[gnome-packagekit] Don't include the size column in the Status column. Fixes rh#509067
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] Don't include the size column in the Status column. Fixes rh#509067
- Date: Wed, 1 Jul 2009 09:26:05 +0000 (UTC)
commit 1103b7443f3a6757a153c22068829c7b147d962f
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 1 10:23:54 2009 +0100
Don't include the size column in the Status column. Fixes rh#509067
src/gpk-update-viewer.c | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 8e854dd..b499baf 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1107,17 +1107,6 @@ gpk_update_viewer_treeview_add_columns_update (GtkTreeView *treeview)
gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_add_attribute (column, renderer, "value", GPK_UPDATES_COLUMN_STATUS);
- /* size */
- renderer = gpk_cell_renderer_size_new ();
- g_object_set (renderer,
- "alignment", PANGO_ALIGN_RIGHT,
- "xalign", 1.0f,
- NULL);
- g_object_set (renderer,
- "value", GPK_UPDATES_COLUMN_SIZE, NULL);
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_add_attribute (column, renderer, "value", GPK_UPDATES_COLUMN_SIZE);
-
/* column for progress */
renderer = gpk_cell_renderer_spinner_new ();
g_object_set (renderer, "size", GTK_ICON_SIZE_BUTTON, NULL);
@@ -1131,6 +1120,27 @@ gpk_update_viewer_treeview_add_columns_update (GtkTreeView *treeview)
/* tooltips */
g_signal_connect (treeview, "query-tooltip", G_CALLBACK (gpk_update_viewer_treeview_query_tooltip_cb), NULL);
g_object_set (treeview, "has-tooltip", TRUE, NULL);
+
+ /* --- column for size --- */
+ column = gtk_tree_view_column_new ();
+ /* TRANSLATORS: a column that has size of each package */
+ gtk_tree_view_column_set_title (column, _("Size"));
+ gtk_tree_view_column_set_expand (GTK_TREE_VIEW_COLUMN (column), FALSE);
+ gtk_tree_view_column_set_sort_column_id (column, GPK_UPDATES_COLUMN_SIZE);
+
+ /* size */
+ renderer = gpk_cell_renderer_size_new ();
+ g_object_set (renderer,
+ "alignment", PANGO_ALIGN_RIGHT,
+ "xalign", 1.0f,
+ NULL);
+ g_object_set (renderer,
+ "value", GPK_UPDATES_COLUMN_SIZE, NULL);
+ gtk_tree_view_column_pack_start (column, renderer, FALSE);
+ gtk_tree_view_column_add_attribute (column, renderer, "value", GPK_UPDATES_COLUMN_SIZE);
+
+ gtk_tree_view_append_column (treeview, column);
+ g_object_set_data (G_OBJECT (column), "tooltip-id", GINT_TO_POINTER (GPK_UPDATES_COLUMN_SIZE));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]