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
This commit is contained in:
Enrico Tröger 2007-07-08 14:55:37 +00:00
parent 4e38d0f823
commit 17a6f764a4
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-07-08 Enrico Tröger <enrico.troeger@uvena.de>
* src/dialogs.c: Fix missing descriptive text in message box when
closing an unsaved file on Windows.
2007-07-07 Enrico Tröger <enrico.troeger@uvena.de> 2007-07-07 Enrico Tröger <enrico.troeger@uvena.de>
* src/editor.c: * src/editor.c:

View File

@ -400,7 +400,7 @@ gboolean dialogs_show_unsaved_file(gint idx)
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
GtkWidget *dialog, *button; GtkWidget *dialog, *button;
#endif #endif
gchar *msg, *short_fn = NULL; gchar *msg, *msg2, *short_fn = NULL;
gint ret; gint ret;
// display the file tab to remind the user of the document // 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."), msg = g_strdup_printf(_("The file '%s' is not saved."),
(short_fn != NULL) ? short_fn : GEANY_STRING_UNTITLED); (short_fn != NULL) ? short_fn : GEANY_STRING_UNTITLED);
msg2 = _("Do you want to save it before closing?");
g_free(short_fn); g_free(short_fn);
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
setptr(msg, g_strconcat(msg, "\n", msg2, NULL));
ret = win32_message_dialog_unsaved(msg); ret = win32_message_dialog_unsaved(msg);
#else #else
dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", msg); GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", msg);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", msg2);
"%s", _("Do you want to save it before closing?"));
gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); 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")); button = ui_button_new_with_image(GTK_STOCK_CLEAR, _("_Don't save"));