Commit d21f31d0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

use quotewords() from Text::ParseWords to split the trigraph. This

2005-05-22  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums (parse_trigraph): use quotewords() from
	Text::ParseWords to split the trigraph. This function correctly
	deals with commas inside quotes.

	* app/core/core-enums.[ch]: tweaked descriptions in the
	GimpDashPreset enum.
parent 7358758f
2005-05-22 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums (parse_trigraph): use quotewords() from
Text::ParseWords to split the trigraph. This function correctly
deals with commas inside quotes.
* app/core/core-enums.[ch]: tweaked descriptions in the
GimpDashPreset enum.
2005-05-22 Sven Neumann <sven@gimp.org>
* app/core/gimpdashpattern.c: minor cleanup.
......
......@@ -360,8 +360,8 @@ gimp_dash_preset_get_type (void)
{ GIMP_DASH_NORMAL_DOTS, N_("Normal dots"), NULL },
{ GIMP_DASH_DENSE_DOTS, N_("Dense dots"), NULL },
{ GIMP_DASH_STIPPLES, N_("Stipples"), NULL },
{ GIMP_DASH_DASH_DOT, N_("Dash dot..."), NULL },
{ GIMP_DASH_DASH_DOT_DOT, N_("Dash dot dot..."), NULL },
{ GIMP_DASH_DASH_DOT, N_("Dash, dot"), NULL },
{ GIMP_DASH_DASH_DOT_DOT, N_("Dash, dot, dot"), NULL },
{ 0, NULL, NULL }
};
......
......@@ -176,17 +176,17 @@ GType gimp_dash_preset_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DASH_CUSTOM, /*< desc="Custom" >*/
GIMP_DASH_LINE, /*< desc="Line" >*/
GIMP_DASH_LONG_DASH, /*< desc="Long dashes" >*/
GIMP_DASH_MEDIUM_DASH, /*< desc="Medium dashes" >*/
GIMP_DASH_SHORT_DASH, /*< desc="Short dashes" >*/
GIMP_DASH_SPARSE_DOTS, /*< desc="Sparse dots" >*/
GIMP_DASH_NORMAL_DOTS, /*< desc="Normal dots" >*/
GIMP_DASH_DENSE_DOTS, /*< desc="Dense dots" >*/
GIMP_DASH_STIPPLES, /*< desc="Stipples" >*/
GIMP_DASH_DASH_DOT, /*< desc="Dash dot..." >*/
GIMP_DASH_DASH_DOT_DOT /*< desc="Dash dot dot..." >*/
GIMP_DASH_CUSTOM, /*< desc="Custom" >*/
GIMP_DASH_LINE, /*< desc="Line" >*/
GIMP_DASH_LONG_DASH, /*< desc="Long dashes" >*/
GIMP_DASH_MEDIUM_DASH, /*< desc="Medium dashes" >*/
GIMP_DASH_SHORT_DASH, /*< desc="Short dashes" >*/
GIMP_DASH_SPARSE_DOTS, /*< desc="Sparse dots" >*/
GIMP_DASH_NORMAL_DOTS, /*< desc="Normal dots" >*/
GIMP_DASH_DENSE_DOTS, /*< desc="Dense dots" >*/
GIMP_DASH_STIPPLES, /*< desc="Stipples" >*/
GIMP_DASH_DASH_DOT, /*< desc="Dash, dot" >*/
GIMP_DASH_DASH_DOT_DOT /*< desc="Dash, dot, dot" >*/
} GimpDashPreset;
......
......@@ -8,6 +8,8 @@
# from the enumeration. To allow i18n of the description, the
# value is by default put into the N_() macro.
use Text::ParseWords;
# gimp-mkenums
# Information about the current enumeration
my $flags; # Is enumeration a bitmask?
......@@ -25,7 +27,7 @@ sub parse_trigraph {
my $opts = shift;
my @opts;
for $opt (split /\s*,\s*/, $opts) {
for $opt (quotewords(",", true, $opts)) {
$opt =~ s/^\s*//;
$opt =~ s/\s*$//;
my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/;
......@@ -34,6 +36,8 @@ sub parse_trigraph {
}
@opts;
}
sub parse_entries {
my $file = shift;
my $file_name = shift;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment