aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-11 15:55:25 -0500
committerTed Gould <ted@gould.cx>2010-08-11 15:55:25 -0500
commitb7d28a11de1b283cffa4caea1abfb94e01db3fdd (patch)
tree12edca8958f0b5ac704f5724ac75a7263660498f /src
parentf34b5e562004795cfb4e09a7daa1d3cbb21f89f0 (diff)
parent7330f014db03391d1859f74b4bcbef13e587aa52 (diff)
downloadayatana-indicator-application-b7d28a11de1b283cffa4caea1abfb94e01db3fdd.tar.gz
ayatana-indicator-application-b7d28a11de1b283cffa4caea1abfb94e01db3fdd.tar.bz2
ayatana-indicator-application-b7d28a11de1b283cffa4caea1abfb94e01db3fdd.zip
Merging in the XLabel branch to handle conflicts.
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c59
-rw-r--r--src/application-service-appstore.c6
-rw-r--r--src/notification-item.xml6
3 files changed, 65 insertions, 6 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 7528da2..6511589 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -94,6 +94,7 @@ enum {
NEW_ATTENTION_ICON,
NEW_STATUS,
NEW_LABEL,
+ X_NEW_LABEL,
CONNECTION_CHANGED,
NEW_ICON_THEME_PATH,
LAST_SIGNAL
@@ -115,6 +116,8 @@ enum {
PROP_CONNECTED,
PROP_LABEL,
PROP_LABEL_GUIDE,
+ PROP_X_LABEL,
+ PROP_X_LABEL_GUIDE,
PROP_ORDERING_INDEX,
PROP_X_ORDERING_INDEX
};
@@ -130,6 +133,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-" PROP_LABEL_S)
+#define PROP_X_LABEL_GUIDE_S ("x-ayatana-" PROP_LABEL_GUIDE_S)
#define PROP_ORDERING_INDEX_S "ordering-index"
#define PROP_X_ORDERING_INDEX_S ("x-ayatana-" PROP_ORDERING_INDEX_S)
@@ -137,6 +142,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"
@@ -370,6 +378,32 @@ app_indicator_class_init (AppIndicatorClass *klass)
0, G_MAXUINT32, 0,
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 */
@@ -435,6 +469,23 @@ app_indicator_class_init (AppIndicatorClass *klass)
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
@arg1: Whether we're connected or not
@@ -698,6 +749,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);
@@ -716,6 +768,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);
@@ -796,10 +849,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;
@@ -828,6 +883,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;
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index d3dc4a9..4ac1576 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -46,14 +46,14 @@ 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_PROP_ORDERING_INDEX "XAyatanaOrderingIndex"
#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"
#define OVERRIDE_GROUP_NAME "Ordering Index Overrides"
diff --git a/src/notification-item.xml b/src/notification-item.xml
index b66dfe3..05afd83 100644
--- a/src/notification-item.xml
+++ b/src/notification-item.xml
@@ -12,8 +12,8 @@
to find the icons specified above. -->
<property name="IconThemePath" type="s" access="read" />
<property name="Menu" type="o" access="read" />
- <property name="Label" type="s" access="read" />
- <property name="LabelGuide" type="s" access="read" />
+ <property name="XAyatanaLabel" type="s" access="read" />
+ <property name="XAyatanaLabelGuide" type="s" access="read" />
<property name="XAyatanaOrderingIndex" type="u" access="read" />
<!-- Methods -->
@@ -30,7 +30,7 @@
<signal name="NewStatus">
<arg type="s" name="status" direction="out" />
</signal>
- <signal name="NewLabel">
+ <signal name="XAyatanaNewLabel">
<arg type="s" name="label" direction="out" />
<arg type="s" name="guide" direction="out" />
</signal>