Thread: [Gtk-osx-users] weird menu problem
Status: Beta
Brought to you by:
jralls
From: Olivier S. <oli...@gm...> - 2011-02-06 15:49:39
|
Hi all, I've rebuild my complete gtk environment for osx 10.5/i386 and now I have a weird problem: the menu's are created but I cannot activate them (no submenu pops down). I'm still using the ige-mac-integration library. Any hints where to look for the cause? Thanks, Olivier |
From: John R. <jr...@ce...> - 2011-02-06 17:04:18
|
On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: > Hi all, > > I've rebuild my complete gtk environment for osx 10.5/i386 and now I > have a weird problem: the menu's are created but I cannot activate > them (no submenu pops down). I'm still using the ige-mac-integration > library. Any hints where to look for the cause? If you don't hide the gtk menubar, do the gtk menus work? Regards, John Ralls |
From: Olivier S. <oli...@gm...> - 2011-02-06 20:30:37
|
no difference at all. If I remove the call ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); the menu (now a regular gtk menu) works. the application seems correctly linked: /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib (compatibility version 1.0.0, current version 1.0.0) Olivier 2011/2/6 John Ralls <jr...@ce...>: > > On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: > >> Hi all, >> >> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >> have a weird problem: the menu's are created but I cannot activate >> them (no submenu pops down). I'm still using the ige-mac-integration >> library. Any hints where to look for the cause? > > If you don't hide the gtk menubar, do the gtk menus work? > > Regards, > John Ralls > > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Gtk-osx-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk-osx-users > |
From: John R. <jr...@ce...> - 2011-02-06 22:04:57
|
On Feb 6, 2011, at 12:30 PM, Olivier Sessink wrote: > no difference at all. If I remove the call > ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); > the menu (now a regular gtk menu) works. > > the application seems correctly linked: > /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib > (compatibility version 1.0.0, current version 1.0.0) > > Olivier > > 2011/2/6 John Ralls <jr...@ce...>: >> >> On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: >> >>> Hi all, >>> >>> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >>> have a weird problem: the menu's are created but I cannot activate >>> them (no submenu pops down). I'm still using the ige-mac-integration >>> library. Any hints where to look for the cause? >> >> If you don't hide the gtk menubar, do the gtk menus work? >> When you say "no difference at all", does that mean that the gtk menus are displayed on the window but don't work either? Or that no gtk menus are displayed on the window? Does the test application (you'll need to change the defines at the top so that IGE_MAC_INTEGRATION is defined and the other two are commented out, then rebuild it) work? What version of ige-mac-integration do you have? When did you rebuild, and did you start from scratch (i.e, blow everything away, retrieve the latest gtk-osx-build-setup.sh, run that, run jhbuild bootstrap and jhbuild build)? Regards, John Ralls |
From: Olivier S. <oli...@gm...> - 2011-02-06 22:44:39
|
I removed the complete gtk directory today, downloaded the latest gtk-osx-build-setup.sh, etc., so it's all the latest versions. The menu is not visible at all if I remove the widget_hide(), which looks weird to me. Olivier 2011/2/6 John Ralls <jr...@ce...>: > > On Feb 6, 2011, at 12:30 PM, Olivier Sessink wrote: > >> no difference at all. If I remove the call >> ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); >> the menu (now a regular gtk menu) works. >> >> the application seems correctly linked: >> /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib >> (compatibility version 1.0.0, current version 1.0.0) >> >> Olivier >> >> 2011/2/6 John Ralls <jr...@ce...>: >>> >>> On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: >>> >>>> Hi all, >>>> >>>> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >>>> have a weird problem: the menu's are created but I cannot activate >>>> them (no submenu pops down). I'm still using the ige-mac-integration >>>> library. Any hints where to look for the cause? >>> >>> If you don't hide the gtk menubar, do the gtk menus work? >>> > > When you say "no difference at all", does that mean that the gtk menus are displayed on the window but don't work either? Or that no gtk menus are displayed on the window? > > Does the test application (you'll need to change the defines at the top so that IGE_MAC_INTEGRATION is defined and the other two are commented out, then rebuild it) work? > > What version of ige-mac-integration do you have? When did you rebuild, and did you start from scratch (i.e, blow everything away, retrieve the latest gtk-osx-build-setup.sh, run that, run jhbuild bootstrap and jhbuild build)? > > Regards, > John Ralls > > > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Gtk-osx-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk-osx-users > |
From: Antoine M. <an...@na...> - 2011-02-07 11:48:00
|
Hi Olivier, I have the same problem! Until you mentioned it here I thought that I had broken something (or that my code was causing problems by constantly rebuilding the menus). I've been igoring the issue since the menus are not essential for using my application. Cheers Antoine On 02/07/2011 05:44 AM, Olivier Sessink wrote: > I removed the complete gtk directory today, downloaded the latest > gtk-osx-build-setup.sh, etc., so it's all the latest versions. > > The menu is not visible at all if I remove the widget_hide(), which > looks weird to me. > > Olivier > > 2011/2/6 John Ralls <jr...@ce...>: >> >> On Feb 6, 2011, at 12:30 PM, Olivier Sessink wrote: >> >>> no difference at all. If I remove the call >>> ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); >>> the menu (now a regular gtk menu) works. >>> >>> the application seems correctly linked: >>> /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib >>> (compatibility version 1.0.0, current version 1.0.0) >>> >>> Olivier >>> >>> 2011/2/6 John Ralls <jr...@ce...>: >>>> >>>> On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: >>>> >>>>> Hi all, >>>>> >>>>> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >>>>> have a weird problem: the menu's are created but I cannot activate >>>>> them (no submenu pops down). I'm still using the ige-mac-integration >>>>> library. Any hints where to look for the cause? >>>> >>>> If you don't hide the gtk menubar, do the gtk menus work? >>>> >> >> When you say "no difference at all", does that mean that the gtk menus are displayed on the window but don't work either? Or that no gtk menus are displayed on the window? >> >> Does the test application (you'll need to change the defines at the top so that IGE_MAC_INTEGRATION is defined and the other two are commented out, then rebuild it) work? >> >> What version of ige-mac-integration do you have? When did you rebuild, and did you start from scratch (i.e, blow everything away, retrieve the latest gtk-osx-build-setup.sh, run that, run jhbuild bootstrap and jhbuild build)? >> >> Regards, >> John Ralls >> >> >> >> ------------------------------------------------------------------------------ >> The modern datacenter depends on network connectivity to access resources >> and provide services. The best practices for maximizing a physical server's >> connectivity to a physical network are well understood - see how these >> rules translate into the virtual world? >> http://p.sf.net/sfu/oracle-sfdevnlfb >> _______________________________________________ >> Gtk-osx-users mailing list >> Gtk...@li... >> https://lists.sourceforge.net/lists/listinfo/gtk-osx-users >> > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Gtk-osx-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk-osx-users |
From: John R. <jr...@ce...> - 2011-02-07 18:30:19
|
On Feb 7, 2011, at 3:47 AM, Antoine Martin wrote: > Hi Olivier, > > I have the same problem! Until you mentioned it here I thought that I > had broken something (or that my code was causing problems by constantly > rebuilding the menus). I've been igoring the issue since the menus are > not essential for using my application. > > Cheers > Antoine > > On 02/07/2011 05:44 AM, Olivier Sessink wrote: >> I removed the complete gtk directory today, downloaded the latest >> gtk-osx-build-setup.sh, etc., so it's all the latest versions. >> >> The menu is not visible at all if I remove the widget_hide(), which >> looks weird to me. >> >> Olivier >> >> 2011/2/6 John Ralls <jr...@ce...>: >>> >>> On Feb 6, 2011, at 12:30 PM, Olivier Sessink wrote: >>> >>>> no difference at all. If I remove the call >>>> ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); >>>> the menu (now a regular gtk menu) works. >>>> >>>> the application seems correctly linked: >>>> /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib >>>> (compatibility version 1.0.0, current version 1.0.0) >>>> >>>> Olivier >>>> >>>> 2011/2/6 John Ralls <jr...@ce...>: >>>>> >>>>> On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >>>>>> have a weird problem: the menu's are created but I cannot activate >>>>>> them (no submenu pops down). I'm still using the ige-mac-integration >>>>>> library. Any hints where to look for the cause? >>>>> >>>>> If you don't hide the gtk menubar, do the gtk menus work? >>>>> >>> >>> When you say "no difference at all", does that mean that the gtk menus are displayed on the window but don't work either? Or that no gtk menus are displayed on the window? >>> >>> Does the test application (you'll need to change the defines at the top so that IGE_MAC_INTEGRATION is defined and the other two are commented out, then rebuild it) work? >>> >>> What version of ige-mac-integration do you have? When did you rebuild, and did you start from scratch (i.e, blow everything away, retrieve the latest gtk-osx-build-setup.sh, run that, run jhbuild bootstrap and jhbuild build)? Interesting, and I'm puzzled. I tested this on ige-mac-integration's src/test-integration and it appears to work as it should. Would each of you please do the same? If you can get it to fail, try debugging to see why it fails. Regards, John Ralls |
From: Olivier S. <oli...@gm...> - 2011-02-10 07:50:13
|
I just has the chance to test on a mac again. The test-integration code works as expected. Should I try any older version of ige-mac-integration? (or should I just move to the new library now?) Olivier 2011/2/7 John Ralls <jr...@ce...>: > > On Feb 7, 2011, at 3:47 AM, Antoine Martin wrote: > >> Hi Olivier, >> >> I have the same problem! Until you mentioned it here I thought that I >> had broken something (or that my code was causing problems by constantly >> rebuilding the menus). I've been igoring the issue since the menus are >> not essential for using my application. >> >> Cheers >> Antoine >> >> On 02/07/2011 05:44 AM, Olivier Sessink wrote: >>> I removed the complete gtk directory today, downloaded the latest >>> gtk-osx-build-setup.sh, etc., so it's all the latest versions. >>> >>> The menu is not visible at all if I remove the widget_hide(), which >>> looks weird to me. >>> >>> Olivier >>> >>> 2011/2/6 John Ralls <jr...@ce...>: >>>> >>>> On Feb 6, 2011, at 12:30 PM, Olivier Sessink wrote: >>>> >>>>> no difference at all. If I remove the call >>>>> ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(bfwin->menubar)); >>>>> the menu (now a regular gtk menu) works. >>>>> >>>>> the application seems correctly linked: >>>>> /Users/olivier/gtk/inst/lib/libigemacintegration.0.dylib >>>>> (compatibility version 1.0.0, current version 1.0.0) >>>>> >>>>> Olivier >>>>> >>>>> 2011/2/6 John Ralls <jr...@ce...>: >>>>>> >>>>>> On Feb 6, 2011, at 7:49 AM, Olivier Sessink wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> I've rebuild my complete gtk environment for osx 10.5/i386 and now I >>>>>>> have a weird problem: the menu's are created but I cannot activate >>>>>>> them (no submenu pops down). I'm still using the ige-mac-integration >>>>>>> library. Any hints where to look for the cause? >>>>>> >>>>>> If you don't hide the gtk menubar, do the gtk menus work? >>>>>> >>>> >>>> When you say "no difference at all", does that mean that the gtk menus are displayed on the window but don't work either? Or that no gtk menus are displayed on the window? >>>> >>>> Does the test application (you'll need to change the defines at the top so that IGE_MAC_INTEGRATION is defined and the other two are commented out, then rebuild it) work? >>>> >>>> What version of ige-mac-integration do you have? When did you rebuild, and did you start from scratch (i.e, blow everything away, retrieve the latest gtk-osx-build-setup.sh, run that, run jhbuild bootstrap and jhbuild build)? > > > Interesting, and I'm puzzled. I tested this on ige-mac-integration's src/test-integration and it appears to work as it should. > > Would each of you please do the same? > > If you can get it to fail, try debugging to see why it fails. > > Regards, > John Ralls > > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Gtk-osx-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk-osx-users > |
From: Olivier S. <oli...@gm...> - 2011-02-10 12:17:46
|
I just noticed that test_integration is default built with gtkosxapplication, and not with ige-mac-integration. however, changing the define on top doesn't help, because it doesn't build: test-integration.c: In function ‘view_menu_cb’: test-integration.c:424: error: ‘GtkOSXApplication’ undeclared (first use in this function) I'll see if I can fix that myself. Olivier 2011/2/7 John Ralls <jr...@ce...>: > > Interesting, and I'm puzzled. I tested this on ige-mac-integration's src/test-integration and it appears to work as it should. > > Would each of you please do the same? > > If you can get it to fail, try debugging to see why it fails. > > Regards, > John Ralls > > > ------------------------------------------------------------------------------ > The modern datacenter depends on network connectivity to access resources > and provide services. The best practices for maximizing a physical server's > connectivity to a physical network are well understood - see how these > rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Gtk-osx-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk-osx-users > |
From: John R. <jr...@ce...> - 2011-02-10 17:22:29
|
On Feb 10, 2011, at 4:17 AM, Olivier Sessink wrote: > I just noticed that test_integration is default built with > gtkosxapplication, and not with ige-mac-integration. > > however, changing the define on top doesn't help, because it doesn't build: > > test-integration.c: In function ‘view_menu_cb’: > test-integration.c:424: error: ‘GtkOSXApplication’ undeclared (first > use in this function) > > I'll see if I can fix that myself. > and > I ported bluefish to the new GtkOSXApplication API. The menu now > works, but I get loads of GLib-GObject-CRITICAL **: g_object_get: > assertion `G_IS_OBJECT (object)' failed warnings in the terminal. Any > idea what could cause this? > > Bluefish still uses GtkItemFactory menu's, could that be related? > > 2011/2/7 John Ralls <jr...@ce...>: >> >> Interesting, and I'm puzzled. I tested this on ige-mac-integration's src/test-integration and it appears to work as it should. >> >> Would each of you please do the same? >> >> If you can get it to fail, try debugging to see why it fails. >> There was a problem with building with IGE_MAC_INTEGRATION and QUARTZ_HANDLERS defined, and I just pushed a fix to github. But view_menu_cb is because you've left BUILT_UI defined, and that only works with the GTK_OSXAPPLICATION code; I'll move that declaration into an #ifdef GTK_OSXAPPLICATION block to bulletproof it. You're passing objects to Gtk which aren't GObjects, obviously. If GtkItemFactory somehow produces Gtk widgets which aren't GObjects, yes, that could be it. If you're going to have to redo your UI, you should probably look into doing so with pygobject and the gobject-introspection interface instead of PyGtk... though I haven't yet done so for GtkOSXApplication. Regards, John Ralls |
From: Olivier S. <oli...@gm...> - 2011-02-10 18:04:45
|
2011/2/10 John Ralls <jr...@ce...>: > You're passing objects to Gtk which aren't GObjects, obviously. If GtkItemFactory somehow produces Gtk widgets which aren't GObjects, yes, that could be it. I doubt that, because you can alter menu's created by GtkItemFactory just if they were created as GtkMenu / GtkMenuItem I'm quite sure that the warnings are shown during _sync() calls. Every sync produces the same number of warnings. > If you're going to have to redo your UI, you should probably look into doing so with pygobject and the gobject-introspection interface instead of PyGtk... though I haven't yet done so for GtkOSXApplication. Bluefish is written in C, so that's not really a problem. However, the menu is quite large so there is lots of code and lots of translations involved. We're planning to move to the uimanager API in the next major release. Olivier |
From: John R. <jr...@ce...> - 2011-02-10 19:22:04
|
On Feb 10, 2011, at 10:04 AM, Olivier Sessink wrote: > 2011/2/10 John Ralls <jr...@ce...>: >> You're passing objects to Gtk which aren't GObjects, obviously. If GtkItemFactory somehow produces Gtk widgets which aren't GObjects, yes, that could be it. > > I doubt that, because you can alter menu's created by GtkItemFactory > just if they were created as GtkMenu / GtkMenuItem > > I'm quite sure that the warnings are shown during _sync() calls. Every > sync produces the same number of warnings. > >> If you're going to have to redo your UI, you should probably look into doing so with pygobject and the gobject-introspection interface instead of PyGtk... though I haven't yet done so for GtkOSXApplication. > > Bluefish is written in C, so that's not really a problem. However, the > menu is quite large so there is lots of code and lots of translations > involved. We're planning to move to the uimanager API in the next > major release. Sorry, for some reason I thought that Bluefish was a Python app. Anyway, the best way to track it down is to set a breakpoint on the G_IS_OBJECT macro and see what's getting passed where that trips is. Regards, John Ralls |
From: Richard P. <ric...@gm...> - 2011-02-10 22:07:57
|
On 11/02/2011, at 8:21 AM, John Ralls wrote: [...] > > Anyway, the best way to track it down is to set a breakpoint on the G_IS_OBJECT macro and see what's getting passed where that trips is. I've been wondering how to do this for ages, and this exchange pipped my curiosity. According to http://library.gnome.org/devel/gtk/2.21/gtk-running.html: "--g-fatal-warnings. Make GTK+ abort on all warnings. This is useful to stop on the first warning in a debugger, if your application is printing multiple warnings. It's almost always best to start debugging with the first warning that occurs." I haven't used it yet; it might be an overly blunt instrument. regards, Richard. |
From: Olivier S. <oli...@gm...> - 2011-02-11 22:32:34
|
2011/2/10 Richard Procter <ric...@gm...>: > "--g-fatal-warnings. Make GTK+ abort on all warnings. This is useful to stop on the first warning in a debugger, if your application is printing multiple warnings. It's almost always best to start debugging with the first warning that occurs." great suggestion!!! Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libglib-2.0.0.dylib 0x00e4a903 g_logv + 1342 1 libglib-2.0.0.dylib 0x00e4aa08 g_log + 44 2 libglib-2.0.0.dylib 0x00e4aa42 g_return_if_fail_warning + 56 3 libgobject-2.0.0.dylib 0x00db16cc g_object_get + 139 4 libigemacintegration.0.dylib 0x00234afc cocoa_menu_item_update_accelerator + 161 5 libigemacintegration.0.dylib 0x00234fed cocoa_menu_item_update_accel_closure + 353 6 libigemacintegration.0.dylib 0x00235471 cocoa_menu_item_sync + 248 7 libigemacintegration.0.dylib 0x00235783 cocoa_menu_item_add_item + 734 8 libigemacintegration.0.dylib 0x00235bae cocoa_menu_item_add_submenu + 1060 9 libigemacintegration.0.dylib 0x0023494a cocoa_menu_item_update_submenu + 720 10 libigemacintegration.0.dylib 0x002354a3 cocoa_menu_item_sync + 298 11 libigemacintegration.0.dylib 0x00235783 cocoa_menu_item_add_item + 734 12 libigemacintegration.0.dylib 0x00235bae cocoa_menu_item_add_submenu + 1060 13 libigemacintegration.0.dylib 0x002388cf gtk_osxapplication_set_menu_bar + 688 I found that get_menu_label_text() returns a NULL label once in a while, and that is why g_object_get warns that NULL is not an object. Olivier |
From: John R. <jr...@ce...> - 2011-02-11 23:57:47
|
On Feb 11, 2011, at 2:32 PM, Olivier Sessink wrote: > 2011/2/10 Richard Procter <ric...@gm...>: > >> "--g-fatal-warnings. Make GTK+ abort on all warnings. This is useful to stop on the first warning in a debugger, if your application is printing multiple warnings. It's almost always best to start debugging with the first warning that occurs." > > great suggestion!!! > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libglib-2.0.0.dylib 0x00e4a903 g_logv + 1342 > 1 libglib-2.0.0.dylib 0x00e4aa08 g_log + 44 > 2 libglib-2.0.0.dylib 0x00e4aa42 g_return_if_fail_warning + 56 > 3 libgobject-2.0.0.dylib 0x00db16cc g_object_get + 139 > 4 libigemacintegration.0.dylib 0x00234afc > cocoa_menu_item_update_accelerator + 161 > 5 libigemacintegration.0.dylib 0x00234fed > cocoa_menu_item_update_accel_closure + 353 > 6 libigemacintegration.0.dylib 0x00235471 cocoa_menu_item_sync + 248 > 7 libigemacintegration.0.dylib 0x00235783 cocoa_menu_item_add_item + 734 > 8 libigemacintegration.0.dylib 0x00235bae cocoa_menu_item_add_submenu + 1060 > 9 libigemacintegration.0.dylib 0x0023494a > cocoa_menu_item_update_submenu + 720 > 10 libigemacintegration.0.dylib 0x002354a3 cocoa_menu_item_sync + 298 > 11 libigemacintegration.0.dylib 0x00235783 cocoa_menu_item_add_item + 734 > 12 libigemacintegration.0.dylib 0x00235bae cocoa_menu_item_add_submenu + 1060 > 13 libigemacintegration.0.dylib 0x002388cf > gtk_osxapplication_set_menu_bar + 688 > > I found that get_menu_label_text() returns a NULL label once in a > while, and that is why g_object_get warns that NULL is not an object. Good job. They're probably separators. Anyway, it's an easy thing to fix, pushed to github. Regards, John Ralls |
From: Olivier S. <oli...@gm...> - 2011-02-12 08:43:50
|
On 02/12/2011 12:57 AM, John Ralls wrote: >> I found that get_menu_label_text() returns a NULL label once in a >> while, and that is why g_object_get warns that NULL is not an object. > > Good job. > > They're probably separators. Anyway, it's an easy thing to fix, pushed to github. I use tearoff items in the menu, they are not very often used anymore, so I guess these might be the problem. Olivier |
From: Olivier S. <oli...@gm...> - 2011-02-10 20:24:03
|
2011/2/10 John Ralls <jr...@ce...>: > > On Feb 10, 2011, at 10:04 AM, Olivier Sessink wrote: > >> 2011/2/10 John Ralls <jr...@ce...>: >>> You're passing objects to Gtk which aren't GObjects, obviously. If GtkItemFactory somehow produces Gtk widgets which aren't GObjects, yes, that could be it. >> >> I doubt that, because you can alter menu's created by GtkItemFactory >> just if they were created as GtkMenu / GtkMenuItem >> >> I'm quite sure that the warnings are shown during _sync() calls. Every >> sync produces the same number of warnings. >> >>> If you're going to have to redo your UI, you should probably look into doing so with pygobject and the gobject-introspection interface instead of PyGtk... though I haven't yet done so for GtkOSXApplication. >> >> Bluefish is written in C, so that's not really a problem. However, the >> menu is quite large so there is lots of code and lots of translations >> involved. We're planning to move to the uimanager API in the next >> major release. > > > Sorry, for some reason I thought that Bluefish was a Python app. > > Anyway, the best way to track it down is to set a breakpoint on the G_IS_OBJECT macro and see what's getting passed where that trips is. > you can't break on a macro, can you? I tried a breakpoint on g_object_get, but there are thousands of calls like that. Do you have any idea where in the GtkOSXApplication library this could be called? Olivier |
From: John R. <jr...@ce...> - 2011-02-10 21:37:10
|
On Feb 10, 2011, at 12:23 PM, Olivier Sessink wrote: > 2011/2/10 John Ralls <jr...@ce...>: >> >> On Feb 10, 2011, at 10:04 AM, Olivier Sessink wrote: >> >>> 2011/2/10 John Ralls <jr...@ce...>: >>>> You're passing objects to Gtk which aren't GObjects, obviously. If GtkItemFactory somehow produces Gtk widgets which aren't GObjects, yes, that could be it. >>> >>> I doubt that, because you can alter menu's created by GtkItemFactory >>> just if they were created as GtkMenu / GtkMenuItem >>> >>> I'm quite sure that the warnings are shown during _sync() calls. Every >>> sync produces the same number of warnings. >>> >>>> If you're going to have to redo your UI, you should probably look into doing so with pygobject and the gobject-introspection interface instead of PyGtk... though I haven't yet done so for GtkOSXApplication. >>> >>> Bluefish is written in C, so that's not really a problem. However, the >>> menu is quite large so there is lots of code and lots of translations >>> involved. We're planning to move to the uimanager API in the next >>> major release. >> >> >> Sorry, for some reason I thought that Bluefish was a Python app. >> >> Anyway, the best way to track it down is to set a breakpoint on the G_IS_OBJECT macro and see what's getting passed where that trips is. >> > > you can't break on a macro, can you? I tried a breakpoint on > g_object_get, but there are thousands of calls like that. Do you have > any idea where in the GtkOSXApplication library this could be called? No, you can't break on a macro by name, but you can break on the code inside it. That said, I was thinking that the assert was inside the G_IS_OBJECT macro, and it isn't. It's a g_return_val_if_fail in g_object_get() (gobject/gobject.c line 1847 in the gobject-2-26 branch). But setting a breakpoint on that will hit a bazillion times, so change it to g_assert(G_IS_OBJECT(object)); rebuild (don't for get to build glib with debugging!), run in the debugger, and your program will stop at the first hit. Regards, John Ralls |