Re: why do constructors return GtkWidget?

2009-09-09 Thread Emmanuel Touzery
Hi, There is a technical difference when writing GTK+ code in C; for instance its quite often that you will access methods on the GtkWidgetClass (like show()/hide()/set_sensitive() etc), also many other apis take GtkWidget * argument, namely GtkContainer apis which operate on child widgets.

Re: why do constructors return GtkWidget?

2009-09-09 Thread Emmanuel Touzery
I'm also using the real types in my declarations, though I'm paying the price with casts. And here I mean: GtkMenuItem *dir_or_not = GTK_MENU_ITEM (gtk_menu_item_new_with_label (Or not)); gtk_menu_shell_append (GTK_MENU_SHELL (directory_filter_menu), GTK_WIDGET

Re: why do constructors return GtkWidget?

2009-09-09 Thread Tor Lillqvist
I think that this is from times where people used to build GUIs in the code... When they were writing all the container embedding and all, in C, building their dialogs. Those times are still very much here. For instance in the application that gave GTK+ the G in its name. --tml

Re: why do constructors return GtkWidget?

2009-09-09 Thread Tristan Van Berkom
On Wed, Sep 9, 2009 at 2:53 AM, Emmanuel Touzeryemmanuel.touz...@free.fr wrote: Hi, [...] You know what I'm thinking... I think that this is from times where people used to build GUIs in the code... When they were writing all the container embedding and all, in C, building their dialogs. At

Re: GtkTextView copy-paste default handler problem

2009-09-09 Thread Tuukka Mäkinen
Matthew Talbert wrote: I want to restrict copy and paste to just text format. For this I've connected to copy-clipboard, cut-clipboard and paste-clipboard signals. Unfortunately this doesn't stop default handlers from being called so everything gets copied twice. I added

Re: why do constructors return GtkWidget?

2009-09-09 Thread Carlos Pereira
Tristan Van Berkom wrote: On Wed, Sep 9, 2009 at 2:53 AM, Emmanuel Touzeryemmanuel.touz...@free.fr wrote: Hi, [...] You know what I'm thinking... I think that this is from times where people used to build GUIs in the code... When they were writing all the container embedding and

Re: Idle Function Not Getting Called

2009-09-09 Thread Marshall Lake
I tried G_PRIORITY_HIGH_IDLE with similar results ... the idle function is called only with the following code: g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) idlefunc, NULL, NULL); while (gtk_events_pending ()) gtk_main_iteration (); If the while loop is not part of