Use Untitled string for unsaved dialog.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@908 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-10-20 16:40:12 +00:00
parent 119a256c15
commit 06e8521a82

View File

@ -334,19 +334,18 @@ gboolean dialogs_show_unsaved_file(gint idx)
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
GtkWidget *dialog, *button, *label, *image, *hbox, *align; GtkWidget *dialog, *button, *label, *image, *hbox, *align;
#endif #endif
gchar *msg; gchar *msg, *short_fn = NULL;
gint ret; gint ret;
if (doc_list[idx].file_name != NULL) if (doc_list[idx].file_name != NULL)
{ {
gchar *short_fn = g_path_get_basename(doc_list[idx].file_name); short_fn = g_path_get_basename(doc_list[idx].file_name);
msg = g_strdup_printf(_("The file '%s' is not saved."), short_fn);
g_free(short_fn);
}
else
{
msg = g_strdup(_("This unnamed file is not saved."));
} }
msg = g_strdup_printf(_("The file '%s' is not saved."),
(short_fn != NULL) ? short_fn : GEANY_STRING_UNTITLED);
g_free(short_fn);
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
ret = win32_message_dialog_unsaved(msg); ret = win32_message_dialog_unsaved(msg);
#else #else