[gtkmm/gtkmm-2-24: 2/7] Deprecate GtkComboBoxEntry in favour of GtkComboBox with has_entry=true.



commit 166015c2d24242d261b089ebadb922912f32d2db
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Nov 25 12:12:21 2010 +0100

    Deprecate GtkComboBoxEntry in favour of GtkComboBox with has_entry=true.
    
    * gtk/gtkmm/comboboxtext.h: Add a comment saying that we are not using
    GtkComboBoxText yet (we use it in gtkmm-3.0) because we want to avoid breaking
    ABI. This still works fine anyway.
    * gtk/src/comboboxentry.[hg|ccg]: Deprecate this entire class in gtkmm.
    Undef GTK_DISABLE_DEPRECATED in the .cc file so this can build without
    --enable-warnings=fatal.

 ChangeLog                 |   11 +++++++++++
 gtk/gtkmm/comboboxtext.h  |    2 ++
 gtk/src/comboboxentry.ccg |    2 +-
 gtk/src/comboboxentry.hg  |    6 ++++++
 4 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ef8d670..c5b9e9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-25  Murray Cumming  <murrayc murrayc com>
+
+	Deprecate GtkComboBoxEntry in favour of GtkComboBox with has_entry=true.
+
+	* gtk/gtkmm/comboboxtext.h: Add a comment saying that we are not using 
+	GtkComboBoxText yet (we use it in gtkmm-3.0) because we want to avoid breaking 
+	ABI. This still works fine anyway. 
+	* gtk/src/comboboxentry.[hg|ccg]: Deprecate this entire class in gtkmm.
+	Undef GTK_DISABLE_DEPRECATED in the .cc file so this can build without 
+	--enable-warnings=fatal.
+
 2010-11-25  Murray Cumming  <murrayc murrayc-desktop>
 
 	TreeViewColumn: Added get_first_cell(), deprecated get_first_cell_renderer().
diff --git a/gtk/gtkmm/comboboxtext.h b/gtk/gtkmm/comboboxtext.h
index f8ed564..edc6b49 100644
--- a/gtk/gtkmm/comboboxtext.h
+++ b/gtk/gtkmm/comboboxtext.h
@@ -27,6 +27,8 @@ namespace Gtk
 {
 
 //This is a C++ convenience class that is equivalent to the gtk_combo_box_new_text() C convenience function.
+//In gtkmm-3.0 we simply wrap GtkComboBoxText, which is also in GTK+ 2.24.
+//But this C++ class was created before GtkComboBoxText existed and we want to avoid changing the ABI. 
 
 /** This is a specialisation of the ComboBox which has one column of text (a simple list),
  * and appropriate methods for setting and getting the text.
diff --git a/gtk/src/comboboxentry.ccg b/gtk/src/comboboxentry.ccg
index 30ad279..0317abe 100644
--- a/gtk/src/comboboxentry.ccg
+++ b/gtk/src/comboboxentry.ccg
@@ -41,10 +41,10 @@ Glib::ustring ComboBoxEntry::get_active_text() const
 {
   //gtk_combo_box_get_active_text() can be used with text-comboboxes, 
   //or GtkComboBoxEntry, which is quite stupid. murrayc:
+  //See also: https://bugzilla.gnome.org/show_bug.cgi?id=612396#c44
   return Glib::convert_return_gchar_ptr_to_ustring (gtk_combo_box_get_active_text(GTK_COMBO_BOX(gobj())));
 }
 
 
-
 } // namespace Gtk
 
diff --git a/gtk/src/comboboxentry.hg b/gtk/src/comboboxentry.hg
index 9508c31..c93ccbd 100644
--- a/gtk/src/comboboxentry.hg
+++ b/gtk/src/comboboxentry.hg
@@ -25,6 +25,9 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/combobox_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
 
 namespace Gtk
 {
@@ -52,10 +55,13 @@ namespace Gtk
  * @image html comboboxentry1.png
  *
  * @ingroup Widgets
+ *
+ * @deprecated Instead use ComboBox with has_entry = true.
  */
 class ComboBoxEntry : public ComboBox
 {
   _CLASS_GTKOBJECT(ComboBoxEntry, GtkComboBoxEntry, GTK_COMBO_BOX_ENTRY, Gtk::ComboBox, GtkComboBox)
+  _IS_DEPRECATED
 public:
   _CTOR_DEFAULT()
   _IGNORE(gtk_combo_box_entry_new, gtk_combo_box_entyry_new_text) //See ComboBoxEntryText for an equivalent of gtk_combo_box_entry_new_text().



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]