From d99ebfe27cca750966d0483360394a3039cb365e Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 20 Sep 2012 16:11:29 +0200 Subject: Fix for Bug #944787 (The command to follow link does not work). (bzr r11684) --- src/interface.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src/interface.cpp') 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) -- cgit v1.2.3 From 3d71bbcdde6255ee9e587124aaccf58dd8741ed6 Mon Sep 17 00:00:00 2001 From: su_v Date: Fri, 21 Sep 2012 14:24:26 +0200 Subject: Fix for bug #1053024: set current layer from template in new blank document after closing last window Fixed bugs: - https://launchpad.net/bugs/1053024 (bzr r11689) --- src/interface.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 710211fe7..acd56f8da 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -322,6 +322,7 @@ sp_ui_close_view(GtkWidget */*widget*/) SPDocument *doc = SPDocument::createNewDoc( templateUri.c_str() , TRUE, true ); dt->change_document(doc); sp_namedview_window_from_document(dt); + sp_namedview_update_layers_from_document(dt); return; } -- cgit v1.2.3 From 3f61bc675d5f2f0c92d7906b8552b09df3cd411f Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 22 Sep 2012 21:14:14 +0900 Subject: Fix for 172222 : Move direct to specified layer (bzr r11695) --- src/interface.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index acd56f8da..c3dbc47c8 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -79,6 +79,7 @@ // #include "inkscape.h" #include "ui/dialog/dialog-manager.h" // #include "../xml/repr.h" +#include "ui/dialog/layer-properties.h" #include #include @@ -1823,6 +1824,16 @@ void ContextMenu::MakeItemMenu (void) mi->show(); select_same_submenu->append(*mi); + /* Move to layer */ + mi = manage(new Gtk::MenuItem(_("_Move to layer ..."),1)); + if (_desktop->selection->isEmpty()) { + mi->set_sensitive(FALSE); + } else { + mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ItemMoveTo)); + } + mi->show(); + append(*mi); + /* Create link */ mi = manage(new Gtk::MenuItem(_("Create _Link"),1)); mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ItemCreateLink)); @@ -1938,6 +1949,13 @@ void ContextMenu::ItemSelectThis(void) _desktop->selection->set(_item); } +void ContextMenu::ItemMoveTo(void) +{ + Inkscape::UI::Dialogs::LayerPropertiesDialog::showMove(_desktop, _desktop->currentLayer()); +} + + + void ContextMenu::ItemCreateLink(void) { Inkscape::XML::Document *xml_doc = _desktop->doc()->getReprDoc(); -- cgit v1.2.3 From a17956f9fa43854a9b0f3b0a72542cdadfad916a Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 23 Sep 2012 11:44:45 +0900 Subject: Fix for 170395 : Add Trace Bitmap to context menu of images (bzr r11697) --- src/interface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index c3dbc47c8..0db046559 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -2097,6 +2097,12 @@ void ContextMenu::MakeImageMenu (void) mi->set_sensitive( FALSE ); } + /* Trace Bitmap */ + mi = manage(new Gtk::MenuItem(_("_Trace Bitmap..."),1)); + mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ImageTraceBitmap)); + mi->show(); + insert(*mi,positionOfLastDialog++); + /* Embed image */ if (Inkscape::Verb::getbyid( "org.ekips.filter.embedselectedimages" )) { mi = manage(new Gtk::MenuItem(C_("Context menu", "Embed Image"))); @@ -2208,6 +2214,12 @@ void ContextMenu::ImageEdit(void) } } +void ContextMenu::ImageTraceBitmap(void) +{ + inkscape_dialogs_unhide(); + _desktop->_dlg_mgr->showDialog("Trace"); +} + void ContextMenu::ImageEmbed(void) { if (_desktop->selection->isEmpty()) { -- cgit v1.2.3 From f29a0a4399cac653df3df4be98ff04cbfc4773cc Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 23 Sep 2012 17:33:15 +0900 Subject: Fix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (bzr r11698) --- src/interface.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 0db046559..fdfdce5ae 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -2102,6 +2102,9 @@ void ContextMenu::MakeImageMenu (void) mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ImageTraceBitmap)); mi->show(); insert(*mi,positionOfLastDialog++); + if (_desktop->selection->isEmpty()) { + mi->set_sensitive(FALSE); + } /* Embed image */ if (Inkscape::Verb::getbyid( "org.ekips.filter.embedselectedimages" )) { -- cgit v1.2.3