Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
onboard
onboard-remove-dep-typelib-appindicator3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File onboard-remove-dep-typelib-appindicator3.patch of Package onboard
Index: onboard-1.4.1/Onboard/Indicator.py =================================================================== --- onboard-1.4.1.orig/Onboard/Indicator.py +++ onboard-1.4.1/Onboard/Indicator.py @@ -174,15 +174,10 @@ class Indicator(): # auto-detection sip = config.get_preferred_statusicon_provider() - if sip == StatusIconProviderEnum.GtkStatusIcon: - backends = [BackendGtkStatusIcon] - elif sip == StatusIconProviderEnum.AppIndicator: - backends = [BackendAppIndicator, BackendGtkStatusIcon] - elif sip is None: + if sip is None: backends = [] else: # sip == StatusIconProviderEnum.auto - backends = [BackendAppIndicator, - BackendGtkStatusIcon] + backends = [BackendGtkStatusIcon] self._backend = None for backend in backends: @@ -280,85 +275,3 @@ class BackendGtkStatusIcon(BackendBase): elif len(args) == 3: # in <=Xenial? x, y, status_icon = args return Gtk.StatusIcon.position_menu(gtk_menu, x, y, status_icon) - - -class BackendAppIndicator(BackendBase): - - _indicator = None - - STATUSNOTIFIER_OBJECT = "/org/ayatana/NotificationItem/Onboard" - STATUSNOTIFIER_IFACE = "org.kde.StatusNotifierItem" - ACTIVATE_METHOD = "Activate" - - def __init__(self, menu): - BackendBase.__init__(self, menu) - - try: - from gi.repository import AppIndicator3 as AppIndicator - except ImportError as ex: - raise RuntimeError(ex) - - self._indicator = AppIndicator.Indicator.new( - self.id, - self.icon_name, - AppIndicator.IndicatorCategory.APPLICATION_STATUS) - self._indicator.set_icon_full(self.icon_name, - self.icon_desc) - - self._indicator.set_menu(menu._menu) - self._indicator.set_secondary_activate_target( - menu._menu.get_children()[0]) - - if "dbus" in globals(): - # Watch left-click Activate() calls on desktops that send them - # (KDE Plasma). There is still "No such method 'Activate'" in - # AppIndicator. - try: - self._bus = dbus.SessionBus() - except dbus.exceptions.DBusException as ex: - _logger.warning("D-Bus session bus unavailable, " - "no left-click Activate() for AppIndicator: " + - unicode_str(ex)) - else: - try: - self._bus.add_match_string( - "type='method_call'," - "eavesdrop=true," - "path='{}'," - "interface='{}'," - "member='{}'" - .format(self.STATUSNOTIFIER_OBJECT, - self.STATUSNOTIFIER_IFACE, - self.ACTIVATE_METHOD)) - self._bus.add_message_filter(self._on_activate_method) - except dbus.exceptions.DBusException as ex: - _logger.warning("Failed to setup D-Bus match rule, " - "no left-click Activate() for AppIndicator: " + - unicode_str(ex)) - - def cleanup(self): - pass - - def _on_activate_method(self, bus, message): - if message.get_path() == self.STATUSNOTIFIER_OBJECT and \ - message.get_member() == self.ACTIVATE_METHOD: - self._menu.on_show_keyboard_toggle() - return dbus.connection.HANDLER_RESULT_NOT_YET_HANDLED - - def set_visible(self, visible): - self._set_indicator_active(visible) - - def _set_indicator_active(self, active): - try: - from gi.repository import AppIndicator3 as AppIndicator - except ImportError: - pass - else: - if active: - self._indicator.set_status( - AppIndicator.IndicatorStatus.ACTIVE) - else: - self._indicator.set_status( - AppIndicator.IndicatorStatus.PASSIVE) - - Index: onboard-1.4.1/Onboard/Version.py =================================================================== --- onboard-1.4.1.orig/Onboard/Version.py +++ onboard-1.4.1/Onboard/Version.py @@ -32,10 +32,3 @@ def require_gi_versions(): gi.require_version('Atspi', '2.0') except ValueError: pass - - # AppIndicator3 is not required - try: - gi.require_version('AppIndicator3', '0.1') - except ValueError: - pass -
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor