diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-04-29 01:00:39 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-04-29 01:00:39 +0000 |
| commit | eca72e61451c8deae7f2f5fbaa9885aec946c790 (patch) | |
| tree | 76d436abbbe469e0bc3b4a254e0ab6e5b4525e3b /src/widgets | |
| parent | Update to trunk (diff) | |
| parent | when removing LPE, with 'flattening' option, don't recalculate/rewrite ellips... (diff) | |
| download | inkscape-eca72e61451c8deae7f2f5fbaa9885aec946c790.tar.gz inkscape-eca72e61451c8deae7f2f5fbaa9885aec946c790.zip | |
Update to trunk and fix issues
(bzr r13090.1.67)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/paint-selector.h | 2 | ||||
| -rw-r--r-- | src/widgets/stroke-style.cpp | 7 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 30 |
3 files changed, 23 insertions, 16 deletions
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h index d3b3f4116..d6ad3f50c 100644 --- a/src/widgets/paint-selector.h +++ b/src/widgets/paint-selector.h @@ -23,7 +23,7 @@ class SPGradient; class SPDesktop; class SPPattern; -struct SPStyle; +class SPStyle; #define SP_TYPE_PAINT_SELECTOR (sp_paint_selector_get_type ()) #define SP_PAINT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_PAINT_SELECTOR, SPPaintSelector)) diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index a4cca9472..0e0a4fd72 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -581,7 +581,8 @@ StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item) Glib::ustring urlId = Glib::ustring::format("url(#", marker->getRepr()->attribute("id"), ")"); unsigned int refs = 0; for (int i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) { - if (item->style->marker[i].set && !strcmp(urlId.c_str(), item->style->marker[i].value)) { + if (item->style->marker_ptrs[i]->set && + !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value)) { refs++; } } @@ -1176,11 +1177,11 @@ StrokeStyle::updateAllMarkers(GSList const *objects) combo->setDesktop(desktop); - if (object->style->marker[keyloc[i].loc].value != NULL && !all_texts) { + if (object->style->marker_ptrs[keyloc[i].loc]->value != NULL && !all_texts) { // If the object has this type of markers, // Extract the name of the marker that the object uses - SPObject *marker = getMarkerObj(object->style->marker[keyloc[i].loc].value, object->document); + SPObject *marker = getMarkerObj(object->style->marker_ptrs[keyloc[i].loc]->value, object->document); // Scroll the combobox to that marker combo->set_current(marker); diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 349fefa12..3a4f315da 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -72,20 +72,20 @@ using Inkscape::UI::PrefPusher; static void sp_print_font( SPStyle *query ) { - bool family_set = query->text->font_family.set; + bool family_set = query->font_family.set; bool style_set = query->font_style.set; - bool fontspec_set = query->text->font_specification.set; + bool fontspec_set = query->font_specification.set; std::cout << " Family set? " << family_set << " Style set? " << style_set << " FontSpec set? " << fontspec_set << std::endl; std::cout << " Family: " - << (query->text->font_family.value ? query->text->font_family.value : "No value") + << (query->font_family.value ? query->font_family.value : "No value") << " Style: " << query->font_style.computed << " Weight: " << query->font_weight.computed << " FontSpec: " - << (query->text->font_specification.value ? query->text->font_specification.value : "No value") + << (query->font_specification.value ? query->font_specification.value : "No value") << std::endl; std::cout << " LineHeight: " << query->line_height.computed << " WordSpacing: " << query->word_spacing.computed @@ -146,6 +146,13 @@ static void sp_text_fontfamily_value_changed( Ink_ComboBoxEntry_Action *act, GOb std::cout << " New active: " << act->active << std::endl; #endif if( new_family.compare( fontlister->get_font_family() ) != 0 ) { + // Changed font-family + + if( act->active == -1 ) { + // New font-family, not in document, not on system (could be fallback list) + fontlister->insert_font_family( new_family ); + act->active = 0; // New family is always at top of list. + } std::pair<Glib::ustring,Glib::ustring> ui = fontlister->set_font_family( act->active ); // active text set in sp_text_toolbox_selection_changed() @@ -923,7 +930,6 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/ } // If we have valid query data for text (font-family, font-specification) set toolbar accordingly. - if (query->text) { // Size (average of text selected) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -1051,11 +1057,11 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/ ege_select_one_action_set_active( textOrientationAction, activeButton2 ); - } // if( query->text ) + } #ifdef DEBUG_TEXT std::cout << " GUI: fontfamily.value: " - << (query->text->font_family.value ? query->text->font_family.value : "No value") + << (query->font_family.value ? query->font_family.value : "No value") << std::endl; std::cout << " GUI: font_size.computed: " << query->font_size.computed << std::endl; std::cout << " GUI: font_weight.computed: " << query->font_weight.computed << std::endl; @@ -1167,15 +1173,15 @@ static void sp_text_toolbox_select_cb( GtkEntry* entry, GtkEntryIconPosition /*p SPItem *item = SP_ITEM(i->data); SPStyle *style = item->style; - if (style && style->text) { + if (style) { Glib::ustring family_style; - if (style->text->font_family.set) { - family_style = style->text->font_family.value; + if (style->font_family.set) { + family_style = style->font_family.value; //std::cout << " family style from font_family: " << family_style << std::endl; } - else if (style->text->font_specification.set) { - family_style = style->text->font_specification.value; + else if (style->font_specification.set) { + family_style = style->font_specification.value; //std::cout << " family style from font_spec: " << family_style << std::endl; } |
