[totem/wip/hadess/stop-button: 1/3] main: Remove totem_object_stop()



commit e50d6348d0b070e422a990a66f1509543da7645e
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Feb 23 00:44:10 2019 +0100

    main: Remove totem_object_stop()
    
    This API was unusable from outside the core of totem, as it only changed
    the state of a couple of items in the UI, but not all the ones needed to
    have the UI "in the right state".

 docs/reference/totem-sections.txt |  1 -
 src/totem-object.c                | 28 ++++++++++------------------
 src/totem.h                       |  1 -
 3 files changed, 10 insertions(+), 20 deletions(-)
---
diff --git a/docs/reference/totem-sections.txt b/docs/reference/totem-sections.txt
index 4e69c9f3d..bebe5e591 100644
--- a/docs/reference/totem-sections.txt
+++ b/docs/reference/totem-sections.txt
@@ -10,7 +10,6 @@ totem_object_show_error
 totem_object_exit
 totem_object_play
 totem_object_play_pause
-totem_object_stop
 totem_object_seek_next
 totem_object_seek_previous
 totem_object_remote_get_setting
diff --git a/src/totem-object.c b/src/totem-object.c
index 5152fad8b..f97c7d040 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -1236,7 +1236,8 @@ reset_seek_status (TotemObject *totem)
                totem->seek_lock = FALSE;
                bacon_video_widget_unmark_popup_busy (totem->bvw, "seek started");
                bacon_video_widget_seek (totem->bvw, 0, NULL);
-               totem_object_stop (totem);
+               bacon_video_widget_stop (totem->bvw);
+               play_pause_set_label (totem, STATE_STOPPED);
        }
 }
 
@@ -1470,7 +1471,8 @@ totem_object_play (TotemObject *totem)
        g_free (disp);
 
        totem_object_show_error (totem, msg, err->message);
-       totem_object_stop (totem);
+       bacon_video_widget_stop (totem->bvw);
+       play_pause_set_label (totem, STATE_STOPPED);
        g_free (msg);
        g_error_free (err);
 }
@@ -1532,19 +1534,6 @@ totem_object_open_dialog (TotemObject *totem, const char *path)
        return TRUE;
 }
 
-/**
- * totem_object_stop:
- * @totem: a #TotemObject
- *
- * Stops the current stream.
- **/
-void
-totem_object_stop (TotemObject *totem)
-{
-       bacon_video_widget_stop (totem->bvw);
-       play_pause_set_label (totem, STATE_STOPPED);
-}
-
 /**
  * totem_object_play_pause:
  * @totem: a #TotemObject
@@ -2032,7 +2021,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_object_stop (totem);
+               bacon_video_widget_stop (totem->bvw);
+               play_pause_set_label (totem, STATE_STOPPED);
                totem_object_show_error (totem, msg, err->message);
                g_free (msg);
                g_error_free (err);
@@ -2822,7 +2812,8 @@ totem_object_remote_command (TotemObject *totem, TotemRemoteCommand cmd, const c
 
                totem_playlist_set_at_start (totem->playlist);
                update_buttons (totem);
-               totem_object_stop (totem);
+               bacon_video_widget_stop (totem->bvw);
+               play_pause_set_label (totem, STATE_STOPPED);
                mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
                if (mrl != NULL) {
                        totem_object_set_mrl (totem, mrl, subtitle);
@@ -3206,7 +3197,8 @@ on_eos_event (GtkWidget *widget, TotemObject *totem)
                /* Set play button status */
                totem_playlist_set_at_start (totem->playlist);
                update_buttons (totem);
-               totem_object_stop (totem);
+               bacon_video_widget_stop (totem->bvw);
+               play_pause_set_label (totem, STATE_STOPPED);
                mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
                totem_object_set_mrl (totem, mrl, subtitle);
                bacon_video_widget_pause (totem->bvw);
diff --git a/src/totem.h b/src/totem.h
index 69649e0ef..86dbed01c 100644
--- a/src/totem.h
+++ b/src/totem.h
@@ -165,7 +165,6 @@ GType       totem_object_get_type                   (void);
 
 void   totem_object_exit                       (TotemObject *totem) G_GNUC_NORETURN;
 void   totem_object_play                       (TotemObject *totem);
-void   totem_object_stop                       (TotemObject *totem);
 void   totem_object_play_pause                 (TotemObject *totem);
 void   totem_object_pause                      (TotemObject *totem);
 gboolean totem_object_can_seek_next            (TotemObject *totem);


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