summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-11-26 10:33:19 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-11-26 10:33:19 +0000
commit4af19c56cf90e31a0d800821e8daf7fb08108e94 (patch)
tree4ca77fb82df33bbc9aef4660f7b2da51ff32122d /src/ui/widget
parentUpdated Russian translation (diff)
downloadinkscape-4af19c56cf90e31a0d800821e8daf7fb08108e94.tar.gz
inkscape-4af19c56cf90e31a0d800821e8daf7fb08108e94.zip
Drop support for GTK+ < 2.24
Fixed bugs: - https://launchpad.net/bugs/1069024 (bzr r11907)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/frame.cpp2
-rw-r--r--src/ui/widget/gimpspinscale.c10
-rw-r--r--src/ui/widget/preferences-widget.cpp13
-rw-r--r--src/ui/widget/unit-menu.cpp14
4 files changed, 1 insertions, 38 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..222a8aa1d 100644
--- a/src/ui/widget/gimpspinscale.c
+++ b/src/ui/widget/gimpspinscale.c
@@ -432,12 +432,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);
@@ -687,12 +682,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