strangeness of g_signal_connect

2005-07-25 Thread Colossus
Hi, In my app I have the following: g_signal_connect ((gpointer) AddFile_button, clicked, G_CALLBACK (on_add_files_activate), dummy); I have noticed that if the function on_add_files_activate is declared with only one parameter, gpointer data , I never

Re: strangeness of g_signal_connect

2005-07-25 Thread David Necas (Yeti)
On Mon, Jul 25, 2005 at 09:18:57AM -0700, Colossus wrote: g_signal_connect ((gpointer) AddFile_button, clicked, G_CALLBACK (on_add_files_activate), dummy); I have noticed that if the function on_add_files_activate is declared with only one parameter,

Re: strangeness of g_signal_connect

2005-07-25 Thread Annamalai Gurusami
Colossus [EMAIL PROTECTED] writes: In my app I have the following: g_signal_connect ((gpointer) AddFile_button, clicked, G_CALLBACK (on_add_files_activate), dummy); I normally write the above call like this: g_signal_connect(

Re: strangeness of g_signal_connect

2005-07-25 Thread Colossus
Annamalai Gurusami wrote: g_signal_connect( G_OBJECT(AddFile_button), clicked, G_CALLBACK(on_add_files_activate), dummy); The actual parameters of the callback function is determined by the event and the widget handling the event. Here you are handling the clicked event for

Re: strangeness of g_signal_connect

2005-07-25 Thread Annamalai Gurusami
Colossus [EMAIL PROTECTED] writes: Annamalai Gurusami wrote: g_signal_connect( G_OBJECT(AddFile_button), clicked, G_CALLBACK(on_add_files_activate), dummy); The actual parameters of the callback function is determined by the event and the widget handling the event. Here

im-xim.la does not export GTK+ IM module API

2005-07-25 Thread Jirka Pirko
hi i got following error when compiling gtk - i tried almost everything but error still occurs: Cannot load module /home/peyrak/src/newshot2/kdrive/gtk/gtk+-2.6.8/modules/input/im-xim.la: /home/peyrak/src/newshot2/kdrive/gtk/gtk+-2.6.8/modules/input/.libs/im-xim.so: undefined symbol:

[GObject] Error in unref

2005-07-25 Thread Uzytkownik
I've this check function: #include woc-pager-test.h #include woc-pager-parser.c #define TEST(name, cau) g_print(#name ...\t%s\n, cau ? OK : Fail) void woc_pager_parser_test() { WocPagerParser *parser = NULL; TEST(Check GType, WOC_PAGER_PARSER_TYPE); TEST(Init, parser =

Re: [GObject] Error in unref

2005-07-25 Thread Tristan Van Berkom
Uzytkownik wrote: [...] It's print address, but after it's error of memory. What do you mean by error of memory ? What do I do wrong? finalize isn't calling What does WocPagerParser derive from ? If there is GtkObject in the heirarchy, then gtk_object_sink() needs to be called (or

Re: [GObject] Error in unref

2005-07-25 Thread Tim Müller
On Monday 25 July 2005 10:14, Uzytkownik wrote: #define TEST(name, cau) g_print(#name ...\t%s\n, cau ? OK : Fail) TEST(Init, parser = g_object_new(WOC_PAGER_PARSER_TYPE, NULL)); g_print(%p\n, parser-scanner); g_object_unref(parser); ... It's print address, but after it's error of

calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Hubert Sokołowski
Hi! I have a GtkMenu which I want to popup when a user clicks a button. my function that is called when user clicks the button looks like this void on_zamowienia_button_print_clicked (GtkButton *button, gpointer user_data) { ... } How

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Hubert Sokołowski
ok, button-press-event on the button did the job :) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Tristan Van Berkom
Hubert Sokołowski wrote: Hi! I have a GtkMenu which I want to popup when a user clicks a button. my function that is called when user clicks the button looks like this void on_zamowienia_button_print_clicked (GtkButton *button, gpointer

Window Visibility Signal

2005-07-25 Thread Kevin DeKorte
What Signal is issued when a window becomes visible or invisible. Say I have a window and other window covers it up, is there signal that is emitted or if a window is uncovered? Thanks, Kevin ___ gtk-app-devel-list mailing list

Re: Window Visibility Signal

2005-07-25 Thread Tristan Van Berkom
Kevin DeKorte wrote: What Signal is issued when a window becomes visible or invisible. Say I have a window and other window covers it up, is there signal that is emitted or if a window is uncovered? You'll recieve expose-event whenever X needs to redraw a widget, I think that in cases where

Re: Window Visibility Signal

2005-07-25 Thread Kevin DeKorte
On Monday 25 July 2005 12:22 pm, Tristan Van Berkom wrote: Kevin DeKorte wrote: What Signal is issued when a window becomes visible or invisible. Say I have a window and other window covers it up, is there signal that is emitted or if a window is uncovered? You'll recieve expose-event

Re: [GObject] Error in unref

2005-07-25 Thread Uzytkownik
Dnia 25-07-2005, pon o godzinie 15:21 +0100, Tim Müller napisał(a): On Monday 25 July 2005 10:14, Uzytkownik wrote: #define TEST(name, cau) g_print(#name ...\t%s\n, cau ? OK : Fail) TEST(Init, parser = g_object_new(WOC_PAGER_PARSER_TYPE, NULL)); g_print(%p\n, parser-scanner);

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Greg Breland
On Mon, 2005-07-25 at 11:53, Tristan Van Berkom wrote: I suppose generating the arguments for gtk_menu_popup() is no big deal but why would you want to use a GtkButton to create a context menu ? First, I'm 100% with you on this issue. The product I support does this and it confuses the users

Re: Window Visibility Signal

2005-07-25 Thread Zeeshan Ali
Hello, Expose is no problem, but what about when it is hid? basically I want to know when the window is hid, so I don't draw to it. If you only want to check if a widget is visible or not at a particular time, you'll need to check for the 'visible' property of the widget.

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Tristan Van Berkom
Greg Breland wrote: [...] For example, our product helps users keep track of customers and what they've done for these customers. When our user's phone rings, they instantly hit F6 which is an activity dialog that lets them pick the customer and enter in free form notes. The user is only given

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Greg Breland
This is the best suggestion I've ever heard as a replacement for the horrible button menu hack. Maybe this will keep the parent poster from adding this hack to yet another piece of software. The only downside I could see is if the list is very long. I think for short lists, say 20 then the

Re: Doubt about free or dont free

2005-07-25 Thread Chris Anderson
I wish the API docs would be added a line for _every_ get- or set- function, which explicitly notes whether and how reference counts of associated objects are changed by that function. I second that motion! Actually, I wish it would be a standard for all GNU-style open source projects. I think

Re: Window Visibility Signal

2005-07-25 Thread Kevin DeKorte
On Monday 25 July 2005 12:38 pm, Zeeshan Ali wrote: Hello, Expose is no problem, but what about when it is hid? basically I want to know when the window is hid, so I don't draw to it. If you only want to check if a widget is visible or not at a particular time, you'll need to

Re: Doubt about free or dont free

2005-07-25 Thread Steve Feehan
On Sat, Jul 23, 2005 at 06:29:17PM +0200, Gus Koppel wrote: I wish the API docs would be added a line for _every_ get- or set- function, which explicitly notes whether and how reference counts of associated objects are changed by that function. Take a look at the following wiki page. If

Re: Window Visibility Signal

2005-07-25 Thread Zeeshan Ali
Hello, Nice tip, but unfortunately the expose event does not signal when the object is covered up. Only when revealed. I even hooked event and event-after and nothing was emitted when I covered up the window. Only events were triggered when I moved the mouse into the window and out of it and

Re: Window Visibility Signal

2005-07-25 Thread David Necas (Yeti)
On Mon, Jul 25, 2005 at 01:57:02PM -0600, Kevin DeKorte wrote: Nice tip, but unfortunately the expose event does not signal when the object is covered up. Only when revealed. I even hooked event and event-after and nothing was emitted when I covered up the window. Only events were

Re: Window Visibility Signal

2005-07-25 Thread Tristan Van Berkom
Kevin DeKorte wrote: [...] Nice tip, but unfortunately the expose event does not signal when the object is covered up. Only when revealed. I even hooked event and event-after and nothing was emitted when I covered up the window. Only events were triggered when I moved the mouse into the window

Re: im-xim.la does not export GTK+ IM module API

2005-07-25 Thread David Necas (Yeti)
On Mon, Jul 25, 2005 at 02:52:38PM +0200, Jirka Pirko wrote: i got following error when compiling gtk - i tried almost everything but error still occurs: Cannot load module /home/peyrak/src/newshot2/kdrive/gtk/gtk+-2.6.8/modules/input/im-xim.la:

Re: Is it possible to use int in labels?

2005-07-25 Thread Søren Juul
I got it working with this: int number = 12; char count[128]; sprintf( count, %i, number ); thanks for all the help 2005/7/20, Søren Juul [EMAIL PROTECTED]: Is it possible to use a int in labels? or is it only chars? Søren J ___

Re: Window Visibility Signal

2005-07-25 Thread Kevin DeKorte
On Monday 25 July 2005 02:11 pm, David Necas (Yeti) wrote: On Mon, Jul 25, 2005 at 01:57:02PM -0600, Kevin DeKorte wrote: Nice tip, but unfortunately the expose event does not signal when the object is covered up. Only when revealed. I even hooked event and event-after and nothing was

Re: Doubt about free or dont free

2005-07-25 Thread Stefan Kost
Gus Koppel wrote: While the case of returned const gchar *s is rather simple, the real problem to me is that the API docs are quite less explicit when it comes to more complex objects than just string constants. For instance, whether and how reference counts of objects related to treeviews are