[Vala] GLib.debug woe

2012-05-14 Thread Nor Jaidi Tuah
Under 0.17.0 (latest vala), GLib.debug doesn't seem to do anything.

Anything I need to do to make it operational?

hand
Nor Jaidi Tuah


___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] GLib.debug woe

2012-05-14 Thread Jürg Billeter
On Mon, 2012-05-14 at 16:59 +0800, Nor Jaidi Tuah wrote:
 Under 0.17.0 (latest vala), GLib.debug doesn't seem to do anything.
 
 Anything I need to do to make it operational?

This is independent of the Vala version. GLib 2.32 no longer prints
debug messages by default. Set G_MESSAGES_DEBUG=all in the environment
to get the behavior of earlier GLib versions.

Jürg

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] custom widget and File observer

2012-05-14 Thread D.H. Bahr
Hello everyone!

I'm working on a teaching exercise: implementing a LifeStream
application (for those not aware: LifeStream is an alternative for the
desktop metaphor; more info can be found on the book 'Beyond the Desktop
Metaphor' published by MIT Press). 
The application would consist solely on a Stream Browser providing
access to (and only to) user own files, that is: all files within the
user dirs (e.g: Documents, Pictures, Videos, Music, Public, Download and
Home directories, recursively off course).

Since I don't intent to create a full working environment (yet), but
only a stream browser I have come to an issue: how to ensure files not
processed within the application (that is files copied/created using
other file browsers or the command line shell) are included effectively
on the stream data structure. My current bet is placed on the idea I can
create an Observer daemon which is somehow notified that any file on the
specific 'observed' directories has been accessed. Is this even
possible??

The other thing I would like to ask is: I want to create a composite
widget for the visual representation of file streams, something in the
fashion of iTunes where there is the current file in the center of the
screen and at the left of it there's a pile of the previous files and at
the right there's another pile of the next files. Can use clutter for
this?? Anyone has a working sample willing to share with me?

Best regards and thanks for every consideration on this matter,
-- 

 Sw.E. D.H. Bahr
 Nova Desktop Development Leader
  CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba




10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] printing int64 value to standard output

2012-05-14 Thread D.H. Bahr
Hello there, how can I print an int64 variable to stdout??

int64 timestamp = 1234151912;
stdout.printf(%?, timestamp);

Best regards,
-- 

 Sw.E. D.H. Bahr
 Nova Desktop Development Leader
  CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba




10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] printing int64 value to standard output

2012-05-14 Thread Abhijit Hoskeri
On Mon, May 14, 2012 at 10:09 AM, D.H. Bahr db...@uci.cu wrote:
 Hello there, how can I print an int64 variable to stdout??

 int64 timestamp = 1234151912;
 stdout.printf(%?, timestamp);


%lld is the format string you need.

Regards,
Abhijit
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] custom widget and File observer

2012-05-14 Thread Andrea Del Signore
Hi,

On Mon, 2012-05-14 at 08:18 -0400, D.H. Bahr wrote:
 Hello everyone!
 
 I'm working on a teaching exercise: implementing a LifeStream
 application (for those not aware: LifeStream is an alternative for the
 desktop metaphor; more info can be found on the book 'Beyond the
 Desktop
 Metaphor' published by MIT Press). 

Nice!

 The application would consist solely on a Stream Browser providing
 access to (and only to) user own files, that is: all files within the
 user dirs (e.g: Documents, Pictures, Videos, Music, Public, Download
 and
 Home directories, recursively off course).
 
 Since I don't intent to create a full working environment (yet), but
 only a stream browser I have come to an issue: how to ensure files
 not
 processed within the application (that is files copied/created using
 other file browsers or the command line shell) are included
 effectively
 on the stream data structure. My current bet is placed on the idea I
 can
 create an Observer daemon which is somehow notified that any file on
 the
 specific 'observed' directories has been accessed. Is this even
 possible?? 

I think that gio has what are you looking for.
Read here: http://www.valadoc.org/#!api=gio-2.0/GLib.FileMonitor

HTH,
Andrea

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] printing int64 value to standard output

2012-05-14 Thread D.H. Bahr
Thanks!!
El lun, 14-05-2012 a las 10:20 -0700, Abhijit Hoskeri escribió:
 On Mon, May 14, 2012 at 10:09 AM, D.H. Bahr db...@uci.cu wrote:
  Hello there, how can I print an int64 variable to stdout??
 
  int64 timestamp = 1234151912;
  stdout.printf(%?, timestamp);
 
 
 %lld is the format string you need.
 
 Regards,
 Abhijit
 
 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
 INFORMATICAS...
 CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
 
 http://www.uci.cu
 http://www.facebook.com/universidad.uci
 http://www.flickr.com/photos/universidad_uci

