code the ignore messages from contacts not in the roster option
This commit is contained in:
parent
3b4a2f748a
commit
4bed9c30b1
|
@ -308,6 +308,9 @@ class preferences_window:
|
||||||
def on_auto_pop_up_away_checkbox_toggled(self, widget):
|
def on_auto_pop_up_away_checkbox_toggled(self, widget):
|
||||||
self.on_checkbutton_toggled(widget, 'autopopupaway')
|
self.on_checkbutton_toggled(widget, 'autopopupaway')
|
||||||
|
|
||||||
|
def on_ignore_events_from_unknown_contacts_checkbutton_toggled(self, widget):
|
||||||
|
self.on_checkbutton_toggled(widget, 'ignore_unknown_contacts')
|
||||||
|
|
||||||
def on_soundplayer_entry_changed(self, widget):
|
def on_soundplayer_entry_changed(self, widget):
|
||||||
self.plugin.config['soundplayer'] = widget.get_text()
|
self.plugin.config['soundplayer'] = widget.get_text()
|
||||||
|
|
||||||
|
|
|
@ -4434,9 +4434,8 @@ on the server as a vCard</property>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="ignore_events_from_contacts_not_in_roster_checkbutton">
|
<widget class="GtkCheckButton" id="ignore_events_from_unknown_contacts_checkbutton">
|
||||||
<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">_Ignore events from contacts not in your roster</property>
|
<property name="label" translatable="yes">_Ignore events from contacts not in your roster</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
@ -4445,7 +4444,7 @@ on the server as a vCard</property>
|
||||||
<property name="active">False</property>
|
<property name="active">False</property>
|
||||||
<property name="inconsistent">False</property>
|
<property name="inconsistent">False</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
<signal name="toggled" handler="on_chk_autopopup_toggled" last_modification_time="Thu, 28 Oct 2004 11:01:25 GMT"/>
|
<signal name="toggled" handler="on_ignore_events_from_unknown_contacts_checkbutton_toggled" last_modification_time="Thu, 10 Mar 2005 23:38:45 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
|
|
@ -3222,6 +3222,9 @@ class plugin:
|
||||||
jid = array[0].split('/')[0]
|
jid = array[0].split('/')[0]
|
||||||
if jid.find("@") <= 0:
|
if jid.find("@") <= 0:
|
||||||
jid = jid.replace('@', '')
|
jid = jid.replace('@', '')
|
||||||
|
if self.config['ignore_unknown_contacts'] and \
|
||||||
|
not self.roster.contacts[account].has_key(jid):
|
||||||
|
return
|
||||||
first = 0
|
first = 0
|
||||||
if not self.windows[account]['chats'].has_key(jid) and \
|
if not self.windows[account]['chats'].has_key(jid) and \
|
||||||
not self.queues[account].has_key(jid):
|
not self.queues[account].has_key(jid):
|
||||||
|
@ -3564,6 +3567,7 @@ class plugin:
|
||||||
'GPG_SECRETE_KEYS', 'ROSTER_INFO', 'MSGSENT'])
|
'GPG_SECRETE_KEYS', 'ROSTER_INFO', 'MSGSENT'])
|
||||||
self.default_config = {'autopopup':1,\
|
self.default_config = {'autopopup':1,\
|
||||||
'autopopupaway':1,\
|
'autopopupaway':1,\
|
||||||
|
'ignore_unknown_contacts':0,\
|
||||||
'showoffline':0,\
|
'showoffline':0,\
|
||||||
'autoaway':1,\
|
'autoaway':1,\
|
||||||
'autoawaytime':10,\
|
'autoawaytime':10,\
|
||||||
|
|
Loading…
Reference in New Issue