build: Use libappindicator GTK+3 bindings

This commit is contained in:
Hylke Bons 2013-10-09 15:23:33 +02:00
parent d239cf56a4
commit c026eefdda
2 changed files with 11 additions and 13 deletions

View file

@ -19,7 +19,7 @@ using System;
using Gtk; using Gtk;
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
using AppIndicator; using AppIndicator3;
#endif #endif
namespace SparkleShare { namespace SparkleShare {
@ -34,7 +34,7 @@ namespace SparkleShare {
private MenuItem state_item; private MenuItem state_item;
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
private ApplicationIndicator indicator; private Indicator indicator;
#else #else
private StatusIcon status_icon; private StatusIcon status_icon;
#endif #endif
@ -43,9 +43,9 @@ namespace SparkleShare {
public SparkleStatusIcon () public SparkleStatusIcon ()
{ {
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
this.indicator = new ApplicationIndicator ("sparkleshare", "sparkleshare", Category.ApplicationStatus); this.indicator = new Indicator ("sparkleshare", "sparkleshare", (int) IndicatorCategory.ApplicationStatus);
this.indicator.IconName = "process-syncing-idle"; this.indicator.IconName = "process-syncing-idle";
this.indicator.Status = Status.Active; this.indicator.Status = (int) IndicatorStatus.Active;
#else #else
this.status_icon = new StatusIcon (); this.status_icon = new StatusIcon ();
this.status_icon.IconName = "sparkleshare"; this.status_icon.IconName = "sparkleshare";
@ -103,8 +103,8 @@ namespace SparkleShare {
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
// Force update of the status icon // Force update of the status icon
this.indicator.Status = Status.Attention; this.indicator.Status = (int) IndicatorStatus.Attention;
this.indicator.Status = Status.Active; this.indicator.Status = (int) IndicatorStatus.Active;
#endif #endif
}); });
}; };

View file

@ -90,21 +90,19 @@ if test "$OSNAME" = "Linux" ; then
fi fi
AC_SUBST(NOTIFY_SHARP_LIBS) AC_SUBST(NOTIFY_SHARP_LIBS)
APPINDICATOR_REQUIRED=0.0.7 APPINDICATOR_REQUIRED=0.1
if test x$enable_appindicator = xauto ; then if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-sharp-0.1 >= $APPINDICATOR_REQUIRED], PKG_CHECK_EXISTS([appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes", enable_appindicator="yes",
enable_appindicator="no") enable_appindicator="no")
fi fi
enable_appindicator="no"
if test x$enable_appindicator = xyes ; then if test x$enable_appindicator = xyes ; then
PKG_CHECK_EXISTS([appindicator-sharp-0.1 >= $APPINDICATOR_REQUIRED],, PKG_CHECK_EXISTS([appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([appindicator-sharp-0.1 is not installed])) AC_MSG_ERROR([appindicator3-sharp-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR, PKG_CHECK_MODULES(APP_INDICATOR,
appindicator-sharp-0.1 >= $APPINDICATOR_REQUIRED) appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED)
AC_SUBST(APP_INDICATOR_CFLAGS) AC_SUBST(APP_INDICATOR_CFLAGS)
AC_SUBST(APP_INDICATOR_LIBS) AC_SUBST(APP_INDICATOR_LIBS)
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator]) AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])