summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-04-26 23:27:03 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-04-26 23:27:03 +0000
commitcf159c3d0415a1a761eb7ca760256cd224927d3c (patch)
tree03cfd9a7f543ec07377c96ed23b9f5b0626a6e2a /src/widgets
parentRedesign of the BSpline LPE widgets (diff)
parentClean up of style code: Patch from suv: SPStyle: struct -> class (diff)
downloadinkscape-cf159c3d0415a1a761eb7ca760256cd224927d3c.tar.gz
inkscape-cf159c3d0415a1a761eb7ca760256cd224927d3c.zip
update to trunk
(bzr r11950.1.336)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/paint-selector.h2
-rw-r--r--src/widgets/stroke-style.cpp7
-rw-r--r--src/widgets/text-toolbar.cpp23
3 files changed, 16 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 7b59fa633..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
@@ -930,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();
@@ -1058,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;
@@ -1174,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;
}