[glom: 2/4] List views and related records portals: Avoid zero-width columns.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom: 2/4] List views and related records portals: Avoid zero-width columns.
- Date: Fri, 30 Oct 2009 16:03:12 +0000 (UTC)
commit 7cf5ef35af6c251734c91b28f43cf39023d9be5e
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 30 16:34:40 2009 +0100
List views and related records portals: Avoid zero-width columns.
* glom/utility_widgets/db_adddel/db_adddel.cc: treeview_append_column():
Except on maemo, don't try to auto-expand a non-rightmost column,
because that does not seem to be possible with fixed-height-mode,
which we use for performance.
ChangeLog | 15 ++++++++++++---
glom/utility_widgets/db_adddel/db_adddel.cc | 12 +++++++++++-
2 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bd6adbb..15d1d8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-30 Murray Cumming <murrayc murrayc com>
+
+ List views and related records portals: Avoid zero-width columns.
+
+ * glom/utility_widgets/db_adddel/db_adddel.cc: treeview_append_column():
+ Except on maemo, don't try to auto-expand a non-rightmost column,
+ because that does not seem to be possible with fixed-height-mode,
+ which we use for performance.
+
2009-10-28 David King <davidk openismus com>
* configure.ac:
@@ -17,7 +26,7 @@
2009-10-27 Murray Cumming <murrayc murrayc com>
- Trying to ignore unwanted column resize signals.
+ Trying to ignore unwanted column resize signals.
* glom/utility_widgets/db_adddel/db_adddel.[h|cc]:
Removed unused set_column_width().
@@ -28,7 +37,7 @@
2009-10-27 Murray Cumming <murrayc murrayc com>
- Avoid runtime warnings about 0 size TreeViewColumn.
+ Avoid runtime warnings about 0 size TreeViewColumn.
* glom/utility_widgets/db_adddel/db_adddel.cc: construct_specified_columns(),
treeview_append_column(): Avoid calling TreeViewColumn::set_fixed_width()
@@ -36,7 +45,7 @@
2009-10-27 Murray Cumming <murrayc murrayc com>
- Fix some warnings.
+ Fix some warnings.
* glom/dialog_existing_or_new.cc: get_service_info(): Replace a 0 with
(void*)0 to avoid a warning after my change on 2009-10-13.
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index ff45c50..41e526c 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -1965,7 +1965,10 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
#ifndef GLOM_ENABLE_MAEMO
DbTreeViewColumnGlom* pViewColumn = Gtk::manage( new DbTreeViewColumnGlom(Utils::string_escape_underscores(title), cellrenderer) );
- pViewColumn->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); //Need by fixed-height mode.
+
+ //This is needed by fixed-height mode. We get critical warnings otherwise.
+ //But we must call set_fixed_width() later or we will have a zero-width column.
+ pViewColumn->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
guint cols_count = m_TreeView.append_column(*pViewColumn);
#else
@@ -1997,6 +2000,13 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
pViewColumn->set_resizable();
#endif //GLOM_ENABLE_MAEMO
+ #ifndef GLOM_ENABLE_MAEMO
+ //GtkTreeView's fixed-height-mode does not allow us to have anything but
+ //the last column as expandable.
+ //TODO: Can we get the total size and calculate a starting size instead?
+ expand = false;
+ #endif
+
int column_width = -1; //Means expand.
if(!expand)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]