GNOME Bugzilla – Bug 454242
Move UIManager code to GtkBuilder
Last modified: 2007-10-06 13:28:00 UTC
SSIA.
Created attachment 92212 [details] [review] Move UIManager stuff to GtkBuilder (not yet working) This patch has most of the grunt work done, but it's not quite working (there are some possible memory bugs), and some work still needs to be done to re-enable the LTR-/RTL-dependent actions.
Created attachment 92222 [details] [review] Move UIManager stuff to GtkBuilder This patch fixes all the issues I can find, and should be pretty much ready for committing.
Created attachment 92406 [details] [review] Move UIManager stuff to GtkBuilder (updated) This patch fixes a Makefile issue I introduced, and also moves the playlist UIManager stuff to GtkBuilder.
I've just noticed I made a typo with the "gtk-preferences" stock ID. I'll submit a new patch once I've got the actions which use custom stock items working, as I've just noticed they're not displaying icons. :-\
Created attachment 92420 [details] [review] Move UIManager stuff to GtkBuilder (updated) There we go. Everything should be finished and working in this patch. :-)
Created attachment 96239 [details] [review] Move UIManager stuff to GtkBuilder (updated) Here's a version updated to SVN head.
Comment on attachment 96239 [details] [review] Move UIManager stuff to GtkBuilder (updated) >Index: src/backend/bacon-video-widget.h >=================================================================== >--- src/backend/bacon-video-widget.h (revision 4735) >+++ src/backend/bacon-video-widget.h (working copy) >@@ -238,11 +238,11 @@ > } BaconVideoWidgetVideoProperty; > > typedef enum { >- BVW_RATIO_AUTO, >- BVW_RATIO_SQUARE, >- BVW_RATIO_FOURBYTHREE, >- BVW_RATIO_ANAMORPHIC, >- BVW_RATIO_DVB >+ BVW_RATIO_AUTO = 1, >+ BVW_RATIO_SQUARE = 2, >+ BVW_RATIO_FOURBYTHREE = 3, >+ BVW_RATIO_ANAMORPHIC = 4, >+ BVW_RATIO_DVB = 5 > } BaconVideoWidgetAspectRatio; What's 0 used for? What's the point of an enum where we list the values, might as well used defines. Rest looks alright, needs testing obviously.
Unfortunately we have to list the values in the enum so that they can be referenced in the UI file; it doesn't like the enum names. Numbering can start with 0 if you want, but I thought we could reserve that for "unknown". :-)
I think you need to register the enum with the GType system, just like you did for the ones that needed it in the bindings.
I've talked to Johan about this, and it currently isn't supported in GtkBuilder; only integers are allowed, so this hack has to remain. There's little possibility of adding support for using enums in this situation to GtkBuilder, as it would have to search through every single GEnumClass to find the right enum, which would be too inefficient.
Could you just change that to start at 0 then. Looks ok to commit afterwards.
2007-10-06 Philip Withnall <pwithnall@svn.gnome.org> * data/Makefile.am: * data/playlist-ui.xml: * data/playlist.ui: * data/totem-ui.xml: * data/totem.ui: * src/backend/bacon-video-widget.h: * src/totem-menu.c: (totem_ui_manager_setup): * src/totem-playlist.c: (playlist_copy_location_action_callback), (playlist_remove_action_callback), (totem_playlist_init): * src/totem.c: (update_seekable), (totem_callback_connect): Move UIManager stuff to GtkBuilder (Closes: #454242)