summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-06-04 02:45:55 +0000
committerJon A. Cruz <jon@joncruz.org>2011-06-04 02:45:55 +0000
commit3638efba5bec8a6afc9211aa6bbe289767d20b38 (patch)
treecbf344e828109b1c37e2feee53cddd0c68a8cf83 /src/ui/widget
parentgerman translation update (diff)
downloadinkscape-3638efba5bec8a6afc9211aa6bbe289767d20b38.tar.gz
inkscape-3638efba5bec8a6afc9211aa6bbe289767d20b38.zip
Removed outdated/unsafe SP_DOCUMENT_DEFS macro and reduced usage of SP_ROOT() gtk type function/macro.
(bzr r10254)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/entity-entry.cpp9
-rw-r--r--src/ui/widget/page-sizer.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp
index e191a9360..e62eb009c 100644
--- a/src/ui/widget/entity-entry.cpp
+++ b/src/ui/widget/entity-entry.cpp
@@ -25,6 +25,7 @@
#include "sp-object.h"
#include "rdf.h"
#include "ui/widget/registry.h"
+#include "sp-root.h"
#include "entity-entry.h"
@@ -87,8 +88,8 @@ void EntityLineEntry::update(SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
// If RDF title is not set, get the document's <title> and set the RDF:
- if ( !text && !strcmp(_entity->name, "title") && doc->root ) {
- text = doc->root->title();
+ if ( !text && !strcmp(_entity->name, "title") && doc->getRoot() ) {
+ text = doc->getRoot()->title();
rdf_set_work_entity(doc, _entity, text);
}
static_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
@@ -133,8 +134,8 @@ void EntityMultiLineEntry::update(SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
// If RDF title is not set, get the document's <title> and set the RDF:
- if ( !text && !strcmp(_entity->name, "title") && doc->root ) {
- text = doc->root->title();
+ if ( !text && !strcmp(_entity->name, "title") && doc->getRoot() ) {
+ text = doc->getRoot()->title();
rdf_set_work_entity(doc, _entity, text);
}
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index f306b9eea..672e1415b 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -422,7 +422,7 @@ PageSizer::setDim (double w, double h, bool changeList)
// The origin for the user is in the lower left corner; this point should remain stationary when
// changing the page size. The SVG's origin however is in the upper left corner, so we must compensate for this
Geom::Translate const vert_offset(Geom::Point(0, (old_height - h)));
- SP_GROUP(SP_ROOT(doc->root))->translateChildItems(vert_offset);
+ doc->getRoot()->translateChildItems(vert_offset);
DocumentUndo::done(doc, SP_VERB_NONE, _("Set page size"));
}