[knuckles] do gmail notifications is exposed in PREFS under Misc but only if we have gtalk acct
This commit is contained in:
parent
286be0f9e2
commit
950572c07e
|
@ -447,6 +447,17 @@ class PreferencesWindow:
|
|||
theme_combobox.set_active(i)
|
||||
i += 1
|
||||
self.on_theme_combobox_changed(theme_combobox)
|
||||
|
||||
# Notify user of new gmail e-mail messages,
|
||||
# only show checkbox if user has a gtalk account
|
||||
self.xml.get_widget('notify_gmail_checkbutton').hide()
|
||||
for account in gajim.config.get_per('accounts'):
|
||||
jid = gajim.get_jid_from_account(account)
|
||||
if gajim.get_server_from_jid(jid) == 'gmail.com':
|
||||
st = gajim.config.get('notify_on_new_gmail_email')
|
||||
self.xml.get_widget('notify_gmail_checkbutton').set_active(st)
|
||||
self.xml.get_widget('notify_gmail_checkbutton').show()
|
||||
|
||||
#FIXME: move code from __init__ here
|
||||
|
||||
def on_preferences_window_key_press_event(self, widget, event):
|
||||
|
@ -810,6 +821,9 @@ class PreferencesWindow:
|
|||
def on_send_os_info_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'send_os_info')
|
||||
|
||||
def on_notify_gmail_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email')
|
||||
|
||||
def fill_msg_treeview(self):
|
||||
self.xml.get_widget('delete_msg_button').set_sensitive(False)
|
||||
model = self.msg_tree.get_model()
|
||||
|
|
|
@ -6208,6 +6208,25 @@ Custom</property>
|
|||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="notify_gmail_checkbutton">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Notify on new _Gmail e-mail</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>
|
||||
<signal name="toggled" handler="on_notify_gmail_checkbutton_toggled" last_modification_time="Wed, 06 Apr 2005 14:43:56 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue