[glom] DataWidget/DbAddDel: Remove unused on_self_style_changed().



commit e8faec23761b2bb8238a0001d11a7671aee988a0
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 14 09:31:51 2017 +0100

    DataWidget/DbAddDel: Remove unused on_self_style_changed().
    
    This signal was removed from gtkmm long ago. This signal handler
    was not connected.

 glom/mode_data/datawidget/datawidget.cc |    7 -------
 glom/mode_data/datawidget/datawidget.h  |    6 ------
 glom/mode_data/db_adddel/db_adddel.cc   |   18 ------------------
 glom/mode_data/db_adddel/db_adddel.h    |    8 --------
 4 files changed, 0 insertions(+), 39 deletions(-)
---
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 9f1db87..ad5a045 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -251,7 +251,6 @@ DataWidget::DataWidget(const std::shared_ptr<LayoutItem_Field>& field, const Gli
 #endif // GLOM_ENABLE_CLIENT_ONLY
 
   set_events(Gdk::BUTTON_PRESS_MASK);
-  //TODO: signal_style_changed().connect(sigc::mem_fun(*this, &DataWidget::on_self_style_changed));
 }
 
 void DataWidget::on_widget_edited()
@@ -652,12 +651,6 @@ void DataWidget::on_button_choose_date()
   }
 }
 
-void DataWidget::on_self_style_changed(const Glib::RefPtr<Gtk::Style>& /* style */)
-{
-  auto layoutField = std::dynamic_pointer_cast<LayoutItem_Field>(get_layout_item());
-  set_child_size_by_field(layoutField);
-}
-
 bool DataWidget::offer_related_record_id_find(Gnome::Gda::Value& chosen_id)
 {
   bool result = false;
diff --git a/glom/mode_data/datawidget/datawidget.h b/glom/mode_data/datawidget/datawidget.h
index 1e5987b..51f0be0 100644
--- a/glom/mode_data/datawidget/datawidget.h
+++ b/glom/mode_data/datawidget/datawidget.h
@@ -104,12 +104,6 @@ private:
   void on_button_new_id();
   void on_button_choose_date();
 
-  // Don't call it on_style_changed, otherwise we would override a virtual
-  // function from Gtk::Widget. We could indeed do that, but we do it with
-  // a normal signal handler, because we have to do it this way anyway in
-  // case default signal handlers have been disabled in glibmm.
-  void on_self_style_changed(const Glib::RefPtr<Gtk::Style>& style);
-
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   void on_menupopup_activate_layout() override;
   void on_menupopup_activate_layout_properties() override;
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index efa9527..39ec2c8 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -105,12 +105,6 @@ DbAddDel::DbAddDel()
 
   show_all_children();
 
-#ifdef GLOM_ENABLE_CLIENT_ONLY //Actually this has only been necessary for Maemo.
-  // Adjust sizing when style changed
-
-  signal_style_changed().connect(sigc::mem_fun(*this, &DbAddDel::on_self_style_changed));
-#endif // !GLOM_ENABLE_CLIENT_ONLY
-
   auto refSelection = m_tree_view.get_selection();
   if(refSelection)
   {
@@ -1994,18 +1988,6 @@ bool DbAddDel::get_allow_view_details() const
   return m_allow_view_details;
 }
 
-#ifdef GLOM_ENABLE_CLIENT_ONLY
-void DbAddDel::on_self_style_changed(const Glib::RefPtr<Gtk::Style>& /* style */)
-{
-  // Reset fixed cell height because the font might have changed due to the new style:
-  m_fixed_cell_height = 0;
-
-  // Reconstruct columns because sizes might have changed:
-  // (TODO: But don't get the data again because that would be inefficient).
-  construct_specified_columns();
-}
-#endif
-
 void DbAddDel::set_open_button_title(const Glib::ustring& title)
 {
   m_open_button_title = title;
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 922fac9..af54b5b 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -346,14 +346,6 @@ private:
   void on_cell_button_clicked(const Gtk::TreeModel::Path& path);
   void on_cell_layout_button_clicked(const Gtk::TreeModel::Path& path, int model_column_index);
 
-#ifdef GLOM_ENABLE_CLIENT_ONLY
-  // Don't name it on_style_changed, otherwise we would override a virtual
-  // function from Gtk::Widget. We could indeed do that, but we do it with
-  // a normal signal handler, because we have to do it this way anyway in
-  // case default signal handlers have been disabled in glibmm.
-  void on_self_style_changed(const Glib::RefPtr<Gtk::Style>& style);
-#endif //GLOM_ENABLE_CLIENT_ONLY
-
   bool get_prevent_user_signals() const;
 
   /** @param model_column_index A value returned from add_column().


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