[Goodies-commits] r3010 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Mon Aug 20 00:47:00 CEST 2007
Author: stephan
Date: 2007-08-19 22:47:00 +0000 (Sun, 19 Aug 2007)
New Revision: 3010
Modified:
ristretto/trunk/src/picture_viewer.c
ristretto/trunk/src/thumbnail_viewer.c
Log:
Add some changing cursors to indicate ristretto is busy.
Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c 2007-08-19 22:18:48 UTC (rev 3009)
+++ ristretto/trunk/src/picture_viewer.c 2007-08-19 22:47:00 UTC (rev 3010)
@@ -197,7 +197,7 @@
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gtk_widget_get_parent_window(widget), &attributes, attributes_mask);
- widget->style = gtk_style_attach (widget->style, widget->window);
+ widget->style = gtk_style_attach (widget->style, widget->window);
gdk_window_set_user_data (widget->window, widget);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_ACTIVE);
@@ -233,6 +233,10 @@
/* required for transparent pixbufs... add double buffering to fix flickering*/
if(GTK_WIDGET_REALIZED(widget))
{
+ GdkCursor *cursor = gdk_cursor_new(GDK_WATCH);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
+
GdkPixmap *buffer = gdk_pixmap_new(NULL, widget->allocation.width, widget->allocation.height, gdk_drawable_get_depth(widget->window));
GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(buffer));
@@ -315,6 +319,10 @@
widget->allocation.width,
widget->allocation.height);
g_object_unref(buffer);
+
+ cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
}
}
@@ -527,8 +535,22 @@
static void
cb_rstto_picture_viewer_nav_file_changed(RsttoNavigator *nav, RsttoPictureViewer *viewer)
{
+ GtkWidget *widget = GTK_WIDGET(viewer);
RsttoNavigatorEntry *entry = rstto_navigator_get_file(nav);
+ if(GTK_WIDGET_REALIZED(widget))
+ {
+ GdkCursor *cursor = gdk_cursor_new(GDK_WATCH);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
+ }
+
GdkPixbuf *pixbuf = rstto_navigator_entry_get_pixbuf(entry);
-
rstto_picture_viewer_set_pixbuf(viewer, pixbuf);
+
+ if(GTK_WIDGET_REALIZED(widget))
+ {
+ GdkCursor *cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
+ }
}
Modified: ristretto/trunk/src/thumbnail_viewer.c
===================================================================
--- ristretto/trunk/src/thumbnail_viewer.c 2007-08-19 22:18:48 UTC (rev 3009)
+++ ristretto/trunk/src/thumbnail_viewer.c 2007-08-19 22:47:00 UTC (rev 3010)
@@ -403,6 +403,9 @@
viewer->priv->dimension / 2 - 7, widget->allocation.height - 16,14,14);
break;
}
+ GdkCursor *cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
}
static void
@@ -519,6 +522,12 @@
}
else
{
+ if(GTK_WIDGET_REALIZED(widget))
+ {
+ GdkCursor *cursor = gdk_cursor_new(GDK_WATCH);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
+ }
rstto_navigator_set_file(viewer->priv->navigator, n);
}
}
More information about the Goodies-commits
mailing list