summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 01:11:56 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 01:11:56 +0000
commitc2daa449f50418c3b25ed000eb1e68a48faa719e (patch)
tree0f39ad1e2632303c43015e0243702f7a11f3cf55 /src
parentAdd search and no results from stock icons. Improve text. Thanks Maren for th... (diff)
parentchange assignment to equality (diff)
downloadinkscape-c2daa449f50418c3b25ed000eb1e68a48faa719e.tar.gz
inkscape-c2daa449f50418c3b25ed000eb1e68a48faa719e.zip
Merge branch 'master' into SymbolsSearch
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/extension/plugins/grid2/CMakeLists.txt2
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/path-chemistry.cpp4
-rw-r--r--src/svg/svg-color.cpp6
5 files changed, 11 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 72d984845..4c56b211d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -540,7 +540,7 @@ set(INKSCAPE_TARGET_LIBS
)
# Build everything except main and inkview.c in a shared library.
-add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC})
+add_library(inkscape_base ${inkscape_SRC} ${sp_SRC})
if(WITH_DBUS)
add_dependencies(inkscape_base inkscape_dbus)
diff --git a/src/extension/plugins/grid2/CMakeLists.txt b/src/extension/plugins/grid2/CMakeLists.txt
index f39e259de..eb200e96e 100644
--- a/src/extension/plugins/grid2/CMakeLists.txt
+++ b/src/extension/plugins/grid2/CMakeLists.txt
@@ -2,7 +2,7 @@ set(grid_PART_SRCS grid.cpp)
include_directories( ${CMAKE_BINARY_DIR}/src )
-add_library(grid2 SHARED ${grid_PART_SRCS})
+add_library(grid2 SHARED EXCLUDE_FROM_ALL ${grid_PART_SRCS})
target_link_libraries(grid2 inkscape_base)
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 9c62e5483..90df81261 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -939,7 +939,7 @@ void font_factory::AddFontsDir(char const *utf8dir)
conf = pango_fc_font_map_get_config(PANGO_FC_FONT_MAP(fontServer));
# endif
FcBool res = FcConfigAppFontAddDir(conf, (FcChar8 const *)dir);
- if (res = FcTrue) {
+ if (res == FcTrue) {
g_info("Fonts dir '%s' added successfully.", utf8dir);
} else {
g_warning("Could not add fonts dir '%s'.", utf8dir);
@@ -971,7 +971,7 @@ void font_factory::AddFontFile(char const *utf8file)
conf = pango_fc_font_map_get_config(PANGO_FC_FONT_MAP(fontServer));
# endif
FcBool res = FcConfigAppFontAddFile(conf, (FcChar8 const *)file);
- if (res = FcTrue) {
+ if (res == FcTrue) {
g_info("Font file '%s' added successfully.", utf8file);
} else {
g_warning("Could not add font file '%s'.", utf8file);
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index b3b0c8076..b824d15c7 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -430,6 +430,8 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
Inkscape::XML::Node *parent = item->getRepr()->parent();
// remember id
char const *id = item->getRepr()->attribute("id");
+ // remember class
+ char const *class_attr = item->getRepr()->attribute("class");
// remember title
gchar *title = item->title();
// remember description
@@ -444,6 +446,8 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
// restore id
repr->setAttribute("id", id);
+ // restore class
+ repr->setAttribute("class", class_attr);
// add the new repr to the parent
parent->appendChild(repr);
SPObject* newObj = document->getObjectByRepr(repr);
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index 89a5636a8..60cbff3dc 100644
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
@@ -398,7 +398,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
* this check wrapper. */
gchar const *end = str;
guint32 const ret = internal_sp_svg_read_color(str, &end, dfl);
- assert(((ret == dfl) && (end == str))
+ g_assert(((ret == dfl) && (end == str))
|| (((ret & 0xff) == 0)
&& (str < end)));
if (str < end) {
@@ -407,7 +407,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
buf[end - str] = '\0';
gchar const *buf_end = buf;
guint32 const check = internal_sp_svg_read_color(buf, &buf_end, 1);
- assert(check == ret
+ g_assert(check == ret
&& buf_end - buf == end - str);
g_free(buf);
@@ -425,7 +425,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
*/
static void rgb24_to_css(char *const buf, unsigned const rgb24)
{
- assert(rgb24 < (1u << 24));
+ g_assert(rgb24 < (1u << 24));
/* SVG 1.1 Full allows additional colour names not supported by SVG Tiny, but we don't bother
* with them: it's good for these colours to be copyable to non-SVG CSS stylesheets and for