summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:41:17 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:41:17 +0000
commitae5fc6f7c5d78bca051dcc308d3344c65fb802cb (patch)
tree7a0fd57a344ca0df7c9b1fdd38198b4e0044954b
parentmerged trunk (diff)
downloadinkscape-ae5fc6f7c5d78bca051dcc308d3344c65fb802cb.tar.gz
inkscape-ae5fc6f7c5d78bca051dcc308d3344c65fb802cb.zip
Using MODE_SOLID_COLOR in paint selector instead of duplicated MODE_COLOR_RGB and MODE_COLOR_CMYK
(bzr r14059.1.22)
-rw-r--r--src/widgets/fill-style.cpp6
-rw-r--r--src/widgets/paint-selector.cpp14
-rw-r--r--src/widgets/paint-selector.h3
3 files changed, 9 insertions, 14 deletions
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 264ebff5a..fa5eabab4 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -431,8 +431,7 @@ void FillNStroke::dragFromPaint()
update = true;
switch (psel->mode) {
- case SPPaintSelector::MODE_COLOR_RGB:
- case SPPaintSelector::MODE_COLOR_CMYK:
+ case SPPaintSelector::MODE_SOLID_COLOR:
{
// local change, do not update from selection
dragId = g_timeout_add_full(G_PRIORITY_DEFAULT, 100, dragDelayCB, this, 0);
@@ -505,8 +504,7 @@ void FillNStroke::updateFromPaint()
break;
}
- case SPPaintSelector::MODE_COLOR_RGB:
- case SPPaintSelector::MODE_COLOR_CMYK:
+ case SPPaintSelector::MODE_SOLID_COLOR:
{
if (kind == FILL) {
// FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in losing release events
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 3b191b2f3..8dd309260 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -95,8 +95,7 @@ static gchar const* modeStrings[] = {
"MODE_EMPTY",
"MODE_MULTIPLE",
"MODE_NONE",
- "MODE_COLOR_RGB",
- "MODE_COLOR_CMYK",
+ "MODE_SOLID_COLOR",
"MODE_GRADIENT_LINEAR",
"MODE_GRADIENT_RADIAL",
"MODE_PATTERN",
@@ -219,7 +218,7 @@ sp_paint_selector_init(SPPaintSelector *psel)
psel->none = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON("paint-none"),
SPPaintSelector::MODE_NONE, _("No paint"));
psel->solid = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON("paint-solid"),
- SPPaintSelector::MODE_COLOR_RGB, _("Flat color"));
+ SPPaintSelector::MODE_SOLID_COLOR, _("Flat color"));
psel->gradient = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON("paint-gradient-linear"),
SPPaintSelector::MODE_GRADIENT_LINEAR, _("Linear gradient"));
psel->radial = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON("paint-gradient-radial"),
@@ -407,8 +406,7 @@ void SPPaintSelector::setMode(Mode mode)
case MODE_NONE:
sp_paint_selector_set_mode_none(this);
break;
- case MODE_COLOR_RGB:
- case MODE_COLOR_CMYK:
+ case MODE_SOLID_COLOR:
sp_paint_selector_set_mode_color(this, mode);
break;
case MODE_GRADIENT_LINEAR:
@@ -465,7 +463,7 @@ void SPPaintSelector::setColorAlpha(SPColor const &color, float alpha)
#ifdef SP_PS_VERBOSE
g_print("PaintSelector set RGBA\n");
#endif
- setMode(MODE_COLOR_RGB);
+ setMode(MODE_SOLID_COLOR);
}
updating_color = true;
@@ -681,7 +679,7 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
sp_paint_selector_set_style_buttons(psel, psel->solid);
gtk_widget_set_sensitive(psel->style, TRUE);
- if ((psel->mode == SPPaintSelector::MODE_COLOR_RGB) || (psel->mode == SPPaintSelector::MODE_COLOR_CMYK)) {
+ if ((psel->mode == SPPaintSelector::MODE_SOLID_COLOR)) {
/* Already have color selector */
// Do nothing
} else {
@@ -1262,7 +1260,7 @@ SPPaintSelector::Mode SPPaintSelector::getModeForStyle(SPStyle const & style, Fi
}
} else if ( target.isColor() ) {
// TODO this is no longer a valid assertion:
- mode = MODE_COLOR_RGB; // so far only rgb can be read from svg
+ mode = MODE_SOLID_COLOR; // so far only rgb can be read from svg
} else if ( target.isNone() ) {
mode = MODE_NONE;
} else {
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h
index 55f0e8ec9..23c2dd456 100644
--- a/src/widgets/paint-selector.h
+++ b/src/widgets/paint-selector.h
@@ -50,8 +50,7 @@ struct SPPaintSelector {
MODE_EMPTY,
MODE_MULTIPLE,
MODE_NONE,
- MODE_COLOR_RGB,
- MODE_COLOR_CMYK,
+ MODE_SOLID_COLOR,
MODE_GRADIENT_LINEAR,
MODE_GRADIENT_RADIAL,
#ifdef WITH_MESH