diff -Nru caja-dropbox-1.18.0/debian/changelog caja-dropbox-1.18.0/debian/changelog --- caja-dropbox-1.18.0/debian/changelog 2017-03-14 12:55:39.000000000 +0000 +++ caja-dropbox-1.18.0/debian/changelog 2017-03-28 01:08:26.000000000 +0000 @@ -1,3 +1,12 @@ +caja-dropbox (1.18.0-0ubuntu2) zesty; urgency=medium + + * debian/patches: + + Replace 2003_execute_via_dbus_launch.patch with + 2003_fake_xdg_current_desktop.patch to coerce XDG_CURRENT_DESKTOP and + ensure indicator icons and menus work. (LP: #1559249) + + -- Martin Wimpress Sat, 25 Mar 2017 23:49:01 +0000 + caja-dropbox (1.18.0-0ubuntu1) zesty; urgency=medium * New upstream release. diff -Nru caja-dropbox-1.18.0/debian/control caja-dropbox-1.18.0/debian/control --- caja-dropbox-1.18.0/debian/control 2017-03-13 19:01:24.000000000 +0000 +++ caja-dropbox-1.18.0/debian/control 2017-03-28 00:47:01.000000000 +0000 @@ -10,9 +10,9 @@ Build-Depends: debhelper (>= 9), dh-autoreconf, dpkg-dev (>= 1.16.1.1), - libcaja-extension-dev (>= 1.18), - libglib2.0-dev (>= 2.36.0), - mate-common (>= 1.18), + libcaja-extension-dev (>= 1.16), + libglib2.0-dev (>= 2.14.0), + mate-common (>= 1.16), python (>= 2.6.6-3~), python-docutils (>= 0.6), python-gtk2 (>= 2.12), diff -Nru caja-dropbox-1.18.0/debian/patches/2003_execute_via_dbus_launch.patch caja-dropbox-1.18.0/debian/patches/2003_execute_via_dbus_launch.patch --- caja-dropbox-1.18.0/debian/patches/2003_execute_via_dbus_launch.patch 2017-03-13 17:54:05.000000000 +0000 +++ caja-dropbox-1.18.0/debian/patches/2003_execute_via_dbus_launch.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -Description: Execute via dbus-launch to ensure the tray icon works. Closes (LP: #1559249) -Author: Martin Wimpress -Abstract: - This works around broken dropbox binary that will only activate the - try icon on Ubuntu Unity. This patch works around that issue by - coercing QT to use GTK theming and executing dropbox via dbus-launch. - . - This patch is valid for Debian and Ubuntu alike. - -diff --git a/caja-dropbox.in b/caja-dropbox.in -index 5026ab7..932d779 100755 ---- a/caja-dropbox.in -+++ b/caja-dropbox.in -@@ -728,7 +728,8 @@ def start_dropbox(): - if os.access(db_path, os.X_OK): - f = open("/dev/null", "w") - # we don't reap the child because we're gonna die anyway, let init do it -- a = subprocess.Popen([db_path], preexec_fn=os.setsid, cwd=os.path.expanduser("~"), -+ os.environ["QT_STYLE_OVERRIDE"] = "gtk" -+ a = subprocess.Popen(['dbus-launch', db_path], preexec_fn=os.setsid, cwd=os.path.expanduser("~"), - stderr=sys.stderr, stdout=f, close_fds=True) - - # in seconds diff -Nru caja-dropbox-1.18.0/debian/patches/2003_fake_xdg_current_desktop.patch caja-dropbox-1.18.0/debian/patches/2003_fake_xdg_current_desktop.patch --- caja-dropbox-1.18.0/debian/patches/2003_fake_xdg_current_desktop.patch 1970-01-01 00:00:00.000000000 +0000 +++ caja-dropbox-1.18.0/debian/patches/2003_fake_xdg_current_desktop.patch 2017-03-28 01:05:33.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Coerce XDG_CURRENT_DESKTOP to "Unity". (LP: #1559249) +Author: Martin Wimpress +Abstract: + This works around broken dropbox binary that will not correctly + activate the tray icon or indicator icon on Ubuntu 17.04. This patch + works around that issue by coercing XDG_CURRENT_DESKTOP to report as + "Unity". + . + This patch is valid for Debian and Ubuntu. + + +--- a/caja-dropbox.in 2017-03-28 02:00:33.223411568 +0100 ++++ b/caja-dropbox.in 2017-03-28 02:03:34.637407866 +0100 +@@ -728,8 +728,13 @@ + if os.access(db_path, os.X_OK): + f = open("/dev/null", "w") + # we don't reap the child because we're gonna die anyway, let init do it ++ ++ # Fix indicator icon and menu. (LP: #1559249) ++ new_env = os.environ.copy() ++ new_env['XDG_CURRENT_DESKTOP'] = 'Unity' ++ + a = subprocess.Popen([db_path], preexec_fn=os.setsid, cwd=os.path.expanduser("~"), +- stderr=sys.stderr, stdout=f, close_fds=True) ++ stderr=sys.stderr, stdout=f, close_fds=True, env=new_env) + + # in seconds + interval = 0.5 diff -Nru caja-dropbox-1.18.0/debian/patches/series caja-dropbox-1.18.0/debian/patches/series --- caja-dropbox-1.18.0/debian/patches/series 2017-03-13 17:54:05.000000000 +0000 +++ caja-dropbox-1.18.0/debian/patches/series 2017-03-28 00:52:51.000000000 +0000 @@ -9,4 +9,4 @@ # Patches below are not really upstreamable 2001_non-interactive-update.patch 2002_use-dpkg-to-select-platform.patch -2003_execute_via_dbus_launch.patch +2003_fake_xdg_current_desktop.patch