Mail Archives: geda-user/2014/10/14/16:24:24
Verbatim from Gtk+ 2 Reference Manual: "gtk_entry_new_with_max_length
has been deprecated since version 2.0 and should not be used in
newly-written code. Use gtk_entry_set_max_length() instead."
---
gattrib/src/x_dialog.c | 3 ++-
gschem/src/x_dialog.c | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/gattrib/src/x_dialog.c b/gattrib/src/x_dialog.c
index c22a24e..cb59bb5 100644
--- a/gattrib/src/x_dialog.c
+++ b/gattrib/src/x_dialog.c
@@ -85,7 +85,8 @@ void x_dialog_newattrib()
FALSE, FALSE, 0);
/* Create the "attrib" text entry area */
- attrib_entry = gtk_entry_new_with_max_length(1024);
+ attrib_entry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(attrib_entry), 1024);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), attrib_entry, TRUE, TRUE, 5);
gtk_widget_set_size_request (dialog, 260, 140);
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index a22f703..1f94835 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -295,7 +295,8 @@ void translate_dialog (GschemToplevel *w_current)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0);
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
- textentry = gtk_entry_new_with_max_length (10);
+ textentry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(textentry), 10);
gtk_entry_set_text(GTK_ENTRY(textentry), "0");
gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
@@ -1028,7 +1029,8 @@ void find_text_dialog(GschemToplevel *w_current)
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
- textentry = gtk_entry_new_with_max_length(20);
+ textentry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(textentry), 20);
gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
@@ -1135,7 +1137,8 @@ void hide_text_dialog(GschemToplevel * w_current)
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
- textentry = gtk_entry_new_with_max_length(20);
+ textentry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(textentry), 20);
gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
gtk_widget_grab_focus(textentry);
@@ -1236,7 +1239,8 @@ void show_text_dialog(GschemToplevel * w_current)
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
- textentry = gtk_entry_new_with_max_length(20);
+ textentry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(textentry), 20);
gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
gtk_widget_grab_focus(textentry);
--
2.1.0
- Raw text -