Re: Correct way to use the g_connect_signal

2005-12-07 Thread Tomaz Canabrava
ok, just ignore it. i found the problem. tanks 4 all =D -- Um Computador sem Windows é como um Navio sem dançarinas de Can-Can ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Correct way to use the g_connect_signal

2005-12-07 Thread Tomaz Canabrava
Sorry, i sent the message without finishing it... void btnAddRevistaClick(GtkWidget Widget, gpointer data){ addComic *bleh = (addComic *) data; // When i Call this line, the program closes. gtk_widget_show_all(bleh->window); } is anyone there that can help? arx? =p --- Um Computado

Correct way to use the g_connect_signal

2005-12-07 Thread Tomaz Canabrava
hy all.; i'm having a little trouble here, when trying to get the data passed to a funcgion with the g_signal_connect: void btnAddRevistaClick(GtkWidget Widget, gpointer data){ addComic *bleh = (addComic *) data; gtk_widget_show_all(bleh->window); } void mostraGuiPrincipal(GuiPrincipal

Re: get current time / win32: got UTC instead of local time

2005-12-07 Thread HuamiSoft Hubert Sokolowski
On Wed, 7 Dec 2005 20:47:32 + Felix Kater <[EMAIL PROTECTED]> wrote: > Hi, > > to sum up: > > With g_get_current_time() / win32 it seems that I get UTC instead of > the local time. How can I get the local time? > > Long version: > > I use g_get_current_time() / win32 to set GTimeVal and ca

get current time / win32: got UTC instead of local time

2005-12-07 Thread Felix Kater
Hi, to sum up: With g_get_current_time() / win32 it seems that I get UTC instead of the local time. How can I get the local time? Long version: I use g_get_current_time() / win32 to set GTimeVal and calculate the current hour of the day (0-23) like this: hour_of_the_day= my_gtimeval.tv_sec %

Re: signals and threads

2005-12-07 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: [...] Its better to use the gthread api only; while using pthreads directly might work, it wont be portable & it wont be garaunteed to work properly either. Ok. What about a sockets and file io? Glib has such support, but it's more convenient for me to make direct calls

Re: signals and threads

2005-12-07 Thread John Cupitt
On 12/7/05, Dmitry A. Yanko <[EMAIL PROTECTED]> wrote: > On Wed, Dec 07, 2005 at 12:46:28PM -0500, Tristan Van Berkom wrote: > > May I just ask why you think you need to use threads in the > > first place ? > It is more convenient. :) > It is difficult to handle many external events whithout thread

Re: signals and threads

2005-12-07 Thread Dmitry A. Yanko
On Wed, Dec 07, 2005 at 12:46:28PM -0500, Tristan Van Berkom wrote: > May I just ask why you think you need to use threads in the > first place ? It is more convenient. :) It is difficult to handle many external events whithout threads. Each event (data stream) needs own window and set of widgets (

Re: signals and threads

2005-12-07 Thread Daniel Atallah
On 12/7/05, Dmitry A. Yanko <[EMAIL PROTECTED]> wrote: > On Mon, Dec 05, 2005 at 01:50:40PM -0500, Tristan Van Berkom wrote: > > >>You can use g_idle_add() to trigger your UI updates from your data > > >>processing threads. > > > > Every signal callback registered to a GSignal will be called > > wh

Re: signals and threads

2005-12-07 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: On Mon, Dec 05, 2005 at 01:50:40PM -0500, Tristan Van Berkom wrote: [...] My app architecture: Main: g_thread_init(); gdk_threads_init(); Thread_A: gtk_init(); gtk_main(); Thread_B: g_idle_add(); - create window,

Re: signals and threads

2005-12-07 Thread Dmitry A. Yanko
On Mon, Dec 05, 2005 at 01:50:40PM -0500, Tristan Van Berkom wrote: > >>You can use g_idle_add() to trigger your UI updates from your data > >>processing threads. > > Every signal callback registered to a GSignal will be called > when that signal is emitted, in the thread context in which > the si

Re: Reading from a block device without permission

2005-12-07 Thread Olivier Sessink
Marc O'Morain wrote: > Hi there, > > I am currently writing an application that I want to run as > unprivileged user, but I want to read raw data from a block device > such as /dev/sda (the usual block device for USB memory sticks). sda is also the usual device if your primary harddisk is a SATA