Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libayatana-appindicator instead of appindicator #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SUBDIRS = plugins data \

bin_PROGRAMS = gol
gol_SOURCES = gol.c gol.h compatibility.h
gol_CFLAGS = $(GTHREAD2_CFLAGS) $(GTK2_CFLAGS) $(OPENSSL_CFLAGS) $(SQLITE3_CFLAGS) $(APP_INDICATOR_CFLAGS) -DDATADIR='"$(pkgdatadir)"' -DLIBDIR='"$(pkglibdir)"'
gol_LDADD = $(GTHREAD2_LIBS) $(GTK2_LIBS) $(OPENSSL_LIBS) $(SQLITE3_LIBS) $(GMODULE2_LIBS) $(APP_INDICATOR_LIBS)
gol_CFLAGS = $(GTHREAD2_CFLAGS) $(GTK2_CFLAGS) $(OPENSSL_CFLAGS) $(SQLITE3_CFLAGS) $(AYATANA_APPINDICATOR_CFLAGS) -DDATADIR='"$(pkgdatadir)"' -DLIBDIR='"$(pkglibdir)"'
gol_LDADD = $(GTHREAD2_LIBS) $(GTK2_LIBS) $(OPENSSL_LIBS) $(SQLITE3_LIBS) $(GMODULE2_LIBS) $(AYATANA_APPINDICATOR_LIBS)

EXTRA_DIST = gol.rc Makefile.w32 README.mkd TODO data/gol.desktop VERSION

Expand Down
34 changes: 17 additions & 17 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ PKG_CHECK_MODULES(NOTIFY, libnotify,
AC_CONFIG_FILES([display/libnotify/Makefile])],
[ENABLE_LIBNOTIFY=""])

APPINDICATOR_REQUIRED=0.4.92
AC_ARG_ENABLE(appindicator,
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],
[Build support for application indicators ]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes",
enable_appindicator="no")
AYATANA_APPINDICATOR_REQUIRED=0.5.4
AC_ARG_ENABLE(ayatana-appindicator,
AS_HELP_STRING([--enable-ayatana-appindicator[=@<:@no/auto/yes@:>@]],
[Build support for Ayatana application indicators ]),
[enable_ayatana_appindicator=$enableval],
[enable_ayatana_appindicator="auto"])
if test x$enable_ayatana_appindicator = xauto ; then
PKG_CHECK_EXISTS([ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED],
enable_ayatana_indicator="yes",
enable_ayatana_indicator="no")
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR,
appindicator-0.1 >= $APPINDICATOR_REQUIRED)
AC_DEFINE(HAVE_APP_INDICATOR, [1], [Have AppIndicator])
if test x$enable_ayatana_appindicator = xyes ; then
PKG_CHECK_EXISTS([ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([ayatana-appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(AYATANA_APPINDICATOR,
ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED)
AC_DEFINE(HAVE_AYATANA_APPINDICATOR, [1], [Have Ayatana application indicator])
fi
AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
AM_CONDITIONAL(HAVE_AYATANA_APPINDICATOR, test x"$enable_ayatana_appindicator" = xyes)

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: growl-for-linux
Section: gnome
Priority: optional
Maintainer: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Build-Depends: debhelper (>= 7), autotools-dev, libglib2.0-dev, libgtk2.0-dev, libnotify-dev, libappindicator-dev, libcurl4-openssl-dev, libxml2-dev, libsqlite3-dev, libdbus-glib-1-dev, desktop-file-utils, libssl-dev
Build-Depends: debhelper (>= 7), autotools-dev, libglib2.0-dev, libgtk2.0-dev, libnotify-dev, libayatana-appindicator-dev, libcurl4-openssl-dev, libxml2-dev, libsqlite3-dev, libdbus-glib-1-dev, desktop-file-utils, libssl-dev
Standards-Version: 3.8.4
Homepage: https://mattn.github.io/growl-for-linux/

Expand Down
10 changes: 5 additions & 5 deletions gol.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
#include "gol.h"
#include "compatibility.h"

#ifdef HAVE_APP_INDICATOR
#include <libappindicator/app-indicator.h>
#ifdef HAVE_AYATANA_APPINDICATOR
#include <libayatana-appindicator/app-indicator.h>
#endif

#define GNTP_OK_STRING_LITERAL(_version, _action) \
Expand Down Expand Up @@ -104,7 +104,7 @@ static gchar* password;
static gboolean require_password_for_local_apps = FALSE;
static gboolean require_password_for_lan_apps = FALSE;
static sqlite3 *db;
#ifdef HAVE_APP_INDICATOR
#ifdef HAVE_AYATANA_APPINDICATOR
static AppIndicator* indicator;
#else
static GtkStatusIcon* status_icon;
Expand Down Expand Up @@ -1694,7 +1694,7 @@ disabled_pixbuf(GdkPixbuf *pixbuf) {
}
*/

#ifdef HAVE_APP_INDICATOR
#ifdef HAVE_AYATANA_APPINDICATOR
static void
gol_status_toggle(GtkMenuItem* menu_item, gpointer GOL_UNUSED_ARG(user_data)) {
switch (gol_status)
Expand Down Expand Up @@ -1820,7 +1820,7 @@ destroy_menu() {
if (popup_menu) {
gtk_widget_destroy(popup_menu);
}
#ifndef HAVE_APP_INDICATOR
#ifndef HAVE_AYATANA_APPINDICATOR
if (status_icon) {
gtk_status_icon_set_visible(GTK_STATUS_ICON(status_icon), FALSE);
g_object_unref(G_OBJECT(status_icon));
Expand Down