Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
b134fccf
by Philipp Hörist at 2019-04-20T14:57:56Z
3 changed files:
Changes:
| ... | ... | @@ -1774,78 +1774,6 @@ $T will be replaced by auto-not-available timeout.</property> |
| 1774 | 1774 |
<property name="margin_top">6</property>
|
| 1775 | 1775 |
<property name="orientation">vertical</property>
|
| 1776 | 1776 |
<property name="spacing">6</property>
|
| 1777 |
- <child>
|
|
| 1778 |
- <object class="GtkCheckButton" id="send_idle_time_checkbutton">
|
|
| 1779 |
- <property name="label" translatable="yes">Allow my idle _time to be sent</property>
|
|
| 1780 |
- <property name="visible">True</property>
|
|
| 1781 |
- <property name="can_focus">True</property>
|
|
| 1782 |
- <property name="receives_default">False</property>
|
|
| 1783 |
- <property name="tooltip_text" translatable="yes">If checked, others will be allowed to detect the idle time of your system</property>
|
|
| 1784 |
- <property name="halign">start</property>
|
|
| 1785 |
- <property name="use_underline">True</property>
|
|
| 1786 |
- <property name="draw_indicator">True</property>
|
|
| 1787 |
- <signal name="toggled" handler="on_send_idle_time_checkbutton_toggled" swapped="no"/>
|
|
| 1788 |
- </object>
|
|
| 1789 |
- <packing>
|
|
| 1790 |
- <property name="expand">False</property>
|
|
| 1791 |
- <property name="fill">True</property>
|
|
| 1792 |
- <property name="position">0</property>
|
|
| 1793 |
- </packing>
|
|
| 1794 |
- </child>
|
|
| 1795 |
- <child>
|
|
| 1796 |
- <object class="GtkCheckButton" id="send_time_info_checkbutton">
|
|
| 1797 |
- <property name="label" translatable="yes">_Allow local system time information to be sent</property>
|
|
| 1798 |
- <property name="visible">True</property>
|
|
| 1799 |
- <property name="can_focus">True</property>
|
|
| 1800 |
- <property name="receives_default">False</property>
|
|
| 1801 |
- <property name="tooltip_text" translatable="yes">If checked, others will be allowed to detect the local time on your system</property>
|
|
| 1802 |
- <property name="halign">start</property>
|
|
| 1803 |
- <property name="use_underline">True</property>
|
|
| 1804 |
- <property name="draw_indicator">True</property>
|
|
| 1805 |
- <signal name="toggled" handler="on_send_time_info_checkbutton_toggled" swapped="no"/>
|
|
| 1806 |
- </object>
|
|
| 1807 |
- <packing>
|
|
| 1808 |
- <property name="expand">False</property>
|
|
| 1809 |
- <property name="fill">True</property>
|
|
| 1810 |
- <property name="position">1</property>
|
|
| 1811 |
- </packing>
|
|
| 1812 |
- </child>
|
|
| 1813 |
- <child>
|
|
| 1814 |
- <object class="GtkCheckButton" id="send_os_info_checkbutton">
|
|
| 1815 |
- <property name="label" translatable="yes">Allow client / _OS information to be sent</property>
|
|
| 1816 |
- <property name="visible">True</property>
|
|
| 1817 |
- <property name="can_focus">True</property>
|
|
| 1818 |
- <property name="receives_default">False</property>
|
|
| 1819 |
- <property name="tooltip_text" translatable="yes">If checked, others will be allowed to detect the operating system you are using</property>
|
|
| 1820 |
- <property name="halign">start</property>
|
|
| 1821 |
- <property name="use_underline">True</property>
|
|
| 1822 |
- <property name="draw_indicator">True</property>
|
|
| 1823 |
- <signal name="toggled" handler="on_send_os_info_checkbutton_toggled" swapped="no"/>
|
|
| 1824 |
- </object>
|
|
| 1825 |
- <packing>
|
|
| 1826 |
- <property name="expand">False</property>
|
|
| 1827 |
- <property name="fill">True</property>
|
|
| 1828 |
- <property name="position">2</property>
|
|
| 1829 |
- </packing>
|
|
| 1830 |
- </child>
|
|
| 1831 |
- <child>
|
|
| 1832 |
- <object class="GtkCheckButton" id="ignore_events_from_unknown_contacts_checkbutton">
|
|
| 1833 |
- <property name="label" translatable="yes">_Ignore events from contacts not in the roster</property>
|
|
| 1834 |
- <property name="visible">True</property>
|
|
| 1835 |
- <property name="can_focus">True</property>
|
|
| 1836 |
- <property name="receives_default">False</property>
|
|
| 1837 |
- <property name="tooltip_text" translatable="yes">If checked, incoming events from unauthorized contacts will be ignored. Use with caution, because it blocks all messages from any contact that is not in the roster.</property>
|
|
| 1838 |
- <property name="halign">start</property>
|
|
| 1839 |
- <property name="use_underline">True</property>
|
|
| 1840 |
- <property name="draw_indicator">True</property>
|
|
| 1841 |
- <signal name="toggled" handler="on_ignore_events_from_unknown_contacts_checkbutton_toggled" swapped="no"/>
|
|
| 1842 |
- </object>
|
|
| 1843 |
- <packing>
|
|
| 1844 |
- <property name="expand">False</property>
|
|
| 1845 |
- <property name="fill">True</property>
|
|
| 1846 |
- <property name="position">3</property>
|
|
| 1847 |
- </packing>
|
|
| 1848 |
- </child>
|
|
| 1849 | 1777 |
<child>
|
| 1850 | 1778 |
<object class="GtkBox">
|
| 1851 | 1779 |
<property name="visible">True</property>
|
| ... | ... | @@ -1897,7 +1825,7 @@ $T will be replaced by auto-not-available timeout.</property> |
| 1897 | 1825 |
<packing>
|
| 1898 | 1826 |
<property name="expand">False</property>
|
| 1899 | 1827 |
<property name="fill">True</property>
|
| 1900 |
- <property name="position">4</property>
|
|
| 1828 |
+ <property name="position">0</property>
|
|
| 1901 | 1829 |
</packing>
|
| 1902 | 1830 |
</child>
|
| 1903 | 1831 |
</object>
|
| ... | ... | @@ -575,9 +575,13 @@ class AccountPage(GenericSettingPage): |
| 575 | 575 |
|
| 576 | 576 |
general = partial(
|
| 577 | 577 |
self.set_page, GeneralPage(account, self), 'general')
|
| 578 |
+ |
|
| 578 | 579 |
connection = partial(
|
| 579 | 580 |
self.set_page, ConnectionPage(account, self), 'connection')
|
| 580 | 581 |
|
| 582 |
+ privacy = partial(
|
|
| 583 |
+ self.set_page, PrivacyPage(account, self), 'privacy')
|
|
| 584 |
+ |
|
| 581 | 585 |
settings = [
|
| 582 | 586 |
Setting(SettingKind.ENTRY, _('Label'),
|
| 583 | 587 |
SettingType.ACCOUNT_CONFIG, 'account_label',
|
| ... | ... | @@ -592,6 +596,9 @@ class AccountPage(GenericSettingPage): |
| 592 | 596 |
Setting(SettingKind.CALLBACK, _('General'),
|
| 593 | 597 |
name='general', props={'callback': general}),
|
| 594 | 598 |
|
| 599 |
+ Setting(SettingKind.CALLBACK, _('Privacy'),
|
|
| 600 |
+ name='privacy', props={'callback': privacy}),
|
|
| 601 |
+ |
|
| 595 | 602 |
Setting(SettingKind.CALLBACK, _('Connection'),
|
| 596 | 603 |
name='connection', props={'callback': connection}),
|
| 597 | 604 |
|
| ... | ... | @@ -644,6 +651,33 @@ class GeneralPage(GenericSettingPage): |
| 644 | 651 |
GenericSettingPage.__init__(self, account, parent, settings)
|
| 645 | 652 |
|
| 646 | 653 |
|
| 654 |
+class PrivacyPage(GenericSettingPage):
|
|
| 655 |
+ def __init__(self, account, parent=None):
|
|
| 656 |
+ |
|
| 657 |
+ settings = [
|
|
| 658 |
+ Setting(SettingKind.SWITCH, _('Idle Time'),
|
|
| 659 |
+ SettingType.ACCOUNT_CONFIG, 'send_idle_time',
|
|
| 660 |
+ desc=_('Disclose the time of your last activity')),
|
|
| 661 |
+ |
|
| 662 |
+ Setting(SettingKind.SWITCH, _('Local System Time'),
|
|
| 663 |
+ SettingType.ACCOUNT_CONFIG, 'send_time_info',
|
|
| 664 |
+ desc=_('Disclose the local system time of the '
|
|
| 665 |
+ 'device Gajim runs on')),
|
|
| 666 |
+ |
|
| 667 |
+ Setting(SettingKind.SWITCH, _('Client / Operating System'),
|
|
| 668 |
+ SettingType.ACCOUNT_CONFIG, 'send_os_info',
|
|
| 669 |
+ desc=_('Disclose informations about the client '
|
|
| 670 |
+ 'and operating system you currently use')),
|
|
| 671 |
+ |
|
| 672 |
+ Setting(SettingKind.SWITCH, _('Ignore Unknown Contacts'),
|
|
| 673 |
+ SettingType.ACCOUNT_CONFIG, 'ignore_unknown_contacts',
|
|
| 674 |
+ desc=_('Ignore everything from contacts not in your '
|
|
| 675 |
+ 'Roster')),
|
|
| 676 |
+ |
|
| 677 |
+ ]
|
|
| 678 |
+ GenericSettingPage.__init__(self, account, parent, settings)
|
|
| 679 |
+ |
|
| 680 |
+ |
|
| 647 | 681 |
class ConnectionPage(GenericSettingPage):
|
| 648 | 682 |
def __init__(self, account, parent=None):
|
| 649 | 683 |
|
| ... | ... | @@ -282,34 +282,6 @@ class Preferences(Gtk.ApplicationWindow): |
| 282 | 282 |
buf.connect('end-user-action', self.on_msg_textview_changed)
|
| 283 | 283 |
|
| 284 | 284 |
### Privacy tab ###
|
| 285 |
- # Send idle time
|
|
| 286 |
- st = self.get_per_account_option('send_idle_time')
|
|
| 287 |
- if st == 'mixed':
|
|
| 288 |
- self._ui.send_idle_time_checkbutton.set_inconsistent(True)
|
|
| 289 |
- else:
|
|
| 290 |
- self._ui.send_idle_time_checkbutton.set_active(st)
|
|
| 291 |
- |
|
| 292 |
- # Send absolute time info
|
|
| 293 |
- st = self.get_per_account_option('send_time_info')
|
|
| 294 |
- if st == 'mixed':
|
|
| 295 |
- self._ui.send_time_info_checkbutton.set_inconsistent(True)
|
|
| 296 |
- else:
|
|
| 297 |
- self._ui.send_time_info_checkbutton.set_active(st)
|
|
| 298 |
- |
|
| 299 |
- # Send OS info
|
|
| 300 |
- st = self.get_per_account_option('send_os_info')
|
|
| 301 |
- if st == 'mixed':
|
|
| 302 |
- self._ui.send_os_info_checkbutton.set_inconsistent(True)
|
|
| 303 |
- else:
|
|
| 304 |
- self._ui.send_os_info_checkbutton.set_active(st)
|
|
| 305 |
- |
|
| 306 |
- # Ignore messages from unknown contacts
|
|
| 307 |
- st = self.get_per_account_option('ignore_unknown_contacts')
|
|
| 308 |
- if st == 'mixed':
|
|
| 309 |
- self._ui.ignore_events_from_unknown_contacts_checkbutton.set_inconsistent(True)
|
|
| 310 |
- else:
|
|
| 311 |
- self._ui.ignore_events_from_unknown_contacts_checkbutton.set_active(st)
|
|
| 312 |
- |
|
| 313 | 285 |
# Outgoing chat state notifications
|
| 314 | 286 |
st = app.config.get('outgoing_chat_state_notifications')
|
| 315 | 287 |
if st == 'all':
|