[glom] Fix the build with --enable-warnings=fatal with gtkmm 3.1.



commit a13736e4b43e3c98bec82bbfe02fec1670a24442
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jun 15 12:15:22 2011 +0200

    Fix the build with --enable-warnings=fatal with gtkmm 3.1.
    
    * glom/mode_data/box_data_details.[h|cc]:
    * glom/mode_data/db_adddel/db_adddel_withbuttons.[h|cc]:
    * glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc:
    * glom/utility_widgets/adddel/adddel_withbuttons.[h|cc]:
    Fix the build with --enable-warnings=fatal with gtkmm 3.1, by
    replacing Gtk::HButtonBox with ButtonBox and replacing get_vbox() with
    get_content_area().

 ChangeLog                                          |   12 +++++++++
 glom/mode_data/box_data_details.cc                 |    5 +++-
 glom/mode_data/box_data_details.h                  |    2 +-
 glom/mode_data/db_adddel/db_adddel_withbuttons.cc  |   27 ++++++++++---------
 glom/mode_data/db_adddel/db_adddel_withbuttons.h   |    2 +-
 .../layout_item_dialogs/dialog_formatting.cc       |    2 +-
 glom/utility_widgets/adddel/adddel_withbuttons.cc  |    6 +++-
 glom/utility_widgets/adddel/adddel_withbuttons.h   |    2 +-
 8 files changed, 38 insertions(+), 20 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 650db6b..2b6ae0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-06-15  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with --enable-warnings=fatal with gtkmm 3.1.
+
+	* glom/mode_data/box_data_details.[h|cc]:
+	* glom/mode_data/db_adddel/db_adddel_withbuttons.[h|cc]:
+	* glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc:
+	* glom/utility_widgets/adddel/adddel_withbuttons.[h|cc]:
+	Fix the build with --enable-warnings=fatal with gtkmm 3.1, by
+	replacing Gtk::HButtonBox with ButtonBox and replacing get_vbox() with
+	get_content_area().
+
 2011-05-12  Murray Cumming  <murrayc murrayc com>
 
 	Fix compiler warnings.
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 72edf68..526621c 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -40,7 +40,7 @@ namespace Glom
 Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
 : m_hbox_content(false, Utils::DEFAULT_SPACING_SMALL),
 #ifndef GLOM_ENABLE_MAEMO
-  m_hbox_buttons(Gtk::BUTTONBOX_END, Utils::DEFAULT_SPACING_SMALL),
+  m_hbox_buttons(Gtk::ORIENTATION_HORIZONTAL),
   m_Button_New(Gtk::Stock::ADD),
   m_Button_Del(Gtk::Stock::DELETE),
   m_Button_Nav_First(Gtk::Stock::GOTO_FIRST),
@@ -56,6 +56,9 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
 {
   m_layout_name = "details";
 
+  m_hbox_buttons.set_layout(Gtk::BUTTONBOX_END);
+  m_hbox_buttons.set_spacing(Utils::DEFAULT_SPACING_SMALL);
+
   add_view(&m_FlowTable); //Allow this to access the document too.
 
   m_FlowTable.set_lines(1); //Sub-groups will have multiple columns (by default, there is one sub-group, with 2 columns).
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index c67dc97..22beca2 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -150,7 +150,7 @@ protected:
 #endif
 
 #ifndef GLOM_ENABLE_MAEMO
-  Gtk::HButtonBox m_hbox_buttons;
+  Gtk::ButtonBox m_hbox_buttons;
   Gtk::Button m_Button_New;
   Gtk::Button m_Button_Del;
   Gtk::Button m_Button_Nav_First;
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
index b5c9ebb..5a47b59 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
@@ -25,7 +25,7 @@ namespace Glom
 {
 
 DbAddDel_WithButtons::DbAddDel_WithButtons()
-: m_ButtonBox(Gtk::BUTTONBOX_END),
+: m_ButtonBox(Gtk::ORIENTATION_HORIZONTAL),
 #ifndef GLOM_ENABLE_MAEMO
   m_Button_Del(Gtk::Stock::DELETE),
   m_Button_Edit(Gtk::Stock::OPEN),
@@ -34,17 +34,18 @@ DbAddDel_WithButtons::DbAddDel_WithButtons()
   m_Button_Add(Gtk::Hildon::SIZE_FINGER_HEIGHT, Hildon::BUTTON_ARRANGEMENT_HORIZONTAL)
 #endif
 {
+  m_ButtonBox.set_layout(Gtk::BUTTONBOX_END);
   m_ButtonBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
 
   setup_buttons();
   pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
 
   //Link buttons to handlers:
-    
+
   #ifndef GLOM_ENABLE_MAEMO
   m_Button_Add.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_add));
   m_ButtonBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
- 
+
   m_Button_Del.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_del));
   m_Button_Edit.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_edit));
 
@@ -57,8 +58,8 @@ DbAddDel_WithButtons::DbAddDel_WithButtons()
   #ifdef GLOM_ENABLE_MAEMO
   //Use smaller icon-only buttons for these infrequently-clicked buttons,
   //to save screen space.
