diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 794502678..d1d282b41 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -199,6 +199,12 @@ class preference_Window: self.plugin.config['autopopup'] = 1 else: self.plugin.config['autopopup'] = 0 + #autopopupaway + ppaway = self.chk_autoppaway.get_active() + if ppaway == True: + self.plugin.config['autopopupaway'] = 1 + else: + self.plugin.config['autopopupaway'] = 0 #autoaway aw = self.chk_autoaway.get_active() if aw == True: @@ -248,6 +254,7 @@ class preference_Window: self.da_status = self.xml.get_widget('drawing_status') self.combo_iconstyle = self.xml.get_widget('combo_iconstyle') self.chk_autopp = self.xml.get_widget('chk_autopopup') + self.chk_autoppaway = self.xml.get_widget('chk_autopopupaway') self.chk_autoaway = self.xml.get_widget('chk_autoaway') self.spin_autoawaytime = self.xml.get_widget('spin_autoawaytime') self.chk_autoxa = self.xml.get_widget('chk_autoxa') @@ -298,11 +305,17 @@ class preference_Window: self.combo_iconstyle.entry.set_text(self.plugin.config['iconstyle']) #Autopopup - st = 0 + st = 1 if self.plugin.config.has_key('autopopup'): st = self.plugin.config['autopopup'] self.chk_autopp.set_active(st) + #Autopopupaway + st = 1 + if self.plugin.config.has_key('autopopupaway'): + st = self.plugin.config['autopopupaway'] + self.chk_autoppaway.set_active(st) + #Autoaway st = 1 if self.plugin.config.has_key('autoaway'): diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 0688ab11d..646fbe4fc 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -3601,32 +3601,11 @@ messages - + True - False True Allow AutoPopup -when NOT onlie - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - True - checkbutton5 +when NOT online True GTK_RELIEF_NORMAL True diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 7bb072191..d68ea2b7a 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -891,7 +891,9 @@ class roster_Window: else: path = None autopopup = self.plugin.config['autopopup'] - if autopopup == 0 and not \ + autopopupaway = self.plugin.config['autopopupaway'] + if (autopopup == 0 or ( not autopopupaway and \ + self.plugin.connected[account] > 1)) and not \ self.plugin.windows[account]['chats'].has_key(jid): #We save it in a queue if not self.plugin.queues[account].has_key(jid): @@ -1439,6 +1441,7 @@ class plugin: self.queueIN = quIN self.queueOUT = quOUT self.send('ASK_CONFIG', None, ('GtkGui', 'GtkGui', {'autopopup':1,\ + 'autopopupaway':1,\ 'showoffline':0,\ 'autoaway':0,\ 'autoawaytime':10,\