diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-10-13 16:34:00 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-13 16:34:00 +0800 |
commit | b5bb571a77966979bd38e0de14caccc82d9fb1ff (patch) | |
tree | d9d90c87864ff3b8f6d6ea17a12489febac65e31 /lib/egg | |
parent | 9a5a2e98f3b2cf3af363bfbcb2de8a5a263af566 (diff) | |
download | gsoc2013-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-x | lib/egg/egg-editable-toolbar.c | 24 |
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", |