-  
-  //Note that icons of size Gtk::ICON_SIZE_MENU are smaller, 
+
+  //Note that icons of size Gtk::ICON_SIZE_MENU are smaller,
   //but it seems impossible to have Hildon::Buttons smaller than Gtk::Hildon::SIZE_FINGER_HEIGHT.
   Gtk::Image* image = Gtk::manage(new Gtk::Image(Gtk::Stock::ADD, Gtk::ICON_SIZE_SMALL_TOOLBAR));
   m_Button_Add.set_image(*image);
@@ -117,22 +118,22 @@ void DbAddDel_WithButtons::setup_buttons()
   const bool allow_edit = get_allow_user_actions() && get_allow_view_details();
   const bool allow_del = get_allow_user_actions() && m_allow_delete;
   const bool allow_add = get_allow_user_actions() && m_allow_add;
- 
+
   m_Button_Add.show();
   m_Button_Add.set_property("visible", allow_add);
- 
-   
+
+
   #ifndef GLOM_ENABLE_MAEMO
   m_Button_Edit.show();
   m_Button_Edit.set_property("visible", allow_edit);
-  
+
   if(!m_open_button_title.empty())
     m_Button_Edit.set_label(m_open_button_title);
- 
+
   m_Button_Del.show();
   m_Button_Del.set_property("visible", allow_del);
   #endif //GLOM_ENABLE_MAEMO
-  
+
   m_ButtonBox.show();
 }
 
@@ -143,7 +144,7 @@ void DbAddDel_WithButtons::show_all_vfunc()
 {
   //Call the base class:
   Gtk::VBox::show_all_vfunc();
-  
+
   //Hide some stuff:
   setup_buttons();
 }
@@ -151,7 +152,7 @@ void DbAddDel_WithButtons::show_all_vfunc()
 void DbAddDel_WithButtons::set_allow_view_details(bool val)
 {
   DbAddDel::set_allow_view_details(val);
-  
+
   setup_buttons();
 }
 
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.h b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
index 5d145f8..9cc1f43 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.h
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
@@ -55,7 +55,7 @@ private:
   virtual void show_all_vfunc();
 
   //member widgets:
-  Gtk::HButtonBox m_ButtonBox;
+  Gtk::ButtonBox m_ButtonBox;
   
 #ifndef GLOM_ENABLE_MAEMO
   typedef Gtk::Button type_button;
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc
index 8173714..366fec6 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc
@@ -35,7 +35,7 @@ Dialog_Formatting::Dialog_Formatting()
   //Get the formatting stuff:
   Utils::get_glade_widget_derived_with_warning(m_box_formatting);
 
-  get_vbox()->pack_start(*m_box_formatting, Gtk::PACK_EXPAND_WIDGET);
+  get_content_area()->pack_start(*m_box_formatting, Gtk::PACK_EXPAND_WIDGET);
   add_view(m_box_formatting);
 
   add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.cc b/glom/utility_widgets/adddel/adddel_withbuttons.cc
index addba32..5a330e9 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.cc
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.cc
@@ -27,7 +27,7 @@ namespace Glom
 {
 
 AddDel_WithButtons::AddDel_WithButtons()
-: m_ButtonBox(Gtk::BUTTONBOX_END),
+: m_ButtonBox(Gtk::ORIENTATION_HORIZONTAL),
   m_Button_Add(Gtk::Stock::ADD),
   m_Button_Del(Gtk::Stock::DELETE),
   m_Button_Edit(Gtk::Stock::OPEN)
@@ -37,7 +37,7 @@ AddDel_WithButtons::AddDel_WithButtons()
 
 AddDel_WithButtons::AddDel_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
 : AddDel(cobject, builder),
-  m_ButtonBox(Gtk::BUTTONBOX_END),
+  m_ButtonBox(Gtk::ORIENTATION_HORIZONTAL),
   m_Button_Add(Gtk::Stock::ADD),
   m_Button_Del(Gtk::Stock::DELETE),
   m_Button_Edit(Gtk::Stock::OPEN)
@@ -47,7 +47,9 @@ AddDel_WithButtons::AddDel_WithButtons(BaseObjectType* cobject, const Glib::RefP
 
 void AddDel_WithButtons::init()
 {
+  m_ButtonBox.set_layout(Gtk::BUTTONBOX_END);
   m_ButtonBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
+
   //m_Button_Add.set_border_width(Utils::DEFAULT_SPACING_SMALL);
   //m_Button_Del.set_border_width(Utils::DEFAULT_SPACING_SMALL);
   //m_Button_Edit.set_border_width(Utils::DEFAULT_SPACING_SMALL);
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.h b/glom/utility_widgets/adddel/adddel_withbuttons.h
index ef617a7..1125296 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.h
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.h
@@ -46,7 +46,7 @@ private:
   void on_button_edit();
 
   //member widgets:
-  Gtk::HButtonBox m_ButtonBox;
+  Gtk::ButtonBox m_ButtonBox;
   Gtk::Button m_Button_Add;
   Gtk::Button m_Button_Del;
   Gtk::Button m_Button_Edit;



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