diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-09 10:45:20 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-09 10:45:20 +0000 |
| commit | f0c6ea33bcb5a03352f6276bac82d56c39c3f5fe (patch) | |
| tree | 28159b96674a5c003fb36948ff04f3eaae3ec864 /src/ui | |
| parent | Refactor of end anchors. (diff) | |
| parent | Make extension tests compatible with VPATH builds. (diff) | |
| download | inkscape-f0c6ea33bcb5a03352f6276bac82d56c39c3f5fe.tar.gz inkscape-f0c6ea33bcb5a03352f6276bac82d56c39c3f5fe.zip | |
update to trunk
(bzr r11950.1.326)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/dialog-manager.cpp | 9 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 25 |
3 files changed, 15 insertions, 21 deletions
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)); diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 47e1fdd30..d427e3590 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); + // The preferences dialog is broken, the DockBehavior code resizes it's floating window to the smallest size + registerFactory("InkscapePreferences", &create<InkscapePreferences, FloatingBehavior>); + if (dialogs_type == FLOATING) { registerFactory("AlignAndDistribute", &create<AlignAndDistribute, FloatingBehavior>); registerFactory("DocumentMetadata", &create<DocumentMetadata, FloatingBehavior>); @@ -106,7 +109,6 @@ DialogManager::DialogManager() { registerFactory("Find", &create<Find, FloatingBehavior>); registerFactory("Glyphs", &create<GlyphsPanel, FloatingBehavior>); registerFactory("IconPreviewPanel", &create<IconPreviewPanel, FloatingBehavior>); - registerFactory("InkscapePreferences", &create<InkscapePreferences, FloatingBehavior>); registerFactory("LayersPanel", &create<LayersPanel, FloatingBehavior>); registerFactory("LivePathEffect", &create<LivePathEffectEditor, FloatingBehavior>); registerFactory("Memory", &create<Memory, FloatingBehavior>); @@ -126,8 +128,8 @@ DialogManager::DialogManager() { registerFactory("TextFont", &create<TextEdit, FloatingBehavior>); registerFactory("SpellCheck", &create<SpellCheck, FloatingBehavior>); registerFactory("Export", &create<Export, FloatingBehavior>); - registerFactory("XmlTree", &create<XmlTree, FloatingBehavior>); registerFactory("CloneTiler", &create<CloneTiler, FloatingBehavior>); + registerFactory("XmlTree", &create<XmlTree, FloatingBehavior>); } else { @@ -140,7 +142,6 @@ DialogManager::DialogManager() { registerFactory("Find", &create<Find, DockBehavior>); registerFactory("Glyphs", &create<GlyphsPanel, DockBehavior>); registerFactory("IconPreviewPanel", &create<IconPreviewPanel, DockBehavior>); - registerFactory("InkscapePreferences", &create<InkscapePreferences, DockBehavior>); registerFactory("LayersPanel", &create<LayersPanel, DockBehavior>); registerFactory("LivePathEffect", &create<LivePathEffectEditor, DockBehavior>); registerFactory("Memory", &create<Memory, DockBehavior>); @@ -160,8 +161,8 @@ DialogManager::DialogManager() { registerFactory("TextFont", &create<TextEdit, DockBehavior>); registerFactory("SpellCheck", &create<SpellCheck, DockBehavior>); registerFactory("Export", &create<Export, DockBehavior>); - registerFactory("XmlTree", &create<XmlTree, DockBehavior>); registerFactory("CloneTiler", &create<CloneTiler, DockBehavior>); + registerFactory("XmlTree", &create<XmlTree, DockBehavior>); } } 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(); |
