Mail Archives: geda-user/2014/10/14/16:25:38
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
- Raw text -