diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-07-28 13:27:26 +0000 |
|---|---|---|
| committer | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-07-31 23:59:31 +0000 |
| commit | a16ccd50d2c6200ff99a7a507764671e9970ecf6 (patch) | |
| tree | 82c6023c8235a23fc1a429b47fb9f91dc3fa2202 /src | |
| parent | Update snap build dependencies (diff) | |
| download | inkscape-a16ccd50d2c6200ff99a7a507764671e9970ecf6.tar.gz inkscape-a16ccd50d2c6200ff99a7a507764671e9970ecf6.zip | |
If potrace unavailable, hide from the context menu
Addresses gitlab.com/inkscape/inkscape/issues/354
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/contextmenu.cpp | 4 | ||||
| -rw-r--r-- | src/ui/contextmenu.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/contextmenu.cpp b/src/ui/contextmenu.cpp index 4286bc70e..fb3cb7b29 100644 --- a/src/ui/contextmenu.cpp +++ b/src/ui/contextmenu.cpp @@ -702,6 +702,7 @@ void ContextMenu::MakeImageMenu () mi->set_sensitive( FALSE ); } +#if HAVE_POTRACE /* Trace Bitmap */ mi = Gtk::manage(new Gtk::MenuItem(_("_Trace Bitmap..."), true)); mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ImageTraceBitmap)); @@ -710,6 +711,7 @@ void ContextMenu::MakeImageMenu () if (_desktop->selection->isEmpty()) { mi->set_sensitive(FALSE); } +#endif /* Trace Pixel Art */ mi = Gtk::manage(new Gtk::MenuItem(_("Trace Pixel Art"), true)); @@ -847,11 +849,13 @@ void ContextMenu::ImageEdit() } } +#if HAVE_POTRACE void ContextMenu::ImageTraceBitmap() { INKSCAPE.dialogs_unhide(); _desktop->_dlg_mgr->showDialog("Trace"); } +#endif void ContextMenu::ImageTracePixelArt() { diff --git a/src/ui/contextmenu.h b/src/ui/contextmenu.h index aaf041d53..ea42d8a46 100644 --- a/src/ui/contextmenu.h +++ b/src/ui/contextmenu.h @@ -187,7 +187,9 @@ class ContextMenu : public Gtk::Menu /** * callback, is executed on clicking the "Trace Bitmap" menu entry */ +#if HAVE_POTRACE void ImageTraceBitmap(); +#endif /** * callback, is executed on clicking the "Trace Pixel Art" menu entry |
