From b63e88070937c3e87fd51e6fcf1538e638c050cb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:08:10 -0600 Subject: Adding a check rule for documentation. --- docs/reference/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index e2a02cd..2f4c584 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -91,5 +91,5 @@ EXTRA_DIST += version.xml.in #DISTCLEANFILES += # Comment this out if you want your docs-status tested during 'make check' -#TESTS = $(GTKDOC_CHECK) +TESTS = $(GTKDOC_CHECK) -- cgit v1.2.3 From 46799c6fa192f2312f3f688914e9bbd02c6dc995 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:24:36 -0600 Subject: Adding in documentation for the Object/Class macros --- src/libappindicator/app-indicator.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/libappindicator/app-indicator.h b/src/libappindicator/app-indicator.h index 6a961fe..f63c387 100644 --- a/src/libappindicator/app-indicator.h +++ b/src/libappindicator/app-indicator.h @@ -34,6 +34,41 @@ License version 3 and version 2.1 along with this program. If not, see G_BEGIN_DECLS +/** + APP_INDICATOR_TYPE: + + Get the #GType for a #AppIndicator. +*/ +/** + APP_INDICATOR: + @obj: The object to convert + + Safely convert a #GObject into an #AppIndicator. +*/ +/** + APP_INDICATOR_CLASS: + @klass: #GObjectClass based class to convert. + + Safely convert a #GObjectClass into a #AppIndicatorClass. +*/ +/** + IS_APP_INDICATOR: + @obj: An #GObject to check + + Checks to see if @obj is in the object hierarchy of #AppIndicator. +*/ +/** + IS_APP_INDICATOR_CLASS: + @klass: An #GObjectClass to check + + Checks to see if @klass is in the object class hierarchy of #AppIndicatorClass. +*/ +/** + APP_INDICATOR_GET_CLASS: + @obj: A #GObject in the class hierarchy of #AppIndicator. + + Gets a pointer to the #AppIndicatorClass for the object @obj. +*/ #define APP_INDICATOR_TYPE (app_indicator_get_type ()) #define APP_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), APP_INDICATOR_TYPE, AppIndicator)) #define APP_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), APP_INDICATOR_TYPE, AppIndicatorClass)) -- cgit v1.2.3 From c80692fd15607364645a27535589e29dd2655e20 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:26:54 -0600 Subject: Adding documentation for the signal string defines. --- src/libappindicator/app-indicator.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/libappindicator/app-indicator.h b/src/libappindicator/app-indicator.h index f63c387..3a46405 100644 --- a/src/libappindicator/app-indicator.h +++ b/src/libappindicator/app-indicator.h @@ -76,6 +76,26 @@ G_BEGIN_DECLS #define IS_APP_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), APP_INDICATOR_TYPE)) #define APP_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), APP_INDICATOR_TYPE, AppIndicatorClass)) +/** + APP_INDICATOR_SIGNAL_NEW_ICON: + + String identifier for the #AppIndicator::new-icon signal. +*/ +/** + APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON: + + String identifier for the #AppIndicator::new-attention-icon signal. +*/ +/** + APP_INDICATOR_SIGNAL_NEW_STATUS: + + String identifier for the #AppIndicator::new-status signal. +*/ +/** + APP_INDICATOR_SIGNAL_CONNECTION_CHANGED: + + String identifier for the #AppIndicator::connection-changed 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" -- cgit v1.2.3 From 79d94105efbbc9f5a1d66678f0e016018e7377ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:35:52 -0600 Subject: Fixing function documentation. --- src/libappindicator/app-indicator.c | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index bd72499..ab95ee5 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -549,7 +549,12 @@ category_from_enum (AppIndicatorCategory category) @icon_name: The icon name for this indicator @category: The category of indicator. - @returns: A pointer to a new #AppIndicator object. + Creates a new #AppIndicator setting the properties: + #AppIndicator::id with @id, #AppIndicator::category + with @category and #AppIndicator::icon-name with + @icon_name. + + Return value: A pointer to a new #AppIndicator object. */ AppIndicator * app_indicator_new (const gchar *id, @@ -565,9 +570,17 @@ app_indicator_new (const gchar *id, return indicator; } +/** + app_indicator_get_type: + + Generates or returns the unique #GType for #AppIndicator. + + Return value: A unique #GType for #AppIndicator objects. +*/ + /** app_indicator_set_status: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use @status: The status to set for this indicator Wrapper function for property #AppIndicator::status. @@ -588,7 +601,7 @@ app_indicator_set_status (AppIndicator *self, AppIndicatorStatus status) /** app_indicator_set_attention_icon: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use @icon_name: The name of the attention icon to set for this indicator Wrapper function for property #AppIndicator::attention-icon. @@ -614,6 +627,10 @@ app_indicator_set_attention_icon (AppIndicator *self, const gchar *icon_name) app_indicator_set_icon: @self: The #AppIndicator object to use @icon_name: The icon name to set. + + Sets the default icon to use when the status is active but + not set to attention. In most cases, this should be the + application icon for the program. **/ void app_indicator_set_icon (AppIndicator *self, const gchar *icon_name) @@ -678,6 +695,10 @@ setup_dbusmenu (AppIndicator *self) app_indicator_set_menu: @self: The #AppIndicator @menu: A #GtkMenu to set + + Sets the menu that should be shown when the Application Indicator + is clicked on in the panel. An application indicator will not + be rendered unless it has a menu. **/ void app_indicator_set_menu (AppIndicator *self, GtkMenu *menu) @@ -704,7 +725,7 @@ app_indicator_set_menu (AppIndicator *self, GtkMenu *menu) /** app_indicator_get_id: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use Wrapper function for property #AppIndicator::id. @@ -720,7 +741,7 @@ app_indicator_get_id (AppIndicator *self) /** app_indicator_get_category: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use Wrapper function for property #AppIndicator::category. @@ -736,7 +757,7 @@ app_indicator_get_category (AppIndicator *self) /** app_indicator_get_status: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use Wrapper function for property #AppIndicator::status. @@ -752,7 +773,7 @@ app_indicator_get_status (AppIndicator *self) /** app_indicator_get_icon: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use Wrapper function for property #AppIndicator::icon-name. @@ -768,7 +789,7 @@ app_indicator_get_icon (AppIndicator *self) /** app_indicator_get_attention_icon: - @ci: The #AppIndicator object to use + @self: The #AppIndicator object to use Wrapper function for property #AppIndicator::attention-icon-name. -- cgit v1.2.3 From b8e1a7185cbdc978f1a637c719ef4b8a3faec94a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:37:48 -0600 Subject: Documenting the AppIndicatorClass as well. --- docs/reference/libappindicator-sections.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt index d64f53a..b994297 100644 --- a/docs/reference/libappindicator-sections.txt +++ b/docs/reference/libappindicator-sections.txt @@ -15,6 +15,7 @@ AppIndicatorStatus AppIndicatorPrivate AppIndicator AppIndicator +AppIndicatorClass app_indicator_get_type app_indicator_new app_indicator_set_status -- cgit v1.2.3 From a29bb3d355c7a6cd97241ca3d7decb61545c0ece Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 15:45:17 -0600 Subject: Adding in some section documentation. --- src/libappindicator/app-indicator.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/libappindicator/app-indicator.h b/src/libappindicator/app-indicator.h index 3a46405..e966a49 100644 --- a/src/libappindicator/app-indicator.h +++ b/src/libappindicator/app-indicator.h @@ -222,4 +222,21 @@ const gchar * app_indicator_get_attention_icon (AppIndicator * G_END_DECLS +/** + SECTION:app-indicator + @short_description: An object to put application information + into the panel. + @stability: Unstable + @include: libappindicator/app-indicator.h + + An application indicator is a way for an application to put + a menu into the panel on the user's screen. This allows the + user to interact with the application even though it might + not be visible to the user at the time. In most cases this + is not a good solution as there are other ways to inform the + user. It should only be use if persistence is a desired + feature for the user (not for your marketing purpose of + having your logo in the panel). +*/ + #endif -- cgit v1.2.3 From e4cdb13a8f940e6cefb757fac5fc038b7310ce22 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Dec 2009 16:02:28 -0600 Subject: Putting gtk-doc-check into a wrapper to it runs in srcdir --- docs/reference/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 2f4c584..67582f2 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -91,5 +91,12 @@ EXTRA_DIST += version.xml.in #DISTCLEANFILES += # Comment this out if you want your docs-status tested during 'make check' -TESTS = $(GTKDOC_CHECK) +TESTS = gtkdoc-in-srcdir + +gtkdoc-in-srcdir: Makefile.am + @echo "#!/bin/sh" > $@ + @echo "cd \"$(srcdir)\"" >> $@ + @echo "$(GTKDOC_CHECK)" >> $@ + @chmod +x $@ +DISTCLEANFILES = gtkdoc-in-srcdir -- cgit v1.2.3 From ecd7cd9eaece64e278d3386a9f03a98b4901401b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 9 Dec 2009 12:11:01 -0600 Subject: Adding a directory name on the distribution of the .pc.in file --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index f1878a4..ee4b7a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ CLEANFILES = DISTCLEANFILES = BUILT_SOURCES = -EXTRA_DIST = appindicator-0.1.pc.in +EXTRA_DIST = libappindicator/appindicator-0.1.pc.in include $(top_srcdir)/Makefile.am.enum include $(top_srcdir)/Makefile.am.marshal -- cgit v1.2.3 From 0e959b1d94b05b560d7de08c167a9a27ba9f68ff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 9 Dec 2009 14:25:32 -0600 Subject: Switching back to the calling style with all the parameters. Otherwise the --enable-gtk-doc gets lost. --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 741ac76..e8fc803 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,4 @@ which gnome-autogen.sh || { USE_GNOME2_MACROS=1 \ USE_COMMON_DOC_BUILD=yes \ -. gnome-autogen.sh --enable-gtk-doc +gnome-autogen.sh --enable-gtk-doc $@ -- cgit v1.2.3 From 6cb0e1a6708ea0aae9b07cb08e49f06220fceeb4 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Wed, 9 Dec 2009 22:10:40 -0600 Subject: Add support for separator menuitems --- src/libappindicator/app-indicator.c | 42 +++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index 6f4a6fd..f73369d 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -33,6 +33,7 @@ License version 3 and version 2.1 along with this program. If not, see #include #include +#include #include "libappindicator/app-indicator.h" #include "libappindicator/app-indicator-enum-types.h" @@ -660,33 +661,42 @@ container_iterate (GtkWidget *widget, { DbusmenuMenuitem *root = (DbusmenuMenuitem *)data; DbusmenuMenuitem *child; - const gchar *label; + const gchar *label = NULL; gboolean label_set = FALSE; - label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget)); - child = dbusmenu_menuitem_new (); - if (GTK_IS_IMAGE_MENU_ITEM (widget)) + if (GTK_IS_SEPARATOR_MENU_ITEM (widget)) + { + dbusmenu_menuitem_property_set (child, + "type", + DBUSMENU_CLIENT_TYPES_SEPARATOR); + } + else { - GtkWidget *image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (widget)); + label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget)); - if (gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_STOCK) + if (GTK_IS_IMAGE_MENU_ITEM (widget)) { - GtkStockItem stock; + GtkWidget *image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (widget)); - gtk_stock_lookup (GTK_IMAGE (image)->data.stock.stock_id, &stock); + if (gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_STOCK) + { + GtkStockItem stock; - dbusmenu_menuitem_property_set (child, - DBUSMENU_MENUITEM_PROP_ICON, - GTK_IMAGE (image)->data.stock.stock_id); + gtk_stock_lookup (GTK_IMAGE (image)->data.stock.stock_id, &stock); - if (stock.label != NULL) - { dbusmenu_menuitem_property_set (child, - DBUSMENU_MENUITEM_PROP_LABEL, - stock.label); - label_set = TRUE; + DBUSMENU_MENUITEM_PROP_ICON, + GTK_IMAGE (image)->data.stock.stock_id); + + if (stock.label != NULL) + { + dbusmenu_menuitem_property_set (child, + DBUSMENU_MENUITEM_PROP_LABEL, + stock.label); + label_set = TRUE; + } } } } -- cgit v1.2.3 From ad85df3a930387b4c385509b5a36a632e17f2809 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Thu, 10 Dec 2009 10:11:28 -0500 Subject: Bump required version for libindicator to 0.3.0 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 74cef75..aca4553 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_CONFIG_MACRO_DIR(m4) ########################### GTK_REQUIRED_VERSION=2.12 -INDICATOR_REQUIRED_VERSION=0.2.0 +INDICATOR_REQUIRED_VERSION=0.3.0 DBUSMENUGTK_REQUIRED_VERSION=0.1.1 PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION -- cgit v1.2.3 From 6b3e25fff4a4bfb35579ddf317cfb6e58ebc0500 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Dec 2009 13:18:44 -0600 Subject: 0.0.3 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index aca4553..d88fdc8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(indicator-application, 0.0.2, ted@canonical.com) +AC_INIT(indicator-application, 0.0.3, ted@canonical.com) AC_COPYRIGHT([Copyright 2009 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-application, 0.0.2) +AM_INIT_AUTOMAKE(indicator-application, 0.0.3) AM_MAINTAINER_MODE -- cgit v1.2.3