Commit | Line | Data |
---|---|---|
d29d04c9 GLV |
1 | Remove the support for Unity's appindicator. |
2 | ||
dc4fae11 GLV |
3 | diff -Naur udiskie-2.0.4/completions/zsh/_udiskie udiskie-2.0.4-new/completions/zsh/_udiskie |
4 | --- udiskie-2.0.4/completions/zsh/_udiskie 2020-01-21 01:12:40.000000000 +0100 | |
5 | +++ udiskie-2.0.4-new/completions/zsh/_udiskie 2020-01-23 10:15:46.956141667 +0100 | |
6 | @@ -18,8 +18,6 @@ | |
d29d04c9 GLV |
7 | '(-a)'{-A,--no-automount}"[disable automounting]" |
8 | '(-N)'{-n,--notify}"[show popup notifications]" | |
9 | '(-n)'{-N,--no-notify}"[disable notifications]" | |
10 | - '(--no-appindicator)'--appindicator"[use appindicator for status icon]" | |
11 | - '(--appindicator)'--no-appindicator"[don't use appindicator]" | |
12 | '(-T -s)'{-t,--tray}"[show tray icon]" | |
13 | '(-T -t)'{-s,--smart-tray}"[auto hide tray icon]" | |
14 | '(-t -s)'{-T,--no-tray}"[disable tray icon]" | |
dc4fae11 GLV |
15 | diff -Naur udiskie-2.0.4/doc/udiskie.8.txt udiskie-2.0.4-new/doc/udiskie.8.txt |
16 | --- udiskie-2.0.4/doc/udiskie.8.txt 2020-01-21 01:12:40.000000000 +0100 | |
17 | +++ udiskie-2.0.4-new/doc/udiskie.8.txt 2020-01-23 10:16:12.636290647 +0100 | |
18 | @@ -92,12 +92,6 @@ | |
19 | *--no-terminal*:: | |
20 | Disable terminal action. | |
d29d04c9 | 21 | |
dc4fae11 | 22 | -*--appindicator*:: |
d29d04c9 GLV |
23 | - Use AppIndicator3 for the status icon. Use this on Ubuntu/Unity if no icon is shown. |
24 | - | |
25 | -*--no-appindicator*:: | |
26 | - Use Gtk.StatusIcon for the status icon (default). | |
27 | - | |
28 | *--password-cache MINUTES*:: | |
29 | Cache passwords for LUKS partitions and set the timeout. | |
30 | ||
dc4fae11 GLV |
31 | diff -Naur udiskie-2.0.4/udiskie/appindicator.py udiskie-2.0.4-new/udiskie/appindicator.py |
32 | --- udiskie-2.0.4/udiskie/appindicator.py 2020-01-21 01:12:40.000000000 +0100 | |
33 | +++ udiskie-2.0.4-new/udiskie/appindicator.py 1970-01-01 01:00:00.000000000 +0100 | |
d29d04c9 GLV |
34 | @@ -1,61 +0,0 @@ |
35 | -""" | |
36 | -Status icon using AppIndicator3. | |
37 | -""" | |
38 | - | |
39 | -from gi.repository import Gtk | |
40 | -from gi.repository import AppIndicator3 | |
41 | - | |
dc4fae11 | 42 | -from .async_ import Future |
d29d04c9 GLV |
43 | - |
44 | - | |
dc4fae11 | 45 | -class AppIndicatorIcon: |
d29d04c9 GLV |
46 | - |
47 | - """ | |
48 | - Show status icon using AppIndicator as backend. Replaces | |
49 | - `udiskie.tray.StatusIcon` on ubuntu/unity. | |
50 | - """ | |
51 | - | |
52 | - def __init__(self, menumaker, _icons): | |
53 | - self._maker = menumaker | |
54 | - self._menu = Gtk.Menu() | |
55 | - self._indicator = AppIndicator3.Indicator.new( | |
56 | - 'udiskie', | |
57 | - _icons.get_icon_name('media'), | |
58 | - AppIndicator3.IndicatorCategory.HARDWARE) | |
59 | - self._indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE) | |
60 | - self._indicator.set_menu(self._menu) | |
61 | - # Get notified before menu is shown, see: | |
62 | - # https://bugs.launchpad.net/screenlets/+bug/522152/comments/15 | |
63 | - dbusmenuserver = self._indicator.get_property('dbus-menu-server') | |
64 | - self._dbusmenuitem = dbusmenuserver.get_property('root-node') | |
65 | - self._conn = self._dbusmenuitem.connect('about-to-show', self._on_show) | |
dc4fae11 | 66 | - self.task = Future() |
d29d04c9 GLV |
67 | - menumaker._quit_action = self.destroy |
68 | - # Populate menu initially, so libdbusmenu does not ignore the | |
69 | - # 'about-to-show': | |
70 | - self._maker(self._menu) | |
71 | - | |
72 | - def destroy(self): | |
73 | - self.show(False) | |
74 | - self._dbusmenuitem.disconnect(self._conn) | |
dc4fae11 | 75 | - self.task.set_result(True) |
d29d04c9 GLV |
76 | - |
77 | - @property | |
78 | - def visible(self): | |
79 | - status = self._indicator.get_status() | |
80 | - return status == AppIndicator3.IndicatorStatus.ACTIVE | |
81 | - | |
82 | - def show(self, show=True): | |
83 | - if show == self.visible: | |
84 | - return | |
85 | - status = (AppIndicator3.IndicatorStatus.ACTIVE if show else | |
86 | - AppIndicator3.IndicatorStatus.PASSIVE) | |
87 | - self._indicator.set_status(status) | |
88 | - | |
89 | - def _on_show(self, menu): | |
90 | - # clear menu: | |
91 | - for item in self._menu.get_children(): | |
92 | - self._menu.remove(item) | |
93 | - # repopulate: | |
94 | - self._maker(self._menu) | |
95 | - self._menu.show_all() | |
dc4fae11 GLV |
96 | diff -Naur udiskie-2.0.4/udiskie/cli.py udiskie-2.0.4-new/udiskie/cli.py |
97 | --- udiskie-2.0.4/udiskie/cli.py 2020-01-21 01:12:40.000000000 +0100 | |
98 | +++ udiskie-2.0.4-new/udiskie/cli.py 2020-01-23 10:17:13.064810617 +0100 | |
99 | @@ -287,9 +287,6 @@ | |
d29d04c9 GLV |
100 | -T, --no-tray Disable tray icon |
101 | -m MENU, --menu MENU Tray menu [flat/nested] | |
102 | ||
103 | - --appindicator Use appindicator for status icon | |
104 | - --no-appindicator Don't use appindicator | |
105 | - | |
106 | --password-cache MINUTES Set password cache timeout | |
107 | --no-password-cache Disable password cache | |
108 | ||
dc4fae11 | 109 | @@ -312,7 +309,6 @@ |
d29d04c9 GLV |
110 | 'notify': True, |
111 | 'tray': False, | |
112 | 'menu': 'flat', | |
113 | - 'appindicator': False, | |
114 | 'file_manager': 'xdg-open', | |
dc4fae11 | 115 | 'terminal': '', |
d29d04c9 | 116 | 'password_prompt': 'builtin:gui', |
dc4fae11 | 117 | @@ -328,7 +324,6 @@ |
d29d04c9 GLV |
118 | '--no-tray': False, |
119 | '--smart-tray': 'auto'}), | |
120 | 'menu': Value('--menu'), | |
121 | - 'appindicator': Switch('appindicator'), | |
122 | 'file_manager': OptionalValue('--file-manager'), | |
123 | 'password_prompt': OptionalValue('--password-prompt'), | |
124 | 'password_cache': OptionalValue('--password-cache'), | |
dc4fae11 | 125 | @@ -459,11 +454,7 @@ |
d29d04c9 | 126 | |
dc4fae11 GLV |
127 | menu_maker = udiskie.tray.UdiskieMenu(self, icons, actions, flat, |
128 | config.quickmenu_actions) | |
d29d04c9 GLV |
129 | - if options['appindicator']: |
130 | - import udiskie.appindicator | |
131 | - TrayIcon = udiskie.appindicator.AppIndicatorIcon | |
132 | - else: | |
133 | - TrayIcon = udiskie.tray.TrayIcon | |
134 | + TrayIcon = udiskie.tray.TrayIcon | |
135 | trayicon = TrayIcon(menu_maker, icons) | |
136 | return udiskie.tray.UdiskieStatusIcon(trayicon, menu_maker, smart) | |
137 | ||
dc4fae11 GLV |
138 | diff -Naur udiskie-2.0.4/udiskie.egg-info/SOURCES.txt udiskie-2.0.4-new/udiskie.egg-info/SOURCES.txt |
139 | --- udiskie-2.0.4/udiskie.egg-info/SOURCES.txt 2020-01-21 01:12:41.000000000 +0100 | |
140 | +++ udiskie-2.0.4-new/udiskie.egg-info/SOURCES.txt 2020-01-23 10:17:50.657205798 +0100 | |
141 | @@ -25,7 +25,6 @@ | |
d29d04c9 GLV |
142 | test/test_cache.py |
143 | test/test_match.py | |
144 | udiskie/__init__.py | |
145 | -udiskie/appindicator.py | |
146 | udiskie/async_.py | |
147 | udiskie/automount.py | |
148 | udiskie/cache.py | |
dc4fae11 | 149 | @@ -47,4 +46,4 @@ |
d29d04c9 GLV |
150 | udiskie.egg-info/entry_points.txt |
151 | udiskie.egg-info/requires.txt | |
dc4fae11 GLV |
152 | udiskie.egg-info/top_level.txt |
153 | -udiskie.egg-info/zip-safe | |
d29d04c9 | 154 | \ Pas de fin de ligne à la fin du fichier |
dc4fae11 | 155 | +udiskie.egg-info/zip-safe |