aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--src/indicator-messages.c15
2 files changed, 21 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 92f5c88..cb5a9e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,20 +43,20 @@ INDICATE_REQUIRED_VERSION=0.4.90
INDICATOR_REQUIRED_VERSION=0.3.19
DBUSMENUGTK_REQUIRED_VERSION=0.3.94
-AC_ARG_WITH([indicator-gtk],
- [AS_HELP_STRING([--with-indicator-gtk],
+AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
[Which version of gtk to use for the indicator @<:@default=3@:>@])],
[],
- [with_indicator_gtk=3])
+ [with_gtk=3])
-AS_IF([test "x$with_indicator_gtk" = x3],
+AS_IF([test "x$with_gtk" = x3],
[PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
indicate-0.5 >= $INDICATE_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
],
- [test "x$with_indicator_gtk" = x2],
+ [test "x$with_gtk" = x2],
[PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
@@ -104,7 +104,7 @@ AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all
if test "x$with_localinstall" = "xyes"; then
INDICATORDIR="${libdir}/indicators/2/"
INDICATORICONSDIR="${datadir}/libindicate/icons/"
-elif test "x$with_indicator_gtk" = x2; then
+elif test "x$with_gtk" = x2; then
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
else
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index bb88c57..bee5e66 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -89,6 +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 void indicator_messages_middle_click (IndicatorObject * io,
+ IndicatorObjectEntry * entry,
+ guint time, gint x, gint y,
+ gpointer data);
static const gchar * get_accessible_desc (IndicatorObject * io);
static void connection_change (IndicatorServiceManager * sm,
gboolean connected,
@@ -131,6 +135,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 +760,13 @@ 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, gint x, gint y, gpointer data)
+{
+ indicator_image_helper_update(GTK_IMAGE(main_image), "indicator-messages");
+ accessible_desc = _("Messages");
+ update_a11y_desc();
+}