From 02e634b42f174aaf771eaed445b6ddf0b690692a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 9 Nov 2010 16:52:06 -0600 Subject: Adding in an icon and passing it's path to the build --- example/Makefile.am | 4 ++++ example/simple-client-test-icon.png | Bin 0 -> 3310 bytes 2 files changed, 4 insertions(+) create mode 100644 example/simple-client-test-icon.png (limited to 'example') diff --git a/example/Makefile.am b/example/Makefile.am index f4f2ab2..0659174 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -11,9 +11,13 @@ simple_client_SOURCES = \ simple_client_CFLAGS = \ $(INDICATOR_CFLAGS) \ + -DLOCAL_ICON="\"$(abs_srcdir)/simple-client-test-icon.png\"" \ -Wall -Werror \ -I$(top_srcdir)/src simple_client_LDADD = \ $(INDICATOR_LIBS) \ $(top_builddir)/src/libappindicator.la + +EXTRA_DIST = \ + simple-client-test-icon.png diff --git a/example/simple-client-test-icon.png b/example/simple-client-test-icon.png new file mode 100644 index 0000000..30dbb9d Binary files /dev/null and b/example/simple-client-test-icon.png differ -- cgit v1.2.3 From 40c2ed841e817647a7f9bf0798815bbf8279769c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 9 Nov 2010 17:01:37 -0600 Subject: Add a menu item to use the local icon --- example/simple-client.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'example') diff --git a/example/simple-client.c b/example/simple-client.c index f2fac6f..734aff6 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -59,6 +59,20 @@ activate_clicked_cb (GtkWidget *widget, gpointer data) } +static void +local_icon_toggle_cb (GtkWidget *widget, gpointer data) +{ + AppIndicator * ci = APP_INDICATOR(data); + + if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { + app_indicator_set_icon(ci, LOCAL_ICON); + } else { + app_indicator_set_icon(ci, "indicator-messages"); + } + + return; +} + static void item_clicked_cb (GtkWidget *widget, gpointer data) { @@ -192,6 +206,12 @@ main (int argc, char ** argv) gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show(item); + item = gtk_check_menu_item_new_with_label ("Set Local Icon"); + g_signal_connect (item, "activate", + G_CALLBACK (local_icon_toggle_cb), ci); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + gtk_widget_show(item); + app_indicator_set_menu (ci, GTK_MENU (menu)); mainloop = g_main_loop_new(NULL, FALSE); -- cgit v1.2.3 From 03dbdec884967325fc7e9135fbc336962ff2d6bf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 2 Dec 2010 15:06:45 -0600 Subject: Migrating to the LIBRARY flags --- example/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/Makefile.am b/example/Makefile.am index f4f2ab2..ae468f7 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -10,10 +10,10 @@ simple_client_SOURCES = \ simple-client.c simple_client_CFLAGS = \ - $(INDICATOR_CFLAGS) \ + $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src simple_client_LDADD = \ - $(INDICATOR_LIBS) \ + $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la -- cgit v1.2.3 From f1ca6d3d9b2aeb3b20b206e4bb716fc91f1e1468 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 15:34:25 -0600 Subject: Autogen --- example/Makefile.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'example') diff --git a/example/Makefile.in b/example/Makefile.in index 4496bac..0337245 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -108,7 +108,6 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSC = @CSC@ CYGPATH_W = @CYGPATH_W@ -DBUSSERVICEDIR = @DBUSSERVICEDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -135,10 +134,6 @@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@ GTK_SHARP_LIBS = @GTK_SHARP_LIBS@ HTML_DIR = @HTML_DIR@ -INDICATORDIR = @INDICATORDIR@ -INDICATORICONSDIR = @INDICATORICONSDIR@ -INDICATOR_CFLAGS = @INDICATOR_CFLAGS@ -INDICATOR_LIBS = @INDICATOR_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -155,6 +150,8 @@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ +LIBRARY_CFLAGS = @LIBRARY_CFLAGS@ +LIBRARY_LIBS = @LIBRARY_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_PREFIX = @LIB_PREFIX@ @@ -200,6 +197,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ +TESTDEPS_LIBS = @TESTDEPS_LIBS@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -265,14 +264,18 @@ simple_client_SOURCES = \ simple-client.c simple_client_CFLAGS = \ - $(INDICATOR_CFLAGS) \ + $(LIBRARY_CFLAGS) \ + -DLOCAL_ICON="\"$(abs_srcdir)/simple-client-test-icon.png\"" \ -Wall -Werror \ -I$(top_srcdir)/src simple_client_LDADD = \ - $(INDICATOR_LIBS) \ + $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la +EXTRA_DIST = \ + simple-client-test-icon.png + all: all-am .SUFFIXES: -- cgit v1.2.3