From 0b74cacedbb3aa39c347957a3bacad954d349e5a Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 17 Feb 2012 17:40:07 +0100 Subject: Distribute data/indicator-printers.service.in instead of the locally generated one --- data/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Makefile.am b/data/Makefile.am index 1ecc4e7..133a853 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -5,7 +5,7 @@ dbus_services_DATA = indicator-printers.service %.service: %.service.in sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ -EXTRA_DIST = indicator-printers.service +EXTRA_DIST = indicator-printers.service.in CLEANFILES = $(dbus_services_DATA) -- cgit v1.2.3 From 6aa8774c5f187531b448dee3a8bd3973738d748a Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 17 Feb 2012 17:48:10 +0100 Subject: 0.1.2 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a5b0c54..5e1d2b6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(indicator-printers, 0.1.1) +AC_INIT(indicator-printers, 0.1.2) AC_PREREQ(2.53) AM_INIT_AUTOMAKE([]) -- cgit v1.2.3 From 72a38572117eb68dfa138ad7b10a98a2b0fd35de Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 17 Feb 2012 19:14:02 +0100 Subject: Create an IndicatorServiceManager in libprintersmenu.so --- src/indicator-printers.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/indicator-printers.c b/src/indicator-printers.c index bcb0579..b69c093 100644 --- a/src/indicator-printers.c +++ b/src/indicator-printers.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -40,6 +41,7 @@ G_DEFINE_TYPE (IndicatorPrinters, indicator_printers, INDICATOR_OBJECT_TYPE) struct _IndicatorPrintersPrivate { + IndicatorServiceManager *service; IndicatorObjectEntry entry; }; @@ -48,6 +50,7 @@ static void dispose (GObject *object) { IndicatorPrinters *self = INDICATOR_PRINTERS (object); + g_clear_object (&self->priv->service); g_clear_object (&self->priv->entry.menu); g_clear_object (&self->priv->entry.image); G_OBJECT_CLASS (indicator_printers_parent_class)->dispose (object); @@ -76,6 +79,18 @@ indicator_printers_class_init (IndicatorPrintersClass *klass) } +static void +connection_changed (IndicatorServiceManager *service, + gboolean connected, + gpointer user_data) +{ + IndicatorPrinters *self = INDICATOR_PRINTERS (user_data); + + if (!connected) + indicator_object_set_visible (INDICATOR_OBJECT (self), FALSE); +} + + static GdkPixbuf * gdk_pixbuf_new_from_encoded_data (guchar *data, gsize length) @@ -254,6 +269,11 @@ indicator_printers_init (IndicatorPrinters *self) IndicatorPrintersPrivate); self->priv = priv; + priv->service = indicator_service_manager_new_version (INDICATOR_PRINTERS_DBUS_NAME, + INDICATOR_PRINTERS_DBUS_VERSION); + g_signal_connect (priv->service, "connection-change", + G_CALLBACK (connection_changed), self); + menu = dbusmenu_gtkmenu_new(INDICATOR_PRINTERS_DBUS_NAME, INDICATOR_PRINTERS_DBUS_OBJECT_PATH); -- cgit v1.2.3 From 8e95494fc099e27de74fe365f1aba30c6fc83659 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 17 Feb 2012 19:15:06 +0100 Subject: 0.1.3 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5e1d2b6..033991a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(indicator-printers, 0.1.2) +AC_INIT(indicator-printers, 0.1.3) AC_PREREQ(2.53) AM_INIT_AUTOMAKE([]) -- cgit v1.2.3