[gnome-commander/gcmd-1-3] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- Date: Sun, 5 Jul 2009 09:14:48 +0000 (UTC)
commit b817d0d70dc715fd01cc929bad73214b2b9b0389
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jul 5 11:10:57 2009 +0200
Replacing obsoleted gtk_signal_connect() with g_signal_connect()
src/gnome-cmd-bookmark-dialog.cc | 23 +++++++++++------------
src/gnome-cmd-prepare-copy-dialog.cc | 2 +-
src/gnome-cmd-prepare-move-dialog.cc | 2 +-
src/gnome-cmd-prepare-xfer-dialog.cc | 7 +++----
src/utils.cc | 6 +++---
5 files changed, 19 insertions(+), 21 deletions(-)
---
diff --git a/src/gnome-cmd-bookmark-dialog.cc b/src/gnome-cmd-bookmark-dialog.cc
index 63547f2..202c38a 100644
--- a/src/gnome-cmd-bookmark-dialog.cc
+++ b/src/gnome-cmd-bookmark-dialog.cc
@@ -497,8 +497,7 @@ static void init (GnomeCmdBookmarkDialog *in_dialog)
gtk_window_set_default_size (GTK_WINDOW (dialog), bookmark_dlg_width, bookmark_dlg_height);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_signal_connect (GTK_OBJECT (dialog), "size-allocate",
- GTK_SIGNAL_FUNC (on_dialog_size_allocate), dialog);
+ g_signal_connect (dialog, "size-allocate", G_CALLBACK (on_dialog_size_allocate), dialog);
vbox = create_vbox (dialog, FALSE, 12);
cat = create_category (dialog, vbox, _("Bookmark Groups"));
@@ -558,16 +557,16 @@ static void init (GnomeCmdBookmarkDialog *in_dialog)
gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_CLOSE,
GTK_SIGNAL_FUNC (on_close), dialog);
- gtk_signal_connect (GTK_OBJECT (dialog), "key-press-event",
- GTK_SIGNAL_FUNC (on_dialog_keypress), dialog);
- gtk_signal_connect_after (GTK_OBJECT (in_dialog->priv->dir_list), "scroll-vertical",
- GTK_SIGNAL_FUNC (on_scroll_vertical), NULL);
- gtk_signal_connect (GTK_OBJECT (in_dialog->priv->dir_list), "unselect-row",
- GTK_SIGNAL_FUNC (on_dir_unselected), dialog);
- gtk_signal_connect (GTK_OBJECT (in_dialog->priv->dir_list), "resize-column",
- GTK_SIGNAL_FUNC (on_column_resize), dialog);
- gtk_signal_connect (GTK_OBJECT (in_dialog->priv->combo), "item-selected",
- GTK_SIGNAL_FUNC (on_group_combo_item_selected), dialog);
+ g_signal_connect (dialog, "key-press-event",
+ G_CALLBACK (on_dialog_keypress), dialog);
+ g_signal_connect_after (G_OBJECT (in_dialog->priv->dir_list), "scroll-vertical",
+ G_CALLBACK (on_scroll_vertical), NULL);
+ g_signal_connect (in_dialog->priv->dir_list, "unselect-row",
+ G_CALLBACK (on_dir_unselected), dialog);
+ g_signal_connect (in_dialog->priv->dir_list, "resize-column",
+ G_CALLBACK (on_column_resize), dialog);
+ g_signal_connect (in_dialog->priv->combo, "item-selected",
+ G_CALLBACK (on_group_combo_item_selected), dialog);
gtk_widget_grab_focus (in_dialog->priv->dir_list);
}
diff --git a/src/gnome-cmd-prepare-copy-dialog.cc b/src/gnome-cmd-prepare-copy-dialog.cc
index e9b2a31..c2817d9 100644
--- a/src/gnome-cmd-prepare-copy-dialog.cc
+++ b/src/gnome-cmd-prepare-copy-dialog.cc
@@ -157,7 +157,7 @@ void gnome_cmd_prepare_copy_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
// Connect signals
- gtk_signal_connect (GTK_OBJECT (data->dialog->ok_button), "clicked", GTK_SIGNAL_FUNC (on_ok), data);
+ g_signal_connect (data->dialog->ok_button, "clicked", G_CALLBACK (on_ok), data);
// Show the dialog
diff --git a/src/gnome-cmd-prepare-move-dialog.cc b/src/gnome-cmd-prepare-move-dialog.cc
index 925df6a..e375243 100644
--- a/src/gnome-cmd-prepare-move-dialog.cc
+++ b/src/gnome-cmd-prepare-move-dialog.cc
@@ -146,7 +146,7 @@ void gnome_cmd_prepare_move_dialog_show (GnomeCmdFileSelector *from, GnomeCmdFil
// Connect signals
- gtk_signal_connect (GTK_OBJECT (data->dialog->ok_button), "clicked", GTK_SIGNAL_FUNC (on_ok), data);
+ g_signal_connect (data->dialog->ok_button, "clicked", G_CALLBACK (on_ok), data);
// Show the dialog
diff --git a/src/gnome-cmd-prepare-xfer-dialog.cc b/src/gnome-cmd-prepare-xfer-dialog.cc
index 7acbd64..aa68295 100644
--- a/src/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/gnome-cmd-prepare-xfer-dialog.cc
@@ -311,8 +311,7 @@ static void init (GnomeCmdPrepareXferDialog *dialog)
gtk_box_pack_start (GTK_BOX (dest_dir_vbox), dest_dir_fileentry, FALSE, FALSE, 0);
dialog->dest_dir_entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (dest_dir_fileentry));
- gtk_signal_connect (GTK_OBJECT (dialog->dest_dir_entry), "key-press-event",
- GTK_SIGNAL_FUNC (on_dest_dir_entry_keypressed), dialog);
+ g_signal_connect (dialog->dest_dir_entry, "key-press-event", G_CALLBACK (on_dest_dir_entry_keypressed), dialog);
// options
GtkWidget *options_hbox = create_hbox (GTK_WIDGET (dialog), TRUE, 6);
@@ -332,8 +331,8 @@ static void init (GnomeCmdPrepareXferDialog *dialog)
dialog->cancel_button = gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_CANCEL, NULL, NULL);
dialog->ok_button = gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_OK, NULL, NULL);
- gtk_signal_connect_after (GTK_OBJECT (dialog->cancel_button), "clicked", GTK_SIGNAL_FUNC (on_cancel), dialog);
- gtk_signal_connect_after (GTK_OBJECT (dialog->ok_button), "clicked", GTK_SIGNAL_FUNC (on_ok), dialog);
+ g_signal_connect_after (G_OBJECT (dialog->cancel_button), "clicked", G_CALLBACK (on_cancel), dialog);
+ g_signal_connect_after (G_OBJECT (dialog->ok_button), "clicked", G_CALLBACK (on_ok), dialog);
gtk_widget_set_size_request (GTK_WIDGET (dialog), 500, -1);
}
diff --git a/src/utils.cc b/src/utils.cc
index fb4ce3c..3619e4e 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -216,9 +216,9 @@ gint run_simple_dialog (GtkWidget *parent, gboolean ignore_close_box,
// Allow close.
if (ignore_close_box)
- gtk_signal_connect (GTK_OBJECT (dialog), "delete-event", GTK_SIGNAL_FUNC (delete_event_callback), NULL);
+ g_signal_connect (dialog, "delete-event", G_CALLBACK (delete_event_callback), NULL);
else
- gtk_signal_connect (GTK_OBJECT (dialog), "key-press-event", GTK_SIGNAL_FUNC (on_run_dialog_keypress), dialog);
+ g_signal_connect (dialog, "key-press-event", G_CALLBACK (on_run_dialog_keypress), dialog);
gtk_window_set_wmclass (GTK_WINDOW (dialog), "dialog", "Eel");
@@ -607,7 +607,7 @@ void mime_exec_single (GnomeCmdFile *f)
dldata->dialog = dialog;
dldata->args = args;
- gtk_signal_connect (GTK_OBJECT (dialog), "response", GTK_SIGNAL_FUNC (on_tmp_download_response), dldata);
+ g_signal_connect (dialog, "response", G_CALLBACK (on_tmp_download_response), dldata);
gtk_widget_show (dialog);
g_free (msg);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]