Opened 10 years ago

Closed 8 years ago

#2514 closed defect (worksforme)

G_OPT_C_BG and G_OPT_C_FG differ in support of color_none

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.0.5
Component: Default Version: svn-trunk
Keywords: color, standard options Cc:
CPU: Unspecified Platform: All

Description

In the attempt to standardize options for fg and bg colors, we ignored the gisprompt where some commands have old,color,color and some old,color_none,color. So this for example results in d.vect gui dialog not supporting transparent feature color, because G_OPT_C_FG doesn't use color_none.

Beside the gisprompt, also the description must be different. Should we have 4 versions of color standard options? Something like G_OPT_C_BG, G_OPT_C_FG, G_OPT_CN_BG, G_OPT_CN_FG?

I suppose all modules using standard color option should be checked.

Change History (4)

in reply to:  description ; comment:1 by mmetz, 10 years ago

Replying to annakrat:

In the attempt to standardize options for fg and bg colors, we ignored the gisprompt where some commands have old,color,color and some old,color_none,color. So this for example results in d.vect gui dialog not supporting transparent feature color, because G_OPT_C_FG doesn't use color_none.

Beside the gisprompt, also the description must be different. Should we have 4 versions of color standard options? Something like G_OPT_C_BG, G_OPT_C_FG, G_OPT_CN_BG, G_OPT_CN_FG?

Too many just slightly different standard options contradict the idea of having standard options. You can not make every possible occurrence of an option a standard option. Standard options can be easily modified by modules to meet their needs. Therefore I would opt to drop G_OPT_C_FG and G_OPT_C_BG, and have instead G_OPT_C for old,color,color and G_OPT_CN for old,color_none,color. That would also fix the wrong description for G_OPT_C_FG.

in reply to:  1 comment:2 by annakrat, 10 years ago

Replying to mmetz:

Replying to annakrat:

In the attempt to standardize options for fg and bg colors, we ignored the gisprompt where some commands have old,color,color and some old,color_none,color. So this for example results in d.vect gui dialog not supporting transparent feature color, because G_OPT_C_FG doesn't use color_none.

Beside the gisprompt, also the description must be different. Should we have 4 versions of color standard options? Something like G_OPT_C_BG, G_OPT_C_FG, G_OPT_CN_BG, G_OPT_CN_FG?

Too many just slightly different standard options contradict the idea of having standard options. You can not make every possible occurrence of an option a standard option. Standard options can be easily modified by modules to meet their needs. Therefore I would opt to drop G_OPT_C_FG and G_OPT_C_BG, and have instead G_OPT_C for old,color,color and G_OPT_CN for old,color_none,color. That would also fix the wrong description for G_OPT_C_FG.

That makes sense, committed in r63797.

comment:3 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:4 by martinl, 8 years ago

Resolution: worksforme
Status: newclosed

No activity last 20 months, closing, feel free to reopen if needed.

Note: See TracTickets for help on using tickets.