[gnome-music] window: Remove close button from notifications
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] window: Remove close button from notifications
- Date: Mon, 13 Mar 2017 21:29:25 +0000 (UTC)
commit a0c5fa0e4095d626cc1902608584c7667a938bbd
Author: theawless <thawless gmail com>
Date: Tue Jan 10 00:31:29 2017 +0530
window: Remove close button from notifications
Removed close buttons from loading and remove playlist notifications,
and removed really_delete which was unnecessarily complicating
behaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=777041
gnomemusic/views/playlistview.py | 1 -
gnomemusic/window.py | 29 -----------------------------
2 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/gnomemusic/views/playlistview.py b/gnomemusic/views/playlistview.py
index 3768bee..5ac5421 100644
--- a/gnomemusic/views/playlistview.py
+++ b/gnomemusic/views/playlistview.py
@@ -124,7 +124,6 @@ class PlaylistView(BaseView):
self._current_playlist_index = None
self.pl_todelete = None
self._pl_todelete_index = None
- self.really_delete = True
self._songs_count = 0
self._update_songs_count()
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 4d27332..a2b47c9 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -114,9 +114,6 @@ class Window(Gtk.ApplicationWindow):
Gtk.RevealerTransitionType.SLIDE_DOWN)
self._overlay.add_overlay(self._loading_notification)
- def hide_notification_cb(button, self):
- self._loading_notification.set_reveal_child(False)
-
grid = Gtk.Grid(margin_bottom=18, margin_start=18, margin_end=18)
grid.set_column_spacing(18)
grid.get_style_context().add_class('app-notification')
@@ -128,12 +125,6 @@ class Window(Gtk.ApplicationWindow):
label = Gtk.Label.new(_("Loading"))
grid.add(label)
- button = Gtk.Button.new_from_icon_name('window-close-symbolic',
- Gtk.IconSize.BUTTON)
- button.get_style_context().add_class('flat')
- button.connect('clicked', hide_notification_cb, self)
- grid.add(button)
-
self._loading_notification.add(grid)
self._loading_notification.show_all()
@@ -156,20 +147,8 @@ class Window(Gtk.ApplicationWindow):
GLib.source_remove(self._playlist_notification_timeout_id)
self._playlist_notification_timeout_id = 0
- # Hide the notification and delete the playlist
- def hide_notification_cb(button, self):
- self._playlist_notification.set_reveal_child(False)
-
- if self.views[3].really_delete:
- playlist.delete_playlist(self.views[3].pl_todelete)
- else:
- self.views[3].really_delete = True
-
- remove_notification_timeout(self)
-
# Undo playlist removal
def undo_remove_cb(button, self):
- self.views[3].really_delete = False
self._playlist_notification.set_reveal_child(False)
self.views[3].undo_playlist_deletion()
@@ -184,13 +163,6 @@ class Window(Gtk.ApplicationWindow):
undo_button.connect("clicked", undo_remove_cb, self)
grid.add(undo_button)
- # Close button
- button = Gtk.Button.new_from_icon_name('window-close-symbolic',
- Gtk.IconSize.BUTTON)
- button.get_style_context().add_class('flat')
- button.connect('clicked', hide_notification_cb, self)
- grid.add(button)
-
self._playlist_notification.add(grid)
self._playlist_notification.show_all()
@@ -399,7 +371,6 @@ class Window(Gtk.ApplicationWindow):
# Callback to remove playlists
def remove_playlist_timeout_cb(self):
# Remove the playlist
- self.views[3].really_delete = False
playlist.delete_playlist(self.views[3].pl_todelete)
# Hide the notification
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]