diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-05-30 19:47:27 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-05-30 19:47:27 +0200 |
commit | 40d4b61b75f0ccd8f1e3577f43d6849a187e8f6c (patch) | |
tree | c8165bbdbf6430e801d3333f86e9d6ae09c9f9c4 /src/totem-menu.c | |
parent | c2af2e7bce749760bf7fe23a4690aa8b904562fc (diff) | |
download | totem-40d4b61b75f0ccd8f1e3577f43d6849a187e8f6c.tar.gz |
main: Remove GtkUIManager usage
Plenty of deprecated code gone.
Diffstat (limited to 'src/totem-menu.c')
-rw-r--r-- | src/totem-menu.c | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/src/totem-menu.c b/src/totem-menu.c index af7838918..d17a6d07e 100644 --- a/src/totem-menu.c +++ b/src/totem-menu.c @@ -37,11 +37,6 @@ #include "totem-profile.h" -/* Callback functions for GtkBuilder */ -G_MODULE_EXPORT void play_action_callback (GtkAction *action, Totem *totem); -G_MODULE_EXPORT void next_chapter_action_callback (GtkAction *action, Totem *totem); -G_MODULE_EXPORT void previous_chapter_action_callback (GtkAction *action, Totem *totem); - static void open_action_cb (GSimpleAction *action, GVariant *parameter, @@ -248,6 +243,30 @@ select_subtitle_action_cb (GSimpleAction *action, TOTEM_PLAYLIST_DIALOG_PLAYING); } +static void +play_action_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + totem_object_play_pause (TOTEM_OBJECT (user_data)); +} + +static void +next_chapter_action_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + TOTEM_PROFILE (totem_object_seek_next (TOTEM_OBJECT (user_data))); +} + +static void +previous_chapter_action_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + TOTEM_PROFILE (totem_object_seek_previous (TOTEM_OBJECT (user_data))); +} + static GActionEntry app_entries[] = { /* Main app menu */ { "open", open_action_cb, NULL, NULL, NULL }, @@ -273,6 +292,11 @@ static GActionEntry app_entries[] = { { "zoom", toggle_action_cb, NULL, "false", zoom_action_change_state }, { "next-angle", next_angle_action_cb, NULL, NULL, NULL }, { "eject", eject_action_cb, NULL, NULL, NULL }, + + /* Navigation popup */ + { "play", play_action_cb, NULL, NULL, NULL }, + { "next-chapter", next_chapter_action_cb, NULL, NULL, NULL }, + { "previous-chapter", previous_chapter_action_cb, NULL, NULL, NULL }, }; void @@ -498,30 +522,3 @@ totem_sublang_exit (Totem *totem) g_list_free_full (totem->subtitles_list, g_free); g_list_free_full (totem->languages_list, g_free); } - -void -play_action_callback (GtkAction *action, Totem *totem) -{ - totem_object_play_pause (totem); -} - -void -next_chapter_action_callback (GtkAction *action, Totem *totem) -{ - TOTEM_PROFILE (totem_object_seek_next (totem)); -} - -void -previous_chapter_action_callback (GtkAction *action, Totem *totem) -{ - TOTEM_PROFILE (totem_object_seek_previous (totem)); -} - -void -totem_ui_manager_setup (Totem *totem) -{ - totem->main_action_group = GTK_ACTION_GROUP (gtk_builder_get_object (totem->xml, "main-action-group")); - - totem->ui_manager = GTK_UI_MANAGER (gtk_builder_get_object (totem->xml, "totem-ui-manager")); -} - |