aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--debian/changelog10
-rw-r--r--src/libappindicator/app-indicator.c35
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/test-libappindicator.c2
5 files changed, 46 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 8f099ea..dc1b787 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-application, 0.0.17, ted@canonical.com)
+AC_INIT(indicator-application, 0.0.18, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-application, 0.0.17)
+AM_INIT_AUTOMAKE(indicator-application, 0.0.18)
AM_MAINTAINER_MODE
diff --git a/debian/changelog b/debian/changelog
index e7b2477..cb8804e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+indicator-application (0.0.18-0ubuntu1~ppa1) UNRELEASED; urgency=low
+
+ * Upstream Release 0.0.18
+ * Change when there are updates to Check and Radio buttons via
+ their actions. (LP: #542221)
+ * Fixing icon updating with themes and naming fallbacks with
+ the status icon fallback. (LP: #532858)
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 25 Mar 2010 11:53:14 -0500
+
indicator-application (0.0.17-0ubuntu1~ppa1) lucid; urgency=low
* Upstream Release 0.0.17
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 1dce0a0..6cb49b9 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -144,6 +144,8 @@ static void watcher_proxy_destroyed (GObject * object, gpointer data);
static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
static void submenu_changed (GtkWidget *widget, GtkWidget *child, gpointer data);
+static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data);
+
/* GObject type */
G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);
@@ -335,6 +337,9 @@ app_indicator_init (AppIndicator *self)
}
dbus_g_connection_ref(priv->connection);
+ g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()),
+ "changed", G_CALLBACK(theme_changed_cb), self);
+
self->priv = priv;
return;
@@ -812,6 +817,13 @@ fallback_timer_expire (gpointer data)
return FALSE;
}
+/* emit a NEW_ICON signal in response for the theme change */
+static void
+theme_changed_cb (GtkIconTheme * theme, gpointer user_data)
+{
+ g_signal_emit (user_data, signals[NEW_ICON], 0, TRUE);
+}
+
/* Creates a StatusIcon that can be used when the application
indicator area isn't available. */
static GtkStatusIcon *
@@ -849,22 +861,32 @@ static void
status_icon_changes (AppIndicator * self, gpointer data)
{
GtkStatusIcon * icon = GTK_STATUS_ICON(data);
+ GIcon *themed_icon = NULL;
switch (app_indicator_get_status(self)) {
case APP_INDICATOR_STATUS_PASSIVE:
+ themed_icon =
+ g_themed_icon_new_with_default_fallbacks (app_indicator_get_icon (self));
gtk_status_icon_set_visible(icon, FALSE);
- gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
+ gtk_status_icon_set_from_gicon(icon, themed_icon);
break;
case APP_INDICATOR_STATUS_ACTIVE:
- gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
+ themed_icon =
+ g_themed_icon_new_with_default_fallbacks (app_indicator_get_icon (self));
+ gtk_status_icon_set_from_gicon(icon, themed_icon);
gtk_status_icon_set_visible(icon, TRUE);
break;
case APP_INDICATOR_STATUS_ATTENTION:
- gtk_status_icon_set_from_icon_name(icon, app_indicator_get_attention_icon(self));
+ themed_icon =
+ g_themed_icon_new_with_default_fallbacks (app_indicator_get_attention_icon (self));
+ gtk_status_icon_set_from_gicon(icon, themed_icon);
gtk_status_icon_set_visible(icon, TRUE);
break;
};
+ if (themed_icon)
+ g_object_unref (themed_icon);
+
return;
}
@@ -1200,6 +1222,13 @@ action_notify_cb (GtkAction *action,
{
DbusmenuMenuitem *child = (DbusmenuMenuitem *)data;
+ if (pspec->name == g_intern_static_string ("active"))
+ {
+ dbusmenu_menuitem_property_set_bool (child,
+ DBUSMENU_MENUITEM_PROP_TOGGLE_STATE,
+ gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+ }
+
if (pspec->name == g_intern_static_string ("label"))
{
dbusmenu_menuitem_property_set (child,
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d42ed2b..d3b18d8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -143,6 +143,7 @@ HTML_REPORT = libappindicator-check-results.html
libappindicator-tests: libappindicator-tests-gtester Makefile.am
@echo "#!/bin/sh" > $@
+ @echo . $(srcdir)/run-xvfb.sh >> $@
@echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@
@chmod +x $@
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 896782d..c987a8f 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -176,7 +176,7 @@ test_libappindicator_props_suite (void)
gint
main (gint argc, gchar * argv[])
{
- g_type_init();
+ gtk_init(&argc, &argv);
g_test_init(&argc, &argv, NULL);
/* Test suites */