summaryrefslogtreecommitdiffstats
path: root/src/widgets/pencil-toolbar.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-03-15 21:57:03 +0000
committerJabiertxof <jtx@jtx.marker.es>2016-03-15 21:57:03 +0000
commit6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch)
tree1b991cc2736f84fb069666802d485bd29cff6394 /src/widgets/pencil-toolbar.cpp
parentUpdate to limit options to radius = 0, radious > 0 or both (diff)
parentfix-bug-1557192. paint-order crash with multiple items (diff)
downloadinkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz
inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'src/widgets/pencil-toolbar.cpp')
-rw-r--r--src/widgets/pencil-toolbar.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 17c1d341d..55127206c 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -34,7 +34,6 @@
#include "pencil-toolbar.h"
#include "desktop.h"
-#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
#include "widgets/ink-action.h"
@@ -54,10 +53,8 @@
#include "live_effects/lpeobject.h"
#include "live_effects/lpeobject-reference.h"
#include "sp-lpe-item.h"
-#include "util/glib-list-iterators.h"
using Inkscape::UI::UXManager;
-using Inkscape::DocumentUndo;
using Inkscape::UI::ToolboxFactory;
using Inkscape::UI::PrefPusher;
@@ -167,6 +164,7 @@ static void freehand_simplify_lpe(InkToggleAction* itact, GObject *dataKludge) {
gint simplify = gtk_toggle_action_get_active( GTK_TOGGLE_ACTION(itact) );
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setInt(freehand_tool_name(dataKludge) + "/simplify", simplify);
+ gtk_action_set_visible( GTK_ACTION( g_object_get_data(dataKludge, "flatten_simplify") ), simplify );
}
/**
@@ -366,7 +364,7 @@ private:
void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder)
{
sp_add_freehand_mode_toggle(mainActions, holder, true);
-
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
EgeAdjustmentAction* eact = 0;
/* Tolerance */
@@ -423,6 +421,10 @@ void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
Inkscape::ICON_SIZE_SMALL_TOOLBAR );
g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_simplify_flatten), holder );
gtk_action_group_add_action( mainActions, GTK_ACTION(inky) );
+ g_object_set_data( holder, "flatten_simplify", inky );
+ if (!prefs->getInt("/tools/freehand/pencil/simplify", 0)) {
+ gtk_action_set_visible( GTK_ACTION( g_object_get_data(holder, "flatten_simplify") ), false );
+ }
}
g_signal_connect( holder, "destroy", G_CALLBACK(purge_repr_listener), holder );