diff options
author | Ted Gould <ted@canonical.com> | 2009-02-09 11:33:03 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-02-09 11:33:03 -0600 |
commit | 42e990fe99a727db4a9e6c00a82212cc8733eef7 (patch) | |
tree | 26dc55956d988247ab66ede8c43c9777dafa8f24 | |
parent | af60279179c1e3998796d3b172b1401bd9a678df (diff) | |
parent | 9d73c89bcac7a548614815c183295ee802fd27d7 (diff) | |
download | libayatana-indicator-42e990fe99a727db4a9e6c00a82212cc8733eef7.tar.gz libayatana-indicator-42e990fe99a727db4a9e6c00a82212cc8733eef7.tar.bz2 libayatana-indicator-42e990fe99a727db4a9e6c00a82212cc8733eef7.zip |
Merge from trunk
-rw-r--r-- | debian/changelog | 55 | ||||
-rw-r--r-- | debian/libindicate0.install | 2 | ||||
-rw-r--r-- | libindicate/Makefile.am | 48 | ||||
-rw-r--r-- | libindicate/indicator.c | 4 | ||||
-rw-r--r-- | libindicate/server.c | 30 |
5 files changed, 107 insertions, 32 deletions
diff --git a/debian/changelog b/debian/changelog index 6ecbe69..306be6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,58 @@ +indicator-applet (0.1~ppa35) intrepid; urgency=low + + * Better use of type and sending it with signals. + * Making it so that the server hide function works better. + * Only sending property updates if the indicator is + visible. + + -- Ted Gould <ted@ubuntu.com> Mon, 09 Feb 2009 11:01:11 -0600 + +indicator-applet (0.1~ppa34) intrepid; urgency=low + + * Ah, listener fixes too. Make everything get together and + use the new APIs. + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 15:02:57 +0100 + +indicator-applet (0.1~ppa33) intrepid; urgency=low + + * Version bump, autogen.sh + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 14:35:38 +0100 + +indicator-applet (0.1~ppa32) intrepid; urgency=low + + * Adding back in the package config data + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 14:14:33 +0100 + +indicator-applet (0.1~ppa31) intrepid; urgency=low + + * Ah, silly packaging stuff. I hate packaging. + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 11:39:04 +0100 + +indicator-applet (0.1~ppa30) intrepid; urgency=low + + * Removing GObject introspection, so that it will build in + the PPA. Will put back later. + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 10:39:59 +0100 + +indicator-applet (0.1~ppa29) intrepid; urgency=low + + * Bumping for PPA as forgot to run autogen.sh + + -- Ted Gould <ted@ubuntu.com> Fri, 06 Feb 2009 00:29:11 +0100 + +indicator-applet (0.1~ppa28) intrepid; urgency=low + + * Updating the server interface to have signals for show and hide + on the server and having properties for the desktop and type + of the server. + + -- Ted Gould <ted@ubuntu.com> Thu, 05 Feb 2009 18:22:19 +0100 + indicator-applet (0.1~ppa27) intrepid; urgency=low * Adding an API function for pixbufs diff --git a/debian/libindicate0.install b/debian/libindicate0.install index a83aa8a..0618a58 100644 --- a/debian/libindicate0.install +++ b/debian/libindicate0.install @@ -1,3 +1 @@ debian/tmp/usr/lib/libindicate.so.* -debian/tmp/usr/share/gir/ -debian/tmp/usr/lib/girepository/ diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index 5b43425..3eb14af 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -74,28 +74,28 @@ listener-marshal.c: $(srcdir)/listener-marshal.list pkgconfig_DATA = indicate.pc pkgconfigdir = $(libdir)/pkgconfig -gobjectintrospection_gir_DATA = \ - Indicate-0.1.gir -gobjectintrospection_girdir = $(datadir)/gir - -gobjectintrospection_type_DATA = \ - Indicate-0.1.typelib -gobjectintrospection_typedir = $(libdir)/girepository - -irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_headers)) -Indicate-0.1.gir: $(irscanner_headers) - $(G_IR_SCANNER) \ - -v --namespace Indicate \ - --nsversion=0.1 \ - --add-include-path=$(srcdir) \ - --include=GObject-2.0 \ - --include=GLib-2.0 \ - --include=GdkPixbuf-2.0 \ - --library=indicate --pkg indicate \ - --output Indicate-0.1.gir $(irscanner_headers) - -Indicate-0.1.typelib: Indicate-0.1.gir - $(G_IR_COMPILER) \ - --includedir=$(srcdir) Indicate-0.1.gir \ - -o Indicate-0.1.typelib +#gobjectintrospection_gir_DATA = \ +# Indicate-0.1.gir +#gobjectintrospection_girdir = $(datadir)/gir +# +#gobjectintrospection_type_DATA = \ +# Indicate-0.1.typelib +#gobjectintrospection_typedir = $(libdir)/girepository +# +#irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_headers)) +#Indicate-0.1.gir: $(irscanner_headers) +# $(G_IR_SCANNER) \ +# -v --namespace Indicate \ +# --nsversion=0.1 \ +# --add-include-path=$(srcdir) \ +# --include=GObject-2.0 \ +# --include=GLib-2.0 \ +# --include=GdkPixbuf-2.0 \ +# --library=indicate --pkg indicate \ +# --output Indicate-0.1.gir $(irscanner_headers) +# +#Indicate-0.1.typelib: Indicate-0.1.gir +# $(G_IR_COMPILER) \ +# --includedir=$(srcdir) Indicate-0.1.gir \ +# -o Indicate-0.1.typelib diff --git a/libindicate/indicator.c b/libindicate/indicator.c index b77d7d7..cf77316 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -255,7 +255,9 @@ set_property (IndicateIndicator * indicator, const gchar * key, const gchar * da /* If the value has changed or there is no value */ gchar * newkey = g_strdup(key); g_hash_table_insert(priv->properties, newkey, g_strdup(data)); - g_signal_emit(indicator, signals[MODIFIED], 0, newkey, TRUE); + if (indicate_indicator_is_visible(indicator)) { + g_signal_emit(indicator, signals[MODIFIED], 0, newkey, TRUE); + } } return; diff --git a/libindicate/server.c b/libindicate/server.c index f5bd0bb..7daedc7 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -40,6 +40,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; typedef struct _IndicateServerPrivate IndicateServerPrivate; struct _IndicateServerPrivate { + DBusGConnection *connection; gchar * path; GSList * indicators; gboolean visible; @@ -175,7 +176,9 @@ indicate_server_finalize (GObject * obj) IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(server); /* TODO: This probably shouldn't be as far down as finalize, but it's fine here. */ - g_signal_emit(server, signals[SERVER_HIDE], 0, priv->type ? priv->type : "", TRUE); + if (priv->visible) { + g_signal_emit(server, signals[SERVER_HIDE], 0, priv->type ? priv->type : "", TRUE); + } if (priv->path) { g_free(priv->path); @@ -261,11 +264,9 @@ indicate_server_show (IndicateServer * server) if (priv->visible) return; - DBusGConnection * connection; - - connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + priv->connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - dbus_g_connection_register_g_object(connection, + dbus_g_connection_register_g_object(priv->connection, priv->path, G_OBJECT(server)); priv->visible = TRUE; @@ -275,6 +276,25 @@ indicate_server_show (IndicateServer * server) return; } +void +indicate_server_hide (IndicateServer * server) +{ + g_return_if_fail(INDICATE_IS_SERVER(server)); + IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(server); + + if (priv->visible) + return; + + priv->visible = FALSE; + + g_signal_emit(server, signals[SERVER_HIDE], 0, priv->type ? priv->type : "", TRUE); + + dbus_g_connection_unref (priv->connection); + priv->connection = NULL; + + return; +} + static guint get_next_id (IndicateServer * server) { |