[gtk/text: 9/11] spin button: Use GtkText



commit a46c2c8a9fdb59cc94e0708c19dd1f240562d6cb
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 15 21:01:33 2019 -0500

    spin button: Use GtkText
    
    We already use GtkEditable api throughout. This just
    means we create a GtkText instead of a GtkEntry.

 gtk/gtkspinbutton.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 68a30a1f34..1d5175bc1b 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -36,7 +36,8 @@
 #include "gtkcssstylepropertyprivate.h"
 #include "gtkeditable.h"
 #include "gtkeditableprivate.h"
-#include "gtkentry.h"
+#include "gtkimage.h"
+#include "gtktext.h"
 #include "gtkeventcontrollerkey.h"
 #include "gtkeventcontrollermotion.h"
 #include "gtkeventcontrollerscroll.h"
@@ -269,7 +270,7 @@ static gboolean gtk_spin_button_stop_spinning  (GtkSpinButton      *spin);
 static void gtk_spin_button_value_changed  (GtkAdjustment      *adjustment,
                                             GtkSpinButton      *spin_button);
 
-static void gtk_spin_button_activate       (GtkEntry           *entry,
+static void gtk_spin_button_activate       (GtkText            *entry,
                                             gpointer            user_data);
 static void gtk_spin_button_unset_adjustment (GtkSpinButton *spin_button);
 static void gtk_spin_button_set_orientation (GtkSpinButton     *spin_button,
@@ -829,7 +830,7 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
   priv->box = gtk_box_new (priv->orientation, 0);
   gtk_widget_set_parent (priv->box, GTK_WIDGET (spin_button));
 
-  priv->entry = gtk_entry_new ();
+  priv->entry = gtk_text_new ();
   gtk_editable_set_delegate (GTK_EDITABLE (spin_button), GTK_EDITABLE (priv->entry));
   gtk_editable_set_width_chars (GTK_EDITABLE (priv->entry), 0);
   gtk_editable_set_max_width_chars (GTK_EDITABLE (priv->entry), 0);
@@ -1293,7 +1294,7 @@ gtk_spin_button_snap (GtkSpinButton *spin_button,
 }
 
 static void
-gtk_spin_button_activate (GtkEntry *entry,
+gtk_spin_button_activate (GtkText *entry,
                           gpointer  user_data)
 {
   GtkSpinButton *spin_button = user_data;


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