Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2012-04-24 01:22:12 +0400
committerYann Leboulanger <asterix@lagaule.org>2012-04-24 01:22:12 +0400
commit168d3cfda4ee6f6cfaf09563310827242fdd7e08 (patch)
tree2027d3821578496f914fc54e17b4b1a855fcbb69
parent297032e6e62b3cde4179652feee7f94cac25277a (diff)
[Aleksey Rybalkin] improve popup notification behaviour
-rw-r--r--src/dialogs.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dialogs.py b/src/dialogs.py
index 2224397a1..f9dfb325e 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -2748,6 +2748,7 @@ class PopupNotificationWindow:
self.account = account
self.jid = jid
self.msg_type = msg_type
+ self.index = len(gajim.interface.roster.popup_notification_windows)
xml = gtkgui_helpers.get_gtk_builder('popup_notification_window.ui')
self.window = xml.get_object('popup_notification_window')
@@ -2832,12 +2833,15 @@ class PopupNotificationWindow:
self.window.destroy()
if len(gajim.interface.roster.popup_notification_windows) > 0:
- # we want to remove the first window added in the list
- gajim.interface.roster.popup_notification_windows.pop(0)
+ # we want to remove the destroyed window from the list
+ gajim.interface.roster.popup_notification_windows.pop(self.index)
# move the rest of popup windows
gajim.interface.roster.popups_notification_height = 0
+ current_index = 0
for window_instance in gajim.interface.roster.popup_notification_windows:
+ window_instance.index = current_index
+ current_index += 1
window_width, window_height = window_instance.window.get_size()
gajim.interface.roster.popups_notification_height += window_height
window_instance.window.move(gtk.gdk.screen_width() - window_width,