Add support to be able to remove an alert which is not the top
one on the queue
This commit is contained in:
parent
099d279d7e
commit
60c746ce5a
2
NEWS
2
NEWS
@ -1,3 +1,5 @@
|
|||||||
|
* Add support to be able to remove an alert which is not the top
|
||||||
|
one on the queue (erikos)
|
||||||
* Fullscreen support (hide toolbar and tray) and tray support in activity
|
* Fullscreen support (hide toolbar and tray) and tray support in activity
|
||||||
window (erikos)
|
window (erikos)
|
||||||
|
|
||||||
|
@ -80,13 +80,15 @@ class Window(gtk.Window):
|
|||||||
def remove_alert(self, alert):
|
def remove_alert(self, alert):
|
||||||
if alert in self._alerts:
|
if alert in self._alerts:
|
||||||
self._alerts.remove(alert)
|
self._alerts.remove(alert)
|
||||||
self._vbox.remove(alert)
|
# if the alert is the visible one on top of the queue
|
||||||
if len(self._alerts) >= 1:
|
if alert.get_parent() is not None:
|
||||||
self._vbox.pack_start(self._alerts[0], False)
|
self._vbox.remove(alert)
|
||||||
if self.toolbox is not None:
|
if len(self._alerts) >= 1:
|
||||||
self._vbox.reorder_child(self._alerts[0], 1)
|
self._vbox.pack_start(self._alerts[0], False)
|
||||||
else:
|
if self.toolbox is not None:
|
||||||
self._vbox.reorder_child(self._alert[0], 0)
|
self._vbox.reorder_child(self._alerts[0], 1)
|
||||||
|
else:
|
||||||
|
self._vbox.reorder_child(self._alert[0], 0)
|
||||||
|
|
||||||
def __window_realize_cb(self, window):
|
def __window_realize_cb(self, window):
|
||||||
group = gtk.Window()
|
group = gtk.Window()
|
||||||
|
Loading…
Reference in New Issue
Block a user