diff --git a/src/common/config.py b/src/common/config.py index 19cb1e53f..02b007795 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -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.')], diff --git a/src/dialogs.py b/src/dialogs.py index 51c39ab96..0ea20b0e7 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -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()