aboutsummaryrefslogtreecommitdiff
path: root/src/libcustomindicator/custom-indicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-20 22:39:45 -0500
committerTed Gould <ted@canonical.com>2009-10-20 22:39:45 -0500
commitada3399cdf75c37fbd5485f44a714e82b888b245 (patch)
tree0bb8a56373200d01c4dafbbb96711504d1d6f22b /src/libcustomindicator/custom-indicator.c
parente932bfa4e6ba766d12fb4193cd4d2e7c24645784 (diff)
downloadlibayatana-appindicator-ada3399cdf75c37fbd5485f44a714e82b888b245.tar.gz
libayatana-appindicator-ada3399cdf75c37fbd5485f44a714e82b888b245.tar.bz2
libayatana-appindicator-ada3399cdf75c37fbd5485f44a714e82b888b245.zip
Fleshing out the get functions.
Diffstat (limited to 'src/libcustomindicator/custom-indicator.c')
-rw-r--r--src/libcustomindicator/custom-indicator.c84
1 files changed, 72 insertions, 12 deletions
diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c
index 530f035..d28f60e 100644
--- a/src/libcustomindicator/custom-indicator.c
+++ b/src/libcustomindicator/custom-indicator.c
@@ -665,46 +665,106 @@ custom_indicator_set_menu (CustomIndicator * ci, DbusmenuServer * menu)
return;
}
+/**
+ custom_indicator_get_id:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::id.
+
+ Return value: The current ID
+*/
const gchar *
custom_indicator_get_id (CustomIndicator * ci)
{
-
- return NULL;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_STRING);
+ g_object_get_property(G_OBJECT(ci), PROP_ID_S, &value);
+ return g_value_get_string(&value);
}
+/**
+ custom_indicator_get_category:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::category.
+
+ Return value: The current category.
+*/
CustomIndicatorCategory
custom_indicator_get_category (CustomIndicator * ci)
{
-
- return CUSTOM_INDICATOR_CATEGORY_OTHER;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_ENUM);
+ g_object_get_property(G_OBJECT(ci), PROP_CATEGORY_S, &value);
+ return g_value_get_enum(&value);
}
+/**
+ custom_indicator_get_status:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::status.
+
+ Return value: The current status.
+*/
CustomIndicatorStatus
custom_indicator_get_status (CustomIndicator * ci)
{
-
- return CUSTOM_INDICATOR_STATUS_OFF;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_ENUM);
+ g_object_get_property(G_OBJECT(ci), PROP_STATUS_S, &value);
+ return g_value_get_enum(&value);
}
+/**
+ custom_indicator_get_icon:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::icon-name.
+
+ Return value: The current icon name.
+*/
const gchar *
custom_indicator_get_icon (CustomIndicator * ci)
{
-
- return NULL;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_STRING);
+ g_object_get_property(G_OBJECT(ci), PROP_ICON_NAME_S, &value);
+ return g_value_get_string(&value);
}
+/**
+ custom_indicator_get_attention_icon:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::attention-icon-name.
+
+ Return value: The current attention icon name.
+*/
const gchar *
custom_indicator_get_attention_icon (CustomIndicator * ci)
{
-
- return NULL;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_STRING);
+ g_object_get_property(G_OBJECT(ci), PROP_ATTENTION_ICON_NAME_S, &value);
+ return g_value_get_string(&value);
}
+/**
+ custom_indicator_get_menu:
+ @ci: The #CustomIndicator object to use
+
+ Wrapper function for property #CustomIndicator::menu.
+
+ Return value: The current menu being used.
+*/
DbusmenuServer *
custom_indicator_get_menu (CustomIndicator * ci)
{
-
- return NULL;
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_OBJECT);
+ g_object_get_property(G_OBJECT(ci), PROP_MENU_S, &value);
+ return DBUSMENU_SERVER(g_value_get_object(&value));
}