Add GUI option for message carbons

This commit is contained in:
Yann Leboulanger 2014-11-11 16:03:26 +01:00
parent 40a6665a65
commit d3b1e006fb
2 changed files with 25 additions and 1 deletions

View File

@ -572,6 +572,22 @@
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="carbons_checkbutton1">
<property name="label" translatable="yes">Receive conversations from other resources (If server supports it)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_carbons_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="use_ft_proxies_checkbutton1">
<property name="label" translatable="yes">Use file transfer proxies</property>
@ -586,7 +602,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
</object>

View File

@ -1996,6 +1996,8 @@ class AccountsWindow:
self.xml.get_object('sync_with_global_status_checkbutton1').set_active(
gajim.config.get_per('accounts', account,
'sync_with_global_status'))
self.xml.get_object('carbons_checkbutton1').set_active(
gajim.config.get_per('accounts', account, 'enable_message_carbons'))
self.xml.get_object('use_ft_proxies_checkbutton1').set_active(
gajim.config.get_per('accounts', account, 'use_ft_proxies'))
@ -2351,6 +2353,12 @@ class AccountsWindow:
account=self.current_account)
gajim.interface.roster.update_status_combobox()
def on_carbons_checkbutton_toggled(self, widget):
if self.ignore_events:
return
self.on_checkbutton_toggled(widget, 'enable_message_carbons',
account=self.current_account)
def on_use_ft_proxies_checkbutton1_toggled(self, widget):
if self.ignore_events:
return