Fix wrongly created header guards when the class filenames contains dashes (patch by PCMan, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3838 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-06-05 15:09:04 +00:00
parent 459d9e2962
commit 5de4dc54e8
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,9 @@
* src/images.c, src/about.c, src/ui_utils.c, THANKS: * src/images.c, src/about.c, src/ui_utils.c, THANKS:
Add a more Tango like icon for 'Save All' (by Jesse Mayes, thanks). Add a more Tango like icon for 'Save All' (by Jesse Mayes, thanks).
* plugins/classbuilder.c:
Fix wrongly created header guards when the class filenames contains
dashes (patch by PCMan, thanks).
2009-06-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2009-06-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -598,7 +598,7 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
} }
class_info->header = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->header_entry))); class_info->header = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->header_entry)));
class_info->header_guard = g_ascii_strup(class_info->header, -1); class_info->header_guard = g_ascii_strup(class_info->header, -1);
g_strdelimit(class_info->header_guard, ".", '_'); g_strdelimit(class_info->header_guard, ".-", '_');
switch (class_info->type) switch (class_info->type)
{ {
case GEANY_CLASS_TYPE_CPP: case GEANY_CLASS_TYPE_CPP: