aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2006-11-17 04:14:56 +0000
committerJason Woodward2006-11-17 04:14:56 +0000
commitb01f90a9a4276f6c59aea0a23fb4739e8812ae14 (patch)
treed09595a98467871bf9c17ec3a43a05587b42f977 /src
parentf7ceab8ee337e8afe0c1bda0a9e6e6df08099483 (diff)
downloadgslapt-b01f90a9a4276f6c59aea0a23fb4739e8812ae14.tar.gz
Added install size to the package listing (Dan)
Diffstat (limited to 'src')
-rw-r--r--src/callbacks.c13
-rw-r--r--src/callbacks.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 01dba07..1732b3a 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -431,7 +431,8 @@ void build_package_treeviewlist (GtkWidget *treeview)
base_model = GTK_TREE_MODEL(gtk_list_store_new (
NUMBER_OF_COLUMNS,
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN
+ G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN, G_TYPE_BOOLEAN
));
for (i = 0; i < all->pkg_count; i++ ) {
@@ -512,6 +513,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
VERSION_COLUMN,all->pkgs[i]->version,
LOCATION_COLUMN,location,
DESC_COLUMN,short_desc,
+ SIZE_COLUMN,all->pkgs[i]->size_u,
STATUS_COLUMN,status,
INST_COLUMN, FALSE,
VISIBLE_COLUMN,TRUE,
@@ -556,6 +558,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
VERSION_COLUMN,installed->pkgs[i]->version,
LOCATION_COLUMN,installed->pkgs[i]->location,
DESC_COLUMN,short_desc,
+ SIZE_COLUMN,installed->pkgs[i]->size_u,
STATUS_COLUMN,status,
INST_COLUMN, TRUE,
VISIBLE_COLUMN,TRUE,
@@ -2699,6 +2702,14 @@ void build_treeview_columns (GtkWidget *treeview)
gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
gtk_tree_view_column_set_resizable(column, TRUE);
+ /* column for installed size */
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes ((gchar *)_("Installed Size"), renderer,
+ "text", SIZE_COLUMN, NULL);
+ gtk_tree_view_column_set_sort_column_id (column, SIZE_COLUMN);
+ gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
+ gtk_tree_view_column_set_resizable(column, TRUE);
+
/* invisible column to sort installed by */
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes ((gchar *)_("Installed"), renderer,
diff --git a/src/callbacks.h b/src/callbacks.h
index f2a8462..a86a63a 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -27,6 +27,7 @@ enum {
VERSION_COLUMN,
LOCATION_COLUMN,
DESC_COLUMN,
+ SIZE_COLUMN,
STATUS_COLUMN,
VISIBLE_COLUMN,
INST_COLUMN,