From 6947ff531840b67cafd4c7931e6b7bb9ceaf7d70 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 5 Feb 2017 20:24:08 +0100 Subject: forward-port from 0.92.x the line height conversion from <.92 to >=.92 Code written by su_v in python as an extension, ported to c++ by Mc, some fixes added by bryce. http://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15338 http://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15339 http://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15350 http://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15351 Option to disable it is called --no-convert-text-baseline-spacing The terminology "convert" is chosen as a jargon word to be used for all such legacy file conversions. The "--no-XXX" naming style is adopted from the convention used by other software such as GIMP. (bzr r15481) --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 605c1207e..47cf43456 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -166,6 +166,7 @@ enum { SP_ARG_SHELL, SP_ARG_VERSION, SP_ARG_VACUUM_DEFS, + SP_ARG_NO_CONVERT_TEXT_BASELINE_SPACING, #ifdef WITH_DBUS SP_ARG_DBUS_LISTEN, SP_ARG_DBUS_NAME, @@ -235,7 +236,6 @@ static gchar *sp_xverbs_yaml_utf8 = NULL; static gchar *sp_xverbs_yaml = NULL; #endif // WITH_YAML - /** * Reset variables to default values. */ @@ -274,6 +274,7 @@ static void resetCommandlineGlobals() { sp_query_all = FALSE; sp_query_id = NULL; sp_vacuum_defs = FALSE; + sp_no_convert_text_baseline_spacing = FALSE; #ifdef WITH_DBUS sp_dbus_listen = FALSE; sp_dbus_name = NULL; @@ -525,6 +526,11 @@ struct poptOption options[] = { N_("Start Inkscape in interactive shell mode."), NULL}, + {"no-convert-text-baseline-spacing", 0, + POPT_ARG_NONE, &sp_no_convert_text_baseline_spacing, SP_ARG_NO_CONVERT_TEXT_BASELINE_SPACING, + N_("Do not fix legacy (pre-0.92) files' text baseline spacing on opening."), + NULL}, + POPT_AUTOHELP POPT_TABLEEND }; @@ -1636,7 +1642,6 @@ static int sp_do_export_png(SPDocument *doc) return retcode; } - /** * Perform a PDF/PS/EPS export * -- cgit v1.2.3 From 860d326a9ac03c2b1e0a3f45c3ed3d35f94c3d54 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 18 Feb 2017 14:21:07 +0100 Subject: Disable GTK3 "client side decorations" on Windows by setting "GTK_CSD=0" They are not used by Inkscape and prevent native theming to be used for window borders and titles. See also https://bugzilla.gnome.org/show_bug.cgi?id=778791 (bzr r15531) --- src/main.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 47cf43456..8be9e2e44 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -691,18 +691,22 @@ main(int argc, char **argv) RegistryTool rt; rt.setPathInfo(); } -#elif defined(ENABLE_NLS) -# ifdef ENABLE_BINRELOC + + // disable "client side decorations" as they prevent window borders and titlebars to be drawn with native theming + // see also https://bugzilla.gnome.org/show_bug.cgi?id=778791 + g_setenv("GTK_CSD", "0", FALSE); +#endif + +#ifdef ENABLE_NLS +# ifndef WIN32 +# ifdef ENABLE_BINRELOC bindtextdomain(GETTEXT_PACKAGE, BR_LOCALEDIR("")); -# else +# else bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); // needed by Python/Gettext g_setenv("PACKAGE_LOCALE_DIR", PACKAGE_LOCALE_DIR, TRUE); +# endif # endif -#endif - - // the bit below compiles regardless of platform -#ifdef ENABLE_NLS // Allow the user to override the locale directory by setting // the environment variable INKSCAPE_LOCALEDIR. char const *inkscape_localedir = g_getenv("INKSCAPE_LOCALEDIR"); -- cgit v1.2.3