[gtk+/gtk-3-16] GtkRecentChooser: Use a better busy cursor



commit ed9b598e9b449aae68ba41f2cea643ca21aa4488
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 7 22:36:00 2015 -0400

    GtkRecentChooser: Use a better busy cursor

 gtk/gtkrecentchooserdefault.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 379d04f..e2a5b76 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -684,7 +684,7 @@ error_message (GtkRecentChooserDefault *impl,
 
 static void
 set_busy_cursor (GtkRecentChooserDefault *impl,
-                gboolean                 show_busy_cursor)
+                gboolean                 busy)
 {
   GtkWindow *toplevel;
   GdkDisplay *display;
@@ -693,15 +693,19 @@ set_busy_cursor (GtkRecentChooserDefault *impl,
   toplevel = get_toplevel (GTK_WIDGET (impl));
   if (!toplevel || !gtk_widget_get_realized (GTK_WIDGET (toplevel)))
     return;
-  
+
   display = gtk_widget_get_display (GTK_WIDGET (toplevel));
-  
-  cursor = NULL;
-  if (show_busy_cursor)
-    cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
 
-  gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (toplevel)),
-                         cursor);
+  if (busy)
+    {
+      cursor = gdk_cursor_new_from_name (display, "left_ptr_watch");
+      if (cursor == NULL)
+        cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
+    }
+  else
+    cursor = NULL;
+
+  gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (toplevel)), cursor);
   gdk_display_flush (display);
 
   if (cursor)


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