diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-05 11:35:56 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-05 11:35:56 +0000 |
| commit | e0ec03ca4929f63579654b8fe281a2638c8d4ceb (patch) | |
| tree | b5e04534abb9d92c4a9078eb10c2666f5c2bf438 /src/helper/unit-menu.cpp | |
| parent | Backward compatibility for gdk_device_get_has_cursor (diff) | |
| download | inkscape-e0ec03ca4929f63579654b8fe281a2638c8d4ceb.tar.gz inkscape-e0ec03ca4929f63579654b8fe281a2638c8d4ceb.zip | |
More GSEAL fixes
(bzr r10845)
Diffstat (limited to 'src/helper/unit-menu.cpp')
| -rw-r--r-- | src/helper/unit-menu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp index a87ac4abd..2757536a2 100644 --- a/src/helper/unit-menu.cpp +++ b/src/helper/unit-menu.cpp @@ -181,7 +181,7 @@ spus_unit_activate(GtkWidget *widget, SPUnitSelector *us) /* Recalculate adjustments. */ for (GSList *l = us->adjustments; l != NULL; l = g_slist_next(l)) { GtkAdjustment *adj = GTK_ADJUSTMENT(l->data); - gdouble val = adj->value; + gdouble val = gtk_adjustment_get_value (adj); #ifdef UNIT_SELECTOR_VERBOSE g_print("Old val %g ... ", val); #endif @@ -189,7 +189,7 @@ spus_unit_activate(GtkWidget *widget, SPUnitSelector *us) #ifdef UNIT_SELECTOR_VERBOSE g_print("new val %g\n", val); #endif - adj->value = val; + gtk_adjustment_set_value (adj, val); } /* need to separate the value changing from the notification * or else the unit changes can break the calculations */ @@ -295,7 +295,7 @@ sp_unit_selector_set_unit(SPUnitSelector *us, SPUnit const *unit) /* Recalculate adjustments */ for (GSList *l = us->adjustments; l != NULL; l = l->next) { GtkAdjustment *adj = GTK_ADJUSTMENT(l->data); - gdouble const val = sp_convert_distance_full(adj->value, *old, *unit); + gdouble const val = sp_convert_distance_full(gtk_adjustment_get_value (adj), *old, *unit); gtk_adjustment_set_value(adj, val); } } @@ -340,10 +340,10 @@ sp_unit_selector_update_test(SPUnitSelector const *selector) double sp_unit_selector_get_value_in_pixels(SPUnitSelector const *selector, GtkAdjustment *adj) { - g_return_val_if_fail(selector != NULL, adj->value); - g_return_val_if_fail(SP_IS_UNIT_SELECTOR(selector), adj->value); + g_return_val_if_fail(selector != NULL, gtk_adjustment_get_value (adj)); + g_return_val_if_fail(SP_IS_UNIT_SELECTOR(selector), gtk_adjustment_get_value (adj)); - return sp_units_get_pixels(adj->value, *(selector->unit)); + return sp_units_get_pixels(gtk_adjustment_get_value (adj), *(selector->unit)); } void |
