From: JucaBlues Date: Fri, 18 Jul 2008 05:49:46 +0000 (+0000) Subject: removing lots of g_warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7c7bbbc4f328c338d2f4356ffc178fafcd7c6f9d;p=inkscape.git removing lots of g_warnings --- diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp index fdab91bc3..c4197406b 100644 --- a/src/sp-font-face.cpp +++ b/src/sp-font-face.cpp @@ -496,19 +496,11 @@ static void sp_fontface_set(SPObject *object, unsigned int key, const gchar *val style = sp_read_fontFaceStyleType(value); if (face->font_style.size() != style.size()){ face->font_style = style; -g_warning(": SP_ATTR_FONT_STYLE:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); } else { for (unsigned int i=0;ifont_style[i]){ face->font_style = style; -g_warning(": SP_ATTR_FONT_STYLE:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); break; } @@ -519,19 +511,11 @@ g_warning(": SP_ATTR_FONT_STYLE:"); variant = sp_read_fontFaceVariantType(value); if (face->font_variant.size() != variant.size()){ face->font_variant = variant; -g_warning(": SP_ATTR_FONT_VARIANT:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); } else { for (unsigned int i=0;ifont_variant[i]){ face->font_variant = variant; -g_warning(": SP_ATTR_FONT_VARIANT:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); break; } @@ -542,19 +526,11 @@ g_warning(": SP_ATTR_FONT_VARIANT:"); weight = sp_read_fontFaceWeightType(value); if (face->font_weight.size() != weight.size()){ face->font_weight = weight; -g_warning(": SP_ATTR_FONT_WEIGHT:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); } else { for (unsigned int i=0;ifont_weight[i]){ face->font_weight = weight; -g_warning(": SP_ATTR_FONT_WEIGHT:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); break; } @@ -565,19 +541,11 @@ g_warning(": SP_ATTR_FONT_WEIGHT:"); stretch = sp_read_fontFaceStretchType(value); if (face->font_stretch.size() != stretch.size()){ face->font_stretch = stretch; -g_warning(": SP_ATTR_FONT_STRETCH:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); } else { for (unsigned int i=0;ifont_stretch[i]){ face->font_stretch = stretch; -g_warning(": SP_ATTR_FONT_STRETCH:"); - for (unsigned int i=0;irequestModified(SP_OBJECT_MODIFIED_FLAG); break; } @@ -588,7 +556,6 @@ g_warning(": SP_ATTR_FONT_STRETCH:"); number = helperfns_read_number(value); if (number != face->units_per_em){ face->units_per_em = number; -g_warning(": SP_ATTR_UNITS_PER_EM: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -596,7 +563,6 @@ g_warning(": SP_ATTR_UNITS_PER_EM: %f", number); number = helperfns_read_number(value); if (number != face->stemv){ face->stemv = number; -g_warning(": SP_ATTR_STEMV: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -604,7 +570,6 @@ g_warning(": SP_ATTR_STEMV: %f", number); number = helperfns_read_number(value); if (number != face->stemh){ face->stemh = number; -g_warning(": SP_ATTR_STEMH: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -612,7 +577,6 @@ g_warning(": SP_ATTR_STEMH: %f", number); number = helperfns_read_number(value); if (number != face->slope){ face->slope = number; -g_warning(": SP_ATTR_SLOPE: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -620,7 +584,6 @@ g_warning(": SP_ATTR_SLOPE: %f", number); number = helperfns_read_number(value); if (number != face->cap_height){ face->cap_height = number; -g_warning(": SP_ATTR_CAP_HEIGHT: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -628,7 +591,6 @@ g_warning(": SP_ATTR_CAP_HEIGHT: %f", number); number = helperfns_read_number(value); if (number != face->x_height){ face->x_height = number; -g_warning(": SP_ATTR_X_HEIGHT: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -636,7 +598,6 @@ g_warning(": SP_ATTR_X_HEIGHT: %f", number); number = helperfns_read_number(value); if (number != face->accent_height){ face->accent_height = number; -g_warning(": SP_ATTR_ACCENT_HEIGHT: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -644,7 +605,6 @@ g_warning(": SP_ATTR_ACCENT_HEIGHT: %f", number); number = helperfns_read_number(value); if (number != face->ascent){ face->ascent = number; -g_warning(": SP_ATTR_ASCENT: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -652,7 +612,6 @@ g_warning(": SP_ATTR_ASCENT: %f", number); number = helperfns_read_number(value); if (number != face->descent){ face->descent = number; -g_warning(": SP_ATTR_DESCENT: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -660,7 +619,6 @@ g_warning(": SP_ATTR_DESCENT: %f", number); number = helperfns_read_number(value); if (number != face->ideographic){ face->ideographic = number; -g_warning(": SP_ATTR_IDEOGRAPHIC: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -668,7 +626,6 @@ g_warning(": SP_ATTR_IDEOGRAPHIC: %f", number); number = helperfns_read_number(value); if (number != face->alphabetic){ face->alphabetic = number; -g_warning(": SP_ATTR_ALPHABETIC: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -676,7 +633,6 @@ g_warning(": SP_ATTR_ALPHABETIC: %f", number); number = helperfns_read_number(value); if (number != face->mathematical){ face->mathematical = number; -g_warning(": SP_ATTR_MATHEMATICAL: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -684,7 +640,6 @@ g_warning(": SP_ATTR_MATHEMATICAL: %f", number); number = helperfns_read_number(value); if (number != face->hanging){ face->hanging = number; -g_warning(": SP_ATTR_HANGING: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -692,7 +647,6 @@ g_warning(": SP_ATTR_HANGING: %f", number); number = helperfns_read_number(value); if (number != face->v_ideographic){ face->v_ideographic = number; -g_warning(": SP_ATTR_V_IDEOGRAPHIC: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -700,7 +654,6 @@ g_warning(": SP_ATTR_V_IDEOGRAPHIC: %f", number); number = helperfns_read_number(value); if (number != face->v_alphabetic){ face->v_alphabetic = number; -g_warning(": SP_ATTR_V_ALPHABETIC: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -708,7 +661,6 @@ g_warning(": SP_ATTR_V_ALPHABETIC: %f", number); number = helperfns_read_number(value); if (number != face->v_mathematical){ face->v_mathematical = number; -g_warning(": SP_ATTR_V_MATHEMATICAL: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -716,7 +668,6 @@ g_warning(": SP_ATTR_V_MATHEMATICAL: %f", number); number = helperfns_read_number(value); if (number != face->v_hanging){ face->v_hanging = number; -g_warning(": SP_ATTR_V_HANGING: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -724,7 +675,6 @@ g_warning(": SP_ATTR_V_HANGING: %f", number); number = helperfns_read_number(value); if (number != face->underline_position){ face->underline_position = number; -g_warning(": SP_ATTR_UNDERLINE_POSITION: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -732,7 +682,6 @@ g_warning(": SP_ATTR_UNDERLINE_POSITION: %f", number); number = helperfns_read_number(value); if (number != face->underline_thickness){ face->underline_thickness = number; -g_warning(": SP_ATTR_UNDERLINE_THICKNESS: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -740,7 +689,6 @@ g_warning(": SP_ATTR_UNDERLINE_THICKNESS: %f", number); number = helperfns_read_number(value); if (number != face->strikethrough_position){ face->strikethrough_position = number; -g_warning(": SP_ATTR_STRIKETHROUGH_POSITION: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -748,7 +696,6 @@ g_warning(": SP_ATTR_STRIKETHROUGH_POSITION: %f", number); number = helperfns_read_number(value); if (number != face->strikethrough_thickness){ face->strikethrough_thickness = number; -g_warning(": SP_ATTR_STRIKETHROUGH_THICKNESS: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -756,7 +703,6 @@ g_warning(": SP_ATTR_STRIKETHROUGH_THICKNESS: %f", number); number = helperfns_read_number(value); if (number != face->overline_position){ face->overline_position = number; -g_warning(": SP_ATTR_OVERLINE_POSITION: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -764,7 +710,6 @@ g_warning(": SP_ATTR_OVERLINE_POSITION: %f", number); number = helperfns_read_number(value); if (number != face->overline_thickness){ face->overline_thickness = number; -g_warning(": SP_ATTR_OVERLINE_THICKNESS: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; diff --git a/src/sp-font.cpp b/src/sp-font.cpp index 789d3a62a..f586e6c62 100644 --- a/src/sp-font.cpp +++ b/src/sp-font.cpp @@ -109,18 +109,6 @@ static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML: static void sp_font_children_modified(SPFont *sp_font) { - SPObject* node = sp_font->children; - for(;node;node=node->next){ - if (SP_IS_GLYPH(node)){ - g_warning("We have a childnode:\n\td=%s\n\tvert-origin-x=%f\n\tvert-origin-y=%f\n\tvert-adv-y=%f", ((SPGlyph*)node)->d, ((SPGlyph*)node)->vert_origin_x, ((SPGlyph*)node)->vert_origin_y, ((SPGlyph*)node)->vert_adv_y ); - - } - if (SP_IS_MISSING_GLYPH(node)){ -g_warning("We have a childnode:\n\td=%s\n\thoriz-origin-x=%f\n\thoriz-origin-y=%f\n\thoriz-adv-x=%f", ((SPMissingGlyph*)node)->d, ((SPMissingGlyph*)node)->vert_origin_x, ((SPMissingGlyph*)node)->vert_origin_y, ((SPMissingGlyph*)node)->vert_adv_y ); - } -// if (SP_IS_FONT_FACE_SRC(node)){ -// } - } } /** @@ -173,7 +161,6 @@ static void sp_font_set(SPObject *object, unsigned int key, const gchar *value) number = helperfns_read_number(value); if (number != font->horiz_origin_x){ font->horiz_origin_x = number; -g_warning(": SP_ATTR_HORIZ_ORIGIN_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -181,7 +168,6 @@ g_warning(": SP_ATTR_HORIZ_ORIGIN_X: %f", number); number = helperfns_read_number(value); if (number != font->horiz_origin_y){ font->horiz_origin_y = number; -g_warning(": SP_ATTR_HORIZ_ORIGIN_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -189,7 +175,6 @@ g_warning(": SP_ATTR_HORIZ_ORIGIN_Y: %f", number); number = helperfns_read_number(value); if (number != font->horiz_adv_x){ font->horiz_adv_x = number; -g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -197,7 +182,6 @@ g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); number = helperfns_read_number(value); if (number != font->vert_origin_x){ font->vert_origin_x = number; -g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -205,7 +189,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); number = helperfns_read_number(value); if (number != font->vert_origin_y){ font->vert_origin_y = number; -g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -213,7 +196,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); number = helperfns_read_number(value); if (number != font->vert_adv_y){ font->vert_adv_y = number; -g_warning(": SP_ATTR_VERT_ADV_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; diff --git a/src/sp-glyph-kerning.cpp b/src/sp-glyph-kerning.cpp index b3d0e8cba..bd5340b6b 100644 --- a/src/sp-glyph-kerning.cpp +++ b/src/sp-glyph-kerning.cpp @@ -150,38 +150,32 @@ static void sp_glyph_kerning_set(SPObject *object, unsigned int key, const gchar { SPGlyphKerning * glyphkern = (SPGlyphKerning*) object; //even if it is a VKern this will work. I did it this way just to avoind warnings. double number; - const char* tag = (SP_IS_HKERN(object) ? "hkern" : "vkern"); switch (key) { case SP_ATTR_U1: if (glyphkern->u1) delete glyphkern->u1; glyphkern->u1 = new UnicodeRange(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning("<%s>: SP_ATTR_U1: %s", tag, value); - break; + break; case SP_ATTR_U2: if (glyphkern->u2) delete glyphkern->u2; glyphkern->u2 = new UnicodeRange(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning("<%s>: SP_ATTR_U2: %s", tag, value); - break; + break; case SP_ATTR_G1: if (glyphkern->g1) delete glyphkern->g1; glyphkern->g1 = new GlyphNames(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning("<%s>: SP_ATTR_G1: %s", tag, value); - break; + break; case SP_ATTR_G2: if (glyphkern->g2) delete glyphkern->g2; glyphkern->g2 = new GlyphNames(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning("<%s>: SP_ATTR_G2: %s", tag, value); break; case SP_ATTR_K: number = helperfns_read_number(value); if (number != glyphkern->k){ glyphkern->k = number; -g_warning("<%s>: SP_ATTR_K: %f", tag, number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -191,7 +185,6 @@ g_warning("<%s>: SP_ATTR_K: %f", tag, number); } break; } -///should free tag? } /** @@ -206,7 +199,6 @@ sp_glyph_kerning_update(SPObject *object, SPCtx *ctx, guint flags) if (flags & SP_OBJECT_MODIFIED_FLAG) { /* do something to trigger redisplay, updates? */ sp_object_read_attr(object, "u1"); - sp_object_read_attr(object, "g1"); sp_object_read_attr(object, "u2"); sp_object_read_attr(object, "g2"); sp_object_read_attr(object, "k"); diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp index 5b2cc2dec..fb7cea15d 100644 --- a/src/sp-glyph.cpp +++ b/src/sp-glyph.cpp @@ -154,19 +154,16 @@ static void sp_glyph_set(SPObject *object, unsigned int key, const gchar *value) if (glyph->unicode) g_free(glyph->unicode); glyph->unicode = g_strdup(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning(": SP_ATTR_UNICODE: %s", value); - break; + break; case SP_ATTR_GLYPH_NAME: if (glyph->glyph_name) g_free(glyph->glyph_name); glyph->glyph_name = g_strdup(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning(": SP_ATTR_GLYPH_NAME: %s", value); - break; + break; case SP_ATTR_D: if (glyph->d) g_free(glyph->d); glyph->d = g_strdup(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning(": SP_ATTR_D: %s", value); break; case SP_ATTR_ORIENTATION: orient = sp_glyph_read_orientation(value); @@ -174,7 +171,6 @@ g_warning(": SP_ATTR_D: %s", value); glyph->orientation = orient; object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -g_warning(": SP_ATTR_ORIENTATION: %d", orient); break; case SP_ATTR_ARABIC_FORM: form = sp_glyph_read_arabic_form(value); @@ -182,19 +178,16 @@ g_warning(": SP_ATTR_ORIENTATION: %d", orient); glyph->arabic_form = form; object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -g_warning(": SP_ATTR_ARABIC_FORM: %d", glyph->arabic_form); break; case SP_ATTR_LANG: if (glyph->lang) g_free(glyph->lang); glyph->lang = g_strdup(value); -g_warning(": SP_ATTR_LANG: %s", value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_HORIZ_ADV_X: number = helperfns_read_number(value); if (number != glyph->horiz_adv_x){ glyph->horiz_adv_x = number; -g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -202,7 +195,6 @@ g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_origin_x){ glyph->vert_origin_x = number; -g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -210,7 +202,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_origin_y){ glyph->vert_origin_y = number; -g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -218,7 +209,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_adv_y){ glyph->vert_adv_y = number; -g_warning(": SP_ATTR_VERT_ADV_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; diff --git a/src/sp-missing-glyph.cpp b/src/sp-missing-glyph.cpp index 7ed6c9bb6..ffc29a71e 100644 --- a/src/sp-missing-glyph.cpp +++ b/src/sp-missing-glyph.cpp @@ -109,13 +109,11 @@ static void sp_missing_glyph_set(SPObject *object, unsigned int key, const gchar if (glyph->d) g_free(glyph->d); glyph->d = g_strdup(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); -g_warning(": SP_ATTR_D: %s", value); break; case SP_ATTR_HORIZ_ADV_X: number = helperfns_read_number(value); if (number != glyph->horiz_adv_x){ glyph->horiz_adv_x = number; -g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -123,7 +121,6 @@ g_warning(": SP_ATTR_HORIZ_ADV_X: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_origin_x){ glyph->vert_origin_x = number; -g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -131,7 +128,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_X: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_origin_y){ glyph->vert_origin_y = number; -g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break; @@ -139,7 +135,6 @@ g_warning(": SP_ATTR_VERT_ORIGIN_Y: %f", number); number = helperfns_read_number(value); if (number != glyph->vert_adv_y){ glyph->vert_adv_y = number; -g_warning(": SP_ATTR_VERT_ADV_Y: %f", number); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } break;