SF.net SVN: geany:[4560] branches/geany-0.18.1
eht16 at users.sourceforge.net
eht16 at xxxxx
Mon Jan 25 21:15:57 UTC 2010
Revision: 4560
http://geany.svn.sourceforge.net/geany/?rev=4560&view=rev
Author: eht16
Date: 2010-01-25 21:15:57 +0000 (Mon, 25 Jan 2010)
Log Message:
-----------
Backport from trunk:
Fix using 'Insert date' keybinding when a custom date string has not been set.
Modified Paths:
--------------
branches/geany-0.18.1/ChangeLog
branches/geany-0.18.1/src/callbacks.c
Modified: branches/geany-0.18.1/ChangeLog
===================================================================
--- branches/geany-0.18.1/ChangeLog 2010-01-25 21:15:47 UTC (rev 4559)
+++ branches/geany-0.18.1/ChangeLog 2010-01-25 21:15:57 UTC (rev 4560)
@@ -5,6 +5,9 @@
* src/keybindings.c, src/keybindings.h, src/prefs.c:
Fix updating main menu accelerators after changing keybindings
(thanks to Lex Trotman).
+ * src/callbacks.c:
+ Fix using 'Insert date' keybinding when a custom date string has
+ not been set.
2009-08-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/geany-0.18.1/src/callbacks.c
===================================================================
--- branches/geany-0.18.1/src/callbacks.c 2010-01-25 21:15:47 UTC (rev 4559)
+++ branches/geany-0.18.1/src/callbacks.c 2010-01-25 21:15:57 UTC (rev 4560)
@@ -1466,11 +1466,18 @@
gpointer user_data)
{
GeanyDocument *doc = document_get_current();
- gchar *format;
+ gchar *format = NULL;
gchar *time_str;
g_return_if_fail(doc != NULL);
+ /* set default value */
+ if (utils_str_equal("", ui_prefs.custom_date_format))
+ {
+ g_free(ui_prefs.custom_date_format);
+ ui_prefs.custom_date_format = g_strdup("%d.%m.%Y");
+ }
+
if (utils_str_equal(_("dd.mm.yyyy"), (gchar*) user_data))
format = "%d.%m.%Y";
else if (utils_str_equal(_("mm.dd.yyyy"), (gchar*) user_data))
@@ -1487,13 +1494,6 @@
format = ui_prefs.custom_date_format;
else
{
- /* set default value */
- if (utils_str_equal("", ui_prefs.custom_date_format))
- {
- g_free(ui_prefs.custom_date_format);
- ui_prefs.custom_date_format = g_strdup("%d.%m.%Y");
- }
-
dialogs_show_input(_("Custom Date Format"),
_("Enter here a custom date and time format. You can use any conversion specifiers which can be used with the ANSI C strftime function."),
ui_prefs.custom_date_format, FALSE, &on_custom_date_input_response);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list