diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-12-04 09:51:15 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-12-04 09:51:15 +0000 |
| commit | 2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e (patch) | |
| tree | 52a0994d8a30aaa8f867073d1cd9ce575f490de8 /src/ui/widget | |
| parent | changes_2012-11_28.patch (diff) | |
| parent | wix installer: create msi filename from version sing in src/inkscape.rc, add ... (diff) | |
| download | inkscape-2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e.tar.gz inkscape-2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e.zip | |
merge from trunk (r11929)
[win32] Please update to latest devlibs for Windows (r41)
(bzr r11668.1.44)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/frame.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/gimpspinscale.c | 28 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 13 | ||||
| -rw-r--r-- | src/ui/widget/unit-menu.cpp | 14 |
4 files changed, 12 insertions, 45 deletions
diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp index b2968f806..eaa4336bb 100644 --- a/src/ui/widget/frame.cpp +++ b/src/ui/widget/frame.cpp @@ -56,9 +56,7 @@ Frame::set_label(const Glib::ustring &label_text, gboolean label_bold /*= TRUE*/ void Frame::set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right) { -#if WITH_GTKMM_2_24 _alignment.set_padding(padding_top, padding_bottom, padding_left, padding_right); -#endif } Gtk::Label const * diff --git a/src/ui/widget/gimpspinscale.c b/src/ui/widget/gimpspinscale.c index df39b9644..f9f9a3807 100644 --- a/src/ui/widget/gimpspinscale.c +++ b/src/ui/widget/gimpspinscale.c @@ -408,21 +408,20 @@ static gboolean gimp_spin_scale_expose (GtkWidget *widget, GdkEventExpose *event) #endif { - GimpSpinScalePrivate *private = GET_PRIVATE (widget); - GtkStyle *style = gtk_widget_get_style (widget); - + GimpSpinScalePrivate *private = GET_PRIVATE (widget); #if WITH_GTKMM_3_0 + GtkStyleContext *style = gtk_widget_get_style_context(widget); GtkAllocation allocation; + GdkRGBA color; cairo_save (cr); GTK_WIDGET_CLASS (parent_class)->draw (widget, cr); cairo_restore (cr); gtk_widget_get_allocation (widget, &allocation); - - #else + GtkStyle *style = gtk_widget_get_style (widget); cairo_t *cr; gint w; @@ -432,12 +431,7 @@ static gboolean gdk_cairo_region (cr, event->region); cairo_clip (cr); -#if GTK_CHECK_VERSION(2, 24,0) w = gdk_window_get_width (event->window); -#else - gdk_drawable_get_size (event->window, &w, NULL); -#endif - #endif cairo_set_line_width (cr, 1.0); @@ -504,12 +498,17 @@ static gboolean #if WITH_GTKMM_3_0 cairo_move_to (cr, layout_offset_x, text_area.y + layout_offset_y-3); + + gtk_style_context_get_color (style, gtk_widget_get_state_flags (widget), + &color); + + gdk_cairo_set_source_rgba (cr, &color); #else cairo_move_to (cr, layout_offset_x, layout_offset_y-3); -#endif - + gdk_cairo_set_source_color (cr, &style->text[gtk_widget_get_state (widget)]); +#endif pango_cairo_show_layout (cr, private->layout); } @@ -687,12 +686,7 @@ gimp_spin_scale_change_value (GtkWidget *widget, gimp_spin_scale_get_limits (GIMP_SPIN_SCALE (widget), &lower, &upper); -#if GTK_CHECK_VERSION(2, 24,0) width = gdk_window_get_width (text_window); -#else - gdk_drawable_get_size (text_window, &width, NULL); -#endif - #endif diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index b793893c7..e7e317d11 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -378,12 +378,7 @@ ZoomCorrRuler::redraw() { Glib::RefPtr<Gdk::Window> window = get_window(); Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context(); -#if WITH_GTKMM_2_24 int w = window->get_width(); -#else - int w, h; - window->get_size(w, h); -#endif _drawing_width = w - _border * 2; cr->set_source_rgb(1.0, 1.0, 1.0); @@ -597,11 +592,7 @@ void PrefCombo::init(Glib::ustring const &prefs_path, for (int i = 0 ; i < num_items; ++i) { -#if WITH_GTKMM_2_24 this->append(labels[i]); -#else - this->append_text(labels[i]); -#endif _values.push_back(values[i]); if (value == values[i]) row = i; @@ -623,11 +614,7 @@ void PrefCombo::init(Glib::ustring const &prefs_path, for (int i = 0 ; i < num_items; ++i) { -#if WITH_GTKMM_2_24 this->append(labels[i]); -#else - this->append_text(labels[i]); -#endif _ustr_values.push_back(values[i]); if (value == values[i]) row = i; diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 86e8c9e58..18b7bcab9 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -34,11 +34,7 @@ bool UnitMenu::setUnitType(UnitType unit_type) UnitTable::UnitMap::iterator iter = m.begin(); while(iter != m.end()) { Glib::ustring text = (*iter).first; -#if WITH_GTKMM_2_24 append(text); -#else - append_text(text); -#endif ++iter; } _type = unit_type; @@ -49,11 +45,7 @@ bool UnitMenu::setUnitType(UnitType unit_type) bool UnitMenu::resetUnitType(UnitType unit_type) { -#if WITH_GTKMM_2_24 - remove_all(); -#else - clear_items(); -#endif + remove_all(); return setUnitType(unit_type); } @@ -61,11 +53,7 @@ bool UnitMenu::resetUnitType(UnitType unit_type) void UnitMenu::addUnit(Unit const& u) { _unit_table.addUnit(u, false); -#if WITH_GTKMM_2_24 append(u.abbr); -#else - append_text(u.abbr); -#endif } Unit UnitMenu::getUnit() const |
