[Aptitude-devel] [PATCH 2 of 4] * src/gtk/entityview.cc (EntityView::setup_column_properties): if
Luca Bruno
lethalman88 at gmail.com
Fri Dec 26 12:26:47 UTC 2008
# HG changeset patch
# User Luca Bruno <lethalman88 at gmail.com>
# Date 1230288425 -3600
# Node ID fd610a4a201e14871a8a5990d7bdee7a0351673b
# Parent a12881333af93cd5eca3c17a85f02e1082571f78
* src/gtk/entityview.cc (EntityView::setup_column_properties): if
size < 0 use AUTOSIZE sizing
(EntityView::init): setup Status column properties with size = -1
diff --git a/src/gtk/entityview.cc b/src/gtk/entityview.cc
--- a/src/gtk/entityview.cc
+++ b/src/gtk/entityview.cc
@@ -520,10 +520,9 @@
EditColumnsDialog::set_edit_name(Status, _("Status"));
EditColumnsDialog::set_description(Status, _("Icons showing the current and future status of this package."));
- setup_column_properties(Status, 48);
+ setup_column_properties(Status, -1);
// Needs to be GROW_ONLY because otherwise it gets clipped in
// the preview display.
- Status->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
tree->append_column(*Status);
}
set_markup_tooltip(tree, Status, cols.StatusDescriptionMarkup);
@@ -604,9 +603,14 @@
treeview_column->add_attribute((*it)->property_cell_background_set(), cols.BgSet);
treeview_column->add_attribute((*it)->property_cell_background(), cols.BgColor);
}
- treeview_column->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
- treeview_column->set_fixed_width(size);
- treeview_column->set_resizable(true);
+ if (size < 0)
+ treeview_column->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE);
+ else
+ {
+ treeview_column->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
+ treeview_column->set_fixed_width(size);
+ treeview_column->set_resizable(true);
+ }
treeview_column->set_reorderable(true);
}
More information about the Aptitude-devel
mailing list