aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-10-13 16:34:00 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-13 16:34:00 +0800
commitb5bb571a77966979bd38e0de14caccc82d9fb1ff (patch)
treed9d90c87864ff3b8f6d6ea17a12489febac65e31 /lib/egg
parent9a5a2e98f3b2cf3af363bfbcb2de8a5a263af566 (diff)
downloadgsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar.gz
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar.bz2
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar.lz
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar.xz
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.tar.zst
gsoc2013-epiphany-b5bb571a77966979bd38e0de14caccc82d9fb1ff.zip
Show a different cursor when hovering toolbar items in edit mode.
2003-10-13 Marco Pesenti Gritti <marco@gnome.org> * lib/egg/egg-editable-toolbar.c: (enter_notify_cb), (leave_notify_cb), (create_item): Show a different cursor when hovering toolbar items in edit mode.
Diffstat (limited to 'lib/egg')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index d76ca6f60..afc824dd1 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -355,6 +355,26 @@ set_item_drag_source (GtkWidget *item,
}
}
+static gboolean
+enter_notify_cb (GtkWidget *widget, GdkEventCrossing *event)
+{
+ GdkCursor *cursor;
+
+ cursor = gdk_cursor_new (GDK_FLEUR);
+ gdk_window_set_cursor (widget->window, cursor);
+ gdk_cursor_unref (cursor);
+
+ return TRUE;
+}
+
+static gboolean
+leave_notify_cb (GtkWidget *widget, GdkEventCrossing *event)
+{
+ gdk_window_set_cursor (widget->window, NULL);
+
+ return TRUE;
+}
+
static GtkWidget *
create_item (EggEditableToolbar *t,
EggToolbarsModel *model,
@@ -384,6 +404,10 @@ create_item (EggEditableToolbar *t,
}
gtk_widget_show (item);
+ g_signal_connect (item, "enter_notify_event",
+ G_CALLBACK (enter_notify_cb), t);
+ g_signal_connect (item, "leave_notify_event",
+ G_CALLBACK (leave_notify_cb), t);
g_signal_connect (item, "drag_data_get",
G_CALLBACK (drag_data_get_cb), t);
g_signal_connect (item, "drag_data_delete",