~lubuntu-software-center-team/light-software-center/trunk

« back to all changes in this revision

Viewing changes to src/Backend/AppsManager.vala

  • Committer: Stephen Smally
  • Date: 2012-07-10 16:27:53 UTC
  • Revision ID: eco.stefi@fastwebnet.it-20120710162753-ovo3kvd7tcui99p9
Refined AppsInfo page (with Granite widgets), fixed warnings (MichaelRawson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                                }
95
95
                        },
96
96
            (obj, resu) => {
97
 
                                Results res = client.generic_finish (resu);
98
 
                                details_received (pkg, p, res.get_details_array()[0]);
 
97
                                try {
 
98
                                        Results res = client.generic_finish (resu);
 
99
                                        details_received (pkg, p, res.get_details_array()[0]);
 
100
                            } catch (GLib.Error e) {
 
101
                                        stdout.printf ("ERROR! %s\n", e.message);
 
102
                                }
99
103
                                loading_finished (LoadingType.DETAILS);
100
104
                        }
101
105
            );
112
116
                                }
113
117
                        },
114
118
            (obj, resu) => {
115
 
                                Results res = client.generic_finish (resu);
116
 
                                get_details_2 (pkg, res.get_package_array()[0]);
 
119
                                try {
 
120
                                        Results res = client.generic_finish (resu);
 
121
                                    get_details_2 (pkg, res.get_package_array()[0]);
 
122
                                } catch (GLib.Error e) {
 
123
                                        stdout.printf ("ERROR! %s\n", e.message);
 
124
                                }
117
125
                        });
118
126
        }
119
127
        
120
128
        public int count_category (string category) {
121
 
                        Query q = database.prepare ("SELECT COUNT (*) FROM '%s';".printf (category));
122
 
            QueryResult r = q.execute();
123
 
            return r.fetch_int (0);
 
129
                        try {
 
130
                                Query q = database.prepare ("SELECT COUNT (*) FROM '%s';".printf (category));
 
131
                    QueryResult r = q.execute();
 
132
                    return r.fetch_int (0);
 
133
                        } catch (GLib.Error e) {
 
134
                                stdout.printf ("ERROR! %s\n", e.message);
 
135
                        }
 
136
                        return -1;
124
137
                }
125
138
        
126
139
        public void get_categories () {