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

« back to all changes in this revision

Viewing changes to src/Backend/AppsManager.vala

  • Committer: Stephen Smally
  • Date: 2012-07-05 13:49:59 UTC
  • Revision ID: eco.stefi@fastwebnet.it-20120705134959-y5vg66cadej8vix1
Added mutable install/remove button

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        // SQLHeavy stuffs
36
36
        private Database database;
37
37
        
38
 
        // Vars
39
 
        public string[] icon_table;
40
 
        
41
 
        public void get_pkgs_cb (Progress progress, ProgressType type) {
42
 
        }
43
 
        
44
38
        public void get_pkgs (string category) {
45
39
            try {
46
40
                                Query get_query = database.prepare ("SELECT * FROM '%s';".printf (category));
59
53
                                
60
54
        }
61
55
        
62
 
        public void search_for_packages (string filters, string name) {
63
 
            Bitfield filter;
64
 
            filter = filter_bitfield_from_string(filters);
65
 
            loading_started(LoadingType.PACKAGES, "Loading packages...");
66
 
            client.search_names_async(filter, {name, null}, null, (pkg) => {
67
 
                if (pkg.package != null) {
68
 
                    //app_added(pkg.package);
69
 
                }
70
 
                while (Gtk.events_pending()) {
71
 
                    Gtk.main_iteration();
72
 
                                }
73
 
            }, () => {
74
 
                loading_finished(LoadingType.PACKAGES);
75
 
            });
76
 
        }
77
 
        
78
56
        public void get_details_2 (LscApp pkg, Package p) {
79
57
                        client.get_details_async({p.get_id(), null},
80
58
            null,
133
111
            loading_finished(LoadingType.CATEGORIES);
134
112
        }
135
113
        
136
 
        public void get_screenshot (string pkg_name) {
137
 
            
138
 
        } 
139
 
        
140
114
        public AppsManager () {
141
115
            client = new Client();
142
116
            control = new Control();