After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 393111 - Add a "Clear Playlist" Edit menu item
Add a "Clear Playlist" Edit menu item
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-01-05 12:10 UTC by Bastien Nocera
Modified: 2007-01-14 23:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.64 KB, patch)
2007-01-09 18:54 UTC, Rene Vahtel
needs-work Details | Review
clear_playlist (3.40 KB, patch)
2007-01-10 17:53 UTC, Rene Vahtel
needs-work Details | Review
clear_playlist (2.89 KB, patch)
2007-01-14 13:42 UTC, Rene Vahtel
none Details | Review

Description Bastien Nocera 2007-01-05 12:10:00 UTC
From bug #164220
Comment 1 Rene Vahtel 2007-01-09 18:54:07 UTC
Created attachment 79877 [details] [review]
patch
Comment 2 Bastien Nocera 2007-01-09 23:36:30 UTC
Good first try, but you should use totem_playlist_get_current() so that the "Clear playlist" button is only sensitive when there are items to clear in the playlist.
Comment 3 Rene Vahtel 2007-01-10 17:53:24 UTC
Created attachment 79973 [details] [review]
clear_playlist

second try, also had to make totem_playlist_update_save_button () non static to make Save playlist button work correctly.
Comment 4 Bastien Nocera 2007-01-14 00:17:35 UTC
Comment on attachment 79973 [details] [review]
clear_playlist

>Index: src/totem-playlist.c
>===================================================================
>--- src/totem-playlist.c	(revision 3855)
>+++ src/totem-playlist.c	(working copy)
>@@ -280,7 +280,7 @@ totem_playlist_is_media (const char *mrl
> 	return FALSE;
> }
> 
>-static void
>+void
> totem_playlist_update_save_button (TotemPlaylist *playlist)

No, totem_playlist_update_save_button should be called after the playlist is cleared in totem_playlist_clear ()
Comment 5 Rene Vahtel 2007-01-14 13:42:31 UTC
Created attachment 80235 [details] [review]
clear_playlist

moved update_save_button ()
Comment 6 Bastien Nocera 2007-01-14 23:47:47 UTC
2007-01-14  Bastien Nocera  <hadess@hadess.net>

        * data/totem-ui.xml:
        * src/totem-menu.c: (clear_playlist_action_callback):
        * src/totem-playlist.c: (totem_playlist_clear):
        * src/totem.c: (totem_action_set_mrl_with_warning):
        Patch from Rene Vahtel <vahtel@starman.ee> to add a "Clear Playlist"
        menu item (Closes: #393111)