From 16cdfbcf41b0136f2e29836a7bdb76a6f05ec4b7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 13:03:59 -0500 Subject: Changing the Dbus interface. --- src/notification-item.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notification-item.xml b/src/notification-item.xml index 01261b5..e0d3649 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -12,8 +12,8 @@ to find the icons specified above. --> - - + + @@ -29,7 +29,7 @@ - + -- cgit v1.2.3 From 2a0f0b9f099c2714556099fc7ddf1ceca5378fa2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 13:04:52 -0500 Subject: Changing the app store --- src/application-service-appstore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 55906ff..cf74efc 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -45,13 +45,13 @@ static gboolean _application_service_server_get_applications (ApplicationService #define NOTIFICATION_ITEM_PROP_AICON_NAME "AttentionIconName" #define NOTIFICATION_ITEM_PROP_ICON_THEME_PATH "IconThemePath" #define NOTIFICATION_ITEM_PROP_MENU "Menu" -#define NOTIFICATION_ITEM_PROP_LABEL "Label" -#define NOTIFICATION_ITEM_PROP_LABEL_GUIDE "LabelGuide" +#define NOTIFICATION_ITEM_PROP_LABEL "XAyatanaLabel" +#define NOTIFICATION_ITEM_PROP_LABEL_GUIDE "XAyatanaLabelGuide" #define NOTIFICATION_ITEM_SIG_NEW_ICON "NewIcon" #define NOTIFICATION_ITEM_SIG_NEW_AICON "NewAttentionIcon" #define NOTIFICATION_ITEM_SIG_NEW_STATUS "NewStatus" -#define NOTIFICATION_ITEM_SIG_NEW_LABEL "NewLabel" +#define NOTIFICATION_ITEM_SIG_NEW_LABEL "XAyatanaNewLabel" #define NOTIFICATION_ITEM_SIG_NEW_ICON_THEME_PATH "NewIconThemePath" /* Private Stuff */ -- cgit v1.2.3 From ea682be679779ba60d98393f2d613e8c980b3fd2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 13:24:27 -0500 Subject: Adding a set of wrapper properties that can be used by the dbus interface. --- src/app-indicator.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 22b9c03..3f7c85f 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -112,7 +112,9 @@ enum { PROP_MENU, PROP_CONNECTED, PROP_LABEL, - PROP_LABEL_GUIDE + PROP_LABEL_GUIDE, + PROP_X_LABEL, + PROP_X_LABEL_GUIDE }; /* The strings so that they can be slowly looked up. */ @@ -126,6 +128,8 @@ enum { #define PROP_CONNECTED_S "connected" #define PROP_LABEL_S "label" #define PROP_LABEL_GUIDE_S "label-guide" +#define PROP_X_LABEL_S "x-ayatana-label" +#define PROP_X_LABEL_GUIDE_S "x-ayatana-label-guide" /* Private macro, shhhh! */ #define APP_INDICATOR_GET_PRIVATE(o) \ @@ -331,6 +335,32 @@ app_indicator_class_init (AppIndicatorClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:x-ayatana-label: + + Wrapper for #AppIndicator:label. Please use that in all of your + code. + */ + g_object_class_install_property(object_class, + PROP_X_LABEL, + g_param_spec_string (PROP_X_LABEL_S, + "A wrapper, please don't use.", + "A wrapper, please don't use.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:x-ayatana-label-guide: + + Wrapper for #AppIndicator:label-guide. Please use that in all of your + code. + */ + g_object_class_install_property(object_class, + PROP_X_LABEL_GUIDE, + g_param_spec_string (PROP_X_LABEL_GUIDE_S, + "A wrapper, please don't use.", + "A wrapper, please don't use.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Signals */ @@ -658,6 +688,7 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu check_connect (self); break; + case PROP_X_LABEL: case PROP_LABEL: { gchar * oldlabel = priv->label; priv->label = g_value_dup_string(value); @@ -676,6 +707,7 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu } break; } + case PROP_X_LABEL_GUIDE: case PROP_LABEL_GUIDE: { gchar * oldguide = priv->label_guide; priv->label_guide = g_value_dup_string(value); -- cgit v1.2.3 From 1fbc480b06ae2596b2644134d3c906ef3ba15f8e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 13:43:36 -0500 Subject: Adding in a wrapper signal --- src/app-indicator.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/app-indicator.c b/src/app-indicator.c index 3f7c85f..e174e57 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -92,6 +92,7 @@ enum { NEW_ATTENTION_ICON, NEW_STATUS, NEW_LABEL, + X_NEW_LABEL, CONNECTION_CHANGED, NEW_ICON_THEME_PATH, LAST_SIGNAL @@ -135,6 +136,9 @@ enum { #define APP_INDICATOR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), APP_INDICATOR_TYPE, AppIndicatorPrivate)) +/* Signal wrapper */ +#define APP_INDICATOR_SIGNAL_X_NEW_LABEL ("x-ayatana-" APP_INDICATOR_SIGNAL_NEW_LABEL) + /* Default Path */ #define DEFAULT_ITEM_PATH "/org/ayatana/NotificationItem" @@ -425,6 +429,23 @@ app_indicator_class_init (AppIndicatorClass *klass) _application_service_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); + /** + AppIndicator::x-ayatana-new-label: + @arg0: The #AppIndicator object + @arg1: The string for the label + @arg1: The string for the guide + + Wrapper for #AppIndicator::new-label, please don't use this signal + use the other one. + */ + signals[X_NEW_LABEL] = g_signal_new (APP_INDICATOR_SIGNAL_X_NEW_LABEL, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AppIndicatorClass, new_label), + NULL, NULL, + _application_service_marshal_VOID__STRING_STRING, + G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); + /** AppIndicator::connection-changed: @arg0: The #AppIndicator object @@ -811,6 +832,10 @@ signal_label_change_idle (gpointer user_data) priv->label != NULL ? priv->label : "", priv->label_guide != NULL ? priv->label_guide : "", TRUE); + g_signal_emit(G_OBJECT(self), signals[X_NEW_LABEL], 0, + priv->label != NULL ? priv->label : "", + priv->label_guide != NULL ? priv->label_guide : "", + TRUE); priv->label_change_idle = 0; -- cgit v1.2.3 From 7330f014db03391d1859f74b4bcbef13e587aa52 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 14:11:18 -0500 Subject: Adding the wrapper properties to the get. --- src/app-indicator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app-indicator.c b/src/app-indicator.c index e174e57..cd8dcc9 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -805,10 +805,12 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa g_value_set_boolean (value, priv->watcher_proxy != NULL ? TRUE : FALSE); break; + case PROP_X_LABEL: case PROP_LABEL: g_value_set_string (value, priv->label); break; + case PROP_X_LABEL_GUIDE: case PROP_LABEL_GUIDE: g_value_set_string (value, priv->label_guide); break; -- cgit v1.2.3