From 17a6f764a4c1e353feed94e6dfee46b57ca995a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 8 Jul 2007 14:55:37 +0000 Subject: [PATCH] Fix missing descriptive text in message box when closing an unsaved file on Windows. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1679 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 6 ++++++ src/dialogs.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0299701a..3c3a7d62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-08 Enrico Tröger + + * src/dialogs.c: Fix missing descriptive text in message box when + closing an unsaved file on Windows. + + 2007-07-07 Enrico Tröger * src/editor.c: diff --git a/src/dialogs.c b/src/dialogs.c index ef7095c2..4c7262ae 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -400,7 +400,7 @@ gboolean dialogs_show_unsaved_file(gint idx) #ifndef G_OS_WIN32 GtkWidget *dialog, *button; #endif - gchar *msg, *short_fn = NULL; + gchar *msg, *msg2, *short_fn = NULL; gint ret; // display the file tab to remind the user of the document @@ -414,15 +414,16 @@ gboolean dialogs_show_unsaved_file(gint idx) msg = g_strdup_printf(_("The file '%s' is not saved."), (short_fn != NULL) ? short_fn : GEANY_STRING_UNTITLED); + msg2 = _("Do you want to save it before closing?"); g_free(short_fn); #ifdef G_OS_WIN32 + setptr(msg, g_strconcat(msg, "\n", msg2, NULL)); ret = win32_message_dialog_unsaved(msg); #else dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", msg); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), - "%s", _("Do you want to save it before closing?")); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", msg2); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); button = ui_button_new_with_image(GTK_STOCK_CLEAR, _("_Don't save"));