[gtk/cursor-things: 1/3] label: Stop juggling cursors



commit b26087845dbc55a73b939818c5a205ed68c57d4d
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 18 15:06:09 2019 -0400

    label: Stop juggling cursors
    
    We have a convenience api for this.

 gtk/gtklabel.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 859fa5059a..05f2c8c537 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4897,13 +4897,7 @@ gtk_label_set_selectable_hint (GtkLabel *label)
   widget = GTK_WIDGET (label);
 
   if (priv->select_info->selectable)
-    {
-      GdkCursor *cursor;
-
-      cursor = gdk_cursor_new_from_name ("text", NULL);
-      gtk_widget_set_cursor (widget, cursor);
-      g_object_unref (cursor);
-    }
+    gtk_widget_set_cursor_from_name (widget, "text");
 }
 
 #define GTK_TYPE_LABEL_CONTENT            (gtk_label_content_get_type ())


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