diff options
| author | Ted Gould <ted@gould.cx> | 2010-05-15 18:08:17 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-05-15 18:08:17 +0000 |
| commit | 2d8c2dfd832ce207aef3895e702bff4098ab7136 (patch) | |
| tree | 642a37c6e3ca05d5e991ffe868f03c9cc58e51bc /src/widgets/paint-selector.cpp | |
| parent | Merge from trunk (diff) | |
| parent | Minor tweaks to text toolbar. (diff) | |
| download | inkscape-2d8c2dfd832ce207aef3895e702bff4098ab7136.tar.gz inkscape-2d8c2dfd832ce207aef3895e702bff4098ab7136.zip | |
Updating to trunk
(bzr r8254.1.54)
Diffstat (limited to 'src/widgets/paint-selector.cpp')
| -rw-r--r-- | src/widgets/paint-selector.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 288764177..d3092669a 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -352,8 +352,7 @@ sp_paint_selector_show_fillrule(SPPaintSelector *psel, bool is_fill) } -GtkWidget * -sp_paint_selector_new(bool is_fill) +SPPaintSelector *sp_paint_selector_new(FillOrStroke kind) { SPPaintSelector *psel = static_cast<SPPaintSelector*>(gtk_type_new(SP_TYPE_PAINT_SELECTOR)); @@ -362,9 +361,9 @@ sp_paint_selector_new(bool is_fill) // This silliness is here because I don't know how to pass a parameter to the // GtkObject "constructor" (sp_paint_selector_init). Remove it when paint_selector // becomes a normal class. - sp_paint_selector_show_fillrule(psel, is_fill); + sp_paint_selector_show_fillrule(psel, kind == FILL); - return GTK_WIDGET(psel); + return psel; } void SPPaintSelector::setMode(Mode mode) @@ -1137,18 +1136,18 @@ void SPPaintSelector::setFlatColor( SPDesktop *desktop, gchar const *color_prope sp_repr_css_attr_unref(css); } -SPPaintSelector::Mode SPPaintSelector::getModeForStyle(SPStyle const & style, bool isfill) +SPPaintSelector::Mode SPPaintSelector::getModeForStyle(SPStyle const & style, FillOrStroke kind) { Mode mode = MODE_UNSET; - SPIPaint const & target = isfill ? style.fill : style.stroke; + SPIPaint const & target = (kind == FILL) ? style.fill : style.stroke; if ( !target.set ) { mode = MODE_UNSET; } else if ( target.isPaintserver() ) { - SPPaintServer const *server = isfill ? style.getFillPaintServer() : style.getStrokePaintServer(); + SPPaintServer const *server = (kind == FILL) ? style.getFillPaintServer() : style.getStrokePaintServer(); #ifdef SP_PS_VERBOSE - g_message("SPPaintSelector::getModeForStyle(%p, %d)", &style, isfill); + g_message("SPPaintSelector::getModeForStyle(%p, %d)", &style, kind); g_message("==== server:%p %s grad:%s swatch:%s", server, server->getId(), (SP_IS_GRADIENT(server)?"Y":"n"), (SP_IS_GRADIENT(server) && SP_GRADIENT(server)->getVector()->isSwatch()?"Y":"n")); #endif // SP_PS_VERBOSE |
