aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-07-10 10:04:46 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-07-10 10:04:46 +0800
commitc263befd20deb51e2a27d1e72b9b7d2046b7e5f3 (patch)
treeef2c437815c842c6c607fa19d613b2d0fe6fca0d /shell
parent5c85a8211ecc53c48666a9180787659f88a8fea8 (diff)
downloadgsoc2013-evolution-c263befd20deb51e2a27d1e72b9b7d2046b7e5f3.tar.gz
gsoc2013-evolution-c263befd20deb51e2a27d1e72b9b7d2046b7e5f3.tar.zst
gsoc2013-evolution-c263befd20deb51e2a27d1e72b9b7d2046b7e5f3.zip
convert the folder name from utf8 before displaying them in the dialog and
2001-07-09 Larry Ewing <lewing@ximian.com> * e-shell-folder-commands.c (delete_dialog): convert the folder name from utf8 before displaying them in the dialog and set the dialog parent. svn path=/trunk/; revision=10943
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-folder-commands.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index a1d902a252..9747a87cc4 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-09 Larry Ewing <lewing@ximian.com>
+
+ * e-shell-folder-commands.c (delete_dialog): convert the folder
+ name from utf8 before displaying them in the dialog and set the
+ dialog parent.
+
2001-07-09 Federico Mena Quintero <federico@ximian.com>
* e-shortcuts-view.c: Make the "Rename" item be a
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index e3276d609b..4fa9d71028 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -28,6 +28,7 @@
#include "e-shell-folder-commands.h"
#include <gal/widgets/e-gui-utils.h>
+#include <gal/widgets/e-unicode.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
@@ -337,17 +338,19 @@ delete_cb (EStorageSet *storage_set,
}
static int
-delete_dialog (const char *folder_name)
+delete_dialog (EShellView *shell_view, const char *utf8_folder)
{
GnomeDialog *dialog;
char *title;
GtkWidget *question_label;
char *question;
-
+ char *folder_name;
/* Popup a dialog asking if they are sure they want to delete
the folder */
+ folder_name = e_utf8_to_gtk_string (GTK_WIDGET (shell_view),
+ (char *)utf8_folder);
title = g_strdup_printf (_("Delete folder '%s'"), folder_name);
dialog = GNOME_DIALOG (gnome_dialog_new (title,
@@ -355,6 +358,7 @@ delete_dialog (const char *folder_name)
GNOME_STOCK_BUTTON_NO,
NULL));
g_free (title);
+ gnome_dialog_set_parent (dialog, GTK_WINDOW (shell_view));
question = g_strdup_printf (_("Are you sure you want to remove the '%s' folder?"),
folder_name);
@@ -362,6 +366,7 @@ delete_dialog (const char *folder_name)
gtk_widget_show (question_label);
gtk_box_pack_start (GTK_BOX (dialog->vbox), question_label, FALSE, TRUE, 2);
+ g_free (folder_name);
g_free (question);
gnome_dialog_set_default (dialog, 1);
@@ -384,7 +389,7 @@ e_shell_command_delete_folder (EShell *shell,
storage_set = e_shell_get_storage_set (shell);
path = g_strdup (e_shell_view_get_current_path (shell_view));
- if (delete_dialog (get_folder_name (shell, path)) == 0) {
+ if (delete_dialog (shell_view, get_folder_name (shell, path)) == 0) {
/* Remove and destroy the control */
e_shell_view_remove_control_for_uri (shell_view,
e_shell_view_get_current_uri (shell_view));