[Aptitude-devel] [PATCH 2 of 4] * src/gtk/entityview.cc (EntityView::setup_column_properties): if
Obey Arthur Liu
arthur at milliways.fr
Fri Dec 26 13:14:50 UTC 2008
Luca Bruno a écrit :
> # 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);
> }
I skipped this patch because of limitations with GTK+. GTK+ only allows
'fixed' width columns when the TreeView is in fixed height mode. Since
fixed height mode is a significant speedup with large trees, I think
we'll have to keep it that way.
(aptitude:20100): Gtk-CRITICAL **: gtk_tree_view_set_fixed_height_mode:
assertion `gtk_tree_view_column_get_sizing (c) ==
GTK_TREE_VIEW_COLUMN_FIXED' failed
Arthur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20081226/416e9028/attachment.pgp
More information about the Aptitude-devel
mailing list