Commit 838ddacb authored by Michael Terry's avatar Michael Terry

drop libappindicator support in favor of libunity support

parent 449aff0c
Déjà Dup 19.90 (GNOME 3.1.90)
-----------------------------
Packaging:
• Drop optional support for libappindicator, libunity plus legacy GtkStatusIcon support is enough
Déjà Dup 19.5 (GNOME 3.1.5)
---------------------------
Bug Fixes:
......
......@@ -70,7 +70,6 @@ GDK_X11_MODULE=gdk-x11-3.0
GLIB_REQ_VER=2.26
GIO_REQ_VER=$GLIB_REQ_VER
NOTIFY_REQ_VER=0.7
APPINDICATOR_MODULE=appindicator3-0.1
DBUSMENU_GTK_MODULE=dbusmenu-gtk3-0.4
AC_SUBST(GTK_MODULE)
......@@ -167,25 +166,6 @@ AS_IF([test "x$with_nautilus" != xno],
)
AM_CONDITIONAL([HAVE_NAUTILUS], [test -n "$NAUTILUS_LIBS"])
AH_TEMPLATE([HAVE_APPINDICATOR], [whether libappindicator is available])
AC_ARG_WITH([appindicator],
[AS_HELP_STRING([--with-appindicator],
[use libappindicator for notification icons @<:@default=check@:>@])],
[],
[with_appindicator=check])
AS_IF([test "x$with_appindicator" != xno],
[PKG_CHECK_MODULES(APPINDICATOR, $APPINDICATOR_MODULE,
[AC_DEFINE(HAVE_APPINDICATOR)
AC_SUBST(APPINDICATOR_CFLAGS)
AC_SUBST(APPINDICATOR_LIBS)],
[if test "x$with_appindicator" != xcheck; then
AC_MSG_FAILURE(
[--with-appindicator was given, but test for $APPINDICATOR_MODULE failed])
fi
]
)]
)
AH_TEMPLATE([HAVE_UNITY], [whether libunity is available])
AC_ARG_WITH([unity],
[AS_HELP_STRING([--with-unity],
......
......@@ -20,11 +20,10 @@
using GLib;
/**
* There are four modes for 'shell' integration:
* There are three modes for 'shell' integration:
* 1) GNOME Shell
* 2) Unity
* 3) Indicator
* 4) Legacy
* 3) Legacy
*
* GNOME Shell:
* No status icon at all.
......@@ -38,11 +37,6 @@ using GLib;
* Success notification.
* Detected by presence of Unity (usually on Ubuntu).
*
* Indicator:
* Register as an application indicator, which falls back to standard GTK+ status icon.
* Success notification.
* Detected by presence of application indicator host (usually on Ubuntu).
*
* Legacy:
* Standard GTK+ status icon.
* Success notification.
......@@ -66,9 +60,7 @@ public abstract class StatusIcon : Object
break;
default:
instance = new IndicatorStatusIcon(window, op, automatic);
if (!instance.is_valid)
instance = new LegacyStatusIcon(window, op, automatic);
instance = new LegacyStatusIcon(window, op, automatic);
break;
}
return instance;
......@@ -238,27 +230,6 @@ class UnityStatusIcon : StatusIcon
}
}
class IndicatorStatusIcon : StatusIcon
{
public IndicatorStatusIcon(Gtk.Window window, DejaDup.Operation op, bool automatic)
{
Object(window: window, op: op, automatic: automatic);
}
Object indicator;
construct {
indicator = hacks_status_icon_make_app_indicator(ensure_menu());
is_valid = indicator != null;
}
~IndicatorStatusIcon()
{
// FIXME: icon won't die, even with this call
if (indicator != null)
hacks_status_icon_close_app_indicator(indicator);
}
}
class ShellStatusIcon : StatusIcon
{
public ShellStatusIcon(Gtk.Window window, DejaDup.Operation op, bool automatic)
......
......@@ -19,10 +19,6 @@
#include "config.h"
#ifdef HAVE_APPINDICATOR
#include <libappindicator/app-indicator.h>
#endif
#if HAVE_UNITY
#include <unity.h>
#include <libdbusmenu-gtk3/parser.h>
......@@ -30,31 +26,6 @@
#include "whacks.h"
/* This is done in whacks, because we can't encode the #ifdef HAVE_APPINDICATOR
in vala (we can... but not have it carry through to the compiled C). */
GObject *
hacks_status_icon_make_app_indicator (GtkMenu *menu)
{
#ifdef HAVE_APPINDICATOR
AppIndicator *icon = app_indicator_new(PACKAGE, NULL,
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
app_indicator_set_icon_full(icon, "deja-dup-symbolic", g_get_application_name());
app_indicator_set_menu(icon, menu);
app_indicator_set_status(icon, APP_INDICATOR_STATUS_ACTIVE);
return G_OBJECT(icon);
#else
return NULL;
#endif
}
void
hacks_status_icon_close_app_indicator (GObject *icon)
{
#ifdef HAVE_APPINDICATOR
app_indicator_set_status(APP_INDICATOR(icon), APP_INDICATOR_STATUS_PASSIVE);
#endif
}
gboolean hacks_unity_present(void)
{
#if HAVE_UNITY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment