Commit 922b1148 authored by Philipp Hörist's avatar Philipp Hörist

Move PEP configuration into accounts menu

parent 211ed18e
Pipeline #4022 failed with stages
in 19 seconds
......@@ -46,6 +46,7 @@ from gajim.gtk.discovery import ServiceDiscoveryWindow
from gajim.gtk.blocking import BlockingList
from gajim.gtk.xml_console import XMLConsoleWindow
from gajim.gtk.groupchat_join import GroupchatJoin
from gajim.gtk.pep_config import ManagePEPServicesWindow
# General Actions
......@@ -190,8 +191,17 @@ def on_import_contacts(action, param):
app.interface.instances['import_contacts'] = \
dialogs.SynchroniseSelectAccountDialog(account)
# Advanced Actions
def on_pep_config(action, param):
account = param.get_string()
window = app.get_app_window(ManagePEPServicesWindow, account=account)
if window is None:
ManagePEPServicesWindow(account)
else:
window.present()
def on_mam_preferences(action, param):
account = param.get_string()
......
......@@ -510,6 +510,7 @@ class GajimApplication(Gtk.Application):
('-xml-console', a.on_xml_console, 'always', 's'),
('-server-info', a.on_server_info, 'online', 's'),
('-archive', a.on_mam_preferences, 'feature', 's'),
('-pep-config', a.on_pep_config, 'online', 's'),
('-sync-history', a.on_history_sync, 'online', 's'),
('-privacylists', a.on_privacy_lists, 'feature', 's'),
('-blocking', a.on_blocking_list, 'feature', 's'),
......
......@@ -677,6 +677,7 @@ def get_account_menu(account):
('-archive', _('Archiving Preferences')),
('-blocking', _('Blocking List')),
('-bookmarks', _('Bookmarks')),
('-pep-config', _('PEP Configuration')),
('-sync-history', _('Synchronise History')),
('-privacylists', _('Privacy Lists')),
('-server-info', _('Server Info')),
......
......@@ -76,7 +76,6 @@ from gajim.gtk.dialogs import CertificateDialog
from gajim.gtk.dialogs import InvitationReceivedDialog
from gajim.gtk.single_message import SingleMessageWindow
from gajim.gtk.add_contact import AddNewContactWindow
from gajim.gtk.pep_config import ManagePEPServicesWindow
from gajim.gtk.account_wizard import AccountCreationWizard
from gajim.gtk.service_registration import ServiceRegistration
from gajim.gtk.discovery import ServiceDiscoveryWindow
......@@ -3498,13 +3497,6 @@ class RosterWindow:
helpers.update_optional_features(account)
def _on_pep_services_menuitem_activate(self, widget, account):
window = app.get_app_window(ManagePEPServicesWindow, account)
if window is None:
ManagePEPServicesWindow(account)
else:
window.present()
def on_add_new_contact(self, widget, account):
AddNewContactWindow(account)
......@@ -4822,15 +4814,6 @@ class RosterWindow:
item.connect('toggled', self.on_publish_location_toggled,
account)
pep_config = Gtk.MenuItem.new_with_label(
_('Configure Services…'))
item = Gtk.SeparatorMenuItem.new()
pep_submenu.append(item)
pep_config.set_sensitive(True)
pep_submenu.append(pep_config)
pep_config.connect('activate',
self._on_pep_services_menuitem_activate, account)
else:
pep_menuitem.set_sensitive(False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment