summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2017-06-16 14:29:04 +0000
committerMartin Owens <doctormo@gmail.com>2017-06-16 14:29:04 +0000
commitbfc9d4824f8ffa3c3807c520f3dc20f25cc0a727 (patch)
tree15f5e3c82c1fae36fdc1564e55addd0781ec3c31 /src/widgets/toolbox.cpp
parentFix err leaking and cmake (diff)
downloadinkscape-bfc9d4824f8ffa3c3807c520f3dc20f25cc0a727.tar.gz
inkscape-bfc9d4824f8ffa3c3807c520f3dc20f25cc0a727.zip
Attempt to make paintbucket build option not cause errors for toolbar loading
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 45f81ee81..65c54f0ce 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -156,6 +156,9 @@ static struct {
{ "/tools/eraser", "eraser_tool", SP_VERB_CONTEXT_ERASER, SP_VERB_CONTEXT_ERASER_PREFS },
#if HAVE_POTRACE
{ "/tools/paintbucket", "paintbucket_tool", SP_VERB_CONTEXT_PAINTBUCKET, SP_VERB_CONTEXT_PAINTBUCKET_PREFS },
+#else
+ // Replacement blank action for ToolPaintBucket to prevent loading errors in ui file
+ { "/tools/paintbucket", "ToolPaintBucket", SP_VERB_NONE, SP_VERB_NONE },
#endif
{ "/tools/text", "text_tool", SP_VERB_CONTEXT_TEXT, SP_VERB_CONTEXT_TEXT_PREFS },
{ "/tools/connector","connector_tool", SP_VERB_CONTEXT_CONNECTOR, SP_VERB_CONTEXT_CONNECTOR_PREFS },
@@ -221,6 +224,8 @@ static struct {
#if HAVE_POTRACE
{ "/tools/paintbucket", "paintbucket_toolbox", 0, sp_paintbucket_toolbox_prep, "PaintbucketToolbar",
SP_VERB_CONTEXT_PAINTBUCKET_PREFS, "/tools/paintbucket", N_("Style of Paint Bucket fill objects")},
+#else
+ { "/tools/paintbucket", "paintbucket_toolbox", 0, NULL, "PaintbucketToolbar", SP_VERB_NONE, "/tools/paintbucket", N_("Disabled")},
#endif
{ NULL, NULL, NULL, NULL, NULL, SP_VERB_INVALID, NULL, NULL }
};
@@ -614,6 +619,12 @@ static Glib::RefPtr<Gtk::ActionGroup> create_or_fetch_actions( SPDesktop* deskto
if ( i == 0 ) {
va->set_active(true);
}
+ } else {
+ // This creates a blank action using the data_name, this can replace
+ // tools that have been disabled by compile time options.
+ Glib::RefPtr<Gtk::Action> act = Gtk::Action::create(Glib::ustring(tools[i].data_name));
+ act->set_sensitive(false);
+ mainActions->add(act);
}
}
}