31
31
private Value value;
32
32
private string stock_image;
34
public void append_app (Package app) {
35
if (app.get_info() == Info.INSTALLED) {
34
public void append_app (LscApp app) {
35
/*if (app.get_info() == Info.INSTALLED) {
36
36
stock_image = Stock.YES;
38
38
stock_image = null;
40
40
model.append(out iter);
41
model.set(iter, 0, "deb", 1, IconSize.DND, 2, app.get_name()+"\n"+app.get_summary(), 3, stock_image, 4, app.get_id());
41
model.set(iter, 0, app.icon, 1, app.name+"\n"+app.summary, 2, stock_image, 3, app.id);
44
44
public void clear () {
57
57
public AppsTree () {
58
model = new ListStore(5,
58
model = new ListStore(4,
59
59
typeof(string), // Icon name
60
typeof(int), // Icon size
61
60
typeof(string), // Name and description
62
61
typeof(string), // Installed (Gtk.Stock)
63
62
typeof(string) // Package ID
68
insert_column_with_attributes(-1, "Icon", new CellRendererPixbuf(), "icon-name", 0, "stock-size", 1);
69
insert_column_with_attributes(-1, "Inst", new CellRendererPixbuf(), "stock-id", 3);
70
insert_column_with_attributes(-1, "Name", new CellRendererText(), "text", 2);
72
get_column(2).set_sort_column_id(2);
67
CellRendererPixbuf icon_cell = new CellRendererPixbuf();
68
icon_cell.stock_size = IconSize.DND;
70
insert_column_with_attributes(-1, "Icon", icon_cell, "icon-name", 0);
71
insert_column_with_attributes(-1, "Inst", new CellRendererPixbuf(), "stock-id", 2);
72
insert_column_with_attributes(-1, "Name", new CellRendererText(), "text", 1);
74
get_column(2).set_sort_column_id(1);
73
75
get_column(2).set_expand(true);
74
76
get_column(2).clicked();
76
get_column(1).set_sort_column_id(3);
78
get_column(1).set_sort_column_id(2);
78
80
cursor_changed.connect(on_cursor_changed);