X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZyS5Ce4XqFizaohXzXhv1f99SlEuCeCs+nDjqdVmyQ4=; b=KUWKU1r8XRV2H2K8kpNhHxi3H0VtRVdscOwXwauyqcTsRt0xPrBSfGM1eIAYZx3WXH Rp2Lm9xADaPcG+kqwP9E0eBmrDwqXjLUiEFvgVRf3BH1iDjDD2tKqgSTc5UNLnpNwVqk fiLEYjUk3a7Q96PXqfm5Uisb6HoqtHPBVqZjLNRa3Yk01D7fZ6zFImmBs/jmoD7ti+Y6 mKLk7CIkx4f7OHyLCgus1CjuwWIufTxAiSStattAV7xJPSiohT8nMdQtRz6GM67b0hh6 GycD9MhGBe+HGFXn4qm3YROt3MGMLKATg3kQQp8o7o/v4b9MutWyy7Tq0rochxeiU8g3 ymLg== X-Received: by 10.194.110.104 with SMTP id hz8mr7431207wjb.62.1413317879034; Tue, 14 Oct 2014 13:17:59 -0700 (PDT) From: Riccardo Lucchese To: geda-user AT delorie DOT com Cc: paubert AT iram DOT es, Riccardo Lucchese Subject: [geda-user] [PATCH V2 07/43] Remove deprecated use of gtk_entry_new_with_max_lenght() Date: Tue, 14 Oct 2014 22:16:59 +0200 Message-Id: <1413317855-10673-8-git-send-email-riccardo.lucchese@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1413317855-10673-1-git-send-email-riccardo.lucchese@gmail.com> References: <1413317855-10673-1-git-send-email-riccardo DOT lucchese AT gmail DOT com> Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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