~lubuntu-software-center-team/lubuntu-software-center/vala-port

« back to all changes in this revision

Viewing changes to src/Widgets/Pages/AppsView.vala

  • Committer: Stephen Smally
  • Date: 2012-07-04 13:40:36 UTC
  • Revision ID: eco.stefi@fastwebnet.it-20120704134036-jzxry23ch4in5o80
Implemented packages list via Database, listing works and is fast!

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        private ListStore model;
29
29
        private TreeIter iter;
30
30
        private TreePath path;
31
 
        private Value value;
32
31
        private string stock_image;
33
32
        
34
33
        public void append_app (LscApp app) {
48
47
        public void on_cursor_changed (TreeView widget) {
49
48
            get_cursor(out path, null);
50
49
            if (path != null) {
 
50
                                string val;
51
51
                model.get_iter(out iter, path);
52
 
                model.get_value(iter, 4, out value);
53
 
                selected_row(value.get_string());
 
52
                model.get(iter, 3, out val);
 
53
                selected_row(val);
54
54
            }
55
55
        }
56
56
        
67
67
            CellRendererPixbuf icon_cell = new CellRendererPixbuf();
68
68
            icon_cell.stock_size = IconSize.DND;
69
69
            
 
70
            CellRendererText text = new CellRendererText();
 
71
            text.ellipsize = Pango.EllipsizeMode.END;
 
72
            
70
73
            insert_column_with_attributes(-1, "Icon", icon_cell, "icon-name", 0);
71
74
            insert_column_with_attributes(-1, "Inst", new CellRendererPixbuf(), "stock-id", 2);
72
 
            insert_column_with_attributes(-1, "Name", new CellRendererText(), "text", 1);
 
75
            insert_column_with_attributes(-1, "Name", text, "text", 1);
73
76
            
74
77
            get_column(2).set_sort_column_id(1);
75
78
            get_column(2).set_expand(true);