[gnome-commander] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- Date: Sun, 27 Jun 2010 10:11:53 +0000 (UTC)
commit 8d79a0325accaf83d38819d95b056f15b097717c
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jun 27 11:56:11 2010 +0200
Replacing obsoleted gtk_signal_connect() with g_signal_connect()
libgcmd/gnome-cmd-dialog.cc | 4 ++--
libgcmd/libgcmd-widget-factory.cc | 6 +++---
src/gnome-cmd-clist.cc | 2 +-
src/gnome-cmd-cmdline.cc | 17 ++++++-----------
src/gnome-cmd-options-dialog.cc | 2 +-
src/gnome-cmd-quicksearch-popup.cc | 6 ++----
src/intviewer/image-render.cc | 16 ++++------------
src/intviewer/text-render.cc | 16 ++++------------
8 files changed, 23 insertions(+), 46 deletions(-)
---
diff --git a/libgcmd/gnome-cmd-dialog.cc b/libgcmd/gnome-cmd-dialog.cc
index 650ff57..67db123 100644
--- a/libgcmd/gnome-cmd-dialog.cc
+++ b/libgcmd/gnome-cmd-dialog.cc
@@ -110,8 +110,8 @@ static void init (GnomeCmdDialog *dialog)
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog->priv->buttonbox), GTK_BUTTONBOX_END);
gtk_box_pack_start (GTK_BOX (vbox), dialog->priv->buttonbox, FALSE, TRUE, 0);
- gtk_signal_connect (GTK_OBJECT (dialog), "key-press-event", (GtkSignalFunc)on_dialog_keypressed, NULL);
- gtk_signal_connect (GTK_OBJECT (dialog), "show", (GtkSignalFunc)on_dialog_show, dialog);
+ g_signal_connect (dialog, "key-press-event", G_CALLBACK (on_dialog_keypressed), NULL);
+ g_signal_connect (dialog, "show", G_CALLBACK (on_dialog_show), dialog);
}
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index 169a3cc..44e36fa 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -348,9 +348,9 @@ GtkWidget *create_clist (GtkWidget *parent, const gchar *name, gint cols, gint r
gtk_clist_column_titles_show (GTK_CLIST (clist));
if (on_row_selected)
- gtk_signal_connect (GTK_OBJECT (clist), "select-row", GTK_SIGNAL_FUNC (on_row_selected), parent);
+ g_signal_connect (clist, "select-row", G_CALLBACK (on_row_selected), parent);
if (on_row_moved)
- gtk_signal_connect (GTK_OBJECT (clist), "row-move", GTK_SIGNAL_FUNC (on_row_moved), parent);
+ g_signal_connect (clist, "row-move", G_CALLBACK (on_row_moved), parent);
return sw;
}
@@ -495,7 +495,7 @@ void create_error_dialog (const gchar *msg, ...)
dialog = gtk_message_dialog_new (GTK_WINDOW (main_win_widget), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, string);
- gtk_signal_connect (GTK_OBJECT (dialog), "response", GTK_SIGNAL_FUNC (on_response), dialog);
+ g_signal_connect (dialog, "response", G_CALLBACK (on_response), dialog);
gtk_widget_show (dialog);
}
diff --git a/src/gnome-cmd-clist.cc b/src/gnome-cmd-clist.cc
index 715a9dd..1623fd5 100644
--- a/src/gnome-cmd-clist.cc
+++ b/src/gnome-cmd-clist.cc
@@ -593,7 +593,7 @@ static void init (GnomeCmdCList *clist)
GTK_CLIST (clist)->focus_row = 0;
gtk_signal_connect_after (GTK_OBJECT (clist), "scroll-vertical", GTK_SIGNAL_FUNC (on_scroll_vertical), NULL);
- gtk_signal_connect (GTK_OBJECT (clist), "realize", GTK_SIGNAL_FUNC (on_realize), NULL);
+ g_signal_connect (clist, "realize", G_CALLBACK (on_realize), NULL);
}
diff --git a/src/gnome-cmd-cmdline.cc b/src/gnome-cmd-cmdline.cc
index 9a43679..fc46bd7 100644
--- a/src/gnome-cmd-cmdline.cc
+++ b/src/gnome-cmd-cmdline.cc
@@ -247,17 +247,12 @@ static void init (GnomeCmdCmdline *cmdline)
GTK_WIDGET_UNSET_FLAGS (cmdline->priv->combo->button, GTK_CAN_FOCUS);
GTK_WIDGET_SET_FLAGS (cmdline->priv->combo->entry, GTK_CAN_FOCUS);
- gtk_signal_connect (GTK_OBJECT (cmdline->priv->combo->entry),
- "key-press-event",
- GTK_SIGNAL_FUNC (on_key_pressed), cmdline);
- gtk_signal_connect (GTK_OBJECT (cmdline->priv->combo), "item-selected",
- GTK_SIGNAL_FUNC (on_combo_item_selected), cmdline);
- gtk_signal_connect (GTK_OBJECT (cmdline->priv->combo), "popwin-hidden",
- GTK_SIGNAL_FUNC (on_combo_popwin_hidden), cmdline);
- gtk_signal_connect_after (GTK_OBJECT (main_win), "switch-fs",
- GTK_SIGNAL_FUNC (on_switch_fs), cmdline);
- gtk_signal_connect (GTK_OBJECT (main_win->fs(LEFT)), "dir-changed", GTK_SIGNAL_FUNC (on_fs_changed_dir), cmdline);
- gtk_signal_connect (GTK_OBJECT (main_win->fs(RIGHT)), "dir-changed", GTK_SIGNAL_FUNC (on_fs_changed_dir), cmdline);
+ g_signal_connect (cmdline->priv->combo->entry, "key-press-event", G_CALLBACK (on_key_pressed), cmdline);
+ g_signal_connect (cmdline->priv->combo, "item-selected", G_CALLBACK (on_combo_item_selected), cmdline);
+ g_signal_connect (cmdline->priv->combo, "popwin-hidden", G_CALLBACK (on_combo_popwin_hidden), cmdline);
+ g_signal_connect_after (main_win, "switch-fs", G_CALLBACK (on_switch_fs), cmdline);
+ g_signal_connect (main_win->fs(LEFT), "dir-changed", G_CALLBACK (on_fs_changed_dir), cmdline);
+ g_signal_connect (main_win->fs(RIGHT), "dir-changed", G_CALLBACK (on_fs_changed_dir), cmdline);
gnome_cmd_cmdline_update_style (cmdline);
}
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index dcbc3c3..c94a75e 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -705,7 +705,7 @@ static GtkWidget *create_layout_tab (GtkWidget *parent)
hbox = create_hbox (parent, FALSE, 6);
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 5, 6, GTK_FILL, GTK_FILL, 0, 0);
- gtk_signal_connect (GTK_OBJECT (check), "toggled", GTK_SIGNAL_FUNC (on_ls_colors_toggled), parent);
+ g_signal_connect (check, "toggled", G_CALLBACK (on_ls_colors_toggled), parent);
gtk_box_pack_start (GTK_BOX (hbox), check, TRUE, TRUE, 0);
btn = create_button_with_data (parent, _("Edit colors..."), GTK_SIGNAL_FUNC (on_ls_colors_edit), parent);
diff --git a/src/gnome-cmd-quicksearch-popup.cc b/src/gnome-cmd-quicksearch-popup.cc
index c1c8499..a131164 100644
--- a/src/gnome-cmd-quicksearch-popup.cc
+++ b/src/gnome-cmd-quicksearch-popup.cc
@@ -275,14 +275,12 @@ static void init (GnomeCmdQuicksearchPopup *popup)
gtk_container_add (GTK_CONTAINER (popup->frame), popup->box);
gtk_container_add (GTK_CONTAINER (popup), popup->frame);
- gtk_signal_connect (GTK_OBJECT (popup->entry), "key-press-event",
- GTK_SIGNAL_FUNC (on_key_pressed), popup);
+ g_signal_connect (popup->entry, "key-press-event", G_CALLBACK (on_key_pressed), popup);
gtk_signal_connect_after (GTK_OBJECT (popup->entry), "key-press-event",
GTK_SIGNAL_FUNC (on_key_pressed_after), popup);
gtk_signal_connect_after (GTK_OBJECT (popup->entry), "changed",
GTK_SIGNAL_FUNC (on_text_changed), popup);
- gtk_signal_connect (GTK_OBJECT (popup->entry), "button-press-event",
- GTK_SIGNAL_FUNC (on_button_press), popup);
+ g_signal_connect (popup->entry, "button-press-event", G_CALLBACK (on_button_press), popup);
gtk_widget_show (popup->lbl);
gtk_widget_show (popup->entry);
diff --git a/src/intviewer/image-render.cc b/src/intviewer/image-render.cc
index dc18876..1e524db 100644
--- a/src/intviewer/image-render.cc
+++ b/src/intviewer/image-render.cc
@@ -160,12 +160,8 @@ void image_render_set_h_adjustment (ImageRender *obj, GtkAdjustment *adjustment)
obj->priv->h_adjustment = adjustment;
gtk_object_ref (GTK_OBJECT (obj->priv->h_adjustment));
- gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) image_render_h_adjustment_changed ,
- (gpointer) obj);
- gtk_signal_connect (GTK_OBJECT (adjustment), "value-changed",
- (GtkSignalFunc) image_render_h_adjustment_value_changed ,
- (gpointer) obj);
+ g_signal_connect (adjustment, "changed", G_CALLBACK (image_render_h_adjustment_changed), obj);
+ g_signal_connect (adjustment, "value-changed", G_CALLBACK (image_render_h_adjustment_value_changed), obj);
obj->priv->old_h_adj_value = gtk_adjustment_get_value (adjustment);
#if GTK_CHECK_VERSION (2, 14, 0)
@@ -194,12 +190,8 @@ void image_render_set_v_adjustment (ImageRender *obj, GtkAdjustment *adjustment)
obj->priv->v_adjustment = adjustment;
gtk_object_ref (GTK_OBJECT (obj->priv->v_adjustment));
- gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) image_render_v_adjustment_changed ,
- (gpointer) obj);
- gtk_signal_connect (GTK_OBJECT (adjustment), "value-changed",
- (GtkSignalFunc) image_render_v_adjustment_value_changed ,
- (gpointer) obj);
+ g_signal_connect (adjustment, "changed", G_CALLBACK (image_render_v_adjustment_changed), obj);
+ g_signal_connect (adjustment, "value-changed", G_CALLBACK (image_render_v_adjustment_value_changed), obj);
obj->priv->old_v_adj_value = gtk_adjustment_get_value (adjustment);
#if GTK_CHECK_VERSION (2, 14, 0)
diff --git a/src/intviewer/text-render.cc b/src/intviewer/text-render.cc
index ef66e31..e1f1791 100644
--- a/src/intviewer/text-render.cc
+++ b/src/intviewer/text-render.cc
@@ -213,12 +213,8 @@ void text_render_set_h_adjustment (TextRender *obj, GtkAdjustment *adjustment)
obj->priv->h_adjustment = adjustment;
gtk_object_ref (GTK_OBJECT (obj->priv->h_adjustment));
- gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) text_render_h_adjustment_changed ,
- (gpointer) obj);
- gtk_signal_connect (GTK_OBJECT (adjustment), "value-changed",
- (GtkSignalFunc) text_render_h_adjustment_value_changed ,
- (gpointer) obj);
+ g_signal_connect (adjustment, "changed", G_CALLBACK (text_render_h_adjustment_changed), obj);
+ g_signal_connect (adjustment, "value-changed", G_CALLBACK (text_render_h_adjustment_value_changed), obj);
obj->priv->old_h_adj_value = adjustment->value;
obj->priv->old_h_adj_lower = adjustment->lower;
@@ -242,12 +238,8 @@ void text_render_set_v_adjustment (TextRender *obj, GtkAdjustment *adjustment)
obj->priv->v_adjustment = adjustment;
gtk_object_ref (GTK_OBJECT (obj->priv->v_adjustment));
- gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) text_render_v_adjustment_changed ,
- (gpointer) obj);
- gtk_signal_connect (GTK_OBJECT (adjustment), "value-changed",
- (GtkSignalFunc) text_render_v_adjustment_value_changed ,
- (gpointer) obj);
+ g_signal_connect (adjustment, "changed", G_CALLBACK (text_render_v_adjustment_changed), obj);
+ g_signal_connect (adjustment, "value-changed", G_CALLBACK (text_render_v_adjustment_value_changed), obj);
obj->priv->old_v_adj_value = adjustment->value;
obj->priv->old_v_adj_lower = adjustment->lower;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]