unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob c19099cdaa858547e3fda1f9adca46ba7a09e7b8 6114 bytes (raw)
name: gnu/packages/patches/udiskie-no-appindicator.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
 
Remove the support for Unity's appindicator.

diff -Naur udiskie-1.7.7/completions/_udiskie udiskie-1.7.7a/completions/_udiskie
--- udiskie-1.7.7/completions/_udiskie	2019-02-17 18:28:58.000000000 +0100
+++ udiskie-1.7.7a/completions/_udiskie	2019-10-29 14:21:04.556193639 +0100
@@ -21,8 +21,6 @@
     '(-a)'{-A,--no-automount}"[disable automounting]"
     '(-N)'{-n,--notify}"[show popup notifications]"
     '(-n)'{-N,--no-notify}"[disable notifications]"
-    '(--no-appindicator)'--appindicator"[use appindicator for status icon]"
-    '(--appindicator)'--no-appindicator"[don't use appindicator]"
     '(-T -s)'{-t,--tray}"[show tray icon]"
     '(-T -t)'{-s,--smart-tray}"[auto hide tray icon]"
     '(-t -s)'{-T,--no-tray}"[disable tray icon]"
diff -Naur udiskie-1.7.7/doc/udiskie.8.txt udiskie-1.7.7a/doc/udiskie.8.txt
--- udiskie-1.7.7/doc/udiskie.8.txt	2019-02-17 18:28:58.000000000 +0100
+++ udiskie-1.7.7a/doc/udiskie.8.txt	2019-10-29 14:21:52.304570344 +0100
@@ -95,12 +95,6 @@
 *-F, \--no-file-manager*::
 	Disable browsing.
 
-*-appindicator*::
-	Use AppIndicator3 for the status icon. Use this on Ubuntu/Unity if no icon is shown.
-
-*--no-appindicator*::
-	Use Gtk.StatusIcon for the status icon (default).
-
 *--password-cache MINUTES*::
 	Cache passwords for LUKS partitions and set the timeout.
 
diff -Naur udiskie-1.7.7/udiskie/appindicator.py udiskie-1.7.7a/udiskie/appindicator.py
--- udiskie-1.7.7/udiskie/appindicator.py	2019-02-17 18:28:58.000000000 +0100
+++ udiskie-1.7.7a/udiskie/appindicator.py	1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-"""
-Status icon using AppIndicator3.
-"""
-
-from gi.repository import Gtk
-from gi.repository import AppIndicator3
-
-from udiskie.async_ import Async
-
-
-class AppIndicatorIcon(object):
-
-    """
-    Show status icon using AppIndicator as backend. Replaces
-    `udiskie.tray.StatusIcon` on ubuntu/unity.
-    """
-
-    def __init__(self, menumaker, _icons):
-        self._maker = menumaker
-        self._menu = Gtk.Menu()
-        self._indicator = AppIndicator3.Indicator.new(
-            'udiskie',
-            _icons.get_icon_name('media'),
-            AppIndicator3.IndicatorCategory.HARDWARE)
-        self._indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE)
-        self._indicator.set_menu(self._menu)
-        # Get notified before menu is shown, see:
-        # https://bugs.launchpad.net/screenlets/+bug/522152/comments/15
-        dbusmenuserver = self._indicator.get_property('dbus-menu-server')
-        self._dbusmenuitem = dbusmenuserver.get_property('root-node')
-        self._conn = self._dbusmenuitem.connect('about-to-show', self._on_show)
-        self.task = Async()
-        menumaker._quit_action = self.destroy
-        # Populate menu initially, so libdbusmenu does not ignore the
-        # 'about-to-show':
-        self._maker(self._menu)
-
-    def destroy(self):
-        self.show(False)
-        self._dbusmenuitem.disconnect(self._conn)
-        self.task.callback()
-
-    @property
-    def visible(self):
-        status = self._indicator.get_status()
-        return status == AppIndicator3.IndicatorStatus.ACTIVE
-
-    def show(self, show=True):
-        if show == self.visible:
-            return
-        status = (AppIndicator3.IndicatorStatus.ACTIVE if show else
-                  AppIndicator3.IndicatorStatus.PASSIVE)
-        self._indicator.set_status(status)
-
-    def _on_show(self, menu):
-        # clear menu:
-        for item in self._menu.get_children():
-            self._menu.remove(item)
-        # repopulate:
-        self._maker(self._menu)
-        self._menu.show_all()
diff -Naur udiskie-1.7.7/udiskie/cli.py udiskie-1.7.7a/udiskie/cli.py
--- udiskie-1.7.7/udiskie/cli.py	2019-02-17 18:28:58.000000000 +0100
+++ udiskie-1.7.7a/udiskie/cli.py	2019-10-29 14:18:22.678919186 +0100
@@ -376,9 +376,6 @@
         -T, --no-tray                           Disable tray icon
         -m MENU, --menu MENU                    Tray menu [flat/nested]
 
-        --appindicator                          Use appindicator for status icon
-        --no-appindicator                       Don't use appindicator
-
         --password-cache MINUTES                Set password cache timeout
         --no-password-cache                     Disable password cache
 
@@ -400,7 +397,6 @@
         'notify': True,
         'tray': False,
         'menu': 'flat',
-        'appindicator': False,
         'file_manager': 'xdg-open',
         'password_prompt': 'builtin:gui',
         'password_cache': False,
@@ -415,7 +411,6 @@
             '--no-tray': False,
             '--smart-tray': 'auto'}),
         'menu': Value('--menu'),
-        'appindicator': Switch('appindicator'),
         'file_manager': OptionalValue('--file-manager'),
         'password_prompt': OptionalValue('--password-prompt'),
         'password_cache': OptionalValue('--password-cache'),
@@ -541,11 +536,7 @@
             raise ValueError("Invalid menu: %s" % (options['menu'],))
 
         menu_maker = udiskie.tray.UdiskieMenu(self, icons, actions, flat)
-        if options['appindicator']:
-            import udiskie.appindicator
-            TrayIcon = udiskie.appindicator.AppIndicatorIcon
-        else:
-            TrayIcon = udiskie.tray.TrayIcon
+        TrayIcon = udiskie.tray.TrayIcon
         trayicon = TrayIcon(menu_maker, icons)
         return udiskie.tray.UdiskieStatusIcon(trayicon, menu_maker, smart)
 
diff -Naur udiskie-1.7.7/udiskie.egg-info/SOURCES.txt udiskie-1.7.7a/udiskie.egg-info/SOURCES.txt
--- udiskie-1.7.7/udiskie.egg-info/SOURCES.txt	2019-02-17 19:42:25.000000000 +0100
+++ udiskie-1.7.7a/udiskie.egg-info/SOURCES.txt	2019-10-29 14:40:09.333315287 +0100
@@ -24,7 +24,6 @@
 test/test_cache.py
 test/test_match.py
 udiskie/__init__.py
-udiskie/appindicator.py
 udiskie/async_.py
 udiskie/automount.py
 udiskie/cache.py
@@ -46,4 +45,4 @@
 udiskie.egg-info/dependency_links.txt
 udiskie.egg-info/entry_points.txt
 udiskie.egg-info/requires.txt
-udiskie.egg-info/top_level.txt
\ Pas de fin de ligne à la fin du fichier
+udiskie.egg-info/top_level.txt

debug log:

solving c19099cdaa ...
found c19099cdaa in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).