diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/libappindicator/app-indicator.c | 14 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rw-r--r-- | tests/run-xvfb.sh | 7 |
4 files changed, 19 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 61be6f8..5aa7a58 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ AC_CONFIG_MACRO_DIR(m4) GTK_REQUIRED_VERSION=2.12 INDICATOR_REQUIRED_VERSION=0.3.1 -DBUSMENUGTK_REQUIRED_VERSION=0.1.1 +DBUSMENUGTK_REQUIRED_VERSION=0.2.2 JSON_GLIB_REQUIRED_VERSION=0.7.6 PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index 575b613..1d8148c 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -987,8 +987,8 @@ activate_menuitem (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data) static void widget_toggled (GtkWidget *widget, DbusmenuMenuitem *mi) { - dbusmenu_menuitem_property_set (mi, - DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, + dbusmenu_menuitem_property_set_int (mi, + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); } @@ -1014,7 +1014,7 @@ update_icon_name (DbusmenuMenuitem *menuitem, return; dbusmenu_menuitem_property_set (menuitem, - DBUSMENU_MENUITEM_PROP_ICON, + DBUSMENU_MENUITEM_PROP_ICON_NAME, image->data.name.icon_name); } @@ -1031,7 +1031,7 @@ update_stock_item (DbusmenuMenuitem *menuitem, gtk_stock_lookup (image->data.stock.stock_id, &stock); dbusmenu_menuitem_property_set (menuitem, - DBUSMENU_MENUITEM_PROP_ICON, + DBUSMENU_MENUITEM_PROP_ICON_NAME, image->data.stock.stock_id); if (stock.label != NULL) @@ -1074,7 +1074,7 @@ widget_notify_cb (GtkWidget *widget, if (pspec->name == g_intern_static_string ("sensitive")) { dbusmenu_menuitem_property_set_bool (child, - DBUSMENU_MENUITEM_PROP_SENSITIVE, + DBUSMENU_MENUITEM_PROP_ENABLED, GTK_WIDGET_IS_SENSITIVE (widget)); } else if (pspec->name == g_intern_static_string ("label")) @@ -1121,8 +1121,8 @@ container_iterate (GtkWidget *widget, label_set = TRUE; - dbusmenu_menuitem_property_set (child, - DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, + dbusmenu_menuitem_property_set_int (child, + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, gtk_check_menu_item_get_active (check) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); g_signal_connect (widget, diff --git a/tests/Makefile.am b/tests/Makefile.am index c94ebdd..327c8cc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,6 +10,8 @@ check_PROGRAMS = \ TESTS = DISTCLEANFILES = $(TESTS) +EXTRA_DIST = run-xvfb.sh + ######################################### ## test-libappindicator ######################################### @@ -89,7 +91,8 @@ test_libappindicator_fallback_item_LDADD = \ $(top_builddir)/src/libappindicator.la test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am - @echo "#!/bin/sh" > $@ + @echo "#!/bin/bash" > $@ + @echo . $(srcdir)/run-xvfb.sh >> $@ @echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@ @chmod +x $@ diff --git a/tests/run-xvfb.sh b/tests/run-xvfb.sh new file mode 100644 index 0000000..3622dbf --- /dev/null +++ b/tests/run-xvfb.sh @@ -0,0 +1,7 @@ +if [ "$DISPLAY" == "" ]; then +Xvfb -ac -noreset -screen 0 800x600x16 -help 2>/dev/null 1>&2 +XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; exit 1` +{ Xvfb -ac -noreset -screen 0 800x600x16 :$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } +DISPLAY=:$XID +export DISPLAY +fi |