aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-09-05 13:58:56 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-05 13:58:56 +0800
commit74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666 (patch)
tree6be6bcf68dacd4540a0a319ee9d99aee13fbcc54 /embed
parenta8cb263c1b5f5e35e71af7e2cbabe6194fcb404a (diff)
downloadgsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar.gz
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar.bz2
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar.lz
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar.xz
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.tar.zst
gsoc2013-epiphany-74d8f312cb8f7fd79cf9ddf4f4f8958d3b04e666.zip
ephy-overview: Use hand cursor when hovering items
For improved visual feedback.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-overview.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/embed/ephy-overview.c b/embed/ephy-overview.c
index 49ca2ff81..dfba6a283 100644
--- a/embed/ephy-overview.c
+++ b/embed/ephy-overview.c
@@ -74,6 +74,26 @@ main_view_item_activated (GtkWidget *widget,
g_free (url);
}
+static gboolean
+iconview_motion_notify (GtkWidget *widget,
+ GdkEvent *event,
+ EphyOverview *overview)
+{
+ GdkCursor *cursor;
+ GtkIconView *iconview = GTK_ICON_VIEW (widget);
+ GdkEventMotion *ev = (GdkEventMotion *)event;
+
+ if (gtk_icon_view_get_item_at_pos (iconview, ev->x, ev->y, NULL, NULL)) {
+ cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_HAND2);
+ gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
+ g_object_unref (cursor);
+ } else {
+ gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
+ }
+
+ return FALSE;
+}
+
static void
ephy_overview_constructed (GObject *object)
{
@@ -91,6 +111,9 @@ ephy_overview_constructed (GObject *object)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
iconview = gtk_bin_get_child (GTK_BIN (self->priv->frecent_view));
gtk_icon_view_set_columns (GTK_ICON_VIEW (iconview), 5);
+ g_signal_connect (iconview, "motion-notify-event",
+ G_CALLBACK (iconview_motion_notify),
+ self);
g_object_set (self->priv->frecent_view,
"halign", GTK_ALIGN_FILL,
"valign", GTK_ALIGN_FILL, NULL);