aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */
/**