enable dbus checkbutton disapperas; introducing send chat state notifications checkbutton
This commit is contained in:
parent
334c2bdcf7
commit
4f7281dfea
|
@ -256,6 +256,14 @@ class PreferencesWindow:
|
|||
#Ignore messages from unknown contacts
|
||||
self.xml.get_widget('ignore_events_from_unknown_contacts_checkbutton').\
|
||||
set_active(gajim.config.get('ignore_unknown_contacts'))
|
||||
|
||||
# send chat state notifications
|
||||
st = gajim.config.get('send_chat_state_notifications')
|
||||
btn = self.xml.get_widget('send_chat_state_checkbutton')
|
||||
if st:
|
||||
btn.set_active(True)
|
||||
else:
|
||||
btn.set_active(False)
|
||||
|
||||
#sounds
|
||||
if os.name == 'nt': # if windows, player must not become visible on show_all
|
||||
|
@ -373,15 +381,7 @@ class PreferencesWindow:
|
|||
st = gajim.config.get('check_for_new_version')
|
||||
btn = self.xml.get_widget('check_for_new_version_checkbutton')
|
||||
btn.set_active(st)
|
||||
|
||||
# use dbus
|
||||
st = gajim.config.get('use_dbus')
|
||||
btn = self.xml.get_widget('enable_dbus_checkbutton')
|
||||
if st and self.plugin.remote:
|
||||
btn.set_active(True)
|
||||
else:
|
||||
btn.set_active(False)
|
||||
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
|
||||
self.sound_tree.get_model().connect('row-changed',
|
||||
|
@ -696,6 +696,9 @@ class PreferencesWindow:
|
|||
def on_ignore_events_from_unknown_contacts_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'ignore_unknown_contacts')
|
||||
|
||||
def on_send_chat_state_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'send_chat_state_notifications')
|
||||
|
||||
def on_play_sounds_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'sounds_on',
|
||||
[self.xml.get_widget('soundplayer_hbox'),
|
||||
|
@ -798,20 +801,6 @@ class PreferencesWindow:
|
|||
gajim.config.set('check_for_new_version', widget.get_active())
|
||||
self.plugin.save_config()
|
||||
|
||||
def on_enable_dbus_checkbutton_toggled(self, widget):
|
||||
isactive = widget.get_active()
|
||||
gajim.config.set('use_dbus', isactive)
|
||||
self.plugin.save_config()
|
||||
if isactive:
|
||||
if self.plugin.remote is None:
|
||||
if not self.plugin.enable_dbus():
|
||||
btn = self.xml.get_widget('enable_dbus_checkbutton')
|
||||
btn.set_sensitive(False)
|
||||
btn.set_active(False)
|
||||
else:
|
||||
if self.plugin.remote is not None:
|
||||
self.plugin.disable_dbus()
|
||||
|
||||
def fill_msg_treeview(self):
|
||||
self.xml.get_widget('delete_msg_button').set_sensitive(False)
|
||||
model = self.msg_tree.get_model()
|
||||
|
|
|
@ -4297,6 +4297,27 @@
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="send_chat_state_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">If checked, Gajim will send meta-information related to a conversation you may have with a contact. (Such information are: about you 'typing a message', about you 'having that conversation active or inactive' etc.)</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Send Chat State Noti_fications</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_send_chat_state_checkbutton_toggled" last_modification_time="Tue, 19 Jul 2005 22:51:55 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="sounds_frame">
|
||||
<property name="visible">True</property>
|
||||
|
@ -5531,27 +5552,6 @@ Custom</property>
|
|||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="enable_dbus_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">If checked, Gajim can be controlled by other programs that support DBus</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Enable DBus capabilities</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_enable_dbus_checkbutton_toggled" last_modification_time="Sun, 17 Jul 2005 22:44:29 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