[Campey] We can now position the old-style popup window

This commit is contained in:
Yann Leboulanger 2006-01-21 21:11:29 +00:00
parent 6109fc798e
commit 97378c63ed
2 changed files with 9 additions and 2 deletions

View File

@ -168,6 +168,8 @@ class Config:
'chat_avatar_height': [opt_int, 52],
'roster_avatar_width': [opt_int, 32],
'roster_avatar_height': [opt_int, 32],
'notification_position_x': [opt_int, -1],
'notification_position_y': [opt_int, -1],
'notification_avatar_width': [opt_int, 48],
'notification_avatar_height': [opt_int, 48],
'muc_highlight_words': [opt_str, '', _('A semicolon-separated list of words that will be highlighted in multi-user chat.')],

View File

@ -945,8 +945,13 @@ class PopupNotificationWindow:
# position the window to bottom-right of screen
window_width, self.window_height = self.window.get_size()
gajim.interface.roster.popups_notification_height += self.window_height
self.window.move(gtk.gdk.screen_width() - window_width,
gtk.gdk.screen_height() - gajim.interface.roster.popups_notification_height)
pos_x = gajim.config.get('notification_position_x')
if pos_x < 0:
pos_x = gtk.gdk.screen_width() - window_width + pos_x + 1
pos_y = gajim.config.get('notification_position_y')
if pos_y < 0:
pos_y = gtk.gdk.screen_height() - gajim.interface.roster.popups_notification_height + pos_y + 1
self.window.move(pos_x, pos_y)
xml.signal_autoconnect(self)
self.window.show_all()