auto away even if not online option is now available

This commit is contained in:
Yann Leboulanger 2004-06-10 02:54:07 +00:00
parent 4f5312432f
commit 0b4a0b916f
3 changed files with 20 additions and 25 deletions

View File

@ -199,6 +199,12 @@ class preference_Window:
self.plugin.config['autopopup'] = 1 self.plugin.config['autopopup'] = 1
else: else:
self.plugin.config['autopopup'] = 0 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 #autoaway
aw = self.chk_autoaway.get_active() aw = self.chk_autoaway.get_active()
if aw == True: if aw == True:
@ -248,6 +254,7 @@ class preference_Window:
self.da_status = self.xml.get_widget('drawing_status') self.da_status = self.xml.get_widget('drawing_status')
self.combo_iconstyle = self.xml.get_widget('combo_iconstyle') self.combo_iconstyle = self.xml.get_widget('combo_iconstyle')
self.chk_autopp = self.xml.get_widget('chk_autopopup') 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.chk_autoaway = self.xml.get_widget('chk_autoaway')
self.spin_autoawaytime = self.xml.get_widget('spin_autoawaytime') self.spin_autoawaytime = self.xml.get_widget('spin_autoawaytime')
self.chk_autoxa = self.xml.get_widget('chk_autoxa') 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']) self.combo_iconstyle.entry.set_text(self.plugin.config['iconstyle'])
#Autopopup #Autopopup
st = 0 st = 1
if self.plugin.config.has_key('autopopup'): if self.plugin.config.has_key('autopopup'):
st = self.plugin.config['autopopup'] st = self.plugin.config['autopopup']
self.chk_autopp.set_active(st) 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 #Autoaway
st = 1 st = 1
if self.plugin.config.has_key('autoaway'): if self.plugin.config.has_key('autoaway'):

View File

@ -3601,32 +3601,11 @@ messages</property>
</child> </child>
<child> <child>
<widget class="GtkCheckButton" id="checkbutton6"> <widget class="GtkCheckButton" id="chk_autopopupaway">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Allow AutoPopup <property name="label" translatable="yes">Allow AutoPopup
when NOT onlie</property> when NOT online</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton7">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">checkbutton5</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>

View File

@ -891,7 +891,9 @@ class roster_Window:
else: else:
path = None path = None
autopopup = self.plugin.config['autopopup'] 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): self.plugin.windows[account]['chats'].has_key(jid):
#We save it in a queue #We save it in a queue
if not self.plugin.queues[account].has_key(jid): if not self.plugin.queues[account].has_key(jid):
@ -1439,6 +1441,7 @@ class plugin:
self.queueIN = quIN self.queueIN = quIN
self.queueOUT = quOUT self.queueOUT = quOUT
self.send('ASK_CONFIG', None, ('GtkGui', 'GtkGui', {'autopopup':1,\ self.send('ASK_CONFIG', None, ('GtkGui', 'GtkGui', {'autopopup':1,\
'autopopupaway':1,\
'showoffline':0,\ 'showoffline':0,\
'autoaway':0,\ 'autoaway':0,\
'autoawaytime':10,\ 'autoawaytime':10,\