diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-11-26 10:33:19 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-11-26 10:33:19 +0000 |
| commit | 4af19c56cf90e31a0d800821e8daf7fb08108e94 (patch) | |
| tree | 4ca77fb82df33bbc9aef4660f7b2da51ff32122d /src/ui | |
| parent | Updated Russian translation (diff) | |
| download | inkscape-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')
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 19 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 23 | ||||
| -rw-r--r-- | src/ui/dialog/glyphs.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/input.cpp | 21 | ||||
| -rw-r--r-- | src/ui/dialog/ocaldialogs.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/spellcheck.cpp | 14 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 11 | ||||
| -rw-r--r-- | src/ui/dialog/symbols.cpp | 17 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 27 | ||||
| -rw-r--r-- | src/ui/widget/frame.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/gimpspinscale.c | 10 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 13 | ||||
| -rw-r--r-- | src/ui/widget/unit-menu.cpp | 14 |
16 files changed, 3 insertions, 216 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index cd1ce1471..dbd06d9e8 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -1040,7 +1040,6 @@ AlignAndDistribute::AlignAndDistribute() //Rest of the widgetry -#if WITH_GTKMM_2_24 _combo.append(_("Last selected")); _combo.append(_("First selected")); _combo.append(_("Biggest object")); @@ -1048,15 +1047,6 @@ AlignAndDistribute::AlignAndDistribute() _combo.append(_("Page")); _combo.append(_("Drawing")); _combo.append(_("Selection")); -#else - _combo.append_text(_("Last selected")); - _combo.append_text(_("First selected")); - _combo.append_text(_("Biggest object")); - _combo.append_text(_("Smallest object")); - _combo.append_text(_("Page")); - _combo.append_text(_("Drawing")); - _combo.append_text(_("Selection")); -#endif _combo.set_active(prefs->getInt("/dialogs/align/align-to", 6)); _combo.signal_changed().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_ref_change)); @@ -1154,21 +1144,12 @@ void AlignAndDistribute::on_selgrp_toggled(){ void AlignAndDistribute::setMode(bool nodeEdit) { //Act on widgets used in node mode -#if WITH_GTKMM_2_24 void ( Gtk::Widget::*mNode) () = nodeEdit ? &Gtk::Widget::show_all : &Gtk::Widget::hide; //Act on widgets used in selection mode void ( Gtk::Widget::*mSel) () = nodeEdit ? &Gtk::Widget::hide : &Gtk::Widget::show_all; -#else - void ( Gtk::Widget::*mNode) () = nodeEdit ? - &Gtk::Widget::show_all : &Gtk::Widget::hide_all; - - //Act on widgets used in selection mode - void ( Gtk::Widget::*mSel) () = nodeEdit ? - &Gtk::Widget::hide_all : &Gtk::Widget::show_all; -#endif ((_alignFrame).*(mSel))(); ((_distributeFrame).*(mSel))(); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index e681147aa..ab1e8fbd8 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -333,21 +333,13 @@ void DocumentProperties::build_snap() #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) /// Populates the available color profiles combo box void DocumentProperties::populate_available_profiles(){ -#if WITH_GTKMM_2_24 _combo_avail.remove_all(); // Clear any existing items in the combo box -#else - _combo_avail.clear_items(); // Clear any existing items in the combo box -#endif // Iterate through the list of profiles and add the name to the combo box. std::vector<std::pair<Glib::ustring, Glib::ustring> > pairs = ColorProfile::getProfileFilesWithNames(); for ( std::vector<std::pair<Glib::ustring, Glib::ustring> >::const_iterator it = pairs.begin(); it != pairs.end(); ++it ) { Glib::ustring name = it->second; -#if WITH_GTKMM_2_24 _combo_avail.append(name); -#else - _combo_avail.append_text(name); -#endif } } @@ -1160,11 +1152,7 @@ void DocumentProperties::build_gridspage() _grids_hbox_crea.pack_start(_grids_button_new, true, true); for (gint t = 0; t <= GRID_MAXTYPENR; t++) { -#if WITH_GTKMM_2_24 _grids_combo_gridtype.append( CanvasGrid::getName( (GridType) t ) ); -#else - _grids_combo_gridtype.append_text( CanvasGrid::getName( (GridType) t ) ); -#endif } _grids_combo_gridtype.set_active_text( CanvasGrid::getName(GRID_RECTANGULAR) ); diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 90d9855ec..553acac84 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -1183,11 +1183,7 @@ void FileSaveDialogImplGtk::addFileType(Glib::ustring name, Glib::ustring patter guessType.name = name; guessType.pattern = pattern; guessType.extension = NULL; - #if WITH_GTKMM_2_24 fileTypeComboBox.append(guessType.name); - #else - fileTypeComboBox.append_text(guessType.name); - #endif fileTypes.push_back(guessType); @@ -1216,11 +1212,7 @@ void FileSaveDialogImplGtk::createFileTypeMenu() knownExtensions.insert( extension.casefold() ); fileDialogExtensionToPattern (type.pattern, extension); type.extension= omod; -#if WITH_GTKMM_2_24 fileTypeComboBox.append(type.name); -#else - fileTypeComboBox.append_text(type.name); -#endif fileTypes.push_back(type); } @@ -1229,11 +1221,7 @@ void FileSaveDialogImplGtk::createFileTypeMenu() guessType.name = _("Guess from extension"); guessType.pattern = "*"; guessType.extension = NULL; -#if WITH_GTKMM_2_24 fileTypeComboBox.append(guessType.name); -#else - fileTypeComboBox.append_text(guessType.name); -#endif fileTypes.push_back(guessType); diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index b00dd042f..9a430114d 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1058,11 +1058,7 @@ private: void update() { -#if WITH_GTKMM_2_24 - _box.hide(); -#else - _box.hide_all(); -#endif + _box.hide(); _box.show(); _light_box.show_all(); @@ -1128,13 +1124,8 @@ FilterEffectsDialog::FilterModifier::FilterModifier(FilterEffectsDialog& d) if(col) col->add_attribute(_cell_toggle.property_active(), _columns.sel); _list.append_column_editable(_("_Filter"), _columns.label); -#if WITH_GTKMM_2_24 ((Gtk::CellRendererText*)_list.get_column(1)->get_first_cell())-> signal_edited().connect(sigc::mem_fun(*this, &FilterEffectsDialog::FilterModifier::on_name_edited)); -#else - ((Gtk::CellRendererText*)_list.get_column(1)->get_first_cell_renderer())-> - signal_edited().connect(sigc::mem_fun(*this, &FilterEffectsDialog::FilterModifier::on_name_edited)); -#endif sw->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); sw->set_shadow_type(Gtk::SHADOW_IN); @@ -2648,11 +2639,7 @@ void FilterEffectsDialog::update_filter_general_settings_view() } else { std::vector<Gtk::Widget*> vect = _settings_tab2.get_children(); -#if WITH_GTKMM_2_24 vect[0]->hide(); -#else - vect[0]->hide_all(); -#endif _no_filter_selected.show(); } @@ -2671,11 +2658,7 @@ void FilterEffectsDialog::update_settings_view() std::vector<Gtk::Widget*> vect1 = _settings_tab1.get_children(); for(unsigned int i=0; i<vect1.size(); i++) -#if WITH_GTKMM_2_24 vect1[i]->hide(); -#else - vect1[i]->hide_all(); -#endif _empty_settings.show(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -2699,11 +2682,7 @@ void FilterEffectsDialog::update_settings_view() //Second Tab std::vector<Gtk::Widget*> vect2 = _settings_tab2.get_children(); -#if WITH_GTKMM_2_24 vect2[0]->hide(); -#else - vect2[0]->hide_all(); -#endif _no_filter_selected.show(); SPFilter* filter = _filter_modifier.get_selected_filter(); diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp index 1eed8d804..eec904ee4 100644 --- a/src/ui/dialog/glyphs.cpp +++ b/src/ui/dialog/glyphs.cpp @@ -364,11 +364,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) : scriptCombo = new Gtk::ComboBoxText(); for (std::map<GUnicodeScript, Glib::ustring>::iterator it = getScriptToName().begin(); it != getScriptToName().end(); ++it) { -#if WITH_GTKMM_2_24 scriptCombo->append(it->second); -#else - scriptCombo->append_text(it->second); -#endif } scriptCombo->set_active_text(getScriptToName()[G_UNICODE_SCRIPT_INVALID_CODE]); @@ -393,11 +389,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) : rangeCombo = new Gtk::ComboBoxText(); for ( std::vector<NamedRange>::iterator it = getRanges().begin(); it != getRanges().end(); ++it ) { -#if WITH_GTKMM_2_24 rangeCombo->append(it->second); -#else - rangeCombo->append_text(it->second); -#endif } rangeCombo->set_active_text(getRanges()[1].second); diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 03366a0c3..291059999 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -986,18 +986,10 @@ void InkscapePreferences::initPageIO() Glib::ustring current = prefs->getString( "/options/displayprofile/uri" ); gint index = 0; -#if WITH_GTKMM_2_24 _cms_display_profile.append(_("<none>")); -#else - _cms_display_profile.append_text(_("<none>")); -#endif index++; for ( std::vector<Glib::ustring>::iterator it = names.begin(); it != names.end(); ++it ) { -#if WITH_GTKMM_2_24 _cms_display_profile.append( *it ); -#else - _cms_display_profile.append_text( *it ); -#endif Glib::ustring path = CMSSystem::getPathForProfile(*it); if ( !path.empty() && path == current ) { _cms_display_profile.set_active(index); @@ -1012,11 +1004,7 @@ void InkscapePreferences::initPageIO() current = prefs->getString("/options/softproof/uri"); index = 0; for ( std::vector<Glib::ustring>::iterator it = names.begin(); it != names.end(); ++it ) { -#if WITH_GTKMM_2_24 _cms_proof_profile.append( *it ); -#else - _cms_proof_profile.append_text( *it ); -#endif Glib::ustring path = CMSSystem::getPathForProfile(*it); if ( !path.empty() && path == current ) { _cms_proof_profile.set_active(index); diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index b3c1bddfd..7e2b0a1e1 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -609,11 +609,7 @@ InputDialogImpl::InputDialogImpl() : ::Gtk::FILL, ::Gtk::SHRINK); -#if WITH_GTKMM_2_24 linkCombo.append(_("None")); -#else - linkCombo.append_text(_("None")); -#endif linkCombo.set_active_text(_("None")); linkCombo.set_sensitive(false); linkConnection = linkCombo.signal_changed().connect(sigc::mem_fun(*this, &InputDialogImpl::linkComboChanged)); @@ -1282,24 +1278,15 @@ void InputDialogImpl::resyncToSelection() { devDetails.set_sensitive(true); linkConnection.block(); -#if WITH_GTKMM_2_24 linkCombo.remove_all(); linkCombo.append(_("None")); -#else - linkCombo.clear_items(); - linkCombo.append_text(_("None")); -#endif linkCombo.set_active(0); if ( dev->getSource() != Gdk::SOURCE_MOUSE ) { Glib::ustring linked = dev->getLink(); std::list<Glib::RefPtr<InputDevice const> > devList = Inkscape::DeviceManager::getManager().getDevices(); for ( std::list<Glib::RefPtr<InputDevice const> >::const_iterator it = devList.begin(); it != devList.end(); ++it ) { if ( ((*it)->getSource() != Gdk::SOURCE_MOUSE) && ((*it) != dev) ) { -#if WITH_GTKMM_2_24 linkCombo.append((*it)->getName().c_str()); -#else - linkCombo.append_text((*it)->getName().c_str()); -#endif if ( (linked.length() > 0) && (linked == (*it)->getId()) ) { linkCombo.set_active_text((*it)->getName().c_str()); } @@ -1334,18 +1321,10 @@ void InputDialogImpl::setupValueAndCombo( gint reported, gint actual, Gtk::Label label.set_label(tmp); g_free(tmp); -#if WITH_GTKMM_2_24 combo.remove_all(); -#else - combo.clear_items(); -#endif for ( gint i = 1; i <= reported; ++i ) { tmp = g_strdup_printf("%d", i); -#if WITH_GTKMM_2_24 combo.append(tmp); -#else - combo.append_text(tmp); -#endif g_free(tmp); } diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp index bb06e3e79..174f361fd 100644 --- a/src/ui/dialog/ocaldialogs.cpp +++ b/src/ui/dialog/ocaldialogs.cpp @@ -963,11 +963,7 @@ void SearchResultList::populate_from_xml(xmlNode * a_node) { if (!strcmp((const char*)cur_node->name, "title")) { -#if WITH_GTKMM_2_24 row_num = append(""); -#else - row_num = append_text(""); -#endif xmlChar *xml_title = xmlNodeGetContent(cur_node); char* title = (char*) xml_title; diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp index 0f2c53f99..9cc18c02c 100644 --- a/src/ui/dialog/spellcheck.cpp +++ b/src/ui/dialog/spellcheck.cpp @@ -109,10 +109,6 @@ SpellCheck::SpellCheck (void) : tree_view.append_column(_("Suggestions:"), tree_columns.suggestions); { -// Backward compatibility fix: The GtkComboBoxText API was introduced with -// GTK+ 2.24. This check should eventually be dropped when we bump our -// GTK dependency. -#if GTK_CHECK_VERSION(2, 24, 0) dictionary_combo = gtk_combo_box_text_new(); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dictionary_combo), _lang.c_str()); if (_lang2 != "") { @@ -121,16 +117,6 @@ SpellCheck::SpellCheck (void) : if (_lang3 != "") { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dictionary_combo), _lang3.c_str()); } -#else - dictionary_combo = gtk_combo_box_new_text(); - gtk_combo_box_append_text (GTK_COMBO_BOX (dictionary_combo), _lang.c_str()); - if (_lang2 != "") { - gtk_combo_box_append_text (GTK_COMBO_BOX (dictionary_combo), _lang2.c_str()); - } - if (_lang3 != "") { - gtk_combo_box_append_text (GTK_COMBO_BOX (dictionary_combo), _lang3.c_str()); - } -#endif gtk_combo_box_set_active (GTK_COMBO_BOX (dictionary_combo), 0); gtk_widget_show_all (dictionary_combo); } diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index f296ad030..be69635e8 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -163,23 +163,14 @@ GlyphComboBox::GlyphComboBox(){ void GlyphComboBox::update(SPFont* spfont){ if (!spfont) return -//TODO: figure out why do we need to append_text("") before clearing items properly... +//TODO: figure out why do we need to append("") before clearing items properly... -#if WITH_GTKMM_2_24 this->append(""); //Gtk is refusing to clear the combobox when I comment out this line this->remove_all(); -#else - this->append_text(""); //Gtk is refusing to clear the combobox when I comment out this line - this->clear_items(); -#endif for(SPObject* node = spfont->children; node; node=node->next){ if (SP_IS_GLYPH(node)){ -#if WITH_GTKMM_2_24 this->append((static_cast<SPGlyph*>(node))->unicode); -#else - this->append_text((static_cast<SPGlyph*>(node))->unicode); -#endif } } } diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 4c3a406f0..9d4ab5d8a 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -103,11 +103,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) : table->attach(*Gtk::manage(labelSet),0,1,row,row+1,Gtk::SHRINK,Gtk::SHRINK); symbolSet = new Gtk::ComboBoxText(); // Fill in later -#if WITH_GTKMM_2_24 symbolSet->append(_("Current Document")); -#else - symbolSet->append_text(_("Current Document")); -#endif symbolSet->set_active_text(_("Current Document")); table->attach(*Gtk::manage(symbolSet),1,2,row,row+1,Gtk::FILL|Gtk::EXPAND,Gtk::SHRINK); @@ -151,11 +147,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) : const gchar *scales[] = {_("Fit"), _("Fit to width"), _("Fit to height"), "0.1", "0.2", "0.5", "1.0", "2.0", "5.0", NULL}; for( int i = 0; scales[i]; ++i ) { -#if WITH_GTKMM_2_24 previewScale->append(scales[i]); -#else - previewScale->append_text(scales[i]); -#endif } previewScale->set_active_text(scales[0]); table->attach(*Gtk::manage(previewScale),1,2,row,row+1,Gtk::FILL|Gtk::EXPAND,Gtk::SHRINK); @@ -173,12 +165,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) : previewSize = new Gtk::ComboBoxText(); const gchar *sizes[] = {"16", "24", "32", "48", "64", NULL}; for( int i = 0; sizes[i]; ++i ) { -#if WITH_GTKMM_2_24 previewSize->append(sizes[i]); -#else - previewSize->append_text(sizes[i]); -#endif - } previewSize->set_active_text(sizes[2]); table->attach(*Gtk::manage(previewSize),1,2,row,row+1,Gtk::FILL|Gtk::EXPAND,Gtk::SHRINK); @@ -333,11 +320,7 @@ void SymbolsDialog::get_symbols() { SPDocument* symbol_doc = SPDocument::createNewDoc( fullname, FALSE ); if( symbol_doc ) { symbolSets[Glib::ustring(filename)]= symbol_doc; -#if WITH_GTKMM_2_24 symbolSet->append(filename); -#else - symbolSet->append_text(filename); -#endif } } g_free( fullname ); diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 033571bb4..6696db083 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -106,30 +106,12 @@ TextEdit::TextEdit() GtkWidget *px = sp_icon_new( Inkscape::ICON_SIZE_SMALL_TOOLBAR, INKSCAPE_ICON("text_line_spacing") ); layout_hbox.pack_start(*Gtk::manage(Glib::wrap(px)), false, false); -/* -This would introduce dependency on gtk version 2.24 which is currently not available in -Trisquel GNU/Linux 4.5.1 (released on May 25th, 2011) -This conditional and its #else block can be deleted in the future. -*/ -#if GTK_CHECK_VERSION(2, 24,0) spacing_combo = gtk_combo_box_text_new_with_entry (); -#else - spacing_combo = gtk_combo_box_entry_new_text (); -#endif gtk_widget_set_size_request (spacing_combo, 90, -1); const gchar *spacings[] = {"50%", "80%", "90%", "100%", "110%", "120%", "130%", "140%", "150%", "200%", "300%", NULL}; for (int i = 0; spacings[i]; i++) { -/* -This would introduce dependency on gtk version 2.24 which is currently not available in -Trisquel GNU/Linux 4.5.1 (released on May 25th, 2011) -This conditional and its #else block can be deleted in the future. -*/ -#if GTK_CHECK_VERSION(2, 24,0) gtk_combo_box_text_append_text((GtkComboBoxText *) spacing_combo, spacings[i]); -#else - gtk_combo_box_append_text((GtkComboBox *) spacing_combo, spacings[i]); -#endif } gtk_widget_set_tooltip_text (px, _("Spacing between lines (percent of font size)")); @@ -505,16 +487,7 @@ SPCSSAttr *TextEdit::getTextStyle () // Note that CSS 1.1 does not support line-height; we set it for consistency, but also set // sodipodi:linespacing for backwards compatibility; in 1.2 we use line-height for flowtext -/* -This would introduce dependency on gtk version 2.24 which is currently not available in -Trisquel GNU/Linux 4.5.1 (released on May 25th, 2011) -This conditional and its #else block can be deleted in the future. -*/ -#if GTK_CHECK_VERSION(2, 24,0) const gchar *sstr = gtk_combo_box_text_get_active_text ((GtkComboBoxText *) spacing_combo); -#else - const gchar *sstr = gtk_entry_get_text ((GtkEntry *) (gtk_bin_get_child (GTK_BIN (spacing_combo)))); -#endif sp_repr_css_set_property (css, "line-height", sstr); return css; 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 |
