[ioerror and !] add GUI widget for send_time_info option.
don't send client version if send_os_info is False. Fixes #7028
This commit is contained in:
parent
708967a21f
commit
7924407325
|
@ -2567,7 +2567,7 @@ to discover one from server.</property>
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="send_os_info_checkbutton">
|
||||
<property name="label" translatable="yes">Allow _OS information to be sent</property>
|
||||
<property name="label" translatable="yes">Allow client / _OS information to be sent</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
|
@ -2581,6 +2581,24 @@ to discover one from server.</property>
|
|||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="send_time_info_checkbutton">
|
||||
<property name="label" translatable="yes">Allow local system time information to be sent</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">If checked, Gajim will allow others to detect the time on your system</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_send_time_info_checkbutton_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="log_encrypted_chats_checkbutton">
|
||||
<property name="label" translatable="yes">Log _encrypted chat session</property>
|
||||
|
@ -2593,8 +2611,8 @@ to discover one from server.</property>
|
|||
<signal name="toggled" handler="on_log_encrypted_chats_checkbutton_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -2608,8 +2626,8 @@ to discover one from server.</property>
|
|||
<signal name="toggled" handler="on_send_idle_time_checkbutton_toggled"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -1469,13 +1469,18 @@ ConnectionJingle, ConnectionIBBytestream):
|
|||
def _nec_version_request_received(self, obj):
|
||||
if obj.conn.name != self.name:
|
||||
return
|
||||
iq_obj = obj.stanza.buildReply('result')
|
||||
qp = iq_obj.setQuery()
|
||||
qp.setTagData('name', 'Gajim')
|
||||
qp.setTagData('version', gajim.version)
|
||||
send_os = gajim.config.get_per('accounts', self.name, 'send_os_info')
|
||||
if send_os:
|
||||
iq_obj = obj.stanza.buildReply('result')
|
||||
qp = iq_obj.getQuery()
|
||||
qp.setTagData('name', 'Gajim')
|
||||
qp.setTagData('version', gajim.version)
|
||||
qp.setTagData('os', helpers.get_os_info())
|
||||
else:
|
||||
iq_obj = obj.stanza.buildReply('error')
|
||||
err = common.xmpp.ErrorNode(name=common.xmpp.NS_STANZAS + \
|
||||
' service-unavailable')
|
||||
iq_obj.addChild(node=err)
|
||||
self.connection.send(iq_obj)
|
||||
|
||||
def _LastCB(self, con, iq_obj):
|
||||
|
|
|
@ -535,6 +535,14 @@ class PreferencesWindow:
|
|||
else:
|
||||
w.set_active(st)
|
||||
|
||||
# send absolute time info
|
||||
w = self.xml.get_object('send_time_info_checkbutton')
|
||||
st = self.get_per_account_option('send_time_info')
|
||||
if st == 'mixed':
|
||||
w.set_inconsistent(True)
|
||||
else:
|
||||
w.set_active(st)
|
||||
|
||||
# send idle time
|
||||
w = self.xml.get_object('send_idle_time_checkbutton')
|
||||
st = self.get_per_account_option('send_idle_time')
|
||||
|
@ -1166,6 +1174,10 @@ class PreferencesWindow:
|
|||
widget.set_inconsistent(False)
|
||||
self.on_per_account_checkbutton_toggled(widget, 'send_os_info')
|
||||
|
||||
def on_send_time_info_checkbutton_toggled(self, widget):
|
||||
widget.set_inconsistent(False)
|
||||
self.on_per_account_checkbutton_toggled(widget, 'send_time_info')
|
||||
|
||||
def on_send_idle_time_checkbutton_toggled(self, widget):
|
||||
widget.set_inconsistent(False)
|
||||
self.on_per_account_checkbutton_toggled(widget, 'send_idle_time')
|
||||
|
|
Loading…
Reference in New Issue