[glom] Fix the build with latest unstable gtkmm 3.



commit b688656fee34bbfa2de9bd27073e5349a389b25a
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Sep 22 11:36:43 2010 +0200

    Fix the build with latest unstable gtkmm 3.
    
    * glom/mode_data/db_adddel/db_adddel.cc: Adapt to CellSizeRequest::get_size().

 ChangeLog                             |    6 ++++++
 glom/mode_data/db_adddel/db_adddel.cc |   10 ++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ade5487..208630f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-09-22  Murray Cumming  <murrayc murrayc com>
 
+	Fix the build with latest unstable gtkmm 3.
+
+	* glom/mode_data/db_adddel/db_adddel.cc: Adapt to CellSizeRequest::get_size().
+
+2010-09-22  Murray Cumming  <murrayc murrayc com>
+
 	ComboChoices: Renamed set_choices() to set_choices_fixed()
 
 	* glom/mode_data/datawidget/combochoices.h: Rename set_choices() to
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 545c7ac..73bab8e 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -1044,11 +1044,9 @@ void DbAddDel::construct_specified_columns()
     m_treeviewcolumn_button = Gtk::manage(new Gtk::TreeViewColumn());
     m_treeviewcolumn_button->pack_start(*pCellButton);
 
-    int x_offset = 0;
-    int y_offset = 0;
-    int width = 0;
-    int height = 0;
-    pCellButton->get_size(m_TreeView, x_offset, y_offset, width, height);
+
+    Gtk::Requisition requistion_min, requistion_natural; //TODO: Really support natural size.
+    pCellButton->get_size(m_TreeView, requistion_min, requistion_natural);
 
     m_treeviewcolumn_button->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); //Needed by fixed-height mode.
 
@@ -1057,7 +1055,7 @@ void DbAddDel::construct_specified_columns()
     // the spacing property of the treeviewcolumn.
     int horizontal_separator = 0;
     m_TreeView.get_style_property("horizontal-separator", horizontal_separator);
-    const int button_width = width + horizontal_separator*2;
+    const int button_width = requistion_min.width + horizontal_separator*2;
     if(button_width > 0) //Otherwise an assertion fails.
       m_treeviewcolumn_button->set_fixed_width(button_width);
 



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