[gtk/text: 7/12] spin button: Use GtkText
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/text: 7/12] spin button: Use GtkText
- Date: Sat, 16 Feb 2019 06:18:02 +0000 (UTC)
commit 997892bf47e6af9fbf42aa647ec5e3adfffebbeb
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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 68a30a1f34..de3a311228 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -36,7 +36,7 @@
#include "gtkcssstylepropertyprivate.h"
#include "gtkeditable.h"
#include "gtkeditableprivate.h"
-#include "gtkentry.h"
+#include "gtktext.h"
#include "gtkeventcontrollerkey.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerscroll.h"
@@ -269,7 +269,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 +829,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 +1293,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]