[gtkmm-documentation] Fix the build with latest gtkmm.



commit 9c47b2e36c8838d145755943c892b43ef981f39d
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Oct 18 12:37:24 2010 +0200

    Fix the build with latest gtkmm.
    
    * examples/book/comboboxentry/complex/examplewindow.[h|cc]:
    * examples/book/comboboxentry/text/examplewindow.[h|cc]: Use Gtk::ComboBox
      with has_entry=true, instead of Gtk::ComboBoxEntry, which was removed.

 ChangeLog                                          |    8 ++++++++
 .../book/comboboxentry/complex/examplewindow.cc    |   10 +++++-----
 .../book/comboboxentry/complex/examplewindow.h     |    6 +++---
 examples/book/comboboxentry/text/examplewindow.cc  |    4 ++--
 examples/book/comboboxentry/text/examplewindow.h   |    4 ++--
 5 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index db54aab..9774239 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-18  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with latest gtkmm.
+
+	* examples/book/comboboxentry/complex/examplewindow.[h|cc]:
+	* examples/book/comboboxentry/text/examplewindow.[h|cc]: Use Gtk::ComboBox
+  with has_entry=true, instead of Gtk::ComboBoxEntry, which was removed.
+
 2.91.0:
 
 2010-09-30  Chris Kühl  <chrisk openismus com>
diff --git a/examples/book/comboboxentry/complex/examplewindow.cc b/examples/book/comboboxentry/complex/examplewindow.cc
index 117e5d5..db2d0d0 100644
--- a/examples/book/comboboxentry/complex/examplewindow.cc
+++ b/examples/book/comboboxentry/complex/examplewindow.cc
@@ -21,8 +21,9 @@
 #include <iostream>
 
 ExampleWindow::ExampleWindow()
+: m_Combo(true /* has_entry */)
 {
-  set_title("ComboBoxEntry example");
+  set_title("ComboBox example");
 
   //Create the Tree model:
   //m_refTreeModel = Gtk::TreeStore::create(m_Columns);
@@ -64,7 +65,7 @@ ExampleWindow::ExampleWindow()
   //m_Combo.pack_start(m_Columns.m_col_id);
   m_Combo.pack_start(m_Columns.m_col_name);
 
-  m_Combo.set_text_column(m_Columns.m_col_id);
+  m_Combo.set_entry_text_column(m_Columns.m_col_id);
 
   //Add the ComboBox to the window.
   add(m_Combo);
@@ -83,8 +84,8 @@ ExampleWindow::~ExampleWindow()
 void ExampleWindow::on_combo_changed()
 {
   Gtk::Entry* entry = m_Combo.get_entry();
-  //Note: to get changes only when the entry has been completed, 
-  //instead of on every key press, connect to Entry::signal_changed() 
+  //Note: to get changes only when the entry has been completed,
+  //instead of on every key press, connect to Entry::signal_changed()
   //instead of ComboBoxEntry::signal_changed.
 
   if(entry)
@@ -92,4 +93,3 @@ void ExampleWindow::on_combo_changed()
     std::cout << " ID=" << entry->get_text() << std::endl;
   }
 }
-
diff --git a/examples/book/comboboxentry/complex/examplewindow.h b/examples/book/comboboxentry/complex/examplewindow.h
index d8af68f..335ca26 100644
--- a/examples/book/comboboxentry/complex/examplewindow.h
+++ b/examples/book/comboboxentry/complex/examplewindow.h
@@ -20,7 +20,7 @@
 #define GTKMM_EXAMPLEWINDOW_H
 
 #include <gtkmm/window.h>
-#include <gtkmm/comboboxentrytext.h>
+#include <gtkmm/combobox.h>
 #include <gtkmm/liststore.h>
 
 class ExampleWindow : public Gtk::Window
@@ -29,7 +29,7 @@ public:
   ExampleWindow();
   virtual ~ExampleWindow();
 
-protected:  
+protected:
   //Signal handlers:
   void on_combo_changed();
 
@@ -48,7 +48,7 @@ protected:
   ModelColumns m_Columns;
 
   //Child widgets:
-  Gtk::ComboBoxEntry m_Combo;
+  Gtk::ComboBox m_Combo;
   Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
 };
 
diff --git a/examples/book/comboboxentry/text/examplewindow.cc b/examples/book/comboboxentry/text/examplewindow.cc
index 6de6111..6125026 100644
--- a/examples/book/comboboxentry/text/examplewindow.cc
+++ b/examples/book/comboboxentry/text/examplewindow.cc
@@ -21,8 +21,9 @@
 #include <iostream>
 
 ExampleWindow::ExampleWindow()
+: m_Combo(true /* has_entry */)
 {
-  set_title("ComboBoxEntryText example");
+  set_title("ComboBoxText example");
 
   //Fill the combo:
   m_Combo.append_text("something");
@@ -49,4 +50,3 @@ void ExampleWindow::on_combo_changed()
   if(!(text.empty()))
     std::cout << "Combo changed: " << text << std::endl;
 }
-
diff --git a/examples/book/comboboxentry/text/examplewindow.h b/examples/book/comboboxentry/text/examplewindow.h
index ff13a25..a0c58f0 100644
--- a/examples/book/comboboxentry/text/examplewindow.h
+++ b/examples/book/comboboxentry/text/examplewindow.h
@@ -20,7 +20,7 @@
 #define GTKMM_EXAMPLEWINDOW_H
 
 #include <gtkmm/window.h>
-#include <gtkmm/comboboxentrytext.h>
+#include <gtkmm/comboboxtext.h>
 
 class ExampleWindow : public Gtk::Window
 {
@@ -33,7 +33,7 @@ protected:
   void on_combo_changed();
 
   //Child widgets:
-  Gtk::ComboBoxEntryText m_Combo;
+  Gtk::ComboBoxText m_Combo;
 };
 
 #endif //GTKMM_EXAMPLEWINDOW_H



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