GNOME Bugzilla – Bug 353560
Totem should use GtkUIManager
Last modified: 2006-09-11 22:06:42 UTC
To simplify menu-handling totem should use the action-based menu API (GtkKUIManager) introduced in GTK+ 2.4.
Created attachment 71908 [details] [review] Patch to introduce GTKUIManager Migrate to GtkUIManager. Add support for GtkRecent.
Comment on attachment 71908 [details] [review] Patch to introduce GTKUIManager <snip> >=== modified file 'configure.in' >--- configure.in 2006-08-24 09:43:54 +0000 >+++ configure.in 2006-08-29 15:41:33 +0000 >@@ -485,6 +485,14 @@ > fi > AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes") > >+dnl Check for GtkRecent >+PKG_CHECK_MODULES(GTK_RECENT, gtk+-2.0 >= 2.10.0, >+ [HAVE_GTK_RECENT=yes], [HAVE_GTK_RECENT=no]) >+if test x$HAVE_GTK_RECENT = xyes; then >+ AC_DEFINE(HAVE_GTK_RECENT, 1, [defined if GtkRecent is available]) >+fi >+AM_CONDITIONAL(HAVE_GTK_RECENT, test x$HAVE_GTK_RECENT = "xyes") >+ No need for HAVE_GTK_RECENT checks. This patch would go in for GNOME 2.17, and we would update the GTK+ requirements to 2.10. <snip> >@@ -77,14 +79,14 @@ > /* skip if empty */ > if (**attr_values) > { >- g_return_if_fail (strlen (*attr_values) == 3); >+ g_return_if_fail (strlen (*attr_values) == 3 || !strcmp (*attr_values, "qaa-qtz")); > ccode_longB = *attr_values; > } > } else if (g_str_equal (*attr_names, "iso_639_2T_code")) { > /* skip if empty */ > if (**attr_values) > { >- g_return_if_fail (strlen (*attr_values) == 3); >+ g_return_if_fail (strlen (*attr_values) == 3 || !strcmp (*attr_values, "qaa-qtz")); What are those changes for? <snip> Wouldn't it be possible to aggregate/consolidate buttons and menu actions? There's also still the matter of bug #171424
ad 1) Ok, updated. ad 2) Nothing related to this patch (there is a 'iso_639_2B_code="qaa-qtz" iso_639_2T_code="qaa-qtz" name="Reserved for local use"' entry in the iso_639.xml file on ubuntu edgy which interfered debugging), removed. ad 3) Aggregation is possible, added.
Created attachment 72040 [details] [review] Updated patch See comment 3.
Could you move the setup of the menu to totem-menu.c (from totem.c's main())? Also, wouldn't there be a way to avoid those huge tables at the top of totem.c?
Created attachment 72212 [details] [review] Updated patch to add UIManager support. Moved menu setup, action tables and action callbacks to totem-menu.c.
There are still a bunch of broken things, like not having volume up/down icons, or no decent icons for the recent files. 2006-09-11 Bastien Nocera <hadess@hadess.net> * configure.in: * data/Makefile.am: * data/popup.glade: * data/totem.glade: * src/Makefile.am: * src/egg-recent-item.c: * src/egg-recent-item.h: * src/egg-recent-model.c: * src/egg-recent-model.h: * src/egg-recent-util.c: * src/egg-recent-util.h: * src/egg-recent-view-gtk.c: * src/egg-recent-view-gtk.h: * src/egg-recent-view.c: * src/egg-recent-view.h: * src/totem-menu.c: (subtitles_changed_callback), (languages_changed_callback), (add_lang_action), (create_lang_actions), (totem_languages_update), (totem_subtitles_update), (on_recent_file_item_activated), (totem_compare_recent_items), (totem_recent_manager_changed_callback), (totem_setup_recent), (totem_action_add_recent), (on_play_disc_activate), (add_device_to_menu), (on_movie_menu_select), (totem_setup_play_disc), (open_action_callback), (open_location_action_callback), (eject_action_callback), (play_action_callback), (quit_action_callback), (take_screenshot_action_callback), (preferences_action_callback), (fullscreen_action_callback), (zoom_1_2_action_callback), (zoom_1_1_action_callback), (zoom_2_1_action_callback), (zoom_in_action_callback), (zoom_reset_action_callback), (zoom_out_action_callback), (next_angle_action_callback), (dvd_root_menu_action_callback), (dvd_title_menu_action_callback), (dvd_audio_menu_action_callback), (dvd_angle_menu_action_callback), (dvd_chapter_menu_action_callback), (next_chapter_action_callback), (previous_chapter_action_callback), (skip_to_action_callback), (skip_forward_action_callback), (skip_backwards_action_callback), (volume_up_action_callback), (volume_down_action_callback), (contents_action_callback), (about_action_callback), (repeat_mode_action_callback), (shuffle_mode_action_callback), (deinterlace_action_callback), (always_on_top_action_callback), (show_controls_action_callback), (show_sidebar_action_callback), (aspect_ratio_changed_callback), (totem_ui_manager_connect_proxy_callback), (totem_ui_manager_setup): * src/totem-menu.h: * src/totem-preferences.c: (deinterlace_changed_cb), (totem_setup_preferences): * src/totem-private.h: * src/totem-sidebar.c: (totem_sidebar_toggle), (toggle_sidebar_from_sidebar), (totem_sidebar_setup): * src/totem-sidebar.h: * src/totem-stock-icons.c: (totem_set_default_icons): * src/totem.c: (totem_action_menu_popup), (play_pause_set_label), (window_state_event_cb), (totem_action_open), (totem_action_open_location), (totem_action_take_screenshot), (totem_action_set_mrl_with_warning), (totem_action_zoom), (totem_action_toggle_aspect_ratio), (totem_action_show_help), (update_seekable), (commit_hide_skip_to), (totem_action_skip_to), (show_controls), (totem_action_toggle_controls), (playlist_repeat_toggle_cb), (playlist_shuffle_toggle_cb), (totem_action_handle_key_press), (update_media_menu_items), (update_buttons), (totem_callback_connect), (main): Huge patch from Jan Arne Petersen <jpetersen@jpetersen.org> to move Totem to GtkUIManager, instead of the old menus (Closes: #353560)