[totem] main: Use non-obsolete public functions



commit 5334f6a8cfd4074cd06b971b666707c5ed7ff40f
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 19 09:31:37 2013 +0100

    main: Use non-obsolete public functions

 src/totem-interface.c   |    2 +-
 src/totem-menu.c        |   14 ++++----
 src/totem-object.c      |   86 +++++++++++++++++++++++-----------------------
 src/totem-options.c     |    8 ++--
 src/totem-preferences.c |    2 +-
 src/totem-sidebar.c     |    6 ++--
 src/totem.c             |    4 +-
 7 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/src/totem-interface.c b/src/totem-interface.c
index a088464..459f483 100644
--- a/src/totem-interface.c
+++ b/src/totem-interface.c
@@ -54,7 +54,7 @@ totem_interface_error_dialog (const char *title, const char *reason,
        GtkWidget *error_dialog;
 
        if (reason == NULL)
-               g_warning ("totem_action_error called with reason == NULL");
+               g_warning ("totem_object_action_error called with reason == NULL");
 
        error_dialog =
                gtk_message_dialog_new (NULL,
diff --git a/src/totem-menu.c b/src/totem-menu.c
index bdfbd44..9260e00 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -148,7 +148,7 @@ quit_action_cb (GSimpleAction *action,
                GVariant      *parameter,
                gpointer       user_data)
 {
-       totem_action_exit (TOTEM_OBJECT (user_data));
+       totem_object_action_exit (TOTEM_OBJECT (user_data));
 }
 
 static GActionEntry app_entries[] = {
@@ -473,7 +473,7 @@ on_recent_file_item_activated (GtkAction *action,
        uri = gtk_recent_info_get_uri (recent_info);
        display_name = gtk_recent_info_get_display_name (recent_info);
 
-       totem_add_to_playlist_and_play (totem, uri, display_name);
+       totem_object_add_to_playlist_and_play (totem, uri, display_name);
 }
 
 static gint
@@ -632,13 +632,13 @@ properties_action_callback (GtkAction *action, Totem *totem)
 void
 play_action_callback (GtkAction *action, Totem *totem)
 {
-       totem_action_play_pause (totem);
+       totem_object_action_play_pause (totem);
 }
 
 G_GNUC_NORETURN void
 quit_action_callback (GtkAction *action, Totem *totem)
 {
-       totem_action_exit (totem);
+       totem_object_action_exit (totem);
 }
 
 void
@@ -659,7 +659,7 @@ select_subtitle_action_callback (GtkAction *action, Totem *totem)
 void
 next_angle_action_callback (GtkAction *action, Totem *totem)
 {
-       totem_action_next_angle (totem);
+       totem_object_action_next_angle (totem);
 }
 
 void
@@ -695,13 +695,13 @@ dvd_chapter_menu_action_callback (GtkAction *action, Totem *totem)
 void
 next_chapter_action_callback (GtkAction *action, Totem *totem)
 {
-       TOTEM_PROFILE (totem_action_next (totem));
+       TOTEM_PROFILE (totem_object_action_next (totem));
 }
 
 void
 previous_chapter_action_callback (GtkAction *action, Totem *totem)
 {
-       TOTEM_PROFILE (totem_action_previous (totem));
+       TOTEM_PROFILE (totem_object_action_previous (totem));
 }
 
 void
diff --git a/src/totem-object.c b/src/totem-object.c
index f8ce9a1..2c14de8 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -438,7 +438,7 @@ totem_object_get_property (GObject *object,
                g_value_set_boolean (value, totem_is_fullscreen (totem));
                break;
        case PROP_PLAYING:
-               g_value_set_boolean (value, totem_is_playing (totem));
+               g_value_set_boolean (value, totem_object_is_playing (totem));
                break;
        case PROP_STREAM_LENGTH:
                g_value_set_int64 (value, bacon_video_widget_get_stream_length (totem->bvw));
@@ -447,7 +447,7 @@ totem_object_get_property (GObject *object,
                g_value_set_int64 (value, bacon_video_widget_get_current_time (totem->bvw));
                break;
        case PROP_SEEKABLE:
-               g_value_set_boolean (value, totem_is_seekable (totem));
+               g_value_set_boolean (value, totem_object_is_seekable (totem));
                break;
        case PROP_CURRENT_MRL:
                g_value_set_string (value, totem->mrl);
@@ -939,7 +939,7 @@ reset_seek_status (TotemObject *totem)
                totem_time_label_set_seeking (TOTEM_TIME_LABEL (totem->fs->time_label), FALSE);
                totem->seek_lock = FALSE;
                bacon_video_widget_seek (totem->bvw, 0, NULL);
-               totem_action_stop (totem);
+               totem_object_action_stop (totem);
        }
 }
 
@@ -967,7 +967,7 @@ totem_action_error_and_exit (const char *title,
        reset_seek_status (totem);
        totem_interface_error_blocking (title, reason,
                        GTK_WINDOW (totem->win));
-       totem_action_exit (totem);
+       totem_object_action_exit (totem);
 }
 
 static void
@@ -1111,7 +1111,7 @@ totem_action_menu_popup (TotemObject *totem, guint button)
 G_GNUC_NORETURN gboolean
 main_window_destroy_cb (GtkWidget *widget, GdkEvent *event, TotemObject *totem)
 {
-       totem_action_exit (totem);
+       totem_object_action_exit (totem);
 }
 
 static void
@@ -1231,8 +1231,8 @@ totem_object_action_play (TotemObject *totem)
        msg = g_strdup_printf(_("Totem could not play '%s'."), disp);
        g_free (disp);
 
-       totem_action_error (totem, msg, err->message);
-       totem_action_stop (totem);
+       totem_object_action_error (totem, msg, err->message);
+       totem_object_action_stop (totem);
        g_free (msg);
        g_error_free (err);
 }
@@ -1260,7 +1260,7 @@ totem_action_seek (TotemObject *totem, double pos)
 
                reset_seek_status (totem);
 
-               totem_action_error (totem, msg, err->message);
+               totem_object_action_error (totem, msg, err->message);
                g_free (msg);
                g_error_free (err);
        }
@@ -1273,14 +1273,14 @@ totem_action_seek (TotemObject *totem, double pos)
  * @subtitle: a subtitle file to load, or %NULL
  *
  * Loads the specified @mrl and plays it, if possible.
- * Calls totem_action_set_mrl() then totem_action_play().
+ * Calls totem_action_set_mrl() then totem_object_action_play().
  * For more information, see the documentation for totem_action_set_mrl().
  **/
 void
 totem_action_set_mrl_and_play (TotemObject *totem, const char *mrl, const char *subtitle)
 {
        totem_action_set_mrl (totem, mrl, subtitle);
-       totem_action_play (totem);
+       totem_object_action_play (totem);
 }
 
 static gboolean
@@ -1447,7 +1447,7 @@ totem_action_fullscreen (TotemObject *totem, gboolean state)
        if (totem_is_fullscreen (totem) == state)
                return;
 
-       totem_action_fullscreen_toggle (totem);
+       totem_object_action_fullscreen_toggle (totem);
 }
 
 void
