[glom: 45/47] Adapt to recent gtkmm-3.0 API changes.



commit 793f37575256bc7c3d4977913373f1557c305ac1
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jul 27 12:27:46 2010 +0200

    Adapt to recent gtkmm-3.0 API changes.
    
    * glom/bakery/app_withdoc_gtk.cc: Remove use of Gtk::RecentManager::set_limit().
    * glom/dialog_existing_or_new.[h|cc]:
    * glom/frame_glom.[h|cc]:
    * glom/mode_data/notebook_data..[h|cc]:
    * glom/mode_design/report_layout/dialog_layout_report.[h|cc]:
    * glom/notebook_glom.[h|cc]: Replace use of GtkNotebookPage with Gtk::Widget*
    in switch_page signal handlers.

 ChangeLog                                          |   12 ++++++++++++
 glom/bakery/app_withdoc_gtk.cc                     |    1 -
 glom/dialog_existing_or_new.cc                     |    2 +-
 glom/dialog_existing_or_new.h                      |    2 +-
 glom/frame_glom.cc                                 |    2 +-
 glom/frame_glom.h                                  |    2 +-
 glom/mode_data/notebook_data.cc                    |    2 +-
 glom/mode_data/notebook_data.h                     |    2 +-
 .../report_layout/dialog_layout_report.cc          |    2 +-
 .../report_layout/dialog_layout_report.h           |    2 +-
 glom/notebook_glom.cc                              |    2 +-
 glom/notebook_glom.h                               |    2 +-
 12 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d328f34..29414bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-07-27  Murray Cumming  <murrayc murrayc com>
+
+	Adapt to recent gtkmm-3.0 API changes.
+
+	* glom/bakery/app_withdoc_gtk.cc: Remove use of Gtk::RecentManager::set_limit().
+	* glom/dialog_existing_or_new.[h|cc]:
+	* glom/frame_glom.[h|cc]:
+	* glom/mode_data/notebook_data..[h|cc]:
+	* glom/mode_design/report_layout/dialog_layout_report.[h|cc]:
+	* glom/notebook_glom.[h|cc]: Replace use of GtkNotebookPage with Gtk::Widget* 
+	in switch_page signal handlers.
+
 2010-07-25  Murray Cumming  <murrayc murrayc com>
 
 	Allow unique fields with same name in multiple tables.
diff --git a/glom/bakery/app_withdoc_gtk.cc b/glom/bakery/app_withdoc_gtk.cc
index 84353f2..683f1ca 100644
--- a/glom/bakery/app_withdoc_gtk.cc
+++ b/glom/bakery/app_withdoc_gtk.cc
@@ -233,7 +233,6 @@ void App_WithDoc_Gtk::init_menus_file_recentfiles(const Glib::ustring& path)
 
       Gtk::RecentChooserMenu* menu = Gtk::manage(new Gtk::RecentChooserMenu);
       menu->set_filter(filter);
-      menu->set_limit(10 /* this should be a global GNOME preference, I think. */);
       menu->set_show_numbers(false);
       menu->set_sort_type(Gtk::RECENT_SORT_MRU);
       menu->signal_item_activated().connect(sigc::bind(sigc::mem_fun(*this, static_cast<void(App_WithDoc_Gtk::*)(Gtk::RecentChooser&)>(&App_WithDoc_Gtk::on_recent_files_activate)), sigc::ref(*menu)));
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 72bc9da..bf33f01 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -577,7 +577,7 @@ void Dialog_ExistingOrNew::new_title_data_func(Gtk::CellRenderer* renderer, cons
 }
 #endif //GLOM_ENABLE_CLIENT_ONLY
 
-void Dialog_ExistingOrNew::on_switch_page(GtkNotebookPage* /* page */, guint /* page_num */)
+void Dialog_ExistingOrNew::on_switch_page(Gtk::Widget* /* page */, guint /* page_num */)
 {
   update_ui_sensitivity();
 }
diff --git a/glom/dialog_existing_or_new.h b/glom/dialog_existing_or_new.h
index 558b280..37c9e52 100644
--- a/glom/dialog_existing_or_new.h
+++ b/glom/dialog_existing_or_new.h
@@ -76,7 +76,7 @@ private:
   void existing_icon_data_func(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter);
   void existing_title_data_func(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter);
 
-  void on_switch_page(GtkNotebookPage* page, guint page_num);
+  void on_switch_page(Gtk::Widget* page, guint page_num);
   void on_existing_selection_changed();
 
 
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index e13fe5e..5223cf3 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -2644,7 +2644,7 @@ void Frame_Glom::on_dialog_tables_hide()
   }
 }
 
-void Frame_Glom::on_notebook_data_switch_page(GtkNotebookPage* /* page */, guint /* page_num */)
+void Frame_Glom::on_notebook_data_switch_page(Gtk::Widget* /* page */, guint /* page_num */)
 {
   //Refill this menu, because it depends on whether list or details are visible:
   Application* pApp = dynamic_cast<Application*>(get_app_window());
diff --git a/glom/frame_glom.h b/glom/frame_glom.h
index d8dc80d..d2ee22a 100644
--- a/glom/frame_glom.h
+++ b/glom/frame_glom.h
@@ -232,7 +232,7 @@ protected:
   void on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clause);
   void on_button_quickfind();
   void on_button_find_all();
