[gnome-commander/gcmd-1-3] Replaced create_error_dialog() with gnome_cmd_show_message()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-3] Replaced create_error_dialog() with gnome_cmd_show_message()
- Date: Tue, 8 Dec 2009 21:22:57 +0000 (UTC)
commit f42d6c78af0f441e80a0fe74d91dabf19d0138ff
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Dec 8 22:15:18 2009 +0100
Replaced create_error_dialog() with gnome_cmd_show_message()
src/gnome-cmd-chown-dialog.cc | 4 ++--
src/gnome-cmd-delete-dialog.cc | 2 +-
src/gnome-cmd-dir.cc | 2 +-
src/gnome-cmd-file-list.cc | 4 ++--
src/gnome-cmd-prepare-xfer-dialog.cc | 4 ++--
src/gnome-cmd-python-plugin.cc | 2 +-
src/gnome-cmd-user-actions.cc | 12 ++++++------
src/gnome-cmd-xfer.cc | 2 +-
src/utils.cc | 11 ++++-------
9 files changed, 20 insertions(+), 23 deletions(-)
---
diff --git a/src/gnome-cmd-chown-dialog.cc b/src/gnome-cmd-chown-dialog.cc
index ff80ffa..68f93df 100644
--- a/src/gnome-cmd-chown-dialog.cc
+++ b/src/gnome-cmd-chown-dialog.cc
@@ -55,8 +55,8 @@ static void do_chown (GnomeCmdFile *in, uid_t uid, gid_t gid, gboolean recurse)
if (ret != GNOME_VFS_OK)
{
gchar *fpath = gnome_cmd_file_get_real_path (in);
- gchar *msg = g_strdup_printf (_("Could not chown %s\n%s"), fpath, gnome_vfs_result_to_string (ret));
- create_error_dialog (msg);
+ gchar *msg = g_strdup_printf (_("Could not chown %s"), fpath);
+ gnome_cmd_show_message (*main_win, msg, gnome_vfs_result_to_string (ret));
g_free (msg);
g_free (fpath);
}
diff --git a/src/gnome-cmd-delete-dialog.cc b/src/gnome-cmd-delete-dialog.cc
index 1c3f267..c0aabee 100644
--- a/src/gnome-cmd-delete-dialog.cc
+++ b/src/gnome-cmd-delete-dialog.cc
@@ -217,7 +217,7 @@ static gboolean update_delete_status_widgets (DeleteData *data)
if (data->delete_done)
{
if (data->vfs_status != GNOME_VFS_OK)
- create_error_dialog (gnome_vfs_result_to_string (data->vfs_status));
+ gnome_cmd_show_message (*main_win, gnome_vfs_result_to_string (data->vfs_status));
if (data->files)
for (GList *tmp = data->files; tmp; tmp = tmp->next)
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index 6dd1666..4afc67b 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -358,7 +358,7 @@ GnomeCmdDir *gnome_cmd_dir_new (GnomeCmdCon *con, GnomeCmdPath *path)
}
else
{
- create_error_dialog (gnome_vfs_result_to_string (res));
+ gnome_cmd_show_message (*main_win, gnome_vfs_result_to_string (res));
gnome_vfs_file_info_unref (info);
}
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 0aae8f5..0796096 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -2016,7 +2016,7 @@ void gnome_cmd_file_list_view (GnomeCmdFileList *fl, gint internal_viewer)
if (!f) return;
if (f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- create_error_dialog (_("Not an ordinary file: %s"), f->info->name);
+ gnome_cmd_show_message (*main_win, _("Not an ordinary file"), f->info->name);
else
gnome_cmd_file_view (f, internal_viewer);
}
@@ -2031,7 +2031,7 @@ void gnome_cmd_file_list_edit (GnomeCmdFileList *fl)
if (!f) return;
if (f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- create_error_dialog (_("Not an ordinary file: %s"), f->info->name);
+ gnome_cmd_show_message (*main_win, _("Not an ordinary file"), f->info->name);
else
gnome_cmd_file_edit (f);
}
diff --git a/src/gnome-cmd-prepare-xfer-dialog.cc b/src/gnome-cmd-prepare-xfer-dialog.cc
index 4635bcb..da3875a 100644
--- a/src/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/gnome-cmd-prepare-xfer-dialog.cc
@@ -157,7 +157,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
GnomeVFSResult mkdir_result = gnome_cmd_con_mkdir (con, parent_dir);
if (mkdir_result != GNOME_VFS_OK)
{
- create_error_dialog (gnome_vfs_result_to_string (mkdir_result));
+ gnome_cmd_show_message (*main_win, gnome_vfs_result_to_string (mkdir_result));
goto bailout;
}
}
@@ -202,7 +202,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
GnomeVFSResult mkdir_result = gnome_cmd_con_mkdir (con, dest_path);
if (mkdir_result != GNOME_VFS_OK)
{
- create_error_dialog (gnome_vfs_result_to_string (mkdir_result));
+ gnome_cmd_show_message (*main_win, gnome_vfs_result_to_string (mkdir_result));
goto bailout;
}
}
diff --git a/src/gnome-cmd-python-plugin.cc b/src/gnome-cmd-python-plugin.cc
index 0630d67..70a6765 100644
--- a/src/gnome-cmd-python-plugin.cc
+++ b/src/gnome-cmd-python-plugin.cc
@@ -211,7 +211,7 @@ gboolean gnome_cmd_python_plugin_execute(const PythonPluginData *plugin, GnomeCm
if (!pmod)
{
- create_error_dialog (_("Can't load python module 'gnomevfs' ('gnome.vfs')\n"));
+ gnome_cmd_show_message (*main_win, _("Can't load python module 'gnomevfs' ('gnome.vfs')"));
goto out_A;
}
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index d467764..6b2e385 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -73,7 +73,7 @@ inline GnomeCmdFile *get_selected_file (const FileSelectorID fsID)
GnomeCmdFile *f = get_fl (fsID)->get_first_selected_file();
if (!f)
- create_error_dialog (_("No file selected"));
+ gnome_cmd_show_message (*main_win, _("No file selected"));
return f;
}
@@ -860,7 +860,7 @@ void file_diff (GtkMenuItem *menuitem, gpointer not_used)
{
if (!get_fs (ACTIVE)->is_local())
{
- create_error_dialog (_("Operation not supported on remote file systems"));
+ gnome_cmd_show_message (*main_win, _("Operation not supported on remote file systems"));
return;
}
@@ -877,7 +877,7 @@ void file_diff (GtkMenuItem *menuitem, gpointer not_used)
case 1:
if (!get_fs (INACTIVE)->is_local())
- create_error_dialog (_("Operation not supported on remote file systems"));
+ gnome_cmd_show_message (*main_win, _("Operation not supported on remote file systems"));
else
if (!append_real_path (s, get_selected_file (ACTIVE)) || !append_real_path (s, get_selected_file (INACTIVE)))
s.clear();
@@ -892,7 +892,7 @@ void file_diff (GtkMenuItem *menuitem, gpointer not_used)
break;
default:
- create_error_dialog (_("Too many selected files"));
+ gnome_cmd_show_message (*main_win, _("Too many selected files"));
break;
}
@@ -917,7 +917,7 @@ void file_sync_dirs (GtkMenuItem *menuitem, gpointer not_used)
if (!active_fs->is_local() || !inactive_fs->is_local())
{
- create_error_dialog (_("Operation not supported on remote file systems"));
+ gnome_cmd_show_message (*main_win, _("Operation not supported on remote file systems"));
return;
}
@@ -1204,7 +1204,7 @@ void command_root_mode (GtkMenuItem *menuitem, gpointer not_used)
if (!su)
{
- gnome_cmd_show_message (NULL, _("gksu or kdesu is not found."));
+ gnome_cmd_show_message (*main_win, _("gksu or kdesu is not found."));
return ;
}
diff --git a/src/gnome-cmd-xfer.cc b/src/gnome-cmd-xfer.cc
index 3f7cd3b..6d5c670 100644
--- a/src/gnome-cmd-xfer.cc
+++ b/src/gnome-cmd-xfer.cc
@@ -383,7 +383,7 @@ gnome_cmd_xfer_uris_start (GList *src_uri_list,
src_uri = (GnomeVFSURI *) tmp->data;
if (uri_is_parent_to_dir_or_equal (src_uri, to_dir))
{
- create_error_dialog (_("Copying a directory into itself is a bad idea.\nThe whole operation was cancelled."));
+ gnome_cmd_show_message (*main_win, _("Copying a directory into itself is a bad idea."), _("The whole operation was cancelled."));
return;
}
if (file_is_already_in_dir (src_uri, to_dir))
diff --git a/src/utils.cc b/src/utils.cc
index ce62ba0..ae06308 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -441,10 +441,8 @@ const gchar *time2string (time_t t, const gchar *date_format)
inline void no_mime_app_found_error (gchar *mime_type)
{
- gchar *msg;
-
- msg = g_strdup_printf (_("No default application found for the MIME type %s.\nOpen the \"File types and programs\" page in the Control Center to add one."), mime_type);
- create_error_dialog (msg);
+ gchar *msg = g_strdup_printf (_("No default application found for the MIME type %s."), mime_type);
+ gnome_cmd_show_message (NULL, msg, "Open the \"File types and programs\" page in the Control Center to add one.");
g_free (msg);
}
@@ -1041,9 +1039,8 @@ gchar *get_temp_download_filepath (const gchar *fname)
{
g_free (tmp_file_dir_template);
- create_error_dialog (
- _("Failed to create a directory in which to store temporary files.\nError message: %s\n"),
- strerror (errno));
+ gnome_cmd_show_message (NULL, _("Failed to create a directory in which to store temporary files"), strerror (errno));
+
return NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]