From d0a0e2af977c560d9fad942f569d64960ce60c20 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 25 Jan 2011 14:38:47 -0600 Subject: releasing version 0.2.91.1-0ubuntu2~ted1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 52fb96d..98e6994 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -libappindicator (0.2.91.1-0ubuntu2~ted1) UNRELEASED; urgency=low +libappindicator (0.2.91.1-0ubuntu2~ted1) natty; urgency=low * Upstream Merge * Use the dbusmenu parser - -- Ted Gould Tue, 25 Jan 2011 14:35:36 -0600 + -- Ted Gould Tue, 25 Jan 2011 14:38:44 -0600 libappindicator (0.2.91.1-0ubuntu1) natty; urgency=low -- cgit v1.2.3 From 52b2a291e980e75e3fc45aa3d0ae2f8f40566c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 00:29:57 +0100 Subject: app-indicator: listen for XAyatanaScrollAction and emit "scroll-event" signal libappindicator now when it gets a dbus call from indicator-application (via the method XAyatanaScrollAction) about the incoming scroll event, sends a "scroll-event" signal to the appindicator application using this library. This works both in indicator and fallback (systray mode). This commit includes a fix for bug #707591 --- src/app-indicator.c | 76 +++++++++++++++++++++++++++++++++++- src/app-indicator.h | 16 ++++++-- src/application-service-marshal.list | 1 + src/notification-item.xml | 6 ++- 4 files changed, 92 insertions(+), 7 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 40959bf..8f8661b 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -102,6 +102,7 @@ enum { NEW_LABEL, CONNECTION_CHANGED, NEW_ICON_THEME_PATH, + SCROLL_EVENT, LAST_SIGNAL }; @@ -169,8 +170,10 @@ static void start_fallback_timer (AppIndicator * self, gboolean disable_timeout) static gboolean fallback_timer_expire (gpointer data); static GtkStatusIcon * fallback (AppIndicator * self); static void status_icon_status_wrapper (AppIndicator * self, const gchar * status, gpointer data); +static gboolean scroll_event_wrapper(GtkWidget *status_icon, GdkEventScroll *event, gpointer user_data); static void status_icon_changes (AppIndicator * self, gpointer data); static void status_icon_activate (GtkStatusIcon * icon, gpointer data); +static void status_icon_menu_activate (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon); static gchar * append_panel_icon_suffix (const gchar * icon_name); static void watcher_owner_changed (GObject * obj, GParamSpec * pspec, gpointer user_data); @@ -178,11 +181,12 @@ static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicat static void submenu_changed (GtkWidget *widget, GtkWidget *child, gpointer data); static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data); static GVariant * bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * property, GError ** error, gpointer user_data); +static void bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * method, GVariant * params, GDBusMethodInvocation * invocation, gpointer user_data); static void bus_creation (GObject * obj, GAsyncResult * res, gpointer user_data); static void bus_watcher_ready (GObject * obj, GAsyncResult * res, gpointer user_data); static const GDBusInterfaceVTable item_interface_table = { - method_call: NULL, /* No methods on this object */ + method_call: bus_method_call, get_property: bus_get_prop, set_property: NULL /* No properties that can be set */ }; @@ -469,6 +473,21 @@ app_indicator_class_init (AppIndicatorClass *klass) g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); + /** + AppIndicator::scroll-event: + @arg0: The #AppIndicator object + + Signaled when there is a new icon set for the + object. + */ + signals[SCROLL_EVENT] = g_signal_new (APP_INDICATOR_SIGNAL_SCROLL_EVENT, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AppIndicatorClass, scroll_event), + NULL, NULL, + _application_service_marshal_VOID__INT_UINT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); + /* DBus interfaces */ if (item_node_info == NULL) { GError * error = NULL; @@ -899,6 +918,30 @@ bus_creation (GObject * obj, GAsyncResult * res, gpointer user_data) return; } +static void +bus_method_call (GDBusConnection * connection, const gchar * sender, + const gchar * path, const gchar * interface, + const gchar * method, GVariant * params, + GDBusMethodInvocation * invocation, gpointer user_data) +{ + g_return_if_fail(IS_APP_INDICATOR(user_data)); + + AppIndicator * app = APP_INDICATOR(user_data); + GVariant * retval = NULL; + + if (g_strcmp0(method, "XAyatanaScrollAction") == 0) { + gint delta; + guint direction; + + g_variant_get(params, "(iu)", &delta, &direction); + g_signal_emit(app, signals[SCROLL_EVENT], 0, delta, direction); + } else { + g_warning("Calling method '%s' on the app-indicator and it's unknown", method); + } + + g_dbus_method_invocation_return_value(invocation, retval); +} + /* DBus is asking for a property so we should figure out what it wants and try and deliver. */ static GVariant * @@ -1053,7 +1096,8 @@ check_connect (AppIndicator *self) if (priv->watcher_proxy == NULL) { /* Build Watcher Proxy */ g_dbus_proxy_new(priv->connection, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, /* We don't use these, don't bother with them */ + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES| + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, /* We don't use these, don't bother with them */ watcher_interface_info, NOTIFICATION_WATCHER_DBUS_ADDR, NOTIFICATION_WATCHER_DBUS_OBJ, @@ -1101,6 +1145,11 @@ bus_watcher_ready (GObject * obj, GAsyncResult * res, gpointer user_data) /* Setting up a signal to watch when the unique name changes */ g_signal_connect(G_OBJECT(app->priv->watcher_proxy), "notify::g-name-owner", G_CALLBACK(watcher_owner_changed), user_data); + + char * name = g_dbus_proxy_get_name_owner(app->priv->watcher_proxy); + if (name != NULL) { + g_free(name); + } } /* Let's insure that someone is on the other side, else we're @@ -1315,6 +1364,8 @@ fallback (AppIndicator * self) status_icon_changes(self, icon); g_signal_connect(G_OBJECT(icon), "activate", G_CALLBACK(status_icon_activate), self); + g_signal_connect(G_OBJECT(icon), "popup-menu", G_CALLBACK(status_icon_menu_activate), self); + g_signal_connect(G_OBJECT(icon), "scroll-event", G_CALLBACK(scroll_event_wrapper), self); return icon; } @@ -1327,6 +1378,18 @@ status_icon_status_wrapper (AppIndicator * self, const gchar * status, gpointer return status_icon_changes(self, data); } +/* A wrapper for redirecting the scroll events to the app-indicator from status + icon widget. */ +static gboolean +scroll_event_wrapper(GtkWidget *status_icon, GdkEventScroll *event, gpointer data) +{ + g_return_val_if_fail(IS_APP_INDICATOR(data), FALSE); + AppIndicator * app = APP_INDICATOR(data); + g_signal_emit(app, signals[SCROLL_EVENT], 0, 1, event->direction); + + return FALSE; +} + /* This tracks changes to either the status or the icons that are associated with the app indicator */ static void @@ -1388,6 +1451,14 @@ status_icon_activate (GtkStatusIcon * icon, gpointer data) return; } +/* Handles the right-click action by the status icon by showing + the menu in a popup. */ +static void +status_icon_menu_activate (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) +{ + status_icon_activate(status_icon, user_data); +} + /* Removes the status icon as the application indicator area is now up and running again. */ static void @@ -1395,6 +1466,7 @@ unfallback (AppIndicator * self, GtkStatusIcon * status_icon) { g_signal_handlers_disconnect_by_func(G_OBJECT(self), status_icon_status_wrapper, status_icon); g_signal_handlers_disconnect_by_func(G_OBJECT(self), status_icon_changes, status_icon); + g_signal_handlers_disconnect_by_func(G_OBJECT(self), scroll_event_wrapper, status_icon); gtk_status_icon_set_visible(status_icon, FALSE); g_object_unref(G_OBJECT(status_icon)); return; diff --git a/src/app-indicator.h b/src/app-indicator.h index 3e159db..9e0d15f 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -107,12 +107,18 @@ G_BEGIN_DECLS String identifier for the #AppIndicator::new-icon-theme-path signal. */ +/** + APP_INDICATOR_SIGNAL_SCROLL_EVENT: + + String identifier for the #AppIndicator::scroll-event signal. +*/ #define APP_INDICATOR_SIGNAL_NEW_ICON "new-icon" #define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon" #define APP_INDICATOR_SIGNAL_NEW_STATUS "new-status" #define APP_INDICATOR_SIGNAL_NEW_LABEL "new-label" #define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed" #define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path" +#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event" /** AppIndicatorCategory: @@ -163,7 +169,7 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate; @new_icon_theme_path: Slot for #AppIndicator::new-icon-theme-path @new_label: Slot for #AppIndicator::new-label. @connection_changed: Slot for #AppIndicator::connection-changed. - @app_indicator_reserved_sw: Reserved for future use. + @scroll-event: Slot for #AppIndicator::scroll-event @app_indicator_reserved_ats: Reserved for future use. @fallback: Function that gets called to make a #GtkStatusIcon when there is no Application Indicator area available. @@ -203,7 +209,12 @@ struct _AppIndicatorClass { void (* connection_changed) (AppIndicator * indicator, gboolean connected, gpointer user_data); - void (*app_indicator_reserved_sw)(void); + + void (* scroll_event) (AppIndicator * indicator, + gint delta, + guint direction, + gpointer user_data); + void (*app_indicator_reserved_ats)(void); /* Overridable Functions */ @@ -217,7 +228,6 @@ struct _AppIndicatorClass { void (*app_indicator_reserved_3)(void); void (*app_indicator_reserved_4)(void); void (*app_indicator_reserved_5)(void); - void (*app_indicator_reserved_6)(void); }; /** diff --git a/src/application-service-marshal.list b/src/application-service-marshal.list index 2b2efa5..39a55fe 100644 --- a/src/application-service-marshal.list +++ b/src/application-service-marshal.list @@ -21,3 +21,4 @@ VOID: INT, STRING, STRING VOID: INT, STRING VOID: STRING, STRING VOID: BOOL, STRING, OBJECT +VOID: INT, UINT diff --git a/src/notification-item.xml b/src/notification-item.xml index 05afd83..48e9695 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -17,7 +17,10 @@ - + + + + @@ -34,6 +37,5 @@ - -- cgit v1.2.3 From eb8d8a3494af3c7fc57f97bd72486da0962a36ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 00:30:30 +0100 Subject: Updated mono bindings --- bindings/mono/libappindicator-api.metadata | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata index ccf58f1..e241ecf 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -9,6 +9,8 @@ new-label ConnectionChanged connection-changed + ScrollEvent + scroll-event NewIcon new-icon NewIconThemePath -- cgit v1.2.3 From e18d298c9366e46a66948cd06165aadf01824da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 12:40:33 +0100 Subject: app-indicator: remove old debug code. --- src/app-indicator.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 8f8661b..4bef6de 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1145,11 +1145,6 @@ bus_watcher_ready (GObject * obj, GAsyncResult * res, gpointer user_data) /* Setting up a signal to watch when the unique name changes */ g_signal_connect(G_OBJECT(app->priv->watcher_proxy), "notify::g-name-owner", G_CALLBACK(watcher_owner_changed), user_data); - - char * name = g_dbus_proxy_get_name_owner(app->priv->watcher_proxy); - if (name != NULL) { - g_free(name); - } } /* Let's insure that someone is on the other side, else we're -- cgit v1.2.3 From a71428d1eb3598bc2739249ddd96b6a5ef1115f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 12:40:58 +0100 Subject: app-indicator: don't use two AppIndicator slots, reset one. --- src/app-indicator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app-indicator.h b/src/app-indicator.h index 9e0d15f..abd6699 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -228,6 +228,7 @@ struct _AppIndicatorClass { void (*app_indicator_reserved_3)(void); void (*app_indicator_reserved_4)(void); void (*app_indicator_reserved_5)(void); + void (*app_indicator_reserved_6)(void); }; /** -- cgit v1.2.3 From 11add3f09572d15b8e73e5e86cda5c554d7a8a96 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Jan 2011 09:00:10 -0600 Subject: releasing version 0.2.91.1-0ubuntu2~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 915cee4..6062b60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -libappindicator (0.2.91.1-0ubuntu2~ppa1) UNRELEASED; urgency=low +libappindicator (0.2.91.1-0ubuntu2~ppa1) natty; urgency=low * Upstream Merge * Fixes to build system to build with GTK3 * Use the dbusmenu parser - -- Ted Gould Thu, 27 Jan 2011 08:53:54 -0600 + -- Ted Gould Thu, 27 Jan 2011 09:00:08 -0600 libappindicator (0.2.91.1-0ubuntu1) natty; urgency=low -- cgit v1.2.3 From 0ab2c933bfd2745bc47c5b12e0488a13b91bfde3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Jan 2011 14:58:37 -0600 Subject: releasing version 0.2.92-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c9d3ae0..acebeb6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -libappindicator (0.2.92-0ubuntu1~ppa1) UNRELEASED; urgency=low +libappindicator (0.2.92-0ubuntu1~ppa1) natty; urgency=low * New upstream release. * Fixes to build system to build with GTK3 * Use the dbusmenu parser - -- Ted Gould Thu, 27 Jan 2011 14:54:17 -0600 + -- Ted Gould Thu, 27 Jan 2011 14:58:35 -0600 libappindicator (0.2.91.1-0ubuntu1) natty; urgency=low -- cgit v1.2.3 From 0d97a5e6201be283ba2dd017297b71122c7f19e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 29 Jan 2011 03:27:29 +0100 Subject: Using the SNI method "Scroll" instead of XAyatanaScrollAction The indicator signal will use anyway the same syntax. --- src/app-indicator.c | 19 ++++++++++++++++--- src/notification-item.xml | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 4bef6de..26d8c73 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -929,12 +929,25 @@ bus_method_call (GDBusConnection * connection, const gchar * sender, AppIndicator * app = APP_INDICATOR(user_data); GVariant * retval = NULL; - if (g_strcmp0(method, "XAyatanaScrollAction") == 0) { - gint delta; + if (g_strcmp0(method, "Scroll") == 0) { guint direction; + gint delta; + const gchar *orientation; + + g_variant_get(params, "(i&s)", &delta, &orientation); + + if (g_strcmp0(orientation, "horizontal") == 0) { + direction = (delta >= 0) ? GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT; + } else if (g_strcmp0(orientation, "vertical") == 0) { + direction = (delta >= 0) ? GDK_SCROLL_DOWN : GDK_SCROLL_UP; + } else { + g_dbus_method_invocation_return_value(invocation, retval); + return; + } - g_variant_get(params, "(iu)", &delta, &direction); + delta = ABS(delta); g_signal_emit(app, signals[SCROLL_EVENT], 0, delta, direction); + } else { g_warning("Calling method '%s' on the app-indicator and it's unknown", method); } diff --git a/src/notification-item.xml b/src/notification-item.xml index 48e9695..127eb3a 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -17,9 +17,9 @@ - + - + -- cgit v1.2.3 From 7f49d7c2602ccb2ef01c64067e2abcc6b5715200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 16:22:06 +0100 Subject: Adding vala bindings and example Adding proper support for vala bindings, fixing the include path Now they are built in the bindings subfolder and they include a *.deps file. and I've also added a small example. --- bindings/Makefile.am | 7 +++-- bindings/vala/Makefile.am | 32 +++++++++++++++++++ bindings/vala/examples/Makefile.am | 14 +++++++++ bindings/vala/examples/indicator-example.vala | 45 +++++++++++++++++++++++++++ configure.ac | 9 ++++++ src/AppIndicator-0.1.metadata | 2 ++ src/Makefile.am | 29 +++-------------- 7 files changed, 111 insertions(+), 27 deletions(-) create mode 100644 bindings/vala/Makefile.am create mode 100644 bindings/vala/examples/Makefile.am create mode 100644 bindings/vala/examples/indicator-example.vala diff --git a/bindings/Makefile.am b/bindings/Makefile.am index f74dec5..8e621e4 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -1,7 +1,10 @@ if USE_GTK3 -SUBDIRS = mono +SUBDIRS = \ + mono \ + vala else SUBDIRS = \ mono \ - python + python \ + vala endif diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am new file mode 100644 index 0000000..c4627f5 --- /dev/null +++ b/bindings/vala/Makefile.am @@ -0,0 +1,32 @@ +SUBDIRS = . examples + + +######################### +# VAPI Files +######################### + +if HAVE_INTROSPECTION + +if USE_GTK3 +GTKVAPI = gtk+-3.0 +else +GTKVAPI = gtk+-2.0 +endif + +vapidir = $(datadir)/vala/vapi +vapiprefix = appindicator$(VER)-0.1 +vapi_DATA = $(vapiprefix).vapi $(vapiprefix).deps +DEPS = $(GTKVAPI) + +$(vapiprefix).deps: + echo $(DEPS) > $@ + +$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps + $(VALA_API_GEN) --library=$(vapiprefix) \ + --pkg $(GTKVAPI) \ + $< + + +CLEANFILES = $(vapi_DATA) + +endif diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am new file mode 100644 index 0000000..6c3bd3c --- /dev/null +++ b/bindings/vala/examples/Makefile.am @@ -0,0 +1,14 @@ + +TESTS = indicator-example +VALAFILES = indicator-example.vala +CLEANFILES = $(TESTS) *.c +EXTRA_DIST = $(VALAFILES) + +VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps + +if HAVE_VALAC +$(TESTS): $(VALAFILES) Makefile.am + $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) + +all: $(TESTS) +endif diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala new file mode 100644 index 0000000..908913a --- /dev/null +++ b/bindings/vala/examples/indicator-example.vala @@ -0,0 +1,45 @@ +using Gtk; +using AppIndicator; + +public class IndicatorExample { + public static int main(string[] args) { + Gtk.init(ref args); + + var win = new Window(); + win.title = "Indicator Test"; + win.resize(200, 200); + win.destroy.connect(Gtk.main_quit); + + var label = new Label("Hello, world!"); + win.add(label); + + var indicator = new Indicator(win.title, "indicator-messages", + IndicatorCategory.APPLICATION_STATUS); + + indicator.set_status(IndicatorStatus.ACTIVE); + indicator.set_attention_icon("indicator-messages-new"); + + var menu = new Menu(); + var item = new MenuItem.with_label("Foo"); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + item.show(); + menu.append(item); + + + item = new MenuItem.with_label("Bar"); + item.show(); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + menu.append(item); + + indicator.set_menu(menu); + + win.show_all(); + + Gtk.main(); + return 0; + } +} diff --git a/configure.ac b/configure.ac index 6f78786..f689003 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,13 @@ AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"]) AC_PATH_PROG([VALA_API_GEN], [vapigen]) +########################### +# Vala Compiler support +########################### + +AM_PROG_VALAC([0.11.0]) +AM_CONDITIONAL(HAVE_VALAC, [test "x$VALAC" != "x"]) + ########################### # Check for Mono support ########################### @@ -205,6 +212,8 @@ bindings/mono/appindicator-sharp-0.1.pc bindings/mono/examples/Makefile bindings/mono/examples/indicator-example bindings/python/Makefile +bindings/vala/Makefile +bindings/vala/examples/Makefile tests/Makefile example/Makefile docs/Makefile diff --git a/src/AppIndicator-0.1.metadata b/src/AppIndicator-0.1.metadata index e4d068e..5790ddb 100644 --- a/src/AppIndicator-0.1.metadata +++ b/src/AppIndicator-0.1.metadata @@ -1 +1,3 @@ AppIndicator name="AppIndicator" +Indicator.priv hidden="1" +IndicatorPrivate hidden="1" diff --git a/src/Makefile.am b/src/Makefile.am index b9ee3e1..b9696c5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,12 +2,10 @@ if USE_GTK3 VER=3 lib_LTLIBRARIES = libappindicator3.la GTKGIR = Gtk-3.0 -GTKVAPI = gtk+-3.0 else VER= lib_LTLIBRARIES = libappindicator.la GTKGIR = Gtk-2.0 -GTKVAPI = gtk+-2.0 endif CLEANFILES = @@ -45,7 +43,8 @@ glib_enum_headers = $(addprefix $(srcdir)/, $(libappindicator_headers)) DISTCLEANFILES += app-indicator-enum-types.c -libappindicatorincludedir=$(includedir)/libappindicator-0.1/libappindicator +libappindicatorincludefolder=libappindicator +libappindicatorincludedir=$(includedir)/libappindicator-0.1/$(libappindicatorincludefolder) libappindicator_headers = \ app-indicator.h @@ -133,13 +132,13 @@ INTROSPECTION_GIRS = if INTROSPECTION_TEN INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ - $(addprefix --c-include=src/, $(introspection_sources)) \ + $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) \ --symbol-prefix=app \ --identifier-prefix=App else INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ - $(addprefix --c-include=src/, $(introspection_sources)) + $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) endif INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) @@ -174,23 +173,3 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) endif - -######################### -# VAPI Files -######################### - -if HAVE_INTROSPECTION - -vapidir = $(datadir)/vala/vapi -vapi_DATA = AppIndicator$(VER)-0.1.vapi - -AppIndicator$(VER)-0.1.vapi: AppIndicator$(VER)-0.1.gir Makefile.am - $(VALA_API_GEN) --library=AppIndicator$(VER)-0.1 \ - --pkg $(GTKVAPI) \ - --vapidir=$(top_builddir)/src \ - $< - -CLEANFILES += $(vapi_DATA) - -endif - -- cgit v1.2.3 From bcbd870a2f3c304aa81133aa4635ee913c9af779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 17:26:35 +0100 Subject: Vala example: adding copyright message. --- bindings/vala/examples/indicator-example.vala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index 908913a..40226df 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -1,3 +1,22 @@ +/* + * Copyright 2009 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Marco Trevisan (Treviño) + */ + using Gtk; using AppIndicator; -- cgit v1.2.3 From 99ffe8877703c2d4e7ffe0bacb2a0cc0afd70d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 17:30:27 +0100 Subject: Vala example: indentation fixes --- bindings/vala/examples/indicator-example.vala | 52 +++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index 40226df..60f62ea 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -21,44 +21,44 @@ using Gtk; using AppIndicator; public class IndicatorExample { - public static int main(string[] args) { + public static int main(string[] args) { Gtk.init(ref args); - var win = new Window(); - win.title = "Indicator Test"; - win.resize(200, 200); - win.destroy.connect(Gtk.main_quit); + var win = new Window(); + win.title = "Indicator Test"; + win.resize(200, 200); + win.destroy.connect(Gtk.main_quit); - var label = new Label("Hello, world!"); - win.add(label); + var label = new Label("Hello, world!"); + win.add(label); - var indicator = new Indicator(win.title, "indicator-messages", - IndicatorCategory.APPLICATION_STATUS); + var indicator = new Indicator(win.title, "indicator-messages", + IndicatorCategory.APPLICATION_STATUS); indicator.set_status(IndicatorStatus.ACTIVE); - indicator.set_attention_icon("indicator-messages-new"); + indicator.set_attention_icon("indicator-messages-new"); - var menu = new Menu(); - var item = new MenuItem.with_label("Foo"); - item.activate.connect(() => { - indicator.set_status(IndicatorStatus.ATTENTION); - }); - item.show(); - menu.append(item); + var menu = new Menu(); + var item = new MenuItem.with_label("Foo"); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + item.show(); + menu.append(item); - item = new MenuItem.with_label("Bar"); - item.show(); - item.activate.connect(() => { - indicator.set_status(IndicatorStatus.ATTENTION); - }); - menu.append(item); + item = new MenuItem.with_label("Bar"); + item.show(); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + menu.append(item); - indicator.set_menu(menu); + indicator.set_menu(menu); - win.show_all(); + win.show_all(); Gtk.main(); return 0; - } + } } -- cgit v1.2.3 From 2fea2064d1da2d2653009ba5f553829e67fc0d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 17:59:57 +0100 Subject: Vala example, changed copyright year --- bindings/vala/examples/indicator-example.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index 60f62ea..c91dfae 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -1,5 +1,5 @@ /* - * Copyright 2009 Canonical Ltd. + * Copyright 2011 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published -- cgit v1.2.3 From 3f2a4ba6563e8d5ba35e65710dc70e81214baaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 18:54:18 +0100 Subject: vala bindings makefile: just use deps file for dependencies --- bindings/vala/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index c4627f5..5a923a5 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -23,8 +23,7 @@ $(vapiprefix).deps: $(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps $(VALA_API_GEN) --library=$(vapiprefix) \ - --pkg $(GTKVAPI) \ - $< + $< CLEANFILES = $(vapi_DATA) -- cgit v1.2.3 From 692281a6d91151306cc8cac72c22d451c17438a1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Feb 2011 12:37:57 -0600 Subject: Changing the build to be the check instead of running it as we might not be interactive. --- bindings/vala/examples/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index 6c3bd3c..32a695b 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,5 +1,4 @@ -TESTS = indicator-example VALAFILES = indicator-example.vala CLEANFILES = $(TESTS) *.c EXTRA_DIST = $(VALAFILES) @@ -7,8 +6,8 @@ EXTRA_DIST = $(VALAFILES) VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps if HAVE_VALAC -$(TESTS): $(VALAFILES) Makefile.am +indicator-example: $(VALAFILES) Makefile.am $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) -all: $(TESTS) +check: indicator-example endif -- cgit v1.2.3 From c58fd3faa5fa27bd1500377caa2ae4908798b0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 01:32:52 +0100 Subject: Include gir metadata file in built_sources Now make distcheck will work ;) --- src/AppIndicator-0.1.metadata | 3 --- src/AppIndicator-0.1.metadata.in | 3 +++ src/AppIndicator3-0.1.metadata.in | 3 +++ src/Makefile.am | 8 +++++++- 4 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 src/AppIndicator-0.1.metadata create mode 100644 src/AppIndicator-0.1.metadata.in create mode 100644 src/AppIndicator3-0.1.metadata.in diff --git a/src/AppIndicator-0.1.metadata b/src/AppIndicator-0.1.metadata deleted file mode 100644 index 5790ddb..0000000 --- a/src/AppIndicator-0.1.metadata +++ /dev/null @@ -1,3 +0,0 @@ -AppIndicator name="AppIndicator" -Indicator.priv hidden="1" -IndicatorPrivate hidden="1" diff --git a/src/AppIndicator-0.1.metadata.in b/src/AppIndicator-0.1.metadata.in new file mode 100644 index 0000000..5790ddb --- /dev/null +++ b/src/AppIndicator-0.1.metadata.in @@ -0,0 +1,3 @@ +AppIndicator name="AppIndicator" +Indicator.priv hidden="1" +IndicatorPrivate hidden="1" diff --git a/src/AppIndicator3-0.1.metadata.in b/src/AppIndicator3-0.1.metadata.in new file mode 100644 index 0000000..5790ddb --- /dev/null +++ b/src/AppIndicator3-0.1.metadata.in @@ -0,0 +1,3 @@ +AppIndicator name="AppIndicator" +Indicator.priv hidden="1" +IndicatorPrivate hidden="1" diff --git a/src/Makefile.am b/src/Makefile.am index b9696c5..f83a6c4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ BUILT_SOURCES = EXTRA_DIST = \ appindicator-0.1.pc.in \ appindicator3-0.1.pc.in \ - AppIndicator-0.1.metadata + AppIndicator$(VER)-0.1.metadata.in include $(top_srcdir)/Makefile.am.enum include $(top_srcdir)/Makefile.am.marshal @@ -164,6 +164,12 @@ AppIndicator3_0_1_gir_FILES = $(AppIndicator_0_1_gir_FILES) INTROSPECTION_GIRS += AppIndicator$(VER)-0.1.gir +AppIndicator$(VER)-0.1.metadata: AppIndicator$(VER)-0.1.gir + cp -f $(srcdir)/$@.in $@ + +BUILT_SOURCES += AppIndicator$(VER)-0.1.metadata +CLEANFILES += AppIndicator$(VER)-0.1.metadata + girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) -- cgit v1.2.3 From 6cc0ff8c6f108324dd2310569b870b8586930712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 01:33:35 +0100 Subject: Vala bindings: add metadata as build dependencies, support for gtk3 --- bindings/vala/Makefile.am | 9 ++++++--- bindings/vala/examples/indicator-example.vala | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 5a923a5..3c17075 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -1,6 +1,5 @@ SUBDIRS = . examples - ######################### # VAPI Files ######################### @@ -9,8 +8,10 @@ if HAVE_INTROSPECTION if USE_GTK3 GTKVAPI = gtk+-3.0 +VER=3 else GTKVAPI = gtk+-2.0 +VER= endif vapidir = $(datadir)/vala/vapi @@ -21,8 +22,10 @@ DEPS = $(GTKVAPI) $(vapiprefix).deps: echo $(DEPS) > $@ -$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps - $(VALA_API_GEN) --library=$(vapiprefix) \ +$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ + $(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \ + $(vapiprefix).deps + $(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \ $< diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index c91dfae..621c962 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -23,7 +23,7 @@ using AppIndicator; public class IndicatorExample { public static int main(string[] args) { Gtk.init(ref args); - + var win = new Window(); win.title = "Indicator Test"; win.resize(200, 200); -- cgit v1.2.3 From 32a1bf9cbb537a759c5fd8484c9eb37d5fa17d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 01:48:02 +0100 Subject: Always check if vapigen is available when building VAPI --- bindings/vala/Makefile.am | 6 ++++-- configure.ac | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 3c17075..f80b48c 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -1,11 +1,12 @@ +if HAVE_INTROSPECTION +if HAVE_VAPIGEN + SUBDIRS = . examples ######################### # VAPI Files ######################### -if HAVE_INTROSPECTION - if USE_GTK3 GTKVAPI = gtk+-3.0 VER=3 @@ -32,3 +33,4 @@ $(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ CLEANFILES = $(vapi_DATA) endif +endif diff --git a/configure.ac b/configure.ac index f689003..758914b 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,7 @@ AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"]) ########################### AC_PATH_PROG([VALA_API_GEN], [vapigen]) +AM_CONDITIONAL(HAVE_VAPIGEN, [test "x$VALA_API_GEN" != "x"]) ########################### # Vala Compiler support -- cgit v1.2.3 From 89b31ab0083ef53a0372d5a3ab3b76a5f9d00d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 04:45:35 +0100 Subject: Examples, added simple-client-vala A rewrite of the simple-client.c version in Vala as example. Added a workaround for compiling it. --- example/Makefile.am | 26 ++++++- example/simple-client-vala.vala | 165 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 example/simple-client-vala.vala diff --git a/example/Makefile.am b/example/Makefile.am index 0900baf..ae9ee94 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -4,9 +4,11 @@ else VER= endif +CLEANFILES = check_PROGRAMS = \ - simple-client + simple-client \ + simple-client-vala ######################################### ## simple-client @@ -27,3 +29,25 @@ simple_client_LDADD = \ EXTRA_DIST = \ simple-client-test-icon.png + +######################################### +## simple-client-vala +######################################### + +VALAFLAGS = \ + --pkg appindicator$(VER)-0.1 \ + --vapidir=$(top_builddir)/bindings/vala + +BUILT_SOURCES = simple-client-vala.c +simple-client-vala.c: $(srcdir)/simple-client-vala.vala + $(VALAC) $(VALAFLAGS) -C $< -o $@ + $(SED) -i "s|#include\s||g" $@ + +simple_client_vala_SOURCES = simple-client-vala.c +simple_client_vala_CFLAGS = \ + $(simple_client_CFLAGS) \ + -include $(top_srcdir)/src/app-indicator.h + +simple_client_vala_LDADD = $(simple_client_LDADD) + +CLEANFILES += *.stamp *-vala.c diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala new file mode 100644 index 0000000..9b4ffb3 --- /dev/null +++ b/example/simple-client-vala.vala @@ -0,0 +1,165 @@ +/* +A small piece of sample code demonstrating a very simple application +with an indicator. + +Copyright 2011 Canonical Ltd. + +Authors: + Marco Trevisan + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +using Gtk; +using AppIndicator; + +static int main(string[] args) { + var sc = new SimpleClient(args); + sc.run(); + return 0; +} + +class SimpleClient { + Menu menu; + Indicator ci; + int percentage; + bool active; + bool can_haz_label; + + public SimpleClient(string[] args) { + Gtk.init(ref args); + + ci = new Indicator("example-simple-client", + "indicator-messages", + IndicatorCategory.APPLICATION_STATUS); + + ci.set_status(IndicatorStatus.ACTIVE); + ci.set_attention_icon("indicator-messages-new"); + ci.set_label("1%", "100%"); + + active = true; + can_haz_label = true; + } + + private void toggle_sensitivity(Widget widget) { + widget.set_sensitive(!widget.is_sensitive()); + } + + private void append_submenu(MenuItem item) { + var menu = new Menu(); + MenuItem mi; + + mi = new MenuItem.with_label("Sub 1"); + menu.append(mi); + mi.activate.connect(() => { print("Sub1\n"); }); + + MenuItem prev_mi = mi; + mi = new MenuItem.with_label("Sub 2"); + menu.append(mi); + mi.activate.connect(() => { toggle_sensitivity(prev_mi); }); + + mi = new MenuItem.with_label("Sub 3"); + menu.append(mi); + mi.activate.connect(() => { print("Sub3\n"); }); + + menu.show_all(); + item.set_submenu(menu); + } + + private void label_toggle(MenuItem item) { + can_haz_label = !can_haz_label; + + if (can_haz_label) { + item.set_label("Hide label"); + } else { + item.set_label("Show label"); + } + } + + public void run() { + Timeout.add_seconds(1, () => { + percentage = (percentage + 1) % 100; + if (can_haz_label) { + ci.set_label(@"$(percentage+1)%", ""); + } else { + ci.set_label("", ""); + } + return true; + }); + + menu = new Menu(); + var chk = new CheckMenuItem.with_label("1"); + chk.activate.connect(() => { print("1\n"); }); + menu.append(chk); + chk.show(); + + var radio = new RadioMenuItem.with_label(new SList(), "2"); + radio.activate.connect(() => { print("2\n"); }); + menu.append(radio); + radio.show(); + + var submenu = new MenuItem.with_label("3"); + menu.append(submenu); + append_submenu(submenu); + submenu.show(); + + var toggle_item = new MenuItem.with_label("Toggle 3"); + toggle_item.activate.connect(() => { toggle_sensitivity(submenu); }); + menu.append(toggle_item); + toggle_item.show(); + + var imgitem = new ImageMenuItem.from_stock(Stock.NEW, null); + imgitem.activate.connect(() => { + Image img = (Image) imgitem.get_image(); + img.set_from_stock(Stock.OPEN, IconSize.MENU); + }); + menu.append(imgitem); + imgitem.show(); + + var att = new MenuItem.with_label("Get Attention"); + att.activate.connect(() => { + if (active) { + ci.set_status(IndicatorStatus.ATTENTION); + att.set_label("I'm okay now"); + active = false; + } else { + ci.set_status(IndicatorStatus.ACTIVE); + att.set_label("Get Attention"); + active = false; + } + }); + menu.append(att); + att.show(); + + var show = new MenuItem.with_label("Show Label"); + label_toggle(show); + show.activate.connect(() => { label_toggle(show); }); + menu.append(show); + show.show(); + + var icon = new CheckMenuItem.with_label("Set Local Icon"); + icon.activate.connect(() => { + if (icon.get_active()) { + ci.set_icon("simple-client-test-icon.png"); + } else { + ci.set_icon("indicator-messages"); + } + }); + menu.append(icon); + icon.show(); + + ci.set_menu(menu); + + Gtk.main(); + } +} -- cgit v1.2.3 From b9efa8f945736d4fd134bbf8731cdbc18fd15eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 04:55:34 +0100 Subject: simple-client-vala: indentation fixes --- example/simple-client-vala.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala index 9b4ffb3..18ece22 100644 --- a/example/simple-client-vala.vala +++ b/example/simple-client-vala.vala @@ -108,9 +108,9 @@ class SimpleClient { menu.append(radio); radio.show(); - var submenu = new MenuItem.with_label("3"); - menu.append(submenu); - append_submenu(submenu); + var submenu = new MenuItem.with_label("3"); + menu.append(submenu); + append_submenu(submenu); submenu.show(); var toggle_item = new MenuItem.with_label("Toggle 3"); -- cgit v1.2.3 From 1b85f7f0fbfa233db1f68792e0496dc6b9d43164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 12:36:25 +0100 Subject: Vala simple client, compile workaround improved. --- example/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/Makefile.am b/example/Makefile.am index ae9ee94..62347d2 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -41,7 +41,7 @@ VALAFLAGS = \ BUILT_SOURCES = simple-client-vala.c simple-client-vala.c: $(srcdir)/simple-client-vala.vala $(VALAC) $(VALAFLAGS) -C $< -o $@ - $(SED) -i "s|#include\s||g" $@ + $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@ simple_client_vala_SOURCES = simple-client-vala.c simple_client_vala_CFLAGS = \ -- cgit v1.2.3 From d22edfa36b360724f433885656a821bcaf7f36cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 12:48:16 +0100 Subject: examples, added scroll-event demo. --- example/simple-client-vala.vala | 5 +++++ example/simple-client.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala index 18ece22..61e0c2f 100644 --- a/example/simple-client-vala.vala +++ b/example/simple-client-vala.vala @@ -87,6 +87,11 @@ class SimpleClient { } public void run() { + + ci.scroll_event.connect((delta, direction) => { + print(@"Got scroll event! delta: $delta, direction: $direction\n"); + }); + Timeout.add_seconds(1, () => { percentage = (percentage + 1) % 100; if (can_haz_label) { diff --git a/example/simple-client.c b/example/simple-client.c index ac8360f..1cf06dc 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -97,6 +97,12 @@ image_clicked_cb (GtkWidget *widget, gpointer data) GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); } +static void +scroll_event_cb (AppIndicator * ci, gint delta, guint direction) +{ + g_print("Got scroll event! delta: %d, direction: %d\n", delta, direction); +} + static void append_submenu (GtkWidget *item) { @@ -162,6 +168,9 @@ main (int argc, char ** argv) app_indicator_set_attention_icon(ci, "indicator-messages-new"); app_indicator_set_label (ci, "1%", "100%"); + g_signal_connect (ci, "scroll-event", + G_CALLBACK (scroll_event_cb), NULL); + g_timeout_add_seconds(1, percent_change, ci); menu = gtk_menu_new (); -- cgit v1.2.3 From d268d2bd9de3cecc3c5cd69a048bc18e0b77b237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 5 Feb 2011 18:30:38 +0100 Subject: examples, vala: check for valac --- example/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/Makefile.am b/example/Makefile.am index 62347d2..a3eb906 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -30,6 +30,8 @@ simple_client_LDADD = \ EXTRA_DIST = \ simple-client-test-icon.png +if HAVE_VALAC + ######################################### ## simple-client-vala ######################################### @@ -51,3 +53,5 @@ simple_client_vala_CFLAGS = \ simple_client_vala_LDADD = $(simple_client_LDADD) CLEANFILES += *.stamp *-vala.c + +endif -- cgit v1.2.3 From b4f20fedc3d5e4549567c73e28cb22cff960eb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 5 Feb 2011 18:31:44 +0100 Subject: example makefile code cleanup --- example/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/Makefile.am b/example/Makefile.am index a3eb906..606317c 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -30,11 +30,10 @@ simple_client_LDADD = \ EXTRA_DIST = \ simple-client-test-icon.png -if HAVE_VALAC - ######################################### ## simple-client-vala ######################################### +if HAVE_VALAC VALAFLAGS = \ --pkg appindicator$(VER)-0.1 \ -- cgit v1.2.3 From 43c1ba2998088bb4e5dd74acc8637da2f867831b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 14:07:37 -0600 Subject: Being more specific about the types of the signal --- src/app-indicator.c | 2 ++ src/app-indicator.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 7bee341..f4e9173 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -476,6 +476,8 @@ app_indicator_class_init (AppIndicatorClass *klass) /** AppIndicator::scroll-event: @arg0: The #AppIndicator object + @arg1: How many steps the scroll wheel has taken + @arg2: (type Gdk.ScrollDirection) Which direction the wheel went in Signaled when there is a new icon set for the object. diff --git a/src/app-indicator.h b/src/app-indicator.h index abd6699..2a30b22 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -212,7 +212,7 @@ struct _AppIndicatorClass { void (* scroll_event) (AppIndicator * indicator, gint delta, - guint direction, + GdkScrollDirection direction, gpointer user_data); void (*app_indicator_reserved_ats)(void); -- cgit v1.2.3 From 409fc00a5a2f60dad3c1adb62d82c896cdfb2a2a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 14:10:12 -0600 Subject: Ignoring new Vala stuff --- .bzrignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bzrignore b/.bzrignore index e120c11..56f006e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -129,3 +129,10 @@ src/gen-notification-watcher.xml.c src/gen-notification-watcher.xml.h src/libappindicator_la-gen-notification-item.xml.lo src/libappindicator_la-gen-notification-watcher.xml.lo +bindings/vala/appindicator-0.1.deps +bindings/vala/appindicator-0.1.vapi +bindings/vala/examples/indicator-example +bindings/vala/examples/indicator-example.c +example/simple-client-vala +example/simple-client-vala.c +src/AppIndicator-0.1.metadata -- cgit v1.2.3 From 23a4650671cb87a0e440b5c4284e437905f768b6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 14:14:30 -0600 Subject: 0.2.93 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 758914b..24ef4e8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libappindicator, 0.2.92, ted@canonical.com) +AC_INIT(libappindicator, 0.2.93, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libappindicator, 0.2.92) +AM_INIT_AUTOMAKE(libappindicator, 0.2.93) AM_MAINTAINER_MODE -- cgit v1.2.3 From 4dfca04e8a15e7cff97a1bd4aca698a8d841e3e0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 15:01:25 -0600 Subject: Getting closer to the tarball --- Makefile.in | 7 ++----- bindings/Makefile.in | 7 ++----- bindings/mono/Makefile.in | 7 ++----- bindings/mono/examples/Makefile.in | 7 ++----- bindings/python/Makefile.in | 7 ++----- docs/Makefile.in | 7 ++----- docs/reference/Makefile.in | 7 ++----- example/Makefile.in | 7 ++----- src/Makefile.in | 7 ++----- tests/Makefile.in | 7 ++----- 10 files changed, 20 insertions(+), 50 deletions(-) diff --git a/Makefile.in b/Makefile.in index f127e94..af96a22 100644 --- a/Makefile.in +++ b/Makefile.in @@ -40,11 +40,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ compile config.guess config.sub depcomp install-sh ltmain.sh \ missing py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/bindings/Makefile.in b/bindings/Makefile.in index e9ae1e6..5e4e657 100644 --- a/bindings/Makefile.in +++ b/bindings/Makefile.in @@ -36,11 +36,8 @@ host_triplet = @host@ subdir = bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/bindings/mono/Makefile.in b/bindings/mono/Makefile.in index 1a578bd..f336d0a 100644 --- a/bindings/mono/Makefile.in +++ b/bindings/mono/Makefile.in @@ -39,11 +39,8 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/appindicator-sharp-0.1.pc.in \ $(srcdir)/appindicator-sharp.dll.config.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/bindings/mono/examples/Makefile.in b/bindings/mono/examples/Makefile.in index 3e65515..9ca2648 100644 --- a/bindings/mono/examples/Makefile.in +++ b/bindings/mono/examples/Makefile.in @@ -37,11 +37,8 @@ subdir = bindings/mono/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/indicator-example.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/bindings/python/Makefile.in b/bindings/python/Makefile.in index 96aa5f4..a015afd 100644 --- a/bindings/python/Makefile.in +++ b/bindings/python/Makefile.in @@ -39,11 +39,8 @@ subdir = bindings/python DIST_COMMON = $(pkgappindicator_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/docs/Makefile.in b/docs/Makefile.in index f6a26df..b965fc0 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -36,11 +36,8 @@ host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in index 92d8076..68ce90e 100644 --- a/docs/reference/Makefile.in +++ b/docs/reference/Makefile.in @@ -44,11 +44,8 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.local.make subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/example/Makefile.in b/example/Makefile.in index 1b5fb46..c848ea3 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -38,11 +38,8 @@ check_PROGRAMS = simple-client$(EXEEXT) simple-client-vala$(EXEEXT) subdir = example DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/src/Makefile.in b/src/Makefile.in index c7b33d1..20885b0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -82,11 +82,8 @@ DIST_COMMON = $(libappindicator3include_HEADERS) \ @HAVE_INTROSPECTION_TRUE@ $(gir_DATA) $(typelib_DATA) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d diff --git a/tests/Makefile.in b/tests/Makefile.in index 35fbc83..9f0135d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -44,11 +44,8 @@ check_PROGRAMS = test-libappindicator$(EXEEXT) \ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d -- cgit v1.2.3 From cd7daed5c4a5b1a60de025eff1f5dae2f03b56a3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 15:25:15 -0600 Subject: Make sure to pull the vala source file along with us. --- example/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example/Makefile.am b/example/Makefile.am index 606317c..dbea724 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -5,6 +5,7 @@ VER= endif CLEANFILES = +EXTRA_DIST = check_PROGRAMS = \ simple-client \ @@ -27,7 +28,7 @@ simple_client_LDADD = \ $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator$(VER).la -EXTRA_DIST = \ +EXTRA_DIST += \ simple-client-test-icon.png ######################################### @@ -54,3 +55,6 @@ simple_client_vala_LDADD = $(simple_client_LDADD) CLEANFILES += *.stamp *-vala.c endif + +EXTRA_DIST += \ + simple-client-vala.vala -- cgit v1.2.3 From e5b56ecf9a05381c8ba725f53f064c2c8569ea8f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 15:25:39 -0600 Subject: 0.2.94 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 24ef4e8..12fcb74 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libappindicator, 0.2.93, ted@canonical.com) +AC_INIT(libappindicator, 0.2.94, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libappindicator, 0.2.93) +AM_INIT_AUTOMAKE(libappindicator, 0.2.94) AM_MAINTAINER_MODE -- cgit v1.2.3 From 99189aa38be57d8cb496b35b957655fc4bf0cdf2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 20:46:41 -0600 Subject: Making sure to pick up both metadata files in dist. --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index f83a6c4..546971f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,8 @@ BUILT_SOURCES = EXTRA_DIST = \ appindicator-0.1.pc.in \ appindicator3-0.1.pc.in \ - AppIndicator$(VER)-0.1.metadata.in + AppIndicator-0.1.metadata.in \ + AppIndicator3-0.1.metadata.in include $(top_srcdir)/Makefile.am.enum include $(top_srcdir)/Makefile.am.marshal -- cgit v1.2.3 From 0c53b3971bad7e67208d6dcf1f22dc0f37ee7d55 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 21:06:08 -0600 Subject: Fixing scroll documentation --- docs/reference/libappindicator-sections.txt | 1 + src/app-indicator.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt index 41ff7fa..536e355 100644 --- a/docs/reference/libappindicator-sections.txt +++ b/docs/reference/libappindicator-sections.txt @@ -12,6 +12,7 @@ APP_INDICATOR_SIGNAL_NEW_STATUS APP_INDICATOR_SIGNAL_NEW_LABEL APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH APP_INDICATOR_SIGNAL_CONNECTION_CHANGED +APP_INDICATOR_SIGNAL_SCROLL_EVENT AppIndicatorCategory AppIndicatorStatus AppIndicatorPrivate diff --git a/src/app-indicator.h b/src/app-indicator.h index 2a30b22..3fdee86 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -169,7 +169,7 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate; @new_icon_theme_path: Slot for #AppIndicator::new-icon-theme-path @new_label: Slot for #AppIndicator::new-label. @connection_changed: Slot for #AppIndicator::connection-changed. - @scroll-event: Slot for #AppIndicator::scroll-event + @scroll_event: Slot for #AppIndicator::scroll-event @app_indicator_reserved_ats: Reserved for future use. @fallback: Function that gets called to make a #GtkStatusIcon when there is no Application Indicator area available. -- cgit v1.2.3 From 3b78014d09a10de5932219ad0e98411f68236f23 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 21:06:28 -0600 Subject: Removing the multiple modules as we shouldn't need them --- docs/reference/Makefile.am | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index ae23e0b..e08f47f 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -9,12 +9,7 @@ AUTOMAKE_OPTIONS = 1.6 # of using the various options. # The name of the module, e.g. 'glib'. -if USE_GTK3 -DOC_MODULE=libappindicator3 -else DOC_MODULE=libappindicator -endif - # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 -- cgit v1.2.3 From f5de6c34a53a19a774ee00c4110752a04ff3f8b1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 21:06:47 -0600 Subject: gtk-doc wants a deprecated section now --- docs/reference/libappindicator-docs.sgml.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reference/libappindicator-docs.sgml.in b/docs/reference/libappindicator-docs.sgml.in index 3a8e5de..67c7cc6 100644 --- a/docs/reference/libappindicator-docs.sgml.in +++ b/docs/reference/libappindicator-docs.sgml.in @@ -25,6 +25,10 @@ API Index + + Deprecated API Index + + -- cgit v1.2.3 From b1842091e350f0483561435bc49afbbba99f9468 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 21:11:14 -0600 Subject: Cleanup what we create --- bindings/vala/examples/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index 32a695b..f5f2c56 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,6 +1,5 @@ VALAFILES = indicator-example.vala -CLEANFILES = $(TESTS) *.c EXTRA_DIST = $(VALAFILES) VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps @@ -10,4 +9,9 @@ indicator-example: $(VALAFILES) Makefile.am $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) check: indicator-example + +CLEANFILES = \ + *.c \ + indicator-example + endif -- cgit v1.2.3 From 2c30d6934b037d865fb835faea985845fbb2c266 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:03:01 -0600 Subject: Ensure that we're building with the right library --- docs/reference/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index e08f47f..8f87b34 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -3,6 +3,14 @@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 +if USE_GTK3 +VER=3 +APPINDICATORLIB = libappindicator3.la +else +VER= +APPINDICATORLIB = libappindicator.la +endif + # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples @@ -91,7 +99,7 @@ expand_content_files= # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src $(LIBRARY_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/src/$(DOC_MODULE).la $(LIBRARY_LIBS) +GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.local.make -- cgit v1.2.3 From 725a13ee3f5a4f51714f341a9c503cc181b21f61 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:03:55 -0600 Subject: Adjusting the name of the different namespace with GTK 3 --- src/AppIndicator3-0.1.metadata.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppIndicator3-0.1.metadata.in b/src/AppIndicator3-0.1.metadata.in index 5790ddb..8d094fd 100644 --- a/src/AppIndicator3-0.1.metadata.in +++ b/src/AppIndicator3-0.1.metadata.in @@ -1,3 +1,3 @@ -AppIndicator name="AppIndicator" +AppIndicator3 name="AppIndicator" Indicator.priv hidden="1" IndicatorPrivate hidden="1" -- cgit v1.2.3 From 61a686f2933c677574c17d40b651cd3b5bfba899 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:04:25 -0600 Subject: Changing the install path of the headers for libappindicator GTK3 version so it's parrallel installable --- src/Makefile.am | 7 +++++-- src/appindicator3-0.1.pc.in | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 546971f..8a74d66 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,7 @@ glib_enum_headers = $(addprefix $(srcdir)/, $(libappindicator_headers)) DISTCLEANFILES += app-indicator-enum-types.c libappindicatorincludefolder=libappindicator -libappindicatorincludedir=$(includedir)/libappindicator-0.1/$(libappindicatorincludefolder) +libappindicatorincludedir=$(includedir)/libappindicator$(VER)-0.1/$(libappindicatorincludefolder) libappindicator_headers = \ app-indicator.h @@ -135,7 +135,8 @@ INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) \ --symbol-prefix=app \ - --identifier-prefix=App + --identifier-prefix=App \ + --warn-all else INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ @@ -157,11 +158,13 @@ AppIndicator_0_1_gir_INCLUDES = \ AppIndicator_0_1_gir_CFLAGS = $(LIBRARY_CFLAGS) -I$(srcdir) -I$(top_builddir)/src AppIndicator_0_1_gir_LIBS = libappindicator$(VER).la AppIndicator_0_1_gir_FILES = $(introspection_sources) +# AppIndicator_0_1_gir_NAMESPACE = AppIndicator AppIndicator3_0_1_gir_INCLUDES = $(AppIndicator_0_1_gir_INCLUDES) AppIndicator3_0_1_gir_CFLAGS = $(AppIndicator_0_1_gir_CFLAGS) AppIndicator3_0_1_gir_LIBS = $(AppIndicator_0_1_gir_LIBS) AppIndicator3_0_1_gir_FILES = $(AppIndicator_0_1_gir_FILES) +# AppIndicator3_0_1_gir_NAMESPACE = AppIndicator INTROSPECTION_GIRS += AppIndicator$(VER)-0.1.gir diff --git a/src/appindicator3-0.1.pc.in b/src/appindicator3-0.1.pc.in index 0ffe409..f59ac70 100644 --- a/src/appindicator3-0.1.pc.in +++ b/src/appindicator3-0.1.pc.in @@ -4,7 +4,7 @@ libdir=@libdir@ bindir=@bindir@ includedir=@includedir@ -Cflags: -I${includedir}/libappindicator-0.1 +Cflags: -I${includedir}/libappindicator3-0.1 Requires: dbusmenu-glib-0.4 gtk+-3.0 Libs: -L${libdir} -lappindicator3 -- cgit v1.2.3 From 889b2da654b149bca523f7f57492de190ae8d865 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:05:20 -0600 Subject: Changing the build so that it uses the right version of the vala files and removes the predefined header location --- bindings/vala/examples/Makefile.am | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index f5f2c56..484a00a 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,14 +1,36 @@ +if USE_GTK3 +VER=3 +else +VER= +endif VALAFILES = indicator-example.vala EXTRA_DIST = $(VALAFILES) -VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps +VALAFLAGS = \ + --pkg appindicator$(VER)-0.1 \ + --vapidir=$(top_builddir)/bindings/vala \ + --save-temps if HAVE_VALAC -indicator-example: $(VALAFILES) Makefile.am - $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) -check: indicator-example +BUILT_SOURCES = indicator-example.c + +indicator-example.c: $(VALAFILES) Makefile.am + $(VALAC) $(VALAFLAGS) -C $< -o $@ + $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@ + +nodist_indicator_example_SOURCES = indicator-example.c +indicator_example_CFLAGS = \ + $(LIBRARY_CFLAGS) \ + -Wall -Werror \ + -I$(top_srcdir)/src \ + -include $(top_srcdir)/src/app-indicator.h +indicator_example_LDADD = \ + $(LIBRARY_LIBS) \ + $(top_builddir)/src/libappindicator$(VER).la + +check_PROGRAMS = indicator-example CLEANFILES = \ *.c \ -- cgit v1.2.3 From 4d24048fffc19e52adb9c0fc4e4a35f3c96faae7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:14:28 -0600 Subject: Blocking the menu proxy from our test --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index ed89981..a65f320 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -153,6 +153,7 @@ HTML_REPORT = libappindicator-check-results.html libappindicator-tests: libappindicator-tests-gtester Makefile.am @echo "#!/bin/bash" > $@ @echo . $(srcdir)/run-xvfb.sh >> $@ + @echo export UBUNTU_MENUPROXY= >> $@ @echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@ @chmod +x $@ -- cgit v1.2.3 From 1c384cdf7e601e3786fc1add31d157c0eafa1539 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:22:11 -0600 Subject: 0.2.95 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 12fcb74..597a5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libappindicator, 0.2.94, ted@canonical.com) +AC_INIT(libappindicator, 0.2.95, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libappindicator, 0.2.94) +AM_INIT_AUTOMAKE(libappindicator, 0.2.95) AM_MAINTAINER_MODE -- cgit v1.2.3 From d13c1f1a4b4cf3efbeed166c557b3f4473bd6219 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:30:24 -0600 Subject: debian/libappindicator-dev.install, debian/libappindicator3-dev.install: switching the file name of the vapi files. --- debian/changelog | 4 +++- debian/libappindicator-dev.install | 2 +- debian/libappindicator3-dev.install | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index f64c000..a175356 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,10 @@ libappindicator (0.2.95-0ubuntu1~ppa1) UNRELEASED; urgency=low ∘ Include vala example files as well * New upstream release (0.2.95) ∘ Fixing build for GTK2/3 dual build + * debian/libappindicator-dev.install, debian/libappindicator3-dev.install: + switching the file name of the vapi files. - -- Ted Gould Thu, 10 Feb 2011 22:24:53 -0600 + -- Ted Gould Thu, 10 Feb 2011 22:29:47 -0600 libappindicator (0.2.92-0ubuntu2) natty; urgency=low diff --git a/debian/libappindicator-dev.install b/debian/libappindicator-dev.install index ddd4220..b401920 100644 --- a/debian/libappindicator-dev.install +++ b/debian/libappindicator-dev.install @@ -2,4 +2,4 @@ debian/tmp/usr/include/libappindicator-0.1/* debian/tmp/usr/lib/libappindicator.so debian/tmp/usr/lib/pkgconfig/appindicator-0.1.pc debian/tmp/usr/share/gir-1.0/AppIndicator-0.1.gir -debian/tmp/usr/share/vala/vapi/AppIndicator-0.1.vapi +debian/tmp/usr/share/vala/vapi/appindicator-0.1.vapi diff --git a/debian/libappindicator3-dev.install b/debian/libappindicator3-dev.install index 0d6700f..664b7a1 100644 --- a/debian/libappindicator3-dev.install +++ b/debian/libappindicator3-dev.install @@ -1,4 +1,4 @@ debian/tmp/usr/lib/libappindicator3.so debian/tmp/usr/lib/pkgconfig/appindicator3-0.1.pc debian/tmp/usr/share/gir-1.0/AppIndicator3-0.1.gir -debian/tmp/usr/share/vala/vapi/AppIndicator3-0.1.vapi +debian/tmp/usr/share/vala/vapi/appindicator3-0.1.vapi -- cgit v1.2.3 From 76953125793ea91d3fc145607d4e11d246c7e326 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:40:03 -0600 Subject: debian/rules: Not building libappindicator3-dev until we've got the GTK3 build all put together. --- debian/changelog | 4 +++- debian/rules | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a175356..4131e3c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,10 @@ libappindicator (0.2.95-0ubuntu1~ppa1) UNRELEASED; urgency=low ∘ Fixing build for GTK2/3 dual build * debian/libappindicator-dev.install, debian/libappindicator3-dev.install: switching the file name of the vapi files. + * debian/rules: Not building libappindicator3-dev until we've got the GTK3 + build all put together. - -- Ted Gould Thu, 10 Feb 2011 22:29:47 -0600 + -- Ted Gould Thu, 10 Feb 2011 22:39:44 -0600 libappindicator (0.2.92-0ubuntu2) natty; urgency=low diff --git a/debian/rules b/debian/rules index 5394f82..c381e8d 100755 --- a/debian/rules +++ b/debian/rules @@ -73,6 +73,8 @@ configure-stamp-gtk3: configure/libappindicator3-1:: configure-stamp-gtk3 +configure/libappindicator3-dev:: configure-stamp-gtk3 + build-stamp-gtk3: : # build for GTK+ 3.0 $(MAKE) -C build-gtk3/src; @@ -80,6 +82,8 @@ build-stamp-gtk3: build/libappindicator3-1:: build-stamp-gtk3 +build/libappindicator3-dev:: build-stamp-gtk3 + install-stamp-gtk3: : # install for GTK+ 3.0 $(MAKE) -C build-gtk3/src DESTDIR=$(CURDIR)/debian/tmp install @@ -88,6 +92,8 @@ install-stamp-gtk3: binary-install/libappindicator3-1:: install-stamp-gtk3 dh_makeshlibs -plibappindicator3-1 +binary-install/libappindicator3-dev:: install-stamp-gtk3 + binary-install/libappindicator0.1-cil:: binary-fixup/libappindicator1 dh_clistrip dh_clifixperms -- cgit v1.2.3 From 26b952114c696b0f373d848c6de6b1c9bd937b46 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Fri, 11 Feb 2011 10:14:54 -0500 Subject: * New upstream release (0.2.95) * debian/rules - build and install the vapi for gtk3 --- debian/changelog | 15 ++++++++------- debian/rules | 8 ++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4131e3c..f791713 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,18 +1,19 @@ -libappindicator (0.2.95-0ubuntu1~ppa1) UNRELEASED; urgency=low +libappindicator (0.2.95-0ubuntu1) UNRELEASED; urgency=low - * New upstream release (0.2.93) + [ Ted Gould ] + * New upstream release (0.2.95) ∘ Fix Vala bindings ∘ Add support for scroll events - * New upstream release (0.2.94) ∘ Include vala example files as well - * New upstream release (0.2.95) ∘ Fixing build for GTK2/3 dual build * debian/libappindicator-dev.install, debian/libappindicator3-dev.install: switching the file name of the vapi files. - * debian/rules: Not building libappindicator3-dev until we've got the GTK3 - build all put together. - -- Ted Gould Thu, 10 Feb 2011 22:39:44 -0600 + [ Ken VanDine ] + * debian/rules + - build and install the vapi for gtk3 + + -- Ken VanDine Fri, 11 Feb 2011 10:03:17 -0500 libappindicator (0.2.92-0ubuntu2) natty; urgency=low diff --git a/debian/rules b/debian/rules index c381e8d..3f266b0 100755 --- a/debian/rules +++ b/debian/rules @@ -73,27 +73,23 @@ configure-stamp-gtk3: configure/libappindicator3-1:: configure-stamp-gtk3 -configure/libappindicator3-dev:: configure-stamp-gtk3 - build-stamp-gtk3: : # build for GTK+ 3.0 $(MAKE) -C build-gtk3/src; + $(MAKE) -C build-gtk3/bindings/vala; touch $@ build/libappindicator3-1:: build-stamp-gtk3 -build/libappindicator3-dev:: build-stamp-gtk3 - install-stamp-gtk3: : # install for GTK+ 3.0 $(MAKE) -C build-gtk3/src DESTDIR=$(CURDIR)/debian/tmp install + $(MAKE) -C build-gtk3/bindings/vala DESTDIR=$(CURDIR)/debian/tmp install touch $@ binary-install/libappindicator3-1:: install-stamp-gtk3 dh_makeshlibs -plibappindicator3-1 -binary-install/libappindicator3-dev:: install-stamp-gtk3 - binary-install/libappindicator0.1-cil:: binary-fixup/libappindicator1 dh_clistrip dh_clifixperms -- cgit v1.2.3