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=Qh16f9fI6g9BtEyyfKFsr3dS8lmABr0T+9lINphM4xg=; b=gRGbDmmLRO7OCYotDrsPde8sjC6wvkeBf/zhZqpScHBGB0acizXdDZomxtuUD8OLix AH9dGr3ZAbkyC8AdxFEDGRRoJXb3cvxKCKNi96welBEfrUO4DhEpJ/DVQxz/wZWaxd4x sxc2jmWhjHHpvlFGSRdczFURaEd5L8CjC10UiOHIx1q2QSI5qX6TNiSt8OldsJMIZYR0 Q0ZlDumagphGL5QdC7A+LDRkHcSvNgA9Udd+itAXNa3SjMgUko0V6dErYF15cxDQW2vl V5yz7U8dGaIaLXpckzXFxE1ZqIYcgE+gSoxdXitV82uB67jRQK5RYCOHco4fc67DxmMs ExNw== X-Received: by 10.194.242.4 with SMTP id wm4mr7218547wjc.61.1413317936552; Tue, 14 Oct 2014 13:18:56 -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 30/43] Remove deprecated use of gtk_signal_connect() Date: Tue, 14 Oct 2014 22:17:22 +0200 Message-Id: <1413317855-10673-31-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_signal_connect is deprecated and should not be used in newly-written code. Use g_signal_connect() instead." --- gattrib/src/gtksheet_2_2.c | 42 ++++++++++++++++++------------------------ gattrib/src/x_window.c | 4 ++-- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c index 00ccc4b..cfcdad0 100644 --- a/gattrib/src/gtksheet_2_2.c +++ b/gattrib/src/gtksheet_2_2.c @@ -1120,10 +1120,9 @@ gtk_sheet_change_entry(GtkSheet *sheet, GtkType entry_type) if(state == GTK_SHEET_NORMAL) { gtk_sheet_show_active_cell(sheet); - gtk_signal_connect(GTK_OBJECT(gtk_sheet_get_entry(sheet)), - "changed", - (GtkSignalFunc)gtk_sheet_entry_changed, - GTK_OBJECT(GTK_WIDGET(sheet))); + g_signal_connect(gtk_sheet_get_entry(sheet), "changed", + (GtkSignalFunc)gtk_sheet_entry_changed, + GTK_OBJECT(GTK_WIDGET(sheet))); } } @@ -2391,12 +2390,11 @@ gtk_sheet_set_vadjustment (GtkSheet *sheet, gtk_object_ref (GTK_OBJECT (sheet->vadjustment)); gtk_object_sink (GTK_OBJECT (sheet->vadjustment)); - gtk_signal_connect (GTK_OBJECT (sheet->vadjustment), "changed", - (GtkSignalFunc) vadjustment_changed, - (gpointer) sheet); - gtk_signal_connect (GTK_OBJECT (sheet->vadjustment), "value_changed", - (GtkSignalFunc) vadjustment_value_changed, - (gpointer) sheet); + g_signal_connect(sheet->vadjustment, "changed", + (GtkSignalFunc)vadjustment_changed, (gpointer)sheet); + g_signal_connect(sheet->vadjustment, "value_changed", + (GtkSignalFunc)vadjustment_value_changed, + (gpointer)sheet); } if (!sheet->vadjustment || !old_adjustment) @@ -2437,12 +2435,11 @@ gtk_sheet_set_hadjustment (GtkSheet *sheet, gtk_object_ref (GTK_OBJECT (sheet->hadjustment)); gtk_object_sink (GTK_OBJECT (sheet->hadjustment)); - gtk_signal_connect (GTK_OBJECT (sheet->hadjustment), "changed", - (GtkSignalFunc) hadjustment_changed, - (gpointer) sheet); - gtk_signal_connect (GTK_OBJECT (sheet->hadjustment), "value_changed", - (GtkSignalFunc) hadjustment_value_changed, - (gpointer) sheet); + g_signal_connect(sheet->hadjustment, "changed", + (GtkSignalFunc)hadjustment_changed, (gpointer)sheet); + g_signal_connect(sheet->hadjustment, "value_changed", + (GtkSignalFunc)hadjustment_value_changed, + (gpointer)sheet); } if (!sheet->hadjustment || !old_adjustment) @@ -2743,10 +2740,8 @@ create_global_button(GtkSheet *sheet) { sheet->button = gtk_button_new_with_label(" "); - gtk_signal_connect (GTK_OBJECT (sheet->button), - "pressed", - (GtkSignalFunc) global_button_clicked, - (gpointer) sheet); + g_signal_connect(sheet->button, "pressed", + (GtkSignalFunc)global_button_clicked, (gpointer)sheet); } static void @@ -4045,10 +4040,9 @@ gtk_sheet_activate_cell(GtkSheet *sheet, gint row, gint col) GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gtk_sheet_show_active_cell(sheet); - gtk_signal_connect(GTK_OBJECT(gtk_sheet_get_entry(sheet)), - "changed", - (GtkSignalFunc)gtk_sheet_entry_changed, - GTK_OBJECT(GTK_WIDGET(sheet))); + g_signal_connect(gtk_sheet_get_entry(sheet), "changed", + (GtkSignalFunc)gtk_sheet_entry_changed, + GTK_OBJECT(GTK_WIDGET(sheet))); _gtkextra_signal_emit(GTK_OBJECT(sheet),sheet_signals[ACTIVATE], row, col, &veto); diff --git a/gattrib/src/x_window.c b/gattrib/src/x_window.c index a4a665e..8f3d00a 100644 --- a/gattrib/src/x_window.c +++ b/gattrib/src/x_window.c @@ -93,8 +93,8 @@ x_window_init() gtk_window_set_title( GTK_WINDOW(window), _("gattrib -- gEDA attribute editor")); gtk_window_set_default_size(GTK_WINDOW(window), 750, 600); - gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC (gattrib_really_quit), 0); + g_signal_connect(window, "delete_event", + GTK_SIGNAL_FUNC(gattrib_really_quit), 0); /* ----- Now create main_vbox. This is a container which organizes child ----- */ /* ----- widgets into a vertical column. ----- */ -- 2.1.0