2019-10-29 16:14:14 +01:00
|
|
|
Remove the support for Unity's appindicator.
|
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
diff -Naur udiskie-2.0.4/completions/zsh/_udiskie udiskie-2.0.4-new/completions/zsh/_udiskie
|
|
|
|
--- udiskie-2.0.4/completions/zsh/_udiskie 2020-01-21 01:12:40.000000000 +0100
|
|
|
|
+++ udiskie-2.0.4-new/completions/zsh/_udiskie 2020-01-23 10:15:46.956141667 +0100
|
|
|
|
@@ -18,8 +18,6 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
'(-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]"
|
2020-01-23 10:25:55 +01:00
|
|
|
diff -Naur udiskie-2.0.4/doc/udiskie.8.txt udiskie-2.0.4-new/doc/udiskie.8.txt
|
|
|
|
--- udiskie-2.0.4/doc/udiskie.8.txt 2020-01-21 01:12:40.000000000 +0100
|
|
|
|
+++ udiskie-2.0.4-new/doc/udiskie.8.txt 2020-01-23 10:16:12.636290647 +0100
|
|
|
|
@@ -92,12 +92,6 @@
|
|
|
|
*--no-terminal*::
|
|
|
|
Disable terminal action.
|
2019-10-29 16:14:14 +01:00
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
-*--appindicator*::
|
2019-10-29 16:14:14 +01:00
|
|
|
- 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.
|
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
diff -Naur udiskie-2.0.4/udiskie/appindicator.py udiskie-2.0.4-new/udiskie/appindicator.py
|
|
|
|
--- udiskie-2.0.4/udiskie/appindicator.py 2020-01-21 01:12:40.000000000 +0100
|
|
|
|
+++ udiskie-2.0.4-new/udiskie/appindicator.py 1970-01-01 01:00:00.000000000 +0100
|
2019-10-29 16:14:14 +01:00
|
|
|
@@ -1,61 +0,0 @@
|
|
|
|
-"""
|
|
|
|
-Status icon using AppIndicator3.
|
|
|
|
-"""
|
|
|
|
-
|
|
|
|
-from gi.repository import Gtk
|
|
|
|
-from gi.repository import AppIndicator3
|
|
|
|
-
|
2020-01-23 10:25:55 +01:00
|
|
|
-from .async_ import Future
|
2019-10-29 16:14:14 +01:00
|
|
|
-
|
|
|
|
-
|
2020-01-23 10:25:55 +01:00
|
|
|
-class AppIndicatorIcon:
|
2019-10-29 16:14:14 +01:00
|
|
|
-
|
|
|
|
- """
|
|
|
|
- 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)
|
2020-01-23 10:25:55 +01:00
|
|
|
- self.task = Future()
|
2019-10-29 16:14:14 +01:00
|
|
|
- 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)
|
2020-01-23 10:25:55 +01:00
|
|
|
- self.task.set_result(True)
|
2019-10-29 16:14:14 +01:00
|
|
|
-
|
|
|
|
- @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()
|
2020-01-23 10:25:55 +01:00
|
|
|
diff -Naur udiskie-2.0.4/udiskie/cli.py udiskie-2.0.4-new/udiskie/cli.py
|
|
|
|
--- udiskie-2.0.4/udiskie/cli.py 2020-01-21 01:12:40.000000000 +0100
|
|
|
|
+++ udiskie-2.0.4-new/udiskie/cli.py 2020-01-23 10:17:13.064810617 +0100
|
|
|
|
@@ -287,9 +287,6 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
-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
|
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
@@ -312,7 +309,6 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
'notify': True,
|
|
|
|
'tray': False,
|
|
|
|
'menu': 'flat',
|
|
|
|
- 'appindicator': False,
|
|
|
|
'file_manager': 'xdg-open',
|
2020-01-23 10:25:55 +01:00
|
|
|
'terminal': '',
|
2019-10-29 16:14:14 +01:00
|
|
|
'password_prompt': 'builtin:gui',
|
2020-01-23 10:25:55 +01:00
|
|
|
@@ -328,7 +324,6 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
'--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'),
|
2020-01-23 10:25:55 +01:00
|
|
|
@@ -459,11 +454,7 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
menu_maker = udiskie.tray.UdiskieMenu(self, icons, actions, flat,
|
|
|
|
config.quickmenu_actions)
|
2019-10-29 16:14:14 +01:00
|
|
|
- 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)
|
|
|
|
|
2020-01-23 10:25:55 +01:00
|
|
|
diff -Naur udiskie-2.0.4/udiskie.egg-info/SOURCES.txt udiskie-2.0.4-new/udiskie.egg-info/SOURCES.txt
|
|
|
|
--- udiskie-2.0.4/udiskie.egg-info/SOURCES.txt 2020-01-21 01:12:41.000000000 +0100
|
|
|
|
+++ udiskie-2.0.4-new/udiskie.egg-info/SOURCES.txt 2020-01-23 10:17:50.657205798 +0100
|
|
|
|
@@ -25,7 +25,6 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
test/test_cache.py
|
|
|
|
test/test_match.py
|
|
|
|
udiskie/__init__.py
|
|
|
|
-udiskie/appindicator.py
|
|
|
|
udiskie/async_.py
|
|
|
|
udiskie/automount.py
|
|
|
|
udiskie/cache.py
|
2020-01-23 10:25:55 +01:00
|
|
|
@@ -47,4 +46,4 @@
|
2019-10-29 16:14:14 +01:00
|
|
|
udiskie.egg-info/entry_points.txt
|
|
|
|
udiskie.egg-info/requires.txt
|
2020-01-23 10:25:55 +01:00
|
|
|
udiskie.egg-info/top_level.txt
|
|
|
|
-udiskie.egg-info/zip-safe
|
2019-10-29 16:14:14 +01:00
|
|
|
\ Pas de fin de ligne à la fin du fichier
|
2020-01-23 10:25:55 +01:00
|
|
|
+udiskie.egg-info/zip-safe
|