gnome-scan r504 - in trunk: . lib



Author: bersace
Date: Sun Feb 24 19:31:06 2008
New Revision: 504
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=504&view=rev

Log:
Added watch cursor while probing.


Modified:
   trunk/ChangeLog
   trunk/lib/gnome-scan-dialog.c

Modified: trunk/lib/gnome-scan-dialog.c
==============================================================================
--- trunk/lib/gnome-scan-dialog.c	(original)
+++ trunk/lib/gnome-scan-dialog.c	Sun Feb 24 19:31:06 2008
@@ -813,6 +813,7 @@
 	GThread *thread;
 	GError *error = NULL;
 	GType *backend_types;
+	GdkCursor *watch_cursor = gdk_cursor_new(GDK_WATCH);
 	gint i;
 	guint n;
 	backend_types = g_type_children (GNOME_TYPE_SCAN_BACKEND, &n);
@@ -833,11 +834,13 @@
 			
 			priv->probing_backends++;
 			
-			
+			gdk_window_set_cursor(GTK_WIDGET(dialog)->window,
+								  watch_cursor);
 			thread = g_thread_create ((GThreadFunc) gnome_scan_backend_probe_scanners,
 									  backend, FALSE, &error);
 		}
 	}
+	gdk_cursor_unref (watch_cursor);
 }
 
 static void
@@ -894,12 +897,21 @@
 gsd_probe_done (GnomeScanBackend *backend, GnomeScanDialog *dialog)
 {
 	GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+	GdkCursor *arrow_cursor;
+	
 	priv->probe_done = !--priv->probing_backends;
 	if (!priv->scanner_count && GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog))) {
 		gsd_message_dialog (dialog, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
 							_("No device found !"),
 							_("Ensure your device is plugged, powered, supported and configured."));
 	}
+
+	if (priv->probe_done) {
+		arrow_cursor = gdk_cursor_new(GDK_ARROW);
+		gdk_window_set_cursor (GTK_WIDGET(dialog)->window,
+							   arrow_cursor);
+		gdk_cursor_unref (arrow_cursor);
+	}
 }
 
 /* GENERAL */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]