summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/font-substitution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/font-substitution.cpp')
-rw-r--r--src/ui/dialog/font-substitution.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index f219f3db6..abae8ea70 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -7,7 +7,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include "config.h"
#endif
#include <gtkmm/messagedialog.h>
@@ -21,16 +21,11 @@
#include "inkscape.h"
#include "desktop.h"
#include "document.h"
-#include "selection.h"
#include "ui/dialog-events.h"
#include "selection-chemistry.h"
-#include "preferences.h"
-#include "xml/repr.h"
-
-#include "sp-defs.h"
#include "sp-root.h"
#include "sp-text.h"
#include "sp-textpath.h"
@@ -106,11 +101,7 @@ FontSubstitution::show(Glib::ustring out, std::vector<SPItem*> &l)
cbWarning->set_label(_("Don't show this warning again"));
cbWarning->show();
-#if GTK_CHECK_VERSION(3,0,0)
- Gtk::Box * box = warning.get_content_area();
-#else
- Gtk::Box * box = warning.get_vbox();
-#endif
+ auto box = warning.get_content_area();
box->set_spacing(2);
box->pack_start(*scrollwindow, true, true, 4);
box->pack_start(*cbSelect, false, false, 0);
@@ -182,7 +173,7 @@ std::vector<SPItem*> FontSubstitution::getFontReplacedItems(SPDocument* doc, Gli
family = SP_TEXT(parent_text)->layout.getFontFamily(0);
// Add all the spans fonts to the set
gint ii = 0;
- for (SPObject *child = parent_text->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: parent_text->children) {
family = SP_TEXT(parent_text)->layout.getFontFamily(ii);
setFontSpans.insert(family);
ii++;