diff options
author | Ted Gould <ted@gould.cx> | 2011-08-11 09:29:30 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-11 09:29:30 -0500 |
commit | 52de3eb2a2a7cc6a1ed8272d85585f1463f836d9 (patch) | |
tree | f74f9f13dac6e58bfcd813a7ab2a20ef178b3db2 /src/indicator-messages.c | |
parent | bfd668716a3702fbc27abee0bf609fc747b88f4e (diff) | |
parent | 6deeec596bef04ffaf469dfcf5197b36b41813cf (diff) | |
download | ayatana-indicator-messages-52de3eb2a2a7cc6a1ed8272d85585f1463f836d9.tar.gz ayatana-indicator-messages-52de3eb2a2a7cc6a1ed8272d85585f1463f836d9.tar.bz2 ayatana-indicator-messages-52de3eb2a2a7cc6a1ed8272d85585f1463f836d9.zip |
* New upstream release.
* Add an item to clear the alert
* Choose mail applications based on the default application
* Clear based on middle click
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index bb88c57..82a9315 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -89,7 +89,10 @@ static void indicator_messages_dispose (GObject *object); static void indicator_messages_finalize (GObject *object); static GtkImage * get_icon (IndicatorObject * io); static GtkMenu * get_menu (IndicatorObject * io); -static const gchar * get_accessible_desc (IndicatorObject * io); +static void indicator_messages_middle_click (IndicatorObject * io, + IndicatorObjectEntry * entry, + guint time, gpointer data); +static const gchar * get_accessible_desc (IndicatorObject * io); static void connection_change (IndicatorServiceManager * sm, gboolean connected, gpointer user_data); @@ -131,6 +134,7 @@ indicator_messages_class_init (IndicatorMessagesClass *klass) io_class->get_image = get_icon; io_class->get_menu = get_menu; io_class->get_accessible_desc = get_accessible_desc; + io_class->secondary_activate = indicator_messages_middle_click; if (bus_node_info == NULL) { GError * error = NULL; @@ -755,3 +759,24 @@ get_accessible_desc (IndicatorObject * io) { return accessible_desc; } + +/* Hide the notifications on middle-click over the indicator-messages */ +static void +indicator_messages_middle_click (IndicatorObject * io, IndicatorObjectEntry * entry, + guint time, gpointer data) +{ + if (icon_proxy == NULL) { + return; + } + + g_dbus_proxy_call(icon_proxy, + "ClearAttention", + NULL, /* params */ + G_DBUS_CALL_FLAGS_NONE, + -1, /* timeout */ + NULL, /* cancel */ + NULL, + NULL); + + return; +} |