From 1a0c666b3461d13265a52d35e38d260d975f02aa Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Thu, 5 Aug 2010 18:25:57 +0200 Subject: Partial, segfaulting, fix for LP: #608219, requires GTK+ change attached to same bug report. --- src/app-indicator.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/app-indicator.c b/src/app-indicator.c index 32f512f..3611d74 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -149,6 +149,7 @@ static gchar * append_panel_icon_suffix (const gchar * icon_name); 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 submenu_added (GtkWidget *widget, GtkWidget *submenu, gpointer data); static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data); @@ -1418,6 +1419,14 @@ container_iterate (GtkWidget *widget, child, 0); } + g_signal_connect (GTK_MENU_ITEM(widget), + "submenu-added", + G_CALLBACK (submenu_added), + child); + g_signal_connect (GTK_MENU_ITEM(widget), + "submenu-removed", + G_CALLBACK (submenu_changed), + child); } dbusmenu_menuitem_property_set_bool (child, @@ -1481,6 +1490,28 @@ submenu_changed (GtkWidget *widget, root); } +static void +submenu_added (GtkWidget *widget, + GtkWidget *submenu, + gpointer data) +{ + DbusmenuMenuitem *root = (DbusmenuMenuitem *)data; + + gtk_container_foreach (GTK_CONTAINER (submenu), + container_iterate, + root); + g_signal_connect_object (GTK_MENU(submenu), + "child-added", + G_CALLBACK (submenu_changed), + root, + 0); + g_signal_connect_object (GTK_MENU(submenu), + "child-removed", + G_CALLBACK (submenu_changed), + root, + 0); +} + static void setup_dbusmenu (AppIndicator *self) { -- cgit v1.2.3 From c2aee8ac8876b03c1fcddaeca884620f973d698d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 15 Sep 2010 17:16:00 -0500 Subject: Adding a disthook for AUTHORS --- Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile.am b/Makefile.am index ba772b0..98e4a88 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,3 +30,15 @@ dist-hook: else \ echo Failed to generate ChangeLog: not a branch >&2; \ fi + @if test -d "$(top_srcdir)/.bzr"; \ + then \ + echo Creating AUTHORS && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run bzr log --long --levels=0 | grep -e "^\s*author:" -e "^\s*committer:" | cut -d ":" -f 2 | cut -d "<" -f 1 | sort -u) > AUTHORS.tmp \ + && mv -f AUTHORS.tmp $(top_distdir)/AUTHORS \ + || (rm -f AUTHORS.tmp; \ + echo Failed to generate AUTHORS >&2 ); \ + else \ + echo Failed to generate AUTHORS: not a branch >&2; \ + fi -- cgit v1.2.3 From e050bfc4eedf02d0adffecca9f3cf901e73686b2 Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Sat, 18 Sep 2010 19:20:11 +0200 Subject: Commit latest changes before merging with trunk --- bindings/mono/Makefile.am | 3 +++ bindings/mono/libappindicator-api.metadata | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 98fe6f9..203dcae 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -77,6 +77,9 @@ $(API): $(MIDDLE_API) Makefile.am -e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \ -e "s|PROP_MENU_S|menu|" \ -e "s|PROP_CONNECTED_S|connected|" \ + -e "s|PROP_LABEL_S|label|" \ + -e "s|PROP_LABEL_GUIDE_S|label-guide|" \ + -e "s|PROP_ORDERING_INDEX_S|ordering-index|" \ $< > $@ api_includes = $(GTK_SHARP_CFLAGS) diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata index 718c500..06313ba 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -5,11 +5,13 @@ new-attention-icon NewStatus new-status + NewLabel + new-label ConnectionChanged connection-changed NewIcon new-icon - NewIconThemePath + NewIconThemePath new-icon-theme-path ID true @@ -20,6 +22,9 @@ Menu GtkMenu* Connected + Label + LabelGuide + OrderingIndex SetMenu id @@ -30,16 +35,24 @@ category icon-theme-path + + + + + + + + -- cgit v1.2.3 From b598108bd71748ab0dc7088a36835864f5f96e22 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:41:59 +0100 Subject: gapi2-parser cannot cope with multiple signals connected to the same method - it will bail out, complaining it cannot find a method to match the second signal. This patch modifies the build system to copy app-indicator.c locally, with the "bad" X_NEW_LABEL signal removed, and use that copy to build the binding. --- bindings/mono/Makefile.am | 8 +++++++- bindings/mono/app-indicator.sources.xml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 98fe6f9..b504d9a 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -15,6 +15,8 @@ ASSEMBLY = $(ASSEMBLY_NAME).dll POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME) POLICY_VERSION = 0.0 DLLPOLICY = $(POLICY).dll +WRAPPER_FREE_BINDING_SRC = ../../src/app-indicator.c +WRAPPER_FREE_BINDING = app-indicator.c TARGET = \ $(ASSEMBLY) \ @@ -35,6 +37,7 @@ CLEANFILES = \ $(RAW_API) \ $(TEST) \ $(DLLPOLICY) \ + $(WRAPPER_FREE_BINDING) \ $(POLICY).config DISTCLEANFILES = $(ASSEMBLY).config @@ -57,9 +60,12 @@ GACUTIL_FLAGS=-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib references = $(GTK_SHARP_LIBS) test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) -r:$(ASSEMBLY) -$(RAW_API): app-indicator.sources.xml +$(RAW_API): app-indicator.sources.xml $(WRAPPER_FREE_BINDING) $(GAPI_PARSER) app-indicator.sources.xml +$(WRAPPER_FREE_BINDING): $(WRAPPER_FREE_BINDING_SRC) + sed '/signals\[X_NEW_LABEL\] /,+6d' $(WRAPPER_FREE_BINDING_SRC) > $(WRAPPER_FREE_BINDING) + $(MIDDLE_API): $(METADATA) $(RAW_API) cp $(srcdir)/$(RAW_API) $(MIDDLE_API) chmod u+w $(MIDDLE_API) diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml index 2649eb4..97faadf 100644 --- a/bindings/mono/app-indicator.sources.xml +++ b/bindings/mono/app-indicator.sources.xml @@ -2,7 +2,7 @@ - ../../src/app-indicator.c + app-indicator.c ../../src/app-indicator-enum-types.c ../../src/app-indicator-enum-types.h ../../src/app-indicator.h -- cgit v1.2.3 From 4247b7e6e67ab79cea4f5b80566ab1e8def6f6f2 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:47:07 +0100 Subject: The purpose of a dllmap is to turn a DllImport for "foo" into a dlopen of "bar". This is most commonly used to make apps more cross-platform, by specifying the Windows library name (foo.dll) into a Linux/OSX/etc filename (libfoo.so.0). indicator-application has been binding directly to libappindicator.so.0, which means multiple places to update if the SONAME changes, and makes it less portable - this commit fixes this. --- bindings/mono/ApplicationIndicator.custom | 8 ++++---- bindings/mono/app-indicator.sources.xml | 2 +- bindings/mono/appindicator-sharp.dll.config.in | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/mono/ApplicationIndicator.custom b/bindings/mono/ApplicationIndicator.custom index 11d16a8..fcc52d7 100644 --- a/bindings/mono/ApplicationIndicator.custom +++ b/bindings/mono/ApplicationIndicator.custom @@ -1,10 +1,10 @@ -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern int app_indicator_get_status (IntPtr i); -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern int app_indicator_get_category (IntPtr i); -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern void app_indicator_set_status (IntPtr i, int s); [GLib.Property ("status")] @@ -23,4 +23,4 @@ static extern void app_indicator_set_status (IntPtr i, int s); get { return (Category) app_indicator_get_category (Handle); } - } \ No newline at end of file + } diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml index 97faadf..6cf28e9 100644 --- a/bindings/mono/app-indicator.sources.xml +++ b/bindings/mono/app-indicator.sources.xml @@ -1,6 +1,6 @@ - + app-indicator.c ../../src/app-indicator-enum-types.c diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in index d0e9e1e..6422a93 100644 --- a/bindings/mono/appindicator-sharp.dll.config.in +++ b/bindings/mono/appindicator-sharp.dll.config.in @@ -1,5 +1,5 @@ - + -- cgit v1.2.3 From 316dbc5d675e78b92334dc087d95c795a3a108d0 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:49:32 +0100 Subject: Bump SONAME in Mono binding to libappindicator.so.1 --- bindings/mono/appindicator-sharp.dll.config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in index 6422a93..2d21d00 100644 --- a/bindings/mono/appindicator-sharp.dll.config.in +++ b/bindings/mono/appindicator-sharp.dll.config.in @@ -1,5 +1,5 @@ - + -- cgit v1.2.3 From 3f3c6a091cb6f724905f94bec6c66175335ba73b Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Mon, 20 Sep 2010 20:28:10 +0200 Subject: * Adding Python bindings for the new API additons * Updating the Mono assembly version to reflect the changes to the API * Remove two redundant elements from the Mono bindings' metadata file --- bindings/mono/AssemblyInfo.cs | 2 +- bindings/mono/Makefile.am | 2 +- bindings/mono/libappindicator-api.metadata | 2 -- bindings/python/appindicator.defs | 36 ++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/bindings/mono/AssemblyInfo.cs b/bindings/mono/AssemblyInfo.cs index 269981a..0417db6 100644 --- a/bindings/mono/AssemblyInfo.cs +++ b/bindings/mono/AssemblyInfo.cs @@ -27,4 +27,4 @@ using System.Reflection; [assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] -[assembly: AssemblyVersion ("0.1")] +[assembly: AssemblyVersion ("0.2")] diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index d9c0ef6..2ad6d87 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -10,7 +10,7 @@ MIDDLE_API = libappindicator-api.middle RAW_API = libappindicator-api.raw METADATA = libappindicator-api.metadata ASSEMBLY_NAME = appindicator-sharp -ASSEMBLY_VERSION = 0.1.0.0 +ASSEMBLY_VERSION = 0.2.0.0 ASSEMBLY = $(ASSEMBLY_NAME).dll POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME) POLICY_VERSION = 0.0 diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata index 06313ba..41aa261 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -35,7 +35,6 @@ category icon-theme-path - @@ -49,7 +48,6 @@ - diff --git a/bindings/python/appindicator.defs b/bindings/python/appindicator.defs index b6c7402..5027a6d 100644 --- a/bindings/python/appindicator.defs +++ b/bindings/python/appindicator.defs @@ -62,6 +62,24 @@ ) ) +(define-method set_label + (of-object "AppIndicator") + (c-name "app_indicator_set_label") + (return-type "none") + (parameters + '("const-gchar*" "label" (null-ok)) + '("const-gchar*" "guide" (null-ok) (default "NULL")) + ) +) + +(define-method set_ordering_index + (of-object "AppIndicator") + (c-name "app_indicator_set_ordering_index") + (parameters + '("guint32" "ordering_index") + ) +) + (define-method set_attention_icon (of-object "AppIndicator") (c-name "app_indicator_set_attention_icon") @@ -116,6 +134,24 @@ (return-type "AppIndicatorStatus") ) +(define-method get_label + (of-object "AppIndicator") + (c-name "app_indicator_get_label") + (return-type "const-gchar*") +) + +(define-method get_label_guide + (of-object "AppIndicator") + (c-name "app_indicator_get_label_guide") + (return-type "const-gchar*") +) + +(define-method get_ordering_index + (of-object "AppIndicator") + (c-name "app_indicator_get_ordering_index") + (return-type "guint32") +) + (define-method get_icon (of-object "AppIndicator") (c-name "app_indicator_get_icon") -- cgit v1.2.3 From 12d7f820f43d4ed09dd974e2e956013f78da519e Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Mon, 20 Sep 2010 20:46:30 +0200 Subject: Remove the redudant set and get functions for the ordering_index property from the Mono bindings as we want programmers to work witht the property directly. --- 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 41aa261..ccf58f1 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -47,10 +47,12 @@ + + -- cgit v1.2.3 From df5dbe27aa3446bf9c7ea8953968bc49a4db5864 Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Tue, 21 Sep 2010 21:13:43 +0200 Subject: Created a second policy file to make sure that applications depending on 'appindicator-sharp' will not have to be recompiled. Changes to the packaging is required to make sure the policy file gets installed. Many thanks to Jo Shields for looking into this issue and proposing a solution. --- bindings/mono/Makefile.am | 20 ++++++++++++++++++-- .../mono/policy.0.0.appindicator-sharp.config.in | 2 +- .../mono/policy.0.1.appindicator-sharp.config.in | 10 ++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 bindings/mono/policy.0.1.appindicator-sharp.config.in diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 2ad6d87..c9c038b 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -15,6 +15,9 @@ ASSEMBLY = $(ASSEMBLY_NAME).dll POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME) POLICY_VERSION = 0.0 DLLPOLICY = $(POLICY).dll +POLICY1 = policy.$(POLICY1_VERSION).$(ASSEMBLY_NAME) +POLICY1_VERSION = 0.1 +DLLPOLICY1 = $(POLICY1).dll WRAPPER_FREE_BINDING_SRC = ../../src/app-indicator.c WRAPPER_FREE_BINDING = app-indicator.c @@ -22,7 +25,9 @@ TARGET = \ $(ASSEMBLY) \ $(ASSEMBLY).config \ $(DLLPOLICY) \ - $(POLICY).config + $(POLICY).config \ + $(DLLPOLICY1) \ + $(POLICY1).config assemblydir = $(libdir)/cli/appindicator-sharp-0.1 assembly_DATA = $(TARGET) @@ -37,8 +42,10 @@ CLEANFILES = \ $(RAW_API) \ $(TEST) \ $(DLLPOLICY) \ + $(DLLPOLICY1) \ $(WRAPPER_FREE_BINDING) \ - $(POLICY).config + $(POLICY).config \ + $(POLICY1).config DISTCLEANFILES = $(ASSEMBLY).config TEST_SOURCES = TestIndicator.cs @@ -52,6 +59,7 @@ EXTRA_DIST = \ app-indicator.sources.xml \ $(ASSEMBLY_NAME).snk \ $(POLICY).config.in \ + $(POLICY1).config.in \ $(customs) \ $(TEST_SOURCES) @@ -128,3 +136,11 @@ $(POLICY).config: $(POLICY).config.in Makefile $(DLLPOLICY): $(POLICY).config $(ASSEMBLY_NAME).snk Makefile $(AL) -link:$(POLICY).config -out:$(DLLPOLICY) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk + +$(POLICY1).config: $(POLICY1).config.in Makefile + sed -e "s|@ASSEMBLY_NAME@|$(ASSEMBLY_NAME)|" \ + -e "s|@ASSEMBLY_VERSION@|$(ASSEMBLY_VERSION)|g" \ + $< > $@ + +$(DLLPOLICY1): $(POLICY1).config $(ASSEMBLY_NAME).snk Makefile + $(AL) -link:$(POLICY1).config -out:$(DLLPOLICY1) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk diff --git a/bindings/mono/policy.0.0.appindicator-sharp.config.in b/bindings/mono/policy.0.0.appindicator-sharp.config.in index 95c21ed..e1fe0db 100644 --- a/bindings/mono/policy.0.0.appindicator-sharp.config.in +++ b/bindings/mono/policy.0.0.appindicator-sharp.config.in @@ -3,7 +3,7 @@ - + diff --git a/bindings/mono/policy.0.1.appindicator-sharp.config.in b/bindings/mono/policy.0.1.appindicator-sharp.config.in new file mode 100644 index 0000000..0a8f9b1 --- /dev/null +++ b/bindings/mono/policy.0.1.appindicator-sharp.config.in @@ -0,0 +1,10 @@ + + + + + + + + + + -- cgit v1.2.3 From e9ed8cb1050236d27ce749ea28fcdd5652ec8e2e Mon Sep 17 00:00:00 2001 From: Sense Egbert Hofstede Date: Tue, 21 Sep 2010 21:22:16 +0200 Subject: Undoing a previous commit that had nothing to do with what I want to achive in my merge request. That's what you get for misusing old branches\! --- src/app-indicator.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 3d15690..6511589 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -174,7 +174,6 @@ static gchar * append_panel_icon_suffix (const gchar * icon_name); 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 submenu_added (GtkWidget *widget, GtkWidget *submenu, gpointer data); static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data); @@ -1750,14 +1749,6 @@ container_iterate (GtkWidget *widget, child, 0); } - g_signal_connect (GTK_MENU_ITEM(widget), - "submenu-added", - G_CALLBACK (submenu_added), - child); - g_signal_connect (GTK_MENU_ITEM(widget), - "submenu-removed", - G_CALLBACK (submenu_changed), - child); } dbusmenu_menuitem_property_set_bool (child, @@ -1821,28 +1812,6 @@ submenu_changed (GtkWidget *widget, root); } -static void -submenu_added (GtkWidget *widget, - GtkWidget *submenu, - gpointer data) -{ - DbusmenuMenuitem *root = (DbusmenuMenuitem *)data; - - gtk_container_foreach (GTK_CONTAINER (submenu), - container_iterate, - root); - g_signal_connect_object (GTK_MENU(submenu), - "child-added", - G_CALLBACK (submenu_changed), - root, - 0); - g_signal_connect_object (GTK_MENU(submenu), - "child-removed", - G_CALLBACK (submenu_changed), - root, - 0); -} - static void setup_dbusmenu (AppIndicator *self) { -- cgit v1.2.3 From fe08c86fc6b9d9d843149bf195b995d7e38a2c40 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Sep 2010 11:13:14 -0500 Subject: 0.2.9 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 25e19c8..0ecea51 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(indicator-application, 0.2.8, ted@canonical.com) +AC_INIT(indicator-application, 0.2.9, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-application, 0.2.8) +AM_INIT_AUTOMAKE(indicator-application, 0.2.9) AM_MAINTAINER_MODE -- cgit v1.2.3