From 1ef312a0be89e57c4531b9d879d3b76ebf1530fe Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 12 Apr 2023 14:04:05 +0100 Subject: [PATCH] Remove overriden GTKInsertComboBoxTextItem from bitmap combobox The base function now has this exact functionality, but is faster. --- include/wx/gtk/bmpcbox.h | 1 - src/gtk/bmpcbox.cpp | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/include/wx/gtk/bmpcbox.h b/include/wx/gtk/bmpcbox.h index 59b756aea0..7634a7fdd2 100644 --- a/include/wx/gtk/bmpcbox.h +++ b/include/wx/gtk/bmpcbox.h @@ -130,7 +130,6 @@ protected: virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const override; virtual void GTKCreateComboBoxWidget() override; - virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text ) override; virtual wxSize DoGetBestSize() const override; diff --git a/src/gtk/bmpcbox.cpp b/src/gtk/bmpcbox.cpp index 62b9f0db17..885e3a4534 100644 --- a/src/gtk/bmpcbox.cpp +++ b/src/gtk/bmpcbox.cpp @@ -285,20 +285,6 @@ int wxBitmapComboBox::Insert(const wxString& item, const wxBitmapBundle& bitmap, return n; } -void wxBitmapComboBox::GTKInsertComboBoxTextItem( unsigned int n, const wxString& text ) -{ - GtkComboBox* combobox = GTK_COMBO_BOX( m_widget ); - GtkTreeModel *model = gtk_combo_box_get_model( combobox ); - GtkListStore *store = GTK_LIST_STORE( model ); - GtkTreeIter iter; - - gtk_list_store_insert( store, &iter, n ); - - wxGtkValue value( G_TYPE_STRING ); - g_value_set_string( value, text.utf8_str() ); - gtk_list_store_set_value( store, &iter, m_stringCellIndex, value ); -} - // ---------------------------------------------------------------------------- // wxTextEntry interface override // ----------------------------------------------------------------------------