diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 24 |
2 files changed, 32 insertions, 0 deletions
@@ -1,5 +1,13 @@ 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. + +2003-10-13 Marco Pesenti Gritti <marco@gnome.org> + * src/bookmarks/ephy-bookmarks-editor.c: (add_bookmarks_source), (import_dialog_response_cb), (cmd_bookmarks_import): 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", |