Convert filename on confirmation dialog
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 23 Mar 2009 08:44:05 +0000 (17:44 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 23 Mar 2009 08:44:05 +0000 (17:44 +0900)
src/ui/gui/psppire-window.c

index b95e6a00075c4395b2857bd571ce4e4667f1f70b..a02edb289a90c7987d5b5ef1d031ecaaec244831 100644 (file)
@@ -452,6 +452,7 @@ psppire_window_init (PsppireWindow *window)
 gint
 psppire_window_query_save (PsppireWindow *se)
 {
+  gchar *fn;
   gint response;
   GtkWidget *dialog;
   GtkWidget *cancel_button;
@@ -468,13 +469,16 @@ psppire_window_query_save (PsppireWindow *se)
   g_return_val_if_fail (filename != NULL, GTK_RESPONSE_NONE);
 
 
+  fn = g_filename_display_basename (filename);
+
   dialog =
     gtk_message_dialog_new (GTK_WINDOW (se),
                            GTK_DIALOG_MODAL,
                            GTK_MESSAGE_WARNING,
                            GTK_BUTTONS_NONE,
                            _("Save the changes to \"%s\" before closing?"),
-                           filename);
+                           fn);
+  g_free (fn);
 
   g_object_set (dialog, "icon-name", "psppicon", NULL);