[gnome-commander] Use cast operator to *GtkWindow instead of previous GTK_WINDOW()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Use cast operator to *GtkWindow instead of previous GTK_WINDOW()
- Date: Sun, 20 Jun 2010 09:58:23 +0000 (UTC)
commit 68f27d973f6157d96b9e41b2f1501893ef3ad271
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jun 20 11:57:51 2010 +0200
Use cast operator to *GtkWindow instead of previous GTK_WINDOW()
src/gnome-cmd-con-device.cc | 4 ++--
src/gnome-cmd-dir.cc | 2 +-
src/gnome-cmd-prepare-xfer-dialog.cc | 2 +-
src/gnome-cmd-remote-dialog.cc | 2 +-
src/gnome-cmd-user-actions.cc | 4 ++--
src/plugin_manager.cc | 4 ++--
src/utils.cc | 5 ++---
7 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index e2a8c5b..7be4a99 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -201,7 +201,7 @@ static void dev_vfs_umount_callback (gboolean succeeded, char *error, char *deta
if (succeeded)
{
- msgbox = gtk_message_dialog_new (GTK_WINDOW (main_win),
+ msgbox = gtk_message_dialog_new (*main_win,
GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
@@ -209,7 +209,7 @@ static void dev_vfs_umount_callback (gboolean succeeded, char *error, char *deta
}
else
{
- msgbox = gtk_message_dialog_new (GTK_WINDOW (main_win),
+ msgbox = gtk_message_dialog_new (*main_win,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index 6708c86..47d92e1 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -544,7 +544,7 @@ static void create_list_progress_dialog (GnomeCmdDir *dir)
gtk_box_pack_start (GTK_BOX (vbox), dir->pbar, FALSE, TRUE, 0);
gnome_cmd_dialog_add_category (GNOME_CMD_DIALOG (dir->dialog), vbox);
- gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dir->dialog), GTK_WINDOW (main_win));
+ gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dir->dialog), *main_win);
gtk_widget_show_all (dir->dialog);
}
diff --git a/src/gnome-cmd-prepare-xfer-dialog.cc b/src/gnome-cmd-prepare-xfer-dialog.cc
index c937f84..e5c88af 100644
--- a/src/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/gnome-cmd-prepare-xfer-dialog.cc
@@ -188,7 +188,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
// Nothing exists, ask the user if a new directory might be suitable in the path that he specified
gchar *msg = g_strdup_printf (_("The directory '%s' doesn't exist, do you want to create it?"),
g_basename (dest_path));
- GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (main_win),
+ GtkWidget *dialog = gtk_message_dialog_new (*main_win,
(GtkDialogFlags) 0,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_OK_CANCEL,
diff --git a/src/gnome-cmd-remote-dialog.cc b/src/gnome-cmd-remote-dialog.cc
index 0186aaf..bd030c6 100644
--- a/src/gnome-cmd-remote-dialog.cc
+++ b/src/gnome-cmd-remote-dialog.cc
@@ -449,7 +449,7 @@ static void init (GnomeCmdRemoteDialog *ftp_dialog)
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
gtk_window_set_title (GTK_WINDOW (dialog), _("Remote Connections"));
- gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dialog), GTK_WINDOW (main_win));
+ gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dialog), *main_win);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
cat_box = create_hbox (dialog, FALSE, 12);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index d186398..9a6848b 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1558,7 +1558,7 @@ void options_edit (GtkMenuItem *menuitem, gpointer not_used)
{
GtkWidget *dialog = gnome_cmd_options_dialog_new ();
gtk_widget_ref (dialog);
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (main_win));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), *main_win);
gtk_widget_show (dialog);
}
@@ -1792,7 +1792,7 @@ void help_about (GtkMenuItem *menuitem, gpointer not_used)
gchar *license_trans = g_strjoin ("\n\n", _(license[0]), _(license[1]), _(license[2]), NULL);
- gtk_show_about_dialog (GTK_WINDOW (main_win),
+ gtk_show_about_dialog (*main_win,
"name", "GNOME Commander",
"version", VERSION,
"comments", _(comments),
diff --git a/src/plugin_manager.cc b/src/plugin_manager.cc
index 94386ee..ec5d528 100644
--- a/src/plugin_manager.cc
+++ b/src/plugin_manager.cc
@@ -385,7 +385,7 @@ static void on_about (GtkButton *button, GtkWidget *dialog)
g_return_if_fail (data != NULL);
- gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (main_win));
+ gtk_window_set_transient_for (GTK_WINDOW (about), *main_win);
gtk_widget_ref (about);
gtk_widget_show (about);
}
@@ -452,7 +452,7 @@ void plugin_manager_show ()
update_plugin_list (GTK_CLIST (avail_list), dialog);
gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_SIGNAL_FUNC(on_close), dialog);
- gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dialog), GTK_WINDOW (main_win));
+ gnome_cmd_dialog_set_transient_for (GNOME_CMD_DIALOG (dialog), *main_win);
gtk_widget_set_size_request (GTK_WIDGET (dialog), 500, 300);
gtk_window_set_resizable ((GtkWindow *) GTK_WIDGET (dialog), TRUE);
diff --git a/src/utils.cc b/src/utils.cc
index 61cebd9..8a42edd 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -203,7 +203,7 @@ gint run_simple_dialog (GtkWidget *parent, gboolean ignore_close_box,
button_titles = convert_varargs_to_name_array (button_title_args);
va_end (button_title_args);
- dialog = gtk_message_dialog_new (GTK_WINDOW (main_win), GTK_DIALOG_MODAL, msg_type, GTK_BUTTONS_NONE, text);
+ dialog = gtk_message_dialog_new (*main_win, GTK_DIALOG_MODAL, msg_type, GTK_BUTTONS_NONE, text);
if (title)
gtk_window_set_title (GTK_WINDOW (dialog), title);
@@ -597,8 +597,7 @@ void mime_exec_single (GnomeCmdFile *f)
else
{
gchar *msg = g_strdup_printf (_("%s does not know how to open remote file. Do you want to download the file to a temporary location and then open it?"), gnome_cmd_app_get_name (app));
- GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (main_win), GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, msg);
+ GtkWidget *dialog = gtk_message_dialog_new (*main_win, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, msg);
TmpDlData *dldata = g_new0 (TmpDlData, 1);
args[0] = (gpointer) app;
// args[2] is NULL here (don't set exec dir for temporarily downloaded files)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]