-- 

 Sw.E. D.H. Bahr
 Nova Desktop Development Leader
  CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba




10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] printing int64 value to standard output

2012-05-14 Thread jezra
On Mon, 14 May 2012 14:14:47 -0400
D.H. Bahr db...@uci.cu wrote:

 Thanks!!
 El lun, 14-05-2012 a las 10:20 -0700, Abhijit Hoskeri escribió:
  On Mon, May 14, 2012 at 10:09 AM, D.H. Bahr db...@uci.cu wrote:
   Hello there, how can I print an int64 variable to stdout??
  
   int64 timestamp = 1234151912;
   stdout.printf(%?, timestamp);
  
  
  %lld is the format string you need.
  
  Regards,
  Abhijit
  
  10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
  INFORMATICAS... CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
  
  http://www.uci.cu
  http://www.facebook.com/universidad.uci
  http://www.flickr.com/photos/universidad_uci
 

Another option is to use Vala string templates:
int64 timestamp = 1234151912;
stdout.printf(@$timestamp\n);

more examples of using string templates is available at:
http://live.gnome.org/Vala/StringSample
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] custom widget and File observer

2012-05-14 Thread D.H. Bahr
El lun, 14-05-2012 a las 19:39 +0200, Andrea Del Signore escribió:
 Hi,
 
 On Mon, 2012-05-14 at 08:18 -0400, D.H. Bahr wrote:
  Hello everyone!
  
  I'm working on a teaching exercise: implementing a LifeStream
  application (for those not aware: LifeStream is an alternative for the
  desktop metaphor; more info can be found on the book 'Beyond the
  Desktop
  Metaphor' published by MIT Press). 
 
 Nice!
 
  The application would consist solely on a Stream Browser providing
  access to (and only to) user own files, that is: all files within the
  user dirs (e.g: Documents, Pictures, Videos, Music, Public, Download
  and
  Home directories, recursively off course).
  
  Since I don't intent to create a full working environment (yet), but
  only a stream browser I have come to an issue: how to ensure files
  not
  processed within the application (that is files copied/created using
  other file browsers or the command line shell) are included
  effectively
  on the stream data structure. My current bet is placed on the idea I
  can
  create an Observer daemon which is somehow notified that any file on
  the
  specific 'observed' directories has been accessed. Is this even
  possible?? 
 
 I think that gio has what are you looking for.
 Read here: http://www.valadoc.org/#!api=gio-2.0/GLib.FileMonitor
 

Yes, I took a look at that, but It doesn't seem to notify when simple
file access occurs; that is: no modification but just open a PDF
document and read, that action won't be notified. Would it??

 HTH,
 Andrea
 

Best regards,
-- 

 Sw.E. D.H. Bahr
 Nova Desktop Development Leader
  CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba




10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] custom widget and File observer

2012-05-14 Thread Antono Vasiljev

D.H. Bahr db...@uci.cu writes:

  The application would consist solely on a Stream Browser providing
  access to (and only to) user own files, that is: all files within the
  user dirs (e.g: Documents, Pictures, Videos, Music, Public, Download
  and
  Home directories, recursively off course).
  
  Since I don't intent to create a full working environment (yet), but
  only a stream browser I have come to an issue: how to ensure files
  not
  processed within the application (that is files copied/created using
  other file browsers or the command line shell) are included
  effectively
  on the stream data structure. My current bet is placed on the idea I
  can
  create an Observer daemon which is somehow notified that any file on
  the
  specific 'observed' directories has been accessed. Is this even
  possible?? 
 
 I think that gio has what are you looking for.
 Read here: http://www.valadoc.org/#!api=gio-2.0/GLib.FileMonitor
 

 Yes, I took a look at that, but It doesn't seem to notify when simple
 file access occurs; that is: no modification but just open a PDF
 document and read, that action won't be notified. Would it??

You can just pull data from zeitgeist daemon:
http://zeitgeist-project.com/

Its written in vala and i belive it will fit your needs.

Also, gnome-activity-journal provides something similar for different
types of activities.

https://live.gnome.org/GnomeActivityJournal


-- 
http://shelr.tv - screencasting for terminal
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list