[glom/glom-1-18] Do not use deprecated Gtk::ComboBoxEntry.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-18] Do not use deprecated Gtk::ComboBoxEntry.
- Date: Thu, 27 Jan 2011 14:35:39 +0000 (UTC)
commit b81aed6274d599468de675b7ba6944c0863f91dd
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jan 27 15:32:56 2011 +0100
Do not use deprecated Gtk::ComboBoxEntry.
* glom/glom_developer.glade:
* glom/mode_data/datawidget/comboentry.[h|cc]:
* glom/mode_design/comboentry_currency.[h|cc]:
* glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidt
h.[h|cc]:
* glom/variablesmap.[h|cc]: Replace use of (deprecated) Gtk::ComboboxEntry
with ComboBox with has_entry=true.
ChangeLog | 14 ++++++++++++++
glom/glom_developer.glade | 6 ++++--
glom/mode_data/datawidget/comboentry.cc | 8 ++++----
glom/mode_data/datawidget/comboentry.h | 4 ++--
glom/mode_design/comboentry_currency.cc | 2 +-
glom/mode_design/comboentry_currency.h | 4 ++--
.../layout_item_dialogs/comboentry_borderwidth.cc | 2 +-
.../layout_item_dialogs/comboentry_borderwidth.h | 2 +-
glom/variablesmap.cc | 12 ++++++------
glom/variablesmap.h | 4 ++--
10 files changed, 37 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ff7cf07..63ad114 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-27 Murray Cumming <murrayc murrayc com>
+
+ Do not use deprecated Gtk::ComboBoxEntry.
+
+ * glom/glom_developer.glade:
+ * glom/mode_data/datawidget/comboentry.[h|cc]:
+ * glom/mode_design/comboentry_currency.[h|cc]:
+ * glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidt
+ h.[h|cc]:
+ * glom/variablesmap.[h|cc]: Replace use of (deprecated) Gtk::ComboboxEntry
+ with ComboBox with has_entry=true.
+
+This is the glom-1-18 branch, which uses gtkmm 2.24.
+
2011-01-06 Murray Cumming <murrayc murrayc com>
get_current_locale(): Handle more complex setlocale(NULL) results.
diff --git a/glom/glom_developer.glade b/glom/glom_developer.glade
index cab328c..e116359 100644
--- a/glom/glom_developer.glade
+++ b/glom/glom_developer.glade
@@ -5496,8 +5496,9 @@ Which user should be added to this group?</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="comboboxentry_border_width">
+ <object class="GtkComboBox" id="comboboxentry_border_width">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
</object>
<packing>
<property name="position">1</property>
@@ -6424,8 +6425,9 @@ Which user should be added to this group?</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="entry_currency_symbol">
+ <object class="GtkComboBox" id="entry_currency_symbol">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/glom/mode_data/datawidget/comboentry.cc b/glom/mode_data/datawidget/comboentry.cc
index 051fc65..1db6336 100644
--- a/glom/mode_data/datawidget/comboentry.cc
+++ b/glom/mode_data/datawidget/comboentry.cc
@@ -55,7 +55,7 @@ ComboEntry::ComboEntry()
Gtk::Entry* ComboEntry::get_entry()
{
#ifndef GLOM_ENABLE_MAEMO
- return Gtk::ComboBoxEntry::get_entry();
+ return Gtk::ComboBox::get_entry();
#else
return m_maemo_selector.get_entry();
#endif
@@ -64,7 +64,7 @@ Gtk::Entry* ComboEntry::get_entry()
const Gtk::Entry* ComboEntry::get_entry() const
{
#ifndef GLOM_ENABLE_MAEMO
- return Gtk::ComboBoxEntry::get_entry();
+ return Gtk::ComboBox::get_entry();
#else
return m_maemo_selector.get_entry();
#endif
@@ -207,7 +207,7 @@ void ComboEntry::check_for_change()
bool ComboEntry::on_entry_focus_out_event(GdkEventFocus* /* event */)
{
- //bool result = Gtk::ComboBoxEntry::on_focus_out_event(event);
+ //bool result = Gtk::ComboBox::on_focus_out_event(event);
//The user has finished editing.
check_for_change();
@@ -336,7 +336,7 @@ void ComboEntry::on_changed(int /* column */)
#endif
{
//Call base class:
- Gtk::ComboBoxEntry::on_changed();
+ Gtk::ComboBox::on_changed();
//This signal is emitted for every key press, but sometimes it's just to say that the active item has changed to "no active item",
//if the text is not in the dropdown list:
diff --git a/glom/mode_data/datawidget/comboentry.h b/glom/mode_data/datawidget/comboentry.h
index bbff22f..01d2774 100644
--- a/glom/mode_data/datawidget/comboentry.h
+++ b/glom/mode_data/datawidget/comboentry.h
@@ -38,14 +38,14 @@ class Application;
namespace DataWidgetChildren
{
-/** A Gtk::ComboBoxEntry that can show choices of field values.
+/** A Gtk::ComboBox that can show choices of field values.
* Use this when the user should be allowed to enter values directly too,
* including values that are not in the choices.
*/
class ComboEntry
:
#ifndef GLOM_ENABLE_MAEMO
- public Gtk::ComboBoxEntry,
+ public Gtk::ComboBox,
#else
public Hildon::PickerButton,
#endif
diff --git a/glom/mode_design/comboentry_currency.cc b/glom/mode_design/comboentry_currency.cc
index 1912f56..e0677c9 100644
--- a/glom/mode_design/comboentry_currency.cc
+++ b/glom/mode_design/comboentry_currency.cc
@@ -25,7 +25,7 @@ namespace Glom
{
ComboEntry_Currency::ComboEntry_Currency(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
-: Gtk::ComboBoxEntry(cobject)
+: Gtk::ComboBox(cobject)
{
m_model = Gtk::ListStore::create(m_model_columns);
diff --git a/glom/mode_design/comboentry_currency.h b/glom/mode_design/comboentry_currency.h
index b2dfb0e..61894c1 100644
--- a/glom/mode_design/comboentry_currency.h
+++ b/glom/mode_design/comboentry_currency.h
@@ -21,7 +21,7 @@
#ifndef GLOM_MODE_DESIGN_COMBOENTRY_CURRENCY_HH
#define GLOM_MODE_DESIGN_COMBOENTRY_CURRENCY_HH
-#include <gtkmm/comboboxentry.h>
+#include <gtkmm/combobox.h>
#include <gtkmm/builder.h>
#include <gtkmm/liststore.h>
@@ -31,7 +31,7 @@ namespace Glom
{
/// A ComboBox that allows the user to choose, or enter, a currency symbol.
-class ComboEntry_Currency : public Gtk::ComboBoxEntry
+class ComboEntry_Currency : public Gtk::ComboBox
{
public:
ComboEntry_Currency(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
diff --git a/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.cc b/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.cc
index 56d794e..a6cd0c4 100644
--- a/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.cc
@@ -25,7 +25,7 @@ namespace Glom
{
ComboEntry_BorderWidth::ComboEntry_BorderWidth(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
-: Gtk::ComboBoxEntry(cobject)
+: Gtk::ComboBox(cobject)
{
m_model = Gtk::ListStore::create(m_model_columns);
diff --git a/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.h b/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.h
index 7ec61fa..be3cf5e 100644
--- a/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.h
+++ b/glom/mode_design/layout/layout_item_dialogs/comboentry_borderwidth.h
@@ -29,7 +29,7 @@
namespace Glom
{
-class ComboEntry_BorderWidth : public Gtk::ComboBoxEntry
+class ComboEntry_BorderWidth : public Gtk::ComboBox
{
public:
ComboEntry_BorderWidth(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
diff --git a/glom/variablesmap.cc b/glom/variablesmap.cc
index d436f2c..dbc2711 100644
--- a/glom/variablesmap.cc
+++ b/glom/variablesmap.cc
@@ -53,14 +53,14 @@ void VariablesMap::connect_widget(const Glib::ustring& widget_name, Glib::ustrin
m_builder->get_widget(widget_name, pWidget);
Gtk::Entry* pEntry = dynamic_cast<Gtk::Entry*>(pWidget); //it mange both Gtk::entry and Gtk::SpinButton
- Gtk::ComboBoxEntry* pComboBoxEntry = dynamic_cast<Gtk::ComboBoxEntry*>(pWidget);
+ Gtk::ComboBox* pComboBox = dynamic_cast<Gtk::ComboBox*>(pWidget);
if(pEntry)
{
m_mapWidgetsToVariables[pEntry] = (void*)(&variable);
}
- if(pComboBoxEntry)
+ if(pComboBox)
{
- m_mapWidgetsToVariables[pComboBoxEntry] = (void*)(&variable);
+ m_mapWidgetsToVariables[pComboBox] = (void*)(&variable);
}
}
@@ -120,7 +120,7 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
{
//Cast the variable appropriately and set it appropriately:
Gtk::Entry* pEntry = dynamic_cast<Gtk::Entry*>(pWidget);
- Gtk::ComboBoxEntry* pComboBoxEntry = dynamic_cast<Gtk::ComboBoxEntry*>(pWidget);
+ Gtk::ComboBox* pComboBox = dynamic_cast<Gtk::ComboBox*>(pWidget);
Gtk::ToggleButton* pToggleButton = dynamic_cast<Gtk::ToggleButton*>(pWidget); //CheckButtons and RadioButtons.
Gtk::Scale* pScale = dynamic_cast<Gtk::Scale*>(pWidget);
@@ -136,10 +136,10 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
pEntry->set_text(*pVar);
}
- if(pComboBoxEntry)
+ if(pComboBox)
{
Glib::ustring* pVar = (Glib::ustring*)(pVariable);
- Gtk::Entry* pIEntry = dynamic_cast<Gtk::Entry*>(pComboBoxEntry->get_child());
+ Gtk::Entry* pIEntry = dynamic_cast<Gtk::Entry*>(pComboBox->get_child());
if(to_variable)
{
diff --git a/glom/variablesmap.h b/glom/variablesmap.h
index d08e8cd..9a1f3aa 100644
--- a/glom/variablesmap.h
+++ b/glom/variablesmap.h
@@ -36,7 +36,7 @@ namespace Glom
*
* Gtk::Entry --> Glib::ustring
* Gtk::SpinBox --> Glib::ustring
- * Gtk::ComboBoxEntry --> Glib::ustring
+ * Gtk::ComboBox --> Glib::ustring
* Gtk::Scale --> double
* Gtk::Calendar --> Glib::Date
* Gtk::CheckBox --> bool
@@ -52,7 +52,7 @@ public:
///For ToggleButton (CheckBox and RadioButton)
void connect_widget(const Glib::ustring& widget_name, bool& variable);
- ///For Entry, ComboBoxEntry and SpinBox
+ ///For Entry, ComboBox and SpinBox
void connect_widget(const Glib::ustring& widget_name, Glib::ustring& variable);
///For Scale (HScale and VScale)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]