[glom/glom-1-18] List view: Stop unnecessary saving of column widths.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-18] List view: Stop unnecessary saving of column widths.
- Date: Wed, 16 Nov 2011 13:47:37 +0000 (UTC)
commit c378d86dce932cffde1a3667301cf1d790a1e836
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Nov 16 12:45:34 2011 +0100
List view: Stop unnecessary saving of column widths.
* glom/mode_data/db_adddel/db_adddel.[h|cc]: Do not handle changes
of the GtkTreeView column width, because it happens during normal
size allocation as well as when the user resizes columns.
It is not essential anyway.
Conflicts:
glom/utility_widgets/db_adddel/db_adddel.cc
glom/utility_widgets/db_adddel/db_adddel.h
ChangeLog | 9 +++++++++
glom/utility_widgets/db_adddel/db_adddel.cc | 11 ++++++++++-
glom/utility_widgets/db_adddel/db_adddel.h | 3 ++-
3 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6b05339..6e9ff2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-11-16 Murray Cumming <murrayc murrayc com>
+ List view: Stop unnecessary saving of column widths.
+
+ * glom/mode_data/db_adddel/db_adddel.[h|cc]: Do not handle changes
+ of the GtkTreeView column width, because it happens during normal
+ size allocation as well as when the user resizes columns.
+ It is not essential anyway.
+
+2011-11-16 Murray Cumming <murrayc murrayc com>
+
Make the Calendar portal work again.
* glom/mode_data/box_data_calendar_related.[h|cc]: Override
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index 69997df..db78e14 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -2020,6 +2020,13 @@ bool DbAddDel::on_treeview_column_drop(Gtk::TreeView* /* treeview */, Gtk::TreeV
return true;
}
+/* We do not let the developer resize the columns directly in the treeview
+ * because we cannot easily avoid this signal handler from being called just during the
+ * intial size allocation.
+ * Anyway, this would be rather implicit anyway - people might not know that they are changing it in the document.
+ * The size can still be specified in the layout dialog.
+ */
+/*
void DbAddDel::on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column)
{
if(!view_column)
@@ -2048,6 +2055,7 @@ void DbAddDel::on_treeview_column_resized(int model_column_index, DbTreeViewColu
if(column_info.m_item)
column_info.m_item->set_display_width(width);
}
+*/
void DbAddDel::on_treeview_column_clicked(int model_column_index)
{
@@ -2231,7 +2239,8 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
pViewColumn->signal_clicked().connect(
sigc::bind( sigc::mem_fun(*this, &DbAddDel::on_treeview_column_clicked), model_column_index) );
- pViewColumn->connect_property_changed("width", sigc::bind(sigc::mem_fun(*this, &DbAddDel::on_treeview_column_resized), model_column_index, pViewColumn) );
+ // See the comment on on_treeview_column_resized():
+ //pViewColumn->connect_property_changed("width", sigc::bind(sigc::mem_fun(*this, &DbAddDel::on_treeview_column_resized), model_column_index, pViewColumn) );
#endif //GLOM_ENABLE_MAEMO
return cols_count;
diff --git a/glom/utility_widgets/db_adddel/db_adddel.h b/glom/utility_widgets/db_adddel/db_adddel.h
index a405cd1..e38689a 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.h
+++ b/glom/utility_widgets/db_adddel/db_adddel.h
@@ -352,7 +352,8 @@ private:
#ifndef GLOM_ENABLE_MAEMO
virtual bool on_treeview_columnheader_button_press_event(GdkEventButton* event);
virtual void on_treeview_column_clicked(int model_column_index);
- void on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column);
+ //void on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column);
+
void on_idle_row_edit();
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]