aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-25 14:54:14 -0600
committerTed Gould <ted@gould.cx>2011-01-25 14:54:14 -0600
commit30d75caf3805223cdfa609f2e4e14e75477c8df5 (patch)
tree242c1d64aa4db5c9471b7ed120d79ca2eb36ba67 /example
parent8cf0c2e5d59a905f6137a00610b298615b871573 (diff)
parentc5195ae53f4956c40b65516bcc4810aa94f985a7 (diff)
downloadlibayatana-appindicator-30d75caf3805223cdfa609f2e4e14e75477c8df5.tar.gz
libayatana-appindicator-30d75caf3805223cdfa609f2e4e14e75477c8df5.tar.bz2
libayatana-appindicator-30d75caf3805223cdfa609f2e4e14e75477c8df5.zip
Fixups for GTK3 Build
Diffstat (limited to 'example')
-rw-r--r--example/Makefile.am8
-rw-r--r--example/simple-client.c5
2 files changed, 10 insertions, 3 deletions
diff --git a/example/Makefile.am b/example/Makefile.am
index e23e08d..0900baf 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,3 +1,9 @@
+if USE_GTK3
+VER=3
+else
+VER=
+endif
+
check_PROGRAMS = \
simple-client
@@ -17,7 +23,7 @@ simple_client_CFLAGS = \
simple_client_LDADD = \
$(LIBRARY_LIBS) \
- $(top_builddir)/src/libappindicator.la
+ $(top_builddir)/src/libappindicator$(VER).la
EXTRA_DIST = \
simple-client-test-icon.png
diff --git a/example/simple-client.c b/example/simple-client.c
index 734aff6..ac8360f 100644
--- a/example/simple-client.c
+++ b/example/simple-client.c
@@ -86,13 +86,14 @@ toggle_sensitivity_cb (GtkWidget *widget, gpointer data)
{
GtkWidget *target = (GtkWidget *)data;
- gtk_widget_set_sensitive (target, !GTK_WIDGET_IS_SENSITIVE (target));
+ gtk_widget_set_sensitive (target, !gtk_widget_is_sensitive (target));
}
static void
image_clicked_cb (GtkWidget *widget, gpointer data)
{
- gtk_image_set_from_stock (GTK_IMAGE (GTK_IMAGE_MENU_ITEM (widget)->image),
+ gtk_image_set_from_stock (GTK_IMAGE (gtk_image_menu_item_get_image (
+ GTK_IMAGE_MENU_ITEM (widget))),
GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
}