diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2012-09-20 14:11:29 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2012-09-20 14:11:29 +0000 |
| commit | d99ebfe27cca750966d0483360394a3039cb365e (patch) | |
| tree | 8bb647a76b2335f4ba050b354d9e4ffe104fa5da /src/interface.cpp | |
| parent | Filters. Typo in the filters menu (bump instead of bumps). (diff) | |
| download | inkscape-d99ebfe27cca750966d0483360394a3039cb365e.tar.gz inkscape-d99ebfe27cca750966d0483360394a3039cb365e.zip | |
Fix for Bug #944787 (The command to follow link does not work).
(bzr r11684)
Diffstat (limited to 'src/interface.cpp')
| -rw-r--r-- | src/interface.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index b10ba3077..710211fe7 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -1766,15 +1766,16 @@ void ContextMenu::MakeItemMenu (void) AddSeparator(); /* Select item */ - mi = manage(new Gtk::MenuItem(_("_Select This"),1)); - if (_desktop->selection->includes(_item)) { - mi->set_sensitive(FALSE); - } else { - mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ItemSelectThis)); + if (Inkscape::Verb::getbyid( "org.inkscape.followlink" )) { + mi = manage(new Gtk::MenuItem(_("_Select This"),1)); + if (_desktop->selection->includes(_item)) { + mi->set_sensitive(FALSE); + } else { + mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ItemSelectThis)); + } + mi->show(); + append(*mi); } - mi->show(); - append(*mi); - mi = manage(new Gtk::MenuItem(_("Select Same"))); @@ -2034,7 +2035,18 @@ void ContextMenu::AnchorLinkProperties(void) void ContextMenu::AnchorLinkFollow(void) { - /* shell out to an external browser here */ + + if (_desktop->selection->isEmpty()) { + _desktop->selection->set(_item); + } + // Opening the selected links with a python extension + Inkscape::Verb *verb = Inkscape::Verb::getbyid( "org.inkscape.followlink" ); + if (verb) { + SPAction *action = verb->get_action(_desktop); + if (action) { + sp_action_perform(action, NULL); + } + } } void ContextMenu::AnchorLinkRemove(void) |
