fill-and-stroke.cpp revision 3a8e479f331858946168c32bfc7622c9010b6680
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "desktop-handles.h"
#include "desktop-style.h"
#include "document.h"
#include "fill-and-stroke.h"
#include "filter-chemistry.h"
#include "inkscape.h"
#include "inkscape-stock.h"
#include "selection.h"
#include "style.h"
#include "svg/css-ostringstream.h"
#include "verbs.h"
#include "dialogs/fill-style.h"
#include "dialogs/stroke-style.h"
namespace Inkscape {
namespace UI {
namespace Dialog {
_blur_vbox(false, 0),
_blur_label_box(false, 0),
_opacity_vbox(false, 0),
_opacity_label_box(false, 0),
_blocked(false)
_notebook.append_page(_page_fill, _createPageTabLabel(_("Fill"), INKSCAPE_STOCK_PROPERTIES_FILL_PAGE));
_notebook.append_page(_page_stroke_paint, _createPageTabLabel(_("Stroke _paint"), INKSCAPE_STOCK_PROPERTIES_STROKE_PAINT_PAGE));
_notebook.append_page(_page_stroke_style, _createPageTabLabel(_("Stroke st_yle"), INKSCAPE_STOCK_PROPERTIES_STROKE_PAGE));
_blur_adjustment.signal_value_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::FillAndStroke::_blurValueChanged));
_opacity_adjustment.signal_value_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::FillAndStroke::_opacityValueChanged));
// these callbacks are only for the blur and master opacity update; the tabs above take care of themselves
g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection", G_CALLBACK (on_selection_changed), this );
g_signal_connect ( G_OBJECT (INKSCAPE), "change_subselection", G_CALLBACK (on_selection_changed), this );
g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection", G_CALLBACK (on_selection_modified), this );
g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (on_selection_changed), this );
if (_blocked)
_blocked = true;
if (!desktop) {
// FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903
if (!bbox) {
sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:blur", SP_VERB_DIALOG_FILL_STROKE, _("Change blur"));
_blocked = false;
if (_blocked)
_blocked = true;
// FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903
sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
_blocked = false;
if (_blocked)
_blocked = true;
// query style from desktop into it. This returns a result flag and fills query with the style of subselection, if any, or selection
switch (result) {
case QUERY_STYLE_NOTHING:
case QUERY_STYLE_SINGLE:
switch (blur_result) {
case QUERY_STYLE_SINGLE:
if (bbox) {
_blocked = false;
label_image)));
return *_tab_label_box;