diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-08-11 14:14:39 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-08-11 14:14:39 -0400 |
commit | 2d1a071b3357517db74dbecb4a70a8233756f6f0 (patch) | |
tree | f74f9f13dac6e58bfcd813a7ab2a20ef178b3db2 /src/indicator-messages.c | |
parent | 191be4ed4601ce62c3197eb14b4044c89a26a0cd (diff) | |
parent | 52de3eb2a2a7cc6a1ed8272d85585f1463f836d9 (diff) | |
download | ayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.tar.gz ayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.tar.bz2 ayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.zip |
* New upstream release.
* Add an item to clear the alert
* Choose mail applications based on the default application
* Clear based on middle click
* Merge new upstream from Ubuntu.
* Standards-Version: 3.9.2
* Merge new upstream from Ubuntu.
* Fix 0.3.11-0ubuntu3 changelog entry (missed a space), so that
bzr builddeb won't go crazy (see Debian Bug #620242)
* Fix debian/copyright, was refering to libdbusmenu by mistake.
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; +} |