@@ -1831,8 +1831,8 @@ totem_seek_time_rel (TotemObject *totem, gint64 _time, gboolean relative, gboole
                msg = g_strdup_printf(_("Totem could not play '%s'."), disp);
                g_free (disp);
 
-               totem_action_stop (totem);
-               totem_action_error (totem, msg, err->message);
+               totem_object_action_stop (totem);
+               totem_object_action_error (totem, msg, err->message);
                g_free (msg);
                g_error_free (err);
        }
@@ -2005,7 +2005,7 @@ totem_action_show_help (TotemObject *totem)
        GError *error = NULL;
 
        if (gtk_show_uri (gtk_widget_get_screen (totem->win), "help:totem", gtk_get_current_event_time (), 
&error) == FALSE) {
-               totem_action_error (totem, _("Totem could not display the help contents."), error->message);
+               totem_object_action_error (totem, _("Totem could not display the help contents."), 
error->message);
                g_error_free (error);
        }
 }
@@ -2134,7 +2134,7 @@ drop_video_cb (GtkWidget     *widget,
        }
 
        if (action == GDK_ACTION_ASK) {
-               action = totem_drag_ask (totem_get_playlist_length (totem) > 0);
+               action = totem_drag_ask (totem_object_get_playlist_length (totem) > 0);
                gdk_drag_status (context, action, GDK_CURRENT_TIME);
        }
 
