GNOME Bugzilla – Bug 742451
Support Undo when removing playlists
Last modified: 2015-02-12 17:16:43 UTC
Mimic Contacts \ Documents behaviour when removing playlist: - instead of remove simply hide playlist from the list - show notification with undo button - if user doesn't click Undo in 20 secs - run the query to actually remove the playlist from tracker DB
Created attachment 294082 [details] [review] Allow undo action to user
Review of attachment 294082 [details] [review]: ::: gnomemusic/view.py @@ +852,3 @@ self.iter_to_clean_model = None self.current_playlist = None + self.pl_todelete = None We store all the playlists about to be deleted, not just the last one ::: gnomemusic/window.py @@ +77,3 @@ self.prev_view = None self.curr_view = None + self.really_delete = True Can we move this part to Playlist? No other view uses notifications (at least yet), so we don't need to clobber this window class with weirdly looking variables @@ +306,3 @@ + def _init_notification(self): + self.notification = Gd.Notification() + self.notification.set_timeout(5) Timeout should be 20 secs, as a user might miss it @@ +313,3 @@ + + undo_button = Gtk.Button.new_with_mnemonic(_("_Undo")) + label = _("Playlist Deleted : %s" %( See other gnome apps: the text should be smth like 'Playlist <name> removed'
Created attachment 294155 [details] [review] Allow undo action to user
Thanks, pushed to master as https://git.gnome.org/browse/gnome-music/commit/?id=0fe6116
Created attachment 296696 [details] [review] bugfix for 'undo playlist deletion': now playlist ACTUALLY deleted from tracker