-  void on_notebook_data_switch_page(GtkNotebookPage* page, guint page_num);
+  void on_notebook_data_switch_page(Gtk::Widget* page, guint page_num);
   void on_notebook_data_record_details_requested(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
   void on_userlevel_changed(AppState::userlevels userlevel);
 
diff --git a/glom/mode_data/notebook_data.cc b/glom/mode_data/notebook_data.cc
index 1a86303..bae0336 100644
--- a/glom/mode_data/notebook_data.cc
+++ b/glom/mode_data/notebook_data.cc
@@ -370,7 +370,7 @@ Notebook_Data::type_signal_record_details_requested Notebook_Data::signal_record
   return m_signal_record_details_requested;
 }
 
-void Notebook_Data::on_switch_page_handler(GtkNotebookPage* pPage, guint uiPageNumber)
+void Notebook_Data::on_switch_page_handler(Gtk::Widget* pPage, guint uiPageNumber)
 {
   //Call base class:
   Notebook_Glom::on_switch_page_handler(pPage, uiPageNumber);
diff --git a/glom/mode_data/notebook_data.h b/glom/mode_data/notebook_data.h
index 05267b5..588e6c5 100644
--- a/glom/mode_data/notebook_data.h
+++ b/glom/mode_data/notebook_data.h
@@ -88,7 +88,7 @@ protected:
   virtual void on_list_user_requested_details(const Gnome::Gda::Value& primary_key_value);
   void on_details_user_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
 
-  virtual void on_switch_page_handler(GtkNotebookPage* pPage, guint uiPageNumber);
+  virtual void on_switch_page_handler(Gtk::Widget* pPage, guint uiPageNumber);
 
 private:
   #ifdef GLOM_ENABLE_MAEMO
diff --git a/glom/mode_design/report_layout/dialog_layout_report.cc b/glom/mode_design/report_layout/dialog_layout_report.cc
index c34ab45..9147a04 100644
--- a/glom/mode_design/report_layout/dialog_layout_report.cc
+++ b/glom/mode_design/report_layout/dialog_layout_report.cc
@@ -1049,7 +1049,7 @@ void Dialog_Layout_Report::fill_report_parts(sharedptr<LayoutGroup>& group, cons
   }
 }
 
-void Dialog_Layout_Report::on_notebook_switch_page(GtkNotebookPage*, guint page_number)
+void Dialog_Layout_Report::on_notebook_switch_page(Gtk::Widget*, guint page_number)
 {
   //Change the list of available parts, depending on the destination treeview:
   Glib::RefPtr<type_model> model_available_parts;
diff --git a/glom/mode_design/report_layout/dialog_layout_report.h b/glom/mode_design/report_layout/dialog_layout_report.h
index ae6fad6..1a4f7a3 100644
--- a/glom/mode_design/report_layout/dialog_layout_report.h
+++ b/glom/mode_design/report_layout/dialog_layout_report.h
@@ -92,7 +92,7 @@ private:
 
   void on_cell_data_available_part(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter);
 
-  void on_notebook_switch_page(GtkNotebookPage*, guint);
+  void on_notebook_switch_page(Gtk::Widget*, guint);
 
   void fill_report_parts(sharedptr<LayoutGroup>& group, const Glib::RefPtr<const type_model> parts_model);
 
diff --git a/glom/notebook_glom.cc b/glom/notebook_glom.cc
index 5d2f899..588759b 100644
--- a/glom/notebook_glom.cc
+++ b/glom/notebook_glom.cc
@@ -57,7 +57,7 @@ Notebook_Glom::type_signal_leave_page Notebook_Glom::signal_leave_page()
 }
 */
 
-void Notebook_Glom::on_switch_page_handler(GtkNotebookPage* /* pPage */, guint uiPageNumber)
+void Notebook_Glom::on_switch_page_handler(Gtk::Widget* /* pPage */, guint uiPageNumber)
 {
   //Remove the help hint for the previous page:
   Gtk::Window* pApp = get_app_window();
diff --git a/glom/notebook_glom.h b/glom/notebook_glom.h
index a4edab5..35a4eff 100644
--- a/glom/notebook_glom.h
+++ b/glom/notebook_glom.h
@@ -55,7 +55,7 @@ protected:
   Gtk::Window* get_app_window();
 
   //Signal handlers:
-  virtual void on_switch_page_handler(GtkNotebookPage* pPage, guint uiPageNumber);  //The _handler suffix is to avoid overriding the base class's method.
+  virtual void on_switch_page_handler(Gtk::Widget* pPage, guint uiPageNumber);  //The _handler suffix is to avoid overriding the base class's method.
   void on_leave_page(guint uiPageNumber);
 
   //type_signal_leave_page m_signal_leave_page; //Signals when the user leaves a page.



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