From 1185cce53f3e490c6bb7939b1d9f42272a2e2f4f Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Thu, 3 Apr 2014 14:49:00 +0200 Subject: Try and explain what selection means when aligning. Changed Selection to Selection Area (bzr r13257) --- src/ui/dialog/align-and-distribute.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index 6b4aeebb9..e02ccd3f1 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -1002,7 +1002,7 @@ AlignAndDistribute::AlignAndDistribute() _combo.append(_("Smallest object")); _combo.append(_("Page")); _combo.append(_("Drawing")); - _combo.append(_("Selection")); + _combo.append(_("Selection Area")); _combo.set_active(prefs->getInt("/dialogs/align/align-to", 6)); _combo.signal_changed().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_ref_change)); -- cgit v1.2.3 From 94226a90e4ba925c940f69059249836edfcd54e8 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 4 Apr 2014 15:16:22 +0200 Subject: XMLTree and InkscapePreferences are not dockable windows, don't treat them like one. (bzr r13262) --- src/ui/dialog/dialog-manager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 47e1fdd30..4be796e67 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -96,6 +96,9 @@ DialogManager::DialogManager() { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int dialogs_type = prefs->getIntLimited("/options/dialogtype/value", DOCK, 0, 1); + registerFactory("InkscapePreferences", &create); + registerFactory("XmlTree", &create); + if (dialogs_type == FLOATING) { registerFactory("AlignAndDistribute", &create); registerFactory("DocumentMetadata", &create); @@ -106,7 +109,6 @@ DialogManager::DialogManager() { registerFactory("Find", &create); registerFactory("Glyphs", &create); registerFactory("IconPreviewPanel", &create); - registerFactory("InkscapePreferences", &create); registerFactory("LayersPanel", &create); registerFactory("LivePathEffect", &create); registerFactory("Memory", &create); @@ -126,7 +128,6 @@ DialogManager::DialogManager() { registerFactory("TextFont", &create); registerFactory("SpellCheck", &create); registerFactory("Export", &create); - registerFactory("XmlTree", &create); registerFactory("CloneTiler", &create); } else { @@ -140,7 +141,6 @@ DialogManager::DialogManager() { registerFactory("Find", &create); registerFactory("Glyphs", &create); registerFactory("IconPreviewPanel", &create); - registerFactory("InkscapePreferences", &create); registerFactory("LayersPanel", &create); registerFactory("LivePathEffect", &create); registerFactory("Memory", &create); @@ -160,7 +160,6 @@ DialogManager::DialogManager() { registerFactory("TextFont", &create); registerFactory("SpellCheck", &create); registerFactory("Export", &create); - registerFactory("XmlTree", &create); registerFactory("CloneTiler", &create); } -- cgit v1.2.3 From f337f7705f290ecef1790c75f8f94c85e13777b2 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 4 Apr 2014 20:12:04 +0200 Subject: fix crash. Iterating through a list to find an object is not necessary, SPDoc provides method for obtaining SPObj from idstring. The crash probably happened because deleting the object invalidated the list iterated (partly). Fixed bugs: - https://launchpad.net/bugs/1302079 (bzr r13265) --- src/ui/dialog/document-properties.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 67e788e21..2674efc1e 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1236,23 +1236,16 @@ void DocumentProperties::removeEmbeddedScript(){ } } - const GSList *current = SP_ACTIVE_DOCUMENT->getResourceList( "script" ); - while ( current ) { - if (current->data && SP_IS_OBJECT(current->data)) { - SPObject* obj = SP_OBJECT(current->data); - if (id == obj->getId()){ - - //XML Tree being used directly here while it shouldn't be. - Inkscape::XML::Node *repr = obj->getRepr(); - if (repr){ - sp_repr_unparent(repr); - - // inform the document, so we can undo - DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, _("Remove embedded script")); - } - } + SPObject* obj = SP_ACTIVE_DOCUMENT->getObjectById(id); + if (obj) { + //XML Tree being used directly here while it shouldn't be. + Inkscape::XML::Node *repr = obj->getRepr(); + if (repr){ + sp_repr_unparent(repr); + + // inform the document, so we can undo + DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, _("Remove embedded script")); } - current = g_slist_next(current); } populate_script_lists(); -- cgit v1.2.3 From 749e8b0ee6b95f7c704fd326ebe948f9f4a076d2 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 5 Apr 2014 09:22:29 +0200 Subject: Revert the xml editor to it's dockable behaviour and add a comment for the preferences. (bzr r13269) --- src/ui/dialog/dialog-manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 4be796e67..d427e3590 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -96,8 +96,8 @@ DialogManager::DialogManager() { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int dialogs_type = prefs->getIntLimited("/options/dialogtype/value", DOCK, 0, 1); + // The preferences dialog is broken, the DockBehavior code resizes it's floating window to the smallest size registerFactory("InkscapePreferences", &create); - registerFactory("XmlTree", &create); if (dialogs_type == FLOATING) { registerFactory("AlignAndDistribute", &create); @@ -129,6 +129,7 @@ DialogManager::DialogManager() { registerFactory("SpellCheck", &create); registerFactory("Export", &create); registerFactory("CloneTiler", &create); + registerFactory("XmlTree", &create); } else { @@ -161,6 +162,7 @@ DialogManager::DialogManager() { registerFactory("SpellCheck", &create); registerFactory("Export", &create); registerFactory("CloneTiler", &create); + registerFactory("XmlTree", &create); } } -- cgit v1.2.3