Re: more questions on struct, variables and objects

2006-03-16 Thread David Necas (Yeti)
On Fri, Mar 17, 2006 at 12:35:47AM +0100, Andreas Kotowicz wrote: > so I have > > typedef struct _FooApp > { > gchar *app_name; > > GtkWidget *main_window; > . > . > } FooApp; > > which I use like this: > > FooApp * > create_app (void) > { > FooApp *app; > > app = g_new0 (FooApp, 1

more questions on struct, variables and objects

2006-03-16 Thread Andreas Kotowicz
so I have typedef struct _FooApp { gchar *app_name; GtkWidget *main_window; . . } FooApp; which I use like this: FooApp * create_app (void) { FooApp *app; app = g_new0 (FooApp, 1); app->app_name = g_strdup ("My Foo App"); app->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread Tristan Van Berkom
David Necas (Yeti) wrote: On Thu, Mar 16, 2006 at 03:55:50PM -0500, Tristan Van Berkom wrote: Well, it locks a mutex before accessing the GMainContext; so if gtk+ is compiled with threads... it should work... unless I'm on crack and mutexes are useless from signal handlers... but I dont thin

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread David Necas (Yeti)
On Thu, Mar 16, 2006 at 03:55:50PM -0500, Tristan Van Berkom wrote: > Well, it locks a mutex before accessing the GMainContext; so if gtk+ is > compiled with threads... it should work... unless I'm on crack and mutexes > are useless from signal handlers... but I dont think so. Maybe I'm missing so

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread Tristan Van Berkom
David Necas (Yeti) wrote: On Thu, Mar 16, 2006 at 03:40:08PM -0500, Tristan Van Berkom wrote: Yes sure, but why would you want to use a flag... when you can just call g_idle_add *from the signal hanlder* Is g_idle_add() really reentrant? It does not look so at the first sight.

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread David Necas (Yeti)
On Thu, Mar 16, 2006 at 03:40:08PM -0500, Tristan Van Berkom wrote: > > > Yes sure, but why would you want to use a flag... when you can just call > g_idle_add > *from the signal hanlder* Is g_idle_add() really reentrant? It does not look so at the first sight. Yeti -- That's enough.

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread Tristan Van Berkom
Freddie Unpenstein wrote: That's well over 1548533 executions (I forgot to print the counter after the 10th second) of the idle callback, or 172059 calls to the idler function per second. Personally, I'd call that a busy wait. Its not a busy wait; your idle handler has never returned FAL

Re: I need advises ;)

2006-03-16 Thread Guy Rouillier
Jerome Le Saux wrote: Hi all , I'm a french developer (so sorry for my unusual english ;)). I'm trying to include in a project a GTK2.0 interface. The squeleton of the interface is made, but now I need to plug my code to the interface. First question in a function, I what to put in a Gtk list a C

Re: GtkProgressBar getting blocked

2006-03-16 Thread Gus Koppel
"jim Pharis" wrote: > I have an external synchronous library call that takes a while to > complete. I want to display a progress bar well I'm waiting. > > The problem is, even when the progress bar is in the thread in a loop > calling gtk_progress_bar_pulse, the progress bar still looks like its

Re: GtkProgressBar getting blocked

2006-03-16 Thread Axel Simon
On Thu, 2006-03-16 at 10:09 -0500, jim Pharis wrote: > I have an external synchronous library call that takes a while to > complete. I want to display a progress bar well I'm waiting. > > The problem is, even when the progress bar is in the thread in a loop > calling gtk_progress_bar_pulse, the pr

Re: GtkProgressBar getting blocked

2006-03-16 Thread Daniel Atallah
On 3/16/06, jim Pharis <[EMAIL PROTECTED]> wrote: > I have an external synchronous library call that takes a while to > complete. I want to display a progress bar well I'm waiting. > > The problem is, even when the progress bar is in the thread in a loop > calling gtk_progress_bar_pulse, the progre

GtkProgressBar getting blocked

2006-03-16 Thread jim Pharis
I have an external synchronous library call that takes a while to complete. I want to display a progress bar well I'm waiting. The problem is, even when the progress bar is in the thread in a loop calling gtk_progress_bar_pulse, the progress bar still looks like its frozen. Here is the psuedo code

how to get one character from GtkTextView widget

2006-03-16 Thread gepolv
I connect signal "insert-text" with funciton "deal_insert" ,and then i want to get one character every time from the GtkTextView widget in funciton "deal_insert". how can i do it? the source code: GtkWidget *text_view; text_view = gtk_text_view_new (); GtkTextBuffer *mainbuffer; mainbuffer=gt

I need advises ;)

2006-03-16 Thread Jerome Le Saux
Hi all , I'm a french developer (so sorry for my unusual english ;)). I'm trying to include in a project a GTK2.0 interface. The squeleton of the interface is made, but now I need to plug my code to the interface. First question in a function, I what to put in a Gtk list a C structure which is comp

Re: Hiding Rows in ListStore

2006-03-16 Thread Axel Simon
On Thu, 2006-03-16 at 13:47 +0100, Bellicano Pascal wrote: > Hello, > > Is there a way to hide rows in a GtkListStore ? > > Because I have to search my treeview (list) and show only the lines > containing certain words.. > > But I want my list still clickeable to modify items... > > Then, I m

Hiding Rows in ListStore

2006-03-16 Thread Bellicano Pascal
Hello, Is there a way to hide rows in a GtkListStore ? Because I have to search my treeview (list) and show only the lines containing certain words.. But I want my list still clickeable to modify items... Then, I mean if I copy certain rows to another store when my search box is not empy (

Re: Handling Unix signals in a GTK+ application

2006-03-16 Thread Freddie Unpenstein
> > That's well over 1548533 executions (I forgot to print the > > counter after the 10th second) of the idle callback, or > > 172059 calls to the idler function per second. Personally, > > I'd call that a busy wait. > Its not a busy wait; your idle handler has never returned FALSE; > so whenever

Re:how to validate data entry

2006-03-16 Thread Andrea Zagli
> i want to validate data enry to the entry widget. means, insome > cases i want only digits be allowed to enter to the widget, or some > times only alphabets and digits no other symbol .. ie entering of > unwanted characters need to be blocked. any help > http://gtkmaskedentry.sourceforge.net/

Re: how to validate data entry

2006-03-16 Thread David Necas (Yeti)
On Thu, Mar 16, 2006 at 02:34:26PM +0530, shibu alampatta wrote: > i want to validate data enry to the entry widget. means, insome > cases i want only digits be allowed to enter to the widget, or some > times only alphabets and digits no other symbol .. ie entering of > unwanted characters need

how to validate data entry

2006-03-16 Thread shibu alampatta
hi, i want to validate data enry to the entry widget. means, insome cases i want only digits be allowed to enter to the widget, or some times only alphabets and digits no other symbol .. ie entering of unwanted characters need to be blocked. any help Thks in advance Shibu