summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/document-properties.cpp8
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp31
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp37
-rw-r--r--src/ui/dialog/swatches.cpp10
4 files changed, 61 insertions, 25 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 2fe353533..4e1ddda2e 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -522,7 +522,9 @@ void DocumentProperties::removeSelectedProfile(){
SPObject* obj = SP_OBJECT(current->data);
Inkscape::ColorProfile* prof = reinterpret_cast<Inkscape::ColorProfile*>(obj);
if (!name.compare(prof->name)){
- sp_repr_unparent(obj->repr);
+
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(obj->getRepr());
SPDocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_COLOR_PROFILE, _("Remove linked color profile"));
}
current = g_slist_next(current);
@@ -691,7 +693,9 @@ void DocumentProperties::removeExternalScript(){
SPObject* obj = SP_OBJECT(current->data);
SPScript* script = (SPScript*) obj;
if (name == script->xlinkhref){
- sp_repr_unparent(obj->repr);
+
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(obj->getRepr());
SPDocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT, _("Remove external script"));
}
current = g_slist_next(current);
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 3a80c4ba8..07b8a4159 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -1023,12 +1023,14 @@ private:
!(ls == 1 && SP_IS_FEPOINTLIGHT(child)) &&
!(ls == 2 && SP_IS_FESPOTLIGHT(child))) {
if(child)
- sp_repr_unparent(child->repr);
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(child->getRepr());
if(ls != -1) {
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(prim->document);
- Inkscape::XML::Node *repr = xml_doc->createElement(_light_source.get_active_data()->key.c_str());
- prim->repr->appendChild(repr);
+ Inkscape::XML::Node *repr = xml_doc->createElement(_light_source.get_active_data()->key.c_str());
+ //XML Tree being used directly here while it shouldn't be.
+ prim->getRepr()->appendChild(repr);
Inkscape::GC::release(repr);
}
@@ -1336,7 +1338,9 @@ void FilterEffectsDialog::FilterModifier::remove_filter()
if(filter) {
SPDocument* doc = filter->document;
- sp_repr_unparent(filter->repr);
+
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(filter->getRepr());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter"));
@@ -1488,7 +1492,9 @@ void FilterEffectsDialog::PrimitiveList::update()
if(prim) {
Gtk::TreeModel::Row row = *_model->append();
row[_columns.primitive] = prim;
- row[_columns.type_id] = FPConverter.get_id_from_key(prim->repr->name());
+
+ //XML Tree being used directly here while it shouldn't be.
+ row[_columns.type_id] = FPConverter.get_id_from_key(prim->getRepr()->name());
row[_columns.type] = _(FPConverter.get_label(row[_columns.type_id]).c_str());
row[_columns.id] = prim->getId();
@@ -1541,7 +1547,8 @@ void FilterEffectsDialog::PrimitiveList::remove_selected()
if(prim) {
_observer->set(0);
- sp_repr_unparent(prim->repr);
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(prim->getRepr());
SPDocumentUndo::done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_FILTER_EFFECTS,
_("Remove filter primitive"));
@@ -1914,7 +1921,9 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton*
if(c == _in_drag && SP_IS_FEMERGENODE(o)) {
// If input is null, delete it
if(!in_val) {
- sp_repr_unparent(o->repr);
+
+ //XML Tree being used directly here while it shouldn't be.
+ sp_repr_unparent(o->getRepr());
SPDocumentUndo::done(prim->document, SP_VERB_DIALOG_FILTER_EFFECTS,
_("Remove merge node"));
(*get_selection()->get_selected())[_columns.primitive] = prim;
@@ -1929,7 +1938,9 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton*
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(prim->document);
Inkscape::XML::Node *repr = xml_doc->createElement("svg:feMergeNode");
repr->setAttribute("inkscape:collect", "always");
- prim->repr->appendChild(repr);
+
+ //XML Tree being used directly here while it shouldn't be.
+ prim->getRepr()->appendChild(repr);
SPFeMergeNode *node = SP_FEMERGENODE(prim->document->getObjectByRepr(repr));
Inkscape::GC::release(repr);
_dialog.set_attr(node, SP_ATTR_IN, in_val);
@@ -2467,7 +2478,9 @@ void FilterEffectsDialog::update_settings_view()
SPFilterPrimitive* prim = _primitive_list.get_selected();
if(prim) {
- _settings->show_and_update(FPConverter.get_id_from_key(prim->repr->name()), prim);
+
+ //XML Tree being used directly here while it shouldn't be.
+ _settings->show_and_update(FPConverter.get_id_from_key(prim->getRepr()->name()), prim);
_empty_settings.hide();
}
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 7c6ced5aa..9f9f91bd1 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -170,7 +170,9 @@ void SvgFontsDialog::on_kerning_value_changed(){
undokey += this->kerning_pair->u2->attribute_string();
//slider values increase from right to left so that they match the kerning pair preview
- this->kerning_pair->repr->setAttribute("k", Glib::Ascii::dtostr(get_selected_spfont()->horiz_adv_x - kerning_slider.get_value()).c_str());
+
+ //XML Tree being directly used here while it shouldn't be.
+ this->kerning_pair->getRepr()->setAttribute("k", Glib::Ascii::dtostr(get_selected_spfont()->horiz_adv_x - kerning_slider.get_value()).c_str());
SPDocumentUndo::maybe_done(document, undokey.c_str(), SP_VERB_DIALOG_SVG_FONTS, _("Adjust kerning value"));
//populate_kerning_pairs_box();
@@ -505,7 +507,8 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){
msgStack->flash(Inkscape::ERROR_MESSAGE, msg);
return;
}
- glyph->repr->setAttribute("d", (char*) sp_svg_write_path (pathv));
+ //XML Tree being directly used here while it shouldn't be.
+ glyph->getRepr()->setAttribute("d", (char*) sp_svg_write_path (pathv));
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
update_glyphs();
@@ -547,7 +550,9 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
SPObject* obj;
for (obj = get_selected_spfont()->children; obj; obj=obj->next){
if (SP_IS_MISSING_GLYPH(obj)){
- obj->repr->setAttribute("d", (char*) sp_svg_write_path (pathv));
+
+ //XML Tree being directly used here while it shouldn't be.
+ obj->getRepr()->setAttribute("d", (char*) sp_svg_write_path (pathv));
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
}
}
@@ -566,7 +571,8 @@ void SvgFontsDialog::reset_missing_glyph_description(){
SPObject* obj;
for (obj = get_selected_spfont()->children; obj; obj=obj->next){
if (SP_IS_MISSING_GLYPH(obj)){
- obj->repr->setAttribute("d", (char*) "M0,0h1000v1024h-1000z");
+ //XML Tree being directly used here while it shouldn't be.
+ obj->getRepr()->setAttribute("d", (char*) "M0,0h1000v1024h-1000z");
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Reset missing-glyph"));
}
}
@@ -579,7 +585,8 @@ void SvgFontsDialog::glyph_name_edit(const Glib::ustring&, const Glib::ustring&
if (!i) return;
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
- glyph->repr->setAttribute("glyph-name", str.c_str());
+ //XML Tree being directly used here while it shouldn't be.
+ glyph->getRepr()->setAttribute("glyph-name", str.c_str());
SPDocument* doc = sp_desktop_document(this->getDesktop());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name"));
@@ -592,7 +599,8 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin
if (!i) return;
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
- glyph->repr->setAttribute("unicode", str.c_str());
+ //XML Tree being directly used here while it shouldn't be.
+ glyph->getRepr()->setAttribute("unicode", str.c_str());
SPDocument* doc = sp_desktop_document(this->getDesktop());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode"));
@@ -603,7 +611,8 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin
void SvgFontsDialog::remove_selected_font(){
SPFont* font = get_selected_spfont();
- sp_repr_unparent(font->repr);
+ //XML Tree being directly used here while it shouldn't be.
+ sp_repr_unparent(font->getRepr());
SPDocument* doc = sp_desktop_document(this->getDesktop());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font"));
@@ -617,7 +626,9 @@ void SvgFontsDialog::remove_selected_glyph(){
if(!i) return;
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
- sp_repr_unparent(glyph->repr);
+
+ //XML Tree being directly used here while it shouldn't be.
+ sp_repr_unparent(glyph->getRepr());
SPDocument* doc = sp_desktop_document(this->getDesktop());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph"));
@@ -632,7 +643,9 @@ void SvgFontsDialog::remove_selected_kerning_pair(){
if(!i) return;
SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode];
- sp_repr_unparent(pair->repr);
+
+ //XML Tree being directly used here while it shouldn't be.
+ sp_repr_unparent(pair->getRepr());
SPDocument* doc = sp_desktop_document(this->getDesktop());
SPDocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair"));
@@ -812,7 +825,8 @@ void set_font_family(SPFont* font, char* str){
SPObject* obj;
for (obj=font->children; obj; obj=obj->next){
if (SP_IS_FONTFACE(obj)){
- obj->repr->setAttribute("font-family", str);
+ //XML Tree being directly used here while it shouldn't be.
+ obj->getRepr()->setAttribute("font-family", str);
}
}
@@ -832,7 +846,8 @@ void SvgFontsDialog::add_font(){
SPObject* obj;
for (obj=font->children; obj; obj=obj->next){
if (SP_IS_FONTFACE(obj)){
- obj->repr->setAttribute("font-family", os2.str().c_str());
+ //XML Tree being directly used here while it shouldn't be.
+ obj->getRepr()->setAttribute("font-family", os2.str().c_str());
}
}
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index 62682d623..6cef5bedd 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -182,7 +182,8 @@ void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer us
for (const GSList *item = gradients; item; item = item->next) {
SPGradient* grad = SP_GRADIENT(item->data);
if ( targetName == grad->getId() ) {
- grad->repr->setAttribute("osb:paint", "solid"); // TODO make conditional
+ //XML Tree being used directly here while it shouldn't be
+ grad->getRepr()->setAttribute("osb:paint", "solid"); // TODO make conditional
SPDocumentUndo::done(doc, SP_VERB_CONTEXT_GRADIENT,
_("Add gradient stop"));
@@ -948,7 +949,8 @@ void SwatchesPanel::_updateFromSelection()
}
}
if ( target ) {
- gchar const* id = target->repr->attribute("id");
+ //XML Tree being used directly here while it shouldn't be
+ gchar const* id = target->getRepr()->attribute("id");
if ( id ) {
fillId = id;
}
@@ -979,7 +981,9 @@ void SwatchesPanel::_updateFromSelection()
}
}
if ( target ) {
- gchar const* id = target->repr->attribute("id");
+
+ //XML Tree being used directly here while it shouldn't be
+ gchar const* id = target->getRepr()->attribute("id");
if ( id ) {
strokeId = id;
}