[anjuta] project-wizard: bgo #631521 - create project in folder c++
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-wizard: bgo #631521 - create project in folder c++
- Date: Thu, 18 Nov 2010 21:39:50 +0000 (UTC)
commit 72c7f4a1b875732dc345bbc61166f8c08685396a
Author: Sébastien Granjoux <seb sfo free fr>
Date: Thu Nov 18 22:09:42 2010 +0100
project-wizard: bgo #631521 - create project in folder c++
plugins/project-wizard/druid.c | 4 ++--
plugins/project-wizard/property.c | 25 ++++++++++---------------
2 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/plugins/project-wizard/druid.c b/plugins/project-wizard/druid.c
index 041d70e..f4db662 100644
--- a/plugins/project-wizard/druid.c
+++ b/plugins/project-wizard/druid.c
@@ -639,12 +639,12 @@ cb_save_valid_property (NPWProperty* property, gpointer user_data)
{
case NPW_FILENAME_RESTRICTION:
g_string_append_printf (data->error,
- _("Field \"%s\" must start with a letter, a digit or an underscore and contain only letters, digits, underscore, minus and dot. Please fix it."),
+ _("Field \"%s\" must contains only letters, digits or the following characters \"#$:%+, = ^_`~\". In addition you cannot have a leading dash. Please fix it."),
npw_property_get_label (property));
break;
case NPW_DIRECTORY_RESTRICTION:
g_string_append_printf (data->error,
- _("Field \"%s\" must start with a letter, a digit, an underscore or a directory separator and contain only letters, digits, underscore, directory separator, minus and dot. Please fix it."),
+ _("Field \"%s\" must contains only letters, digits, the following characters \"#$:%+, = ^_`~\" or directory separators. In addition you cannot have a leading dash. Please fix it."),
npw_property_get_label (property));
break;
default:
diff --git a/plugins/project-wizard/property.c b/plugins/project-wizard/property.c
index 0b3a060..fc71579 100644
--- a/plugins/project-wizard/property.c
+++ b/plugins/project-wizard/property.c
@@ -251,40 +251,35 @@ npw_property_is_valid_restriction (const NPWProperty* prop)
case NPW_FILENAME_RESTRICTION:
value = npw_property_get_value (prop);
- /* First character should be letters, digit or '_' */
+ /* First character should be letters, digit or "#$:%+, = ^_`~" */
if (value == NULL) return TRUE;
- if (!isalnum (*value) && (*value != '_'))
+ if (!isalnum (*value) && (strchr ("#$:%+, = ^_`~", *value) == NULL))
return FALSE;
- /* Following characters should be letters, digit or '_'
+ /* Following characters should be letters, digit or "#$:%+,- = ^_`~"
* or '-' or '.' */
for (value++; *value != '\0'; value++)
{
- if (!isalnum (*value)
- && (*value != '_')
- && (*value != '-')
- && (*value != '.'))
+ if (!isalnum (*value) && (strchr ("#$:%+,- = ^_`~", *value) == NULL))
return FALSE;
}
break;
case NPW_DIRECTORY_RESTRICTION:
value = npw_property_get_value (prop);
- /* First character should be letters, digit or '_' or
+ /* First character should be letters, digit or "#$:%+, = ^_`~" or
* directory separator */
if (value == NULL) return TRUE;
- if (!isalnum (*value) && (*value != '_') && (*value != G_DIR_SEPARATOR))
+ if (!isalnum (*value) && (strchr ("#$:%+, = ^_`~", *value) == NULL) && (*value != G_DIR_SEPARATOR))
return FALSE;
- /* Following characters should be letters, digit or '_'
- * directory separator or '-' or '.' */
+ /* Following characters should be letters, digit or "#$:%+,- = ^_`~"
+ * or directory separator */
for (value++; *value != '\0'; value++)
{
if (!isalnum (*value)
- && (*value != '_')
- && (*value != G_DIR_SEPARATOR)
- && (*value != '-')
- && (*value != '.'))
+ && (strchr ("#$:%+,- = ^_`~", *value) == NULL)
+ && (*value != G_DIR_SEPARATOR))
return FALSE;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]