@@ -2186,7 +2186,7 @@ drop_playlist_cb (GtkWidget     *widget,
        GdkDragAction action = gdk_drag_context_get_selected_action (context);
 
        if (action == GDK_ACTION_ASK) {
-               action = totem_drag_ask (totem_get_playlist_length (totem) > 0);
+               action = totem_drag_ask (totem_object_get_playlist_length (totem) > 0);
                gdk_drag_status (context, action, GDK_CURRENT_TIME);
        }
 
@@ -2349,7 +2349,7 @@ on_error_event (BaconVideoWidget *bvw, char *message,
        if (playback_stopped)
                play_pause_set_label (totem, STATE_STOPPED);
 
-       totem_action_error (totem, _("An error occurred"), message);
+       totem_object_action_error (totem, _("An error occurred"), message);
 }
 
 static void
@@ -2824,7 +2824,7 @@ totem_object_action_remote (TotemObject *totem, TotemRemoteCommand cmd, const ch
 
        switch (cmd) {
        case TOTEM_REMOTE_COMMAND_PLAY:
-               totem_action_play (totem);
+               totem_object_action_play (totem);
                icon_name = "media-playback-start-symbolic";
                break;
        case TOTEM_REMOTE_COMMAND_PLAYPAUSE:
@@ -2832,7 +2832,7 @@ totem_object_action_remote (TotemObject *totem, TotemRemoteCommand cmd, const ch
                        icon_name = "media-playback-start-symbolic";
                else
                        icon_name = "media-playback-pause-symbolic";
-               totem_action_play_pause (totem);
+               totem_object_action_play_pause (totem);
                break;
        case TOTEM_REMOTE_COMMAND_PAUSE:
                totem_action_pause (totem);
@@ -2843,7 +2843,7 @@ totem_object_action_remote (TotemObject *totem, TotemRemoteCommand cmd, const ch
 
                totem_playlist_set_at_start (totem->playlist);
                update_buttons (totem);
-               totem_action_stop (totem);
+               totem_object_action_stop (totem);
                mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
                if (mrl != NULL) {
                        totem_action_set_mrl (totem, mrl, subtitle);
@@ -2886,18 +2886,18 @@ totem_object_action_remote (TotemObject *totem, TotemRemoteCommand cmd, const ch
                totem_action_volume_relative (totem, VOLUME_DOWN_OFFSET);
                break;
        case TOTEM_REMOTE_COMMAND_NEXT:
-               totem_action_next (totem);
+               totem_object_action_next (totem);
                icon_name = "media-skip-forward-symbolic";
                break;
        case TOTEM_REMOTE_COMMAND_PREVIOUS:
-               totem_action_previous (totem);
+               totem_object_action_previous (totem);
                icon_name = "media-skip-backward-symbolic";
                break;
        case TOTEM_REMOTE_COMMAND_FULLSCREEN:
-               totem_action_fullscreen_toggle (totem);
+               totem_object_action_fullscreen_toggle (totem);
                break;
        case TOTEM_REMOTE_COMMAND_QUIT:
-               totem_action_exit (totem);
+               totem_object_action_exit (totem);
                break;
        case TOTEM_REMOTE_COMMAND_ENQUEUE:
                g_assert (url != NULL);
@@ -3199,7 +3199,7 @@ on_video_button_press_event (BaconVideoWidget *bvw, GdkEventButton *event,
                gtk_widget_grab_focus (GTK_WIDGET (bvw));
                return TRUE;
        } else if (event->type == GDK_2BUTTON_PRESS && event->button == 1) {
-               totem_action_fullscreen_toggle(totem);
+               totem_object_action_fullscreen_toggle (totem);
                return TRUE;
        } else if (event->type == GDK_BUTTON_PRESS && event->button == 2) {
                const char *icon_name;
@@ -3208,7 +3208,7 @@ on_video_button_press_event (BaconVideoWidget *bvw, GdkEventButton *event,
                else
                        icon_name = "media-playback-pause-symbolic";
                totem_fullscreen_show_popups_or_osd (totem->fs, icon_name, FALSE);
-               totem_action_play_pause (totem);
+               totem_object_action_play_pause (totem);
                return TRUE;
        } else if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
                totem_action_menu_popup (totem, event->button);
@@ -3229,13 +3229,13 @@ on_eos_event (GtkWidget *widget, TotemObject *totem)
        if (totem_playlist_has_next_mrl (totem->playlist) == FALSE &&
            totem_playlist_get_repeat (totem->playlist) == FALSE &&
            (totem_playlist_get_last (totem->playlist) != 0 ||
-            totem_is_seekable (totem) == FALSE)) {
+            totem_object_is_seekable (totem) == FALSE)) {
                char *mrl, *subtitle;
 
                /* Set play button status */
                totem_playlist_set_at_start (totem->playlist);
                update_buttons (totem);
-               totem_action_stop (totem);
+               totem_object_action_stop (totem);
                mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
                totem_action_set_mrl (totem, mrl, subtitle);
                bacon_video_widget_pause (totem->bvw);
@@ -3243,16 +3243,16 @@ on_eos_event (GtkWidget *widget, TotemObject *totem)
                g_free (subtitle);
        } else {
                if (totem_playlist_get_last (totem->playlist) == 0 &&
-                   totem_is_seekable (totem)) {
+                   totem_object_is_seekable (totem)) {
                        if (totem_playlist_get_repeat (totem->playlist) != FALSE) {
-                               totem_action_seek_time (totem, 0, FALSE);
-                               totem_action_play (totem);
+                               totem_object_action_seek_time (totem, 0, FALSE);
+                               totem_object_action_play (totem);
                        } else {
                                totem_action_pause (totem);
-                               totem_action_seek_time (totem, 0, FALSE);
+                               totem_object_action_seek_time (totem, 0, FALSE);
                        }
                } else {
-                       totem_action_next (totem);
+                       totem_object_action_next (totem);
                }
        }
 
@@ -3318,7 +3318,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_Back:
        case GDK_KEY_B:
        case GDK_KEY_b:
-               totem_action_previous (totem);
+               totem_object_action_previous (totem);
                icon_name = "media-skip-backward-symbolic";
                break;
        case GDK_KEY_C:
@@ -3329,12 +3329,12 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_F11:
        case GDK_KEY_f:
        case GDK_KEY_F:
-               totem_action_fullscreen_toggle (totem);
+               totem_object_action_fullscreen_toggle (totem);
                break;
        case GDK_KEY_CycleAngle:
        case GDK_KEY_g:
        case GDK_KEY_G:
-               totem_action_next_angle (totem);
+               totem_object_action_next_angle (totem);
                break;
        case GDK_KEY_M:
        case GDK_KEY_m:
@@ -3345,7 +3345,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_N:
        case GDK_KEY_n:
        case GDK_KEY_End:
-               totem_action_next (totem);
+               totem_object_action_next (totem);
                icon_name = "media-skip-forward-symbolic";
                break;
        case GDK_KEY_OpenURL:
@@ -3368,7 +3368,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
                                icon_name = "media-playback-start-symbolic";
                        else
                                icon_name = "media-playback-pause-symbolic";
-                       totem_action_play_pause (totem);
+                       totem_object_action_play_pause (totem);
                }
                break;
        case GDK_KEY_comma:
@@ -3389,7 +3389,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
                break;
        case GDK_KEY_q:
        case GDK_KEY_Q:
-               totem_action_exit (totem);
+               totem_object_action_exit (totem);
                break;
        case GDK_KEY_r:
        case GDK_KEY_R:
@@ -3425,7 +3425,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
                                                icon_name = "media-playback-start-symbolic";
                                        else
                                                icon_name = "media-playback-pause-symbolic";
-                                       totem_action_play_pause (totem);
+                                       totem_object_action_play_pause (totem);
                                } else if (bacon_video_widget_has_menus (totem->bvw) != FALSE) {
                                        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU_SELECT);
                                }
@@ -3504,7 +3504,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_plus:
        case GDK_KEY_KP_Add:
                if (!(event->state & GDK_CONTROL_MASK)) {
-                       totem_action_next (totem);
+                       totem_object_action_next (totem);
                } else {
                        totem_action_set_zoom (totem, TRUE);
                }
@@ -3512,7 +3512,7 @@ totem_action_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_minus:
        case GDK_KEY_KP_Subtract:
                if (!(event->state & GDK_CONTROL_MASK)) {
-                       totem_action_previous (totem);
+                       totem_object_action_previous (totem);
                } else {
                        totem_action_set_zoom (totem, FALSE);
                }
@@ -3975,7 +3975,7 @@ playlist_widget_setup (TotemObject *totem)
        totem->playlist = TOTEM_PLAYLIST (totem_playlist_new ());
 
        if (totem->playlist == NULL)
-               totem_action_exit (totem);
+               totem_object_action_exit (totem);
 
        gtk_widget_show_all (GTK_WIDGET (totem->playlist));
 
diff --git a/src/totem-options.c b/src/totem-options.c
index 5065f07..d676179 100644
--- a/src/totem-options.c
+++ b/src/totem-options.c
@@ -114,7 +114,7 @@ totem_options_process_for_server (Totem                     *totem,
 
        /* Are we quitting ? */
        if (options->quit) {
-               totem_action_remote (totem, TOTEM_REMOTE_COMMAND_QUIT, NULL);
+               totem_object_action_remote (totem, TOTEM_REMOTE_COMMAND_QUIT, NULL);
                return;
        }
 
@@ -135,7 +135,7 @@ totem_options_process_for_server (Totem                     *totem,
                filename = options->filenames[i];
                full_path = totem_create_full_path (filename);
 
-               totem_action_remote (totem, action, full_path ? full_path : filename);
+               totem_object_action_remote (totem, action, full_path ? full_path : filename);
 
                g_free (full_path);
 
@@ -203,13 +203,13 @@ totem_options_process_for_server (Totem                     *totem,
 
        /* No commands, no files, show ourselves */
        if (commands == NULL && options->filenames == NULL) {
-               totem_action_remote (totem, TOTEM_REMOTE_COMMAND_SHOW, NULL);
+               totem_object_action_remote (totem, TOTEM_REMOTE_COMMAND_SHOW, NULL);
                return;
        }
 
        /* Send commands */
        for (l = commands; l != NULL; l = l->next) {
-               totem_action_remote (totem, GPOINTER_TO_INT (l->data), NULL);
+               totem_object_action_remote (totem, GPOINTER_TO_INT (l->data), NULL);
        }
 
        g_list_free (commands);
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 5db656e..a1e0c1a 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -289,7 +289,7 @@ totem_setup_preferences (Totem *totem)
 
        g_return_if_fail (totem->settings != NULL);
 
-       bvw = totem_get_video_widget (totem);
+       bvw = totem_object_get_video_widget (totem);
 
        /* Work-around builder dialogue not parenting properly for
         * On top windows */
diff --git a/src/totem-sidebar.c b/src/totem-sidebar.c
index c042d74..d607c7e 100644
--- a/src/totem-sidebar.c
+++ b/src/totem-sidebar.c
@@ -138,7 +138,7 @@ totem_sidebar_setup (Totem *totem, gboolean visible)
        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (totem->sidebar), FALSE);
 
        action_group = gtk_action_group_new ("SidebarActions");
-       uimanager = totem_get_ui_manager (totem);
+       uimanager = totem_object_get_ui_manager (totem);
        gtk_ui_manager_insert_action_group (uimanager, action_group, -1);
        g_object_set_data (G_OBJECT (totem->sidebar), "sidebar-action-group", action_group);
 
@@ -198,7 +198,7 @@ totem_sidebar_add_page (Totem *totem,
        g_signal_connect (G_OBJECT (action), "activate",
                          G_CALLBACK (action_activated), totem);
 
-       uimanager = totem_get_ui_manager (totem);
+       uimanager = totem_object_get_ui_manager (totem);
        merge_id = gtk_ui_manager_new_merge_id (uimanager);
 
        action_group = g_object_get_data (G_OBJECT (totem->sidebar), "sidebar-action-group");
@@ -267,7 +267,7 @@ totem_sidebar_remove_page (Totem *totem,
                return;
 
        action_group = g_object_get_data (G_OBJECT (totem->sidebar), "sidebar-action-group");
-       uimanager = totem_get_ui_manager (totem);
+       uimanager = totem_object_get_ui_manager (totem);
        gtk_ui_manager_remove_ui (uimanager, merge_id);
        action = gtk_action_group_get_action (action_group, page_id);
        gtk_action_group_remove_action (action_group, action);
diff --git a/src/totem.c b/src/totem.c
index c713d59..8a4201b 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -88,7 +88,7 @@ app_init (Totem *totem, char **argv)
        /* Main window */
        totem->xml = totem_interface_load ("totem.ui", TRUE, NULL, totem);
        if (totem->xml == NULL)
-               totem_action_exit (NULL);
+               totem_object_action_exit (NULL);
 
        totem->win = GTK_WIDGET (gtk_builder_get_object (totem->xml, "totem_main_window"));
        gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (totem->win), TRUE);
@@ -160,7 +160,7 @@ app_init (Totem *totem, char **argv)
                        totem_action_set_mrl (totem, NULL, NULL);
        } else {
                if (totem_action_open_files (totem, optionstate.filenames))
-                       totem_action_play_pause (totem);
+                       totem_object_action_play_pause (totem);
                else
                        totem_action_set_mrl (totem, NULL, NULL);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]