aboutsummaryrefslogtreecommitdiff
path: root/src/actions.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-12 02:03:13 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-12 02:03:13 -0500
commit98d1379784757b63e317bcd9ac7af69836e473d9 (patch)
treeee960cfd6593540d48bc7b57c92754c8e5e0b76d /src/actions.h
parentf71bc96e3131f4241256a850ab8c0b556bdac4dd (diff)
downloadayatana-indicator-session-98d1379784757b63e317bcd9ac7af69836e473d9.tar.gz
ayatana-indicator-session-98d1379784757b63e317bcd9ac7af69836e473d9.tar.bz2
ayatana-indicator-session-98d1379784757b63e317bcd9ac7af69836e473d9.zip
Add a 'can-reboot' property to the Actions class.
This is used for handling a couple of pathological cases where features and states mix and match: 1. unity has the same dialog for 'reboot' and 'power off', so remove the duplicate menuitem, EXCEPT: 2. if the unity prompt isn't available (such as in the greeter), show both menuitems, OR 3. if the user has prompting disabled we need both, OR 4. if the user has the 'power off' button disabled, don't treat 'reboot' as redundant.
Diffstat (limited to 'src/actions.h')
-rw-r--r--src/actions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/actions.h b/src/actions.h
index bba6045..0f8aa1d 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -38,6 +38,7 @@ typedef struct _IndicatorSessionActionsClass IndicatorSessionActionsClass;
/* property keys */
#define INDICATOR_SESSION_ACTIONS_PROP_CAN_LOCK "can-lock"
#define INDICATOR_SESSION_ACTIONS_PROP_CAN_LOGOUT "can-logout"
+#define INDICATOR_SESSION_ACTIONS_PROP_CAN_REBOOT "can-reboot"
#define INDICATOR_SESSION_ACTIONS_PROP_CAN_SWITCH "can-switch"
#define INDICATOR_SESSION_ACTIONS_PROP_CAN_SUSPEND "can-suspend"
#define INDICATOR_SESSION_ACTIONS_PROP_CAN_HIBERNATE "can-hibernate"
@@ -62,6 +63,7 @@ struct _IndicatorSessionActionsClass
gboolean (*can_lock) (IndicatorSessionActions * self);
gboolean (*can_logout) (IndicatorSessionActions * self);
+ gboolean (*can_reboot) (IndicatorSessionActions * self);
gboolean (*can_switch) (IndicatorSessionActions * self);
gboolean (*can_suspend) (IndicatorSessionActions * self);
gboolean (*can_hibernate) (IndicatorSessionActions * self);
@@ -92,6 +94,7 @@ GType indicator_session_actions_get_type (void);
gboolean indicator_session_actions_can_lock (IndicatorSessionActions * self);
gboolean indicator_session_actions_can_logout (IndicatorSessionActions * self);
+gboolean indicator_session_actions_can_reboot (IndicatorSessionActions * self);
gboolean indicator_session_actions_can_switch (IndicatorSessionActions * self);
gboolean indicator_session_actions_can_suspend (IndicatorSessionActions * self);
gboolean indicator_session_actions_can_hibernate (IndicatorSessionActions * self);
@@ -101,6 +104,7 @@ gboolean indicator_session_actions_has_online_account_error (IndicatorSession
void indicator_session_actions_notify_can_lock (IndicatorSessionActions * self);
void indicator_session_actions_notify_can_logout (IndicatorSessionActions * self);
+void indicator_session_actions_notify_can_reboot (IndicatorSessionActions * self);
void indicator_session_actions_notify_can_switch (IndicatorSessionActions * self);
void indicator_session_actions_notify_can_suspend (IndicatorSessionActions * self);
void indicator_session_actions_notify_can_hibernate (IndicatorSessionActions * self);