[gtk/wip/carlosg/broken-grabs: 1/6] gtktexthandle: Set css name on GtkWidgetClass



commit 1c5b6eb21474f987773883abcac425b2a67fd1c1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Apr 25 02:56:38 2020 +0200

    gtktexthandle: Set css name on GtkWidgetClass
    
    Handles are their own widget, special names are not necessary
    anymore.

 gtk/gtktexthandle.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index fda579ca52..df8ea7c638 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -348,6 +348,8 @@ gtk_text_handle_class_init (GtkTextHandleClass *klass)
                  NULL, NULL,
                   NULL,
                   G_TYPE_NONE, 0, G_TYPE_NONE);
+
+  gtk_widget_class_set_css_name (widget_class, I_("cursor-handle"));
 }
 
 static void
@@ -461,9 +463,7 @@ gtk_text_handle_new (GtkWidget *parent)
 {
   GtkTextHandle *handle;
 
-  handle = g_object_new (GTK_TYPE_TEXT_HANDLE,
-                         "css-name", I_("cursor-handle"),
-                         NULL);
+  handle = g_object_new (GTK_TYPE_TEXT_HANDLE, NULL);
   gtk_widget_set_parent (GTK_WIDGET (handle), parent);
 
   return handle;


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