summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-28 23:11:49 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-28 23:11:49 +0000
commitb0bc5900769742861a57b3200f25378a5d5138be (patch)
treec641716ac21b5f28e2a05284eedd4778605fbc69 /src
parentUpdate to trunk (diff)
parentFix for Bug #1161205 (Font substitution dialog appears when generic font fami... (diff)
downloadinkscape-b0bc5900769742861a57b3200f25378a5d5138be.tar.gz
inkscape-b0bc5900769742861a57b3200f25378a5d5138be.zip
Update to trunk
(bzr r11950.1.76)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/bind/javabind.h2
-rw-r--r--src/color-profile.cpp2
-rw-r--r--src/desktop.cpp2
-rw-r--r--src/dom/dom.h4
-rw-r--r--src/dom/io/domstream.cpp5
-rw-r--r--src/dom/uri.cpp9
-rw-r--r--src/dom/views.h5
-rw-r--r--src/dom/xpathparser.cpp3
-rw-r--r--src/dropper-context.cpp1
-rw-r--r--src/extension/init.cpp4
-rw-r--r--src/extension/internal/odf.h5
-rw-r--r--src/extension/script/InkscapeScript.h4
-rw-r--r--src/file.cpp4
-rw-r--r--src/helper/geom.cpp26
-rw-r--r--src/interface.cpp3
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libnrtype/font-lister.cpp43
-rw-r--r--src/main.cpp4
-rw-r--r--src/registrytool.cpp6
-rw-r--r--src/registrytool.h5
-rw-r--r--src/shortcuts.cpp3
-rw-r--r--src/shortcuts.h1
-rw-r--r--src/sp-rect.cpp4
-rw-r--r--src/tools-switch.cpp1
-rw-r--r--src/ui/dialog/export.cpp2
-rw-r--r--src/ui/dialog/filedialog.cpp2
-rw-r--r--src/ui/dialog/filedialog.h3
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp5
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp4
-rw-r--r--src/ui/dialog/font-substitution.cpp8
-rw-r--r--src/ui/dialog/ocaldialogs.cpp8
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp4
-rw-r--r--src/ui/tool/path-manipulator.cpp1
-rw-r--r--src/ui/widget/preferences-widget.cpp2
35 files changed, 119 insertions, 76 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7d8a9ef50..b9ec53ab1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,7 +49,8 @@ all_libs = \
$(LIBCDR_LIBS) \
$(DBUS_LIBS) \
$(GDL_LIBS) \
- $(IMAGEMAGICK_LIBS)
+ $(IMAGEMAGICK_LIBS) \
+ $(X11_LIBS)
# Add sources common for Inkscape and Inkview to this variable.
ink_common_sources =
@@ -83,7 +84,8 @@ AM_CPPFLAGS = \
$(WIN32_CFLAGS) \
-I$(srcdir)/bind/javainc \
-I$(srcdir)/bind/javainc/linux \
- -I$(builddir)/extension/dbus
+ -I$(builddir)/extension/dbus \
+ $(X11_CFLAGS)
CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
diff --git a/src/bind/javabind.h b/src/bind/javabind.h
index 254548bfb..c11656a66 100644
--- a/src/bind/javabind.h
+++ b/src/bind/javabind.h
@@ -27,8 +27,8 @@
#ifndef SEEN_JAVABIND_H
#define SEEN_JAVABIND_H
-#include <glibmm.h>
#include <vector>
+#include <glibmm/ustring.h>
namespace Inkscape
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index e7f18af15..14f88c77e 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -47,6 +47,8 @@
#include <icm.h>
#endif // WIN32
+#include <glibmm/convert.h>
+
using Inkscape::ColorProfile;
using Inkscape::ColorProfileClass;
using Inkscape::ColorProfileImpl;
diff --git a/src/desktop.cpp b/src/desktop.cpp
index c04dba6cc..0bf442b7a 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -811,7 +811,7 @@ SPDesktop::push_current_zoom (std::list<Geom::Rect> &history)
{
Geom::Rect area = get_display_area();
- if (history.empty() || history.front() == area) {
+ if (history.empty() || history.front() != area) {
history.push_front(area);
}
}
diff --git a/src/dom/dom.h b/src/dom/dom.h
index 22fd09ebf..14165166e 100644
--- a/src/dom/dom.h
+++ b/src/dom/dom.h
@@ -60,9 +60,9 @@
*/
#ifdef DOM_STANDALONE
-#include <string>
+# include <string>
#else
-#include <glibmm.h>
+# include <glibmm/ustring.h>
#endif
//# Unfortunate hack for a name collision
diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp
index 7118025d6..1f08c0eee 100644
--- a/src/dom/io/domstream.cpp
+++ b/src/dom/io/domstream.cpp
@@ -34,9 +34,10 @@
*
*/
+#include <cmath>
+#include <cstdarg>
#include <cstdio>
-#include <math.h>
-#include <stdarg.h>
+#include <cstdlib>
#include "domstream.h"
#include "dom/ucd.h"
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index e1089017d..231995daf 100644
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
@@ -27,17 +27,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
-
#include "uri.h"
#include "ucd.h"
-#include <stdio.h>
-#include <stdarg.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
#include <vector>
-
namespace org
{
namespace w3c
diff --git a/src/dom/views.h b/src/dom/views.h
index f165d2a9b..f1154fb62 100644
--- a/src/dom/views.h
+++ b/src/dom/views.h
@@ -45,12 +45,9 @@
* Be prepared in the future to adjust to this, if SVG ever switches .
*/
-
-
+#include <cstdlib>
#include "dom.h"
-
-
namespace org
{
namespace w3c
diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp
index b19975966..4785ce93f 100644
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
@@ -27,10 +27,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include "ucd.h"
#include "xpathparser.h"
-
+#include <cstdlib>
namespace org
{
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index d41e4059d..05d22017e 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -15,7 +15,6 @@
# include <config.h>
#endif
-#include <glibmm.h>
#include <glibmm/i18n.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
diff --git a/src/extension/init.cpp b/src/extension/init.cpp
index 5555eddf6..d403d270f 100644
--- a/src/extension/init.cpp
+++ b/src/extension/init.cpp
@@ -26,8 +26,10 @@
#include "path-prefix.h"
#include "inkscape.h"
-#include <glibmm/ustring.h>
+
+#include <glibmm/fileutils.h>
#include <glibmm/i18n.h>
+#include <glibmm/ustring.h>
#include "system.h"
#include "db.h"
diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h
index 219a99a4f..001f5e1f1 100644
--- a/src/extension/internal/odf.h
+++ b/src/extension/internal/odf.h
@@ -27,19 +27,18 @@
#include <io/stringstream.h>
#include <dom/uri.h>
-#include <glibmm.h>
#include "extension/implementation/implementation.h"
-
#include <xml/repr.h>
#include <string>
#include <map>
#include <dom/util/ziptool.h>
-//#include <io/domstream.h>
#include "sp-item.h"
+#include <glibmm/ustring.h>
+
namespace Inkscape
{
namespace Extension
diff --git a/src/extension/script/InkscapeScript.h b/src/extension/script/InkscapeScript.h
index 2ebeb1b19..8d6346582 100644
--- a/src/extension/script/InkscapeScript.h
+++ b/src/extension/script/InkscapeScript.h
@@ -12,7 +12,9 @@
#include "config.h"
-#include <glibmm.h>
+namespace Glib {
+class ustring;
+}
namespace Inkscape
{
diff --git a/src/file.cpp b/src/file.cpp
index 5737f0a8a..453ddb546 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -68,8 +68,10 @@
#include "ui/dialog/font-substitution.h"
#include <gtk/gtk.h>
-#include <glib.h>
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
using Inkscape::DocumentUndo;
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp
index 3e63df1ac..077344380 100644
--- a/src/helper/geom.cpp
+++ b/src/helper/geom.cpp
@@ -9,6 +9,7 @@
* Released under GNU GPL
*/
+#include <algorithm>
#include "helper/geom.h"
#include "helper/geom-curves.h"
#include <typeinfo>
@@ -20,7 +21,6 @@
#include <2geom/rect.h>
#include <2geom/coord.h>
#include <2geom/sbasis-to-bezier.h>
-#include <glibmm.h>
using Geom::X;
using Geom::Y;
@@ -275,18 +275,18 @@ geom_cubic_bbox_wind_distance (Geom::Coord x000, Geom::Coord y000,
if (bbox) cubic_bbox (x000, y000, x001, y001, x011, y011, x111, y111, *bbox);
- x0 = MIN (x000, x001);
- x0 = MIN (x0, x011);
- x0 = MIN (x0, x111);
- y0 = MIN (y000, y001);
- y0 = MIN (y0, y011);
- y0 = MIN (y0, y111);
- x1 = MAX (x000, x001);
- x1 = MAX (x1, x011);
- x1 = MAX (x1, x111);
- y1 = MAX (y000, y001);
- y1 = MAX (y1, y011);
- y1 = MAX (y1, y111);
+ x0 = std::min (x000, x001);
+ x0 = std::min (x0, x011);
+ x0 = std::min (x0, x111);
+ y0 = std::min (y000, y001);
+ y0 = std::min (y0, y011);
+ y0 = std::min (y0, y111);
+ x1 = std::min (x000, x001);
+ x1 = std::min (x1, x011);
+ x1 = std::min (x1, x111);
+ y1 = std::min (y000, y001);
+ y1 = std::min (y1, y011);
+ y1 = std::min (y1, y111);
if (best) {
/* Quickly adjust to endpoints */
diff --git a/src/interface.cpp b/src/interface.cpp
index 4421b4a1d..986d3107f 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -79,7 +79,8 @@
#include "ui/dialog/layer-properties.h"
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
+
+#include <glibmm/miscutils.h>
using Inkscape::DocumentUndo;
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index bb8b0887f..74c706a1b 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -14,9 +14,7 @@
# include "config.h"
#endif
-#include <glibmm.h>
-#include <glib.h>
-#include <glibmm/i18n.h> // _()
+#include <glibmm/i18n.h>
#include <pango/pangoft2.h>
#include "libnrtype/FontFactory.h"
#include "libnrtype/font-instance.h"
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index a0db12c2b..39a04914b 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -9,7 +9,6 @@
#include <libnrtype/TextWrapper.h>
#include <libnrtype/one-glyph.h>
-#include <glibmm.h>
#include "font-lister.h"
#include "FontFactory.h"
@@ -22,6 +21,8 @@
#include "sp-root.h"
#include "xml/repr.h"
+#include <glibmm/regex.h>
+
//#define DEBUG_FONT
namespace Inkscape
@@ -286,6 +287,14 @@ namespace Inkscape
const gchar* family = pango_font_description_get_family(descr);
Glib::ustring Family = family;
+ // PANGO BUG...
+ // A font spec of Delicious, 500 Italic should result in a family of 'Delicious'
+ // and a style of 'Medium Italic'. It results instead with: a family of
+ // 'Delicious, 500' with a style of 'Medium Italic'. We chop of any weight numbers
+ // at the end of the family: match ",[1-9]00^".
+ Glib::RefPtr<Glib::Regex> weight = Glib::Regex::create(",[1-9]00$");
+ Family = weight->replace( Family, 0, "", Glib::REGEX_MATCH_PARTIAL );
+
// Pango canonized strings remove space after comma between family names. Put it back.
size_t i = 0;
while( (i = Family.find(",", i)) != std::string::npos) {
@@ -325,7 +334,7 @@ namespace Inkscape
// From style
if( fontspec.empty() ) {
- //std::cout << " Attempting desktop style" << std::endl;
+ //std::cout << " Attempting desktop style" << std::endl;
int rfamily = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
int rstyle = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
@@ -338,7 +347,7 @@ namespace Inkscape
// From preferences
if( fontspec.empty() ) {
- //std::cout << " Attempting preferences" << std::endl;
+ //std::cout << " Attempting preferences" << std::endl;
sp_style_read_from_prefs(query, "/tools/text");
fontspec = fontspec_from_style( query );
//std::cout << " fontspec from prefs :" << fontspec << ":" << std::endl;
@@ -347,7 +356,7 @@ namespace Inkscape
// From thin air
if( fontspec.empty() ) {
- //std::cout << " Attempting thin air" << std::endl;
+ //std::cout << " Attempting thin air" << std::endl;
fontspec = current_family + ", " + current_style;
//std::cout << " fontspec from thin air :" << fontspec << ":" << std::endl;
}
@@ -554,13 +563,13 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
PangoWeight weight = pango_font_description_get_weight( desc );
switch ( weight ) {
case PANGO_WEIGHT_THIN:
- sp_repr_css_set_property (css, "font-weight", "thin" );
+ sp_repr_css_set_property (css, "font-weight", "100" );
break;
case PANGO_WEIGHT_ULTRALIGHT:
- sp_repr_css_set_property (css, "font-weight", "extra light" );
+ sp_repr_css_set_property (css, "font-weight", "200" );
break;
case PANGO_WEIGHT_LIGHT:
- sp_repr_css_set_property (css, "font-weight", "light" );
+ sp_repr_css_set_property (css, "font-weight", "300" );
break;
case PANGO_WEIGHT_BOOK:
sp_repr_css_set_property (css, "font-weight", "380" );
@@ -569,19 +578,19 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
sp_repr_css_set_property (css, "font-weight", "normal" );
break;
case PANGO_WEIGHT_MEDIUM:
- sp_repr_css_set_property (css, "font-weight", "medium" );
+ sp_repr_css_set_property (css, "font-weight", "500" );
break;
case PANGO_WEIGHT_SEMIBOLD:
- sp_repr_css_set_property (css, "font-weight", "semi bold" );
+ sp_repr_css_set_property (css, "font-weight", "600" );
break;
case PANGO_WEIGHT_BOLD:
sp_repr_css_set_property (css, "font-weight", "bold" );
break;
case PANGO_WEIGHT_ULTRABOLD:
- sp_repr_css_set_property (css, "font-weight", "extra bold" );
+ sp_repr_css_set_property (css, "font-weight", "800" );
break;
case PANGO_WEIGHT_HEAVY:
- sp_repr_css_set_property (css, "font-weight", "black" );
+ sp_repr_css_set_property (css, "font-weight", "900" );
break;
case PANGO_WEIGHT_ULTRAHEAVY:
sp_repr_css_set_property (css, "font-weight", "1000" );
@@ -729,11 +738,11 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
switch (style->font_stretch.computed) {
case SP_CSS_FONT_STRETCH_ULTRA_CONDENSED:
- fontspec += " extra_condensed";
+ fontspec += " extra-condensed";
break;
case SP_CSS_FONT_STRETCH_EXTRA_CONDENSED:
- fontspec += " extra_condensed";
+ fontspec += " extra-condensed";
break;
case SP_CSS_FONT_STRETCH_CONDENSED:
@@ -742,7 +751,7 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
break;
case SP_CSS_FONT_STRETCH_SEMI_CONDENSED:
- fontspec += " semi_condensed";
+ fontspec += " semi-condensed";
break;
case SP_CSS_FONT_STRETCH_NORMAL:
@@ -750,7 +759,7 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
break;
case SP_CSS_FONT_STRETCH_SEMI_EXPANDED:
- fontspec += " semi_expanded";
+ fontspec += " semi-expanded";
break;
case SP_CSS_FONT_STRETCH_EXPANDED:
@@ -759,11 +768,11 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
break;
case SP_CSS_FONT_STRETCH_EXTRA_EXPANDED:
- fontspec += " extra_expanded";
+ fontspec += " extra-expanded";
break;
case SP_CSS_FONT_STRETCH_ULTRA_EXPANDED:
- fontspec += " ultra_expanded";
+ fontspec += " ultra-expanded";
break;
default:
diff --git a/src/main.cpp b/src/main.cpp
index 20330edbb..58ab19616 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -47,7 +47,6 @@
#endif /* Not def: POPT_TABLEEND */
#include <libxml/tree.h>
-#include <glib.h>
#include <glib/gprintf.h>
#include <glib-object.h>
#include <gtk/gtk.h>
@@ -103,6 +102,9 @@
#include "extension/init.h"
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/miscutils.h>
+
#include <gtkmm/main.h>
#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
diff --git a/src/registrytool.cpp b/src/registrytool.cpp
index 72b53821e..7544e1c91 100644
--- a/src/registrytool.cpp
+++ b/src/registrytool.cpp
@@ -21,12 +21,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "registrytool.h"
+
#include <windows.h>
#include <string>
#include <cstdio>
-
-#include "registrytool.h"
-
+#include <glibmm/ustring.h>
typedef struct
{
diff --git a/src/registrytool.h b/src/registrytool.h
index 0a8139184..335a8bd52 100644
--- a/src/registrytool.h
+++ b/src/registrytool.h
@@ -21,8 +21,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string>
-#include <glibmm.h>
+namespace Glib {
+ class ustring;
+}
/**
* Inkscape Registry Tool
diff --git a/src/shortcuts.cpp b/src/shortcuts.cpp
index a746b8633..2af04929e 100644
--- a/src/shortcuts.cpp
+++ b/src/shortcuts.cpp
@@ -29,7 +29,10 @@
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
#include "helper/action.h"
#include "io/sys.h"
diff --git a/src/shortcuts.h b/src/shortcuts.h
index 2d87b17ef..406768f97 100644
--- a/src/shortcuts.h
+++ b/src/shortcuts.h
@@ -10,6 +10,7 @@
* This code is in public domain
*/
+#include <vector>
#include <gdkmm/types.h>
typedef struct _GtkAccelGroup GtkAccelGroup;
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index e7e1432c2..747a988a9 100644
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
@@ -120,13 +120,13 @@ sp_rect_set(SPObject *object, unsigned key, gchar const *value)
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_ATTR_RX:
- if (!rect->rx.read(value) || rect->rx.value < 0.0) {
+ if (!rect->rx.read(value) || rect->rx.value <= 0.0) {
rect->rx.unset();
}
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_ATTR_RY:
- if (!rect->ry.read(value) || rect->ry.value < 0.0) {
+ if (!rect->ry.read(value) || rect->ry.value <= 0.0) {
rect->ry.unset();
}
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp
index f0535e2ff..9e7dfa3f9 100644
--- a/src/tools-switch.cpp
+++ b/src/tools-switch.cpp
@@ -213,7 +213,6 @@ tools_switch(SPDesktop *dt, int num)
dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> or <b>double click</b> to create a mesh on selected objects, <b>drag handles</b> to adjust meshes."));
break;
case TOOLS_ZOOM:
- std::cout << "tools-switch.cpp: TOOLS_ZOOM" << std::endl;
dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]);
dt->activate_guides(false);
inkscape_eventcontext_set(sp_desktop_event_context(dt));
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 99a8c08d2..3017dc117 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -42,6 +42,8 @@
#endif
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
+
#include "helper/unit-menu.h"
#include "helper/units.h"
#include "unit-constants.h"
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp
index b3af6fc00..3413b0b0d 100644
--- a/src/ui/dialog/filedialog.cpp
+++ b/src/ui/dialog/filedialog.cpp
@@ -24,6 +24,8 @@
#include "extension/output.h"
#include "preferences.h"
+#include <glibmm/convert.h>
+
namespace Inkscape
{
namespace UI
diff --git a/src/ui/dialog/filedialog.h b/src/ui/dialog/filedialog.h
index 63cee6bdc..8dfcf5dce 100644
--- a/src/ui/dialog/filedialog.h
+++ b/src/ui/dialog/filedialog.h
@@ -16,12 +16,13 @@
#ifndef __FILE_DIALOG_H__
#define __FILE_DIALOG_H__
-#include <glibmm.h>
#include <vector>
#include <set>
#include "extension/system.h"
+#include <glibmm/ustring.h>
+
class SPDocument;
namespace Inkscape {
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index cb6d92799..5808d7d21 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -34,7 +34,12 @@
#include <gtkmm/expander.h>
#include <gtkmm/stock.h>
+
+#include <glibmm/convert.h>
+#include <glibmm/fileutils.h>
#include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
+
#include "extension/input.h"
#include "extension/output.h"
#include "extension/db.h"
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index d65f5c48c..0d2d0757c 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -26,7 +26,11 @@
#endif
#include "ui/widget/spinbutton.h"
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/stringutils.h>
#include "desktop.h"
#include "desktop-handles.h"
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index f0112f1d8..796d2b97a 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -228,7 +228,11 @@ GSList * FontSubstitution::getFontReplacedItems(SPDocument* doc, Glib::ustring *
std::set<Glib::ustring>::const_iterator iter = setFontSpans.find(font);
if (iter != setFontSpans.end() ||
font == Glib::ustring("sans-serif") ||
- font == Glib::ustring("Sans")) {
+ font == Glib::ustring("Sans") ||
+ font == Glib::ustring("serif") ||
+ font == Glib::ustring("Serif") ||
+ font == Glib::ustring("monospace") ||
+ font == Glib::ustring("Monospace")) {
fontFound = true;
break;
}
@@ -236,7 +240,7 @@ GSList * FontSubstitution::getFontReplacedItems(SPDocument* doc, Glib::ustring *
if (fontFound == false) {
Glib::ustring subName = getSubstituteFontName(fonts);
Glib::ustring err = Glib::ustring::compose(
- "Font '%1' substituted with '%2'", fonts.c_str(), subName.c_str());
+ _("Font '%1' substituted with '%2'"), fonts.c_str(), subName.c_str());
setErrors.insert(err);
outList = g_slist_prepend (outList, item);
}
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 09ce59e9c..c597bc849 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -33,10 +33,16 @@
#include <gtkmm/notebook.h>
#include <gtkmm/spinner.h>
#include <gtkmm/stock.h>
-#include <glibmm/i18n.h>
#include <gdkmm/general.h>
#include <libxml/tree.h>
+#include <glibmm/convert.h>
+#include <glibmm/fileutils.h>
+#include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/markup.h>
+#include <glibmm/miscutils.h>
+
namespace Inkscape
{
namespace UI
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index bce63093d..ab5f4c0e9 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -22,7 +22,6 @@
#include <gtkmm/imagemenuitem.h>
#include <gtkmm/scale.h>
#include <gtkmm/stock.h>
-#include <glibmm/i18n.h>
#include <message-stack.h>
#include "selection.h"
#include <string.h>
@@ -38,6 +37,9 @@
#include "sp-font.h"
#include "sp-glyph-kerning.h"
+#include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
+
SvgFontDrawingArea::SvgFontDrawingArea():
_x(0),
_y(0),
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index f8c5deea2..1607585c5 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -19,7 +19,6 @@
#include <2geom/bezier-curve.h>
#include <2geom/bezier-utils.h>
#include <2geom/svg-path.h>
-#include <glibmm.h>
#include <glibmm/i18n.h>
#include "ui/tool/path-manipulator.h"
#include "desktop.h"
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 314bf75bf..d32de6871 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -41,6 +41,8 @@
#include "selection-chemistry.h"
#include "ui/dialog/filedialog.h"
#include "xml/repr.h"
+
+#include <glibmm/convert.h>
#include <glibmm/i18n.h>
using namespace Inkscape::UI::Widget;