aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-16 16:22:04 -0500
committerTed Gould <ted@canonical.com>2009-10-16 16:22:04 -0500
commit85b61a412d9cfafd73422f5e021bc315ed30c805 (patch)
tree24d67c8853955fbd3b1f5beb76a73a81b729d2c0
parent63e10a66964e2cecf813e4feb6d155ac47674ca7 (diff)
downloadayatana-indicator-application-85b61a412d9cfafd73422f5e021bc315ed30c805.tar.gz
ayatana-indicator-application-85b61a412d9cfafd73422f5e021bc315ed30c805.tar.bz2
ayatana-indicator-application-85b61a412d9cfafd73422f5e021bc315ed30c805.zip
Putting in our first property, status. Woo hoo!
-rw-r--r--src/libcustomindicator/custom-indicator.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c
index 6608437..25b0424 100644
--- a/src/libcustomindicator/custom-indicator.c
+++ b/src/libcustomindicator/custom-indicator.c
@@ -2,13 +2,19 @@
#include "config.h"
#endif
-#include "custom-indicator.h"
+#include "libcustomindicator/custom-indicator.h"
+#include "libcustomindicator/custom-indicator-enum-types.h"
typedef struct _CustomIndicatorPrivate CustomIndicatorPrivate;
struct _CustomIndicatorPrivate {
int placeholder;
};
+enum properties {
+ PROP_0,
+ PROP_STATUS
+};
+
#define CUSTOM_INDICATOR_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), CUSTOM_INDICATOR_TYPE, CustomIndicatorPrivate))
@@ -34,6 +40,14 @@ custom_indicator_class_init (CustomIndicatorClass *klass)
object_class->set_property = custom_indicator_set_property;
object_class->get_property = custom_indicator_get_property;
+ g_object_class_install_property(object_class, PROP_STATUS,
+ g_param_spec_enum("status",
+ "Indicator Status",
+ "Whether the indicator is shown or requests attention.",
+ CUSTOM_INDICATOR_TYPE_CUSTOM_INDICATOR_STATUS_T,
+ CUSTOM_INDICATOR_STATUS_OFF,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
return;
}