Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
a9c5691a by André Apitzsch at 2022-03-08T08:21:12+00:00
Account: Privacy: Update module states on switch

- - - - -


1 changed file:

- gajim/gtk/accounts.py


Changes:

=====================================
gajim/gtk/accounts.py
=====================================
@@ -723,15 +723,18 @@ def __init__(self, account: str) -> None:
         settings = [
             Setting(SettingKind.SWITCH, _('Idle Time'),
                     SettingType.ACCOUNT_CONFIG, 'send_idle_time',
+                    callback=self._send_idle_time,
                     desc=_('Disclose the time of your last activity')),
 
             Setting(SettingKind.SWITCH, _('Local System Time'),
                     SettingType.ACCOUNT_CONFIG, 'send_time_info',
+                    callback=self._send_time_info,
                     desc=_('Disclose the local system time of the '
                            'device Gajim runs on')),
 
             Setting(SettingKind.SWITCH, _('Client / Operating System'),
                     SettingType.ACCOUNT_CONFIG, 'send_os_info',
+                    callback=self._send_os_info,
                     desc=_('Disclose information about the client '
                            'and operating system you currently use')),
 
@@ -813,6 +816,15 @@ def _reset_gc_send_chatstate(button: Gtk.Button) -> None:
         button.set_sensitive(False)
         app.settings.set_group_chat_settings('send_chatstate', None)
 
+    def _send_idle_time(self, state: bool, _data: Any) -> None:
+        
app.connections[self._account].get_module('LastActivity').set_enabled(state)
+
+    def _send_time_info(self, state: bool, _data: Any) -> None:
+        
app.connections[self._account].get_module('EntityTime').set_enabled(state)
+
+    def _send_os_info(self, state: bool, _data: Any) -> None:
+        
app.connections[self._account].get_module('SoftwareVersion').set_enabled(state)
+
     def _publish_tune(self, state: bool, _data: Any) -> None:
         
app.connections[self._account].get_module('UserTune').set_enabled(state)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a9c5691a5c83775a997e55803db843066a412594

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a9c5691a5c83775a997e55803db843066a412594
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to