aboutsummaryrefslogtreecommitdiff
path: root/src/libcustomindicator/custom-indicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-19 16:44:59 -0500
committerTed Gould <ted@canonical.com>2009-10-19 16:44:59 -0500
commitb82c8da3f4ace3aa62097f2c3ea2b92c7d553191 (patch)
tree9a228357ee1d76d6321f8b596bf4af2e3309cbfb /src/libcustomindicator/custom-indicator.c
parent9dbe19dd59b0d42a4b4c33150bed0db4c31295f2 (diff)
downloadlibayatana-appindicator-b82c8da3f4ace3aa62097f2c3ea2b92c7d553191.tar.gz
libayatana-appindicator-b82c8da3f4ace3aa62097f2c3ea2b92c7d553191.tar.bz2
libayatana-appindicator-b82c8da3f4ace3aa62097f2c3ea2b92c7d553191.zip
Creating a connected property to check easily.
Diffstat (limited to 'src/libcustomindicator/custom-indicator.c')
-rw-r--r--src/libcustomindicator/custom-indicator.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c
index 314493f..d59e1c5 100644
--- a/src/libcustomindicator/custom-indicator.c
+++ b/src/libcustomindicator/custom-indicator.c
@@ -38,7 +38,8 @@ enum {
PROP_STATUS,
PROP_ICON_NAME,
PROP_ATTENTION_ICON_NAME,
- PROP_MENU
+ PROP_MENU,
+ PROP_CONNECTED
};
/* The strings so that they can be slowly looked up. */
@@ -48,6 +49,7 @@ enum {
#define PROP_ICON_NAME_S "icon-name"
#define PROP_ATTENTION_ICON_NAME_S "attention-icon-name"
#define PROP_MENU_S "menu"
+#define PROP_CONNECTED_S "connected"
/* Private macro, shhhh! */
#define CUSTOM_INDICATOR_GET_PRIVATE(o) \
@@ -125,6 +127,14 @@ custom_indicator_class_init (CustomIndicatorClass *klass)
DBUSMENU_TYPE_SERVER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property(object_class, PROP_CONNECTED,
+ g_param_spec_boolean(PROP_CONNECTED_S,
+ "Whether we're conneced to a watcher",
+ "Pretty simple, true if we have a reasonable expectation of being displayed through this object. You should hide your TrayIcon if so.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+
/* Signals */
/**