gnome-netstatus r752 - in trunk: . src
- From: diegoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-netstatus r752 - in trunk: . src
- Date: Sat, 29 Nov 2008 00:41:54 +0000 (UTC)
Author: diegoe
Date: Sat Nov 29 00:41:54 2008
New Revision: 752
URL: http://svn.gnome.org/viewvc/gnome-netstatus?rev=752&view=rev
Log:
Obey Fitt's law in the panel applet.
Fixes bug #325141. Patch by Benjamin Otte.
Modified:
trunk/ChangeLog
trunk/src/netstatus-applet.c
Modified: trunk/src/netstatus-applet.c
==============================================================================
--- trunk/src/netstatus-applet.c (original)
+++ trunk/src/netstatus-applet.c Sat Nov 29 00:41:54 2008
@@ -51,6 +51,8 @@
NetstatusAppletClass *klass);
static void netstatus_applet_class_init (NetstatusAppletClass *klass);
static void netstatus_applet_finalize (GObject *object);
+static gboolean netstatus_applet_button_press_event (GtkWidget *widget,
+ GdkEventButton *event);
static gboolean netstatus_applet_key_press_event (GtkWidget *widget,
GdkEventKey *event);
static void netstatus_applet_orientation_changed (NetstatusApplet *applet,
@@ -154,6 +156,7 @@
gobject_class->finalize = netstatus_applet_finalize;
widget_class->key_press_event = netstatus_applet_key_press_event;
+ widget_class->button_press_event = netstatus_applet_button_press_event;
}
static void
@@ -188,6 +191,21 @@
}
static gboolean
+netstatus_applet_button_press_event (GtkWidget *widget,
+ GdkEventButton *event)
+{
+ NetstatusApplet *applet = (NetstatusApplet *) widget;
+
+ if (event->button == 1)
+ {
+ netstatus_icon_invoke (NETSTATUS_ICON (applet->priv->icon));
+ return TRUE;
+ }
+
+ return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event);
+}
+
+static gboolean
netstatus_applet_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]