diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2011-07-20 02:57:51 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2011-07-20 02:57:51 +0200 |
commit | 8f71358509ec3e2a6e2fe633c4dfc07c58f450ed (patch) | |
tree | 84a92968fe93fb4cc422a1411cca63a3eef08e5b /src/app-indicator.h | |
parent | d54d1e78545ee8cbeb7d3b0d276665290de7f296 (diff) | |
download | libayatana-appindicator-8f71358509ec3e2a6e2fe633c4dfc07c58f450ed.tar.gz libayatana-appindicator-8f71358509ec3e2a6e2fe633c4dfc07c58f450ed.tar.bz2 libayatana-appindicator-8f71358509ec3e2a6e2fe633c4dfc07c58f450ed.zip |
app-indicator: Move from "secondary-activate" signal to secondary_activate target
To avoid appindicators writers to use the "secondary-activate"
event to perform actions that can't be done via a menu item
we added a new API:
- app_indicator_set_secondary_activate_target
- app_indicator_get_secondary_activate_target
With it, an appindicator writer can simply define a new GtkWidget
that will be activated when a secondary activation will occur.
The GtkWidget must be a sensitive and visible inner child of
the appindicator MenuItem.
Diffstat (limited to 'src/app-indicator.h')
-rw-r--r-- | src/app-indicator.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/app-indicator.h b/src/app-indicator.h index 32aa2dd..09b7520 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -118,7 +118,6 @@ G_BEGIN_DECLS #define APP_INDICATOR_SIGNAL_NEW_LABEL "new-label" #define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed" #define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path" -#define APP_INDICATOR_SIGNAL_SECONDARY_ACTIVATE "secondary-activate" #define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event" /** @@ -171,10 +170,7 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate; @new_label: Slot for #AppIndicator::new-label. @connection_changed: Slot for #AppIndicator::connection-changed. @scroll_event: Slot for #AppIndicator::scroll-event - @secondary_activate: Slot for #AppIndicator::secondary-activate. - This signal is generally called on middle-click over the #AppIndicator, - it's meant to be used only for advanced actions, which must be - accessible also via menu items or any other platform-independent controls. + @app_indicator_reserved_ats: Reserved for future use. @fallback: Function that gets called to make a #GtkStatusIcon when there is no Application Indicator area available. @unfallback: The function that gets called if an Application @@ -210,19 +206,16 @@ struct _AppIndicatorClass { gpointer user_data); /* Local Signals */ - void (* connection_changed) (AppIndicator *indicator, - gboolean connected, - gpointer user_data); + void (* connection_changed) (AppIndicator * indicator, + gboolean connected, + gpointer user_data); - void (* scroll_event) (AppIndicator *indicator, - gint delta, + void (* scroll_event) (AppIndicator * indicator, + gint delta, GdkScrollDirection direction, - gpointer user_data); + gpointer user_data); - void (* secondary_activate) (AppIndicator *indicator, - gint x, - gint y, - gpointer user_data); + void (*app_indicator_reserved_ats)(void); /* Overridable Functions */ GtkStatusIcon * (*fallback) (AppIndicator * indicator); @@ -291,6 +284,8 @@ void app_indicator_set_icon_theme_path(AppIndicator const gchar *icon_theme_path); void app_indicator_set_ordering_index (AppIndicator *self, guint32 ordering_index); +void app_indicator_set_secondary_activate_target (AppIndicator *self, + GtkWidget *menuitem); /* Get properties */ const gchar * app_indicator_get_id (AppIndicator *self); @@ -305,6 +300,7 @@ GtkMenu * app_indicator_get_menu (AppIndic const gchar * app_indicator_get_label (AppIndicator *self); const gchar * app_indicator_get_label_guide (AppIndicator *self); guint32 app_indicator_get_ordering_index (AppIndicator *self); +GtkWidget * app_indicator_get_secondary_activate_target (AppIndicator *self); /* Helpers */ void app_indicator_build_menu_from_desktop (AppIndicator * self, |