286
321
UnityOptionsFilter* _tmp10_;
288
323
gchar* pkg_search_string;
289
UnityLensSearch* _tmp12_;
325
UnityOptionsFilter* _tmp13_;
326
UnityOptionsFilter* _tmp14_;
331
UnityLensSearch* _tmp18_;
291
333
gboolean has_search;
294
DeeSerializableModel* _tmp15_;
295
DeeTransaction* _tmp16_;
336
DeeSerializableModel* _tmp21_;
337
DeeTransaction* _tmp22_;
296
338
DeeTransaction* transaction;
297
DeeTransaction* _tmp17_;
339
DeeTransaction* _tmp23_;
299
341
GeeSet* installed_uris;
301
343
GeeSet* available_uris;
302
UnityPackageSort _tmp20_;
304
UnityPackageSearcher* _tmp22_;
305
const gchar* _tmp23_;
306
UnityPackageSort _tmp24_;
307
UnityPackageSearchResult* _tmp25_;
308
UnityPackageSearchResult* appresults;
344
UnityPackageSort _tmp26_;
310
345
gboolean _tmp27_;
311
UnityPackageSearchResult* _tmp28_;
312
UnityPackageSearchResult* _tmp29_;
315
DeeTransaction* _tmp32_;
346
UnityPackageSearcher* _tmp28_;
347
const gchar* _tmp29_;
348
UnityPackageSort _tmp30_;
349
UnityPackageSearchResult* _tmp31_;
350
UnityPackageSearchResult* appresults;
317
353
UnityPackageSearchResult* _tmp34_;
321
const gchar* _tmp38_;
327
UnityOptionsFilter* _tmp44_;
354
UnityPackageSearchResult* _tmp35_;
357
DeeTransaction* _tmp38_;
359
UnityPackageSearchResult* _tmp40_;
363
const gchar* _tmp44_;
369
UnityOptionsFilter* _tmp50_;
329
371
gchar* zg_search_string;
330
ZeitgeistIndex* _tmp46_;
331
const gchar* _tmp47_;
332
ZeitgeistTimeRange* _tmp48_;
333
ZeitgeistTimeRange* _tmp49_;
336
GCancellable* _tmp52_;
337
ZeitgeistResultSet* _tmp53_;
338
ZeitgeistResultSet* _tmp54_;
339
ZeitgeistResultSet* results;
340
ZeitgeistResultSet* _tmp55_;
341
DeeTransaction* _tmp56_;
372
ZeitgeistIndex* _tmp52_;
373
const gchar* _tmp53_;
374
ZeitgeistTimeRange* _tmp54_;
375
ZeitgeistTimeRange* _tmp55_;
378
GCancellable* _tmp58_;
344
379
ZeitgeistResultSet* _tmp59_;
380
ZeitgeistResultSet* _tmp60_;
381
ZeitgeistResultSet* results;
346
382
ZeitgeistResultSet* _tmp61_;
350
const gchar* _tmp65_;
383
DeeTransaction* _tmp62_;
386
ZeitgeistResultSet* _tmp65_;
388
ZeitgeistResultSet* _tmp67_;
392
const gchar* _tmp71_;
353
UnityLensSearch* _tmp66_;
354
const gchar* _tmp67_;
355
const gchar* _tmp68_;
357
const gchar* _tmp70_;
358
DeeTransaction* _tmp71_;
364
UnityPackageSearcher* _tmp77_;
395
UnityLensSearch* _tmp72_;
396
const gchar* _tmp73_;
397
const gchar* _tmp74_;
399
const gchar* _tmp76_;
400
DeeTransaction* _tmp77_;
401
UnityApplicationsLensPurchaseInfoHelper* _tmp78_;
366
402
gboolean _tmp79_;
368
UnityPackageSearcher* _tmp81_;
369
const gchar* _tmp82_;
370
UnityPackageSearchResult* _tmp83_;
407
UnityPackageSearcher* _tmp84_;
411
UnityPackageSearcher* _tmp88_;
412
const gchar* _tmp89_;
413
UnityPackageSearchResult* _tmp90_;
371
414
UnityPackageSearchResult* pkgresults;
372
UnityPackageSearchResult* _tmp84_;
375
DeeSerializableModel* _tmp87_;
377
UnityPackageSearchResult* _tmp89_;
381
const gchar* _tmp93_;
383
UnityLensSearch* _tmp95_;
384
UnityOptionsFilter* _tmp96_;
415
UnityPackageSearchResult* _tmp91_;
418
DeeSerializableModel* _tmp94_;
420
UnityPackageSearchResult* _tmp96_;
424
const gchar* _tmp100_;
427
UnityLensSearch* _tmp103_;
428
UnityOptionsFilter* _tmp104_;
386
430
gchar* filter_query;
387
UnityPackageSearcher* _tmp98_;
388
const gchar* _tmp99_;
389
UnityPackageSearchResult* _tmp100_;
390
UnityPackageSearchResult* random_pkgresults;
391
UnityPackageSearchResult* _tmp101_;
394
DeeSerializableModel* _tmp104_;
396
UnityPackageSearchResult* _tmp106_;
400
DeeSerializableModel* _tmp110_;
402
UnityLensSearch* _tmp112_;
403
const gchar* _tmp113_;
405
UnityLensSearch* _tmp115_;
431
UnityPackageSearcher* _tmp106_;
432
const gchar* _tmp107_;
433
UnityPackageSearchResult* _tmp108_;
434
UnityPackageSearchResult* _vala1_pkgresults;
435
UnityApplicationsLensPurchaseInfoHelper* _tmp109_;
436
UnityPackageSearchResult* _tmp110_;
437
UnityPackageSearchResult* _tmp111_;
440
DeeSerializableModel* _tmp114_;
442
UnityPackageSearchResult* _tmp116_;
448
GeeHashSet* _tmp121_;
449
GeeSet* duplicates_lookup;
450
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp122_;
451
UnityApplicationsLensSoftwareCenterDataCache* _tmp123_;
452
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp124_;
454
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp126_;
455
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** whats_new;
456
gint whats_new_length1;
457
gint _whats_new_size_;
458
UnityApplicationsLensPurchaseInfoHelper* _tmp127_;
459
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp128_;
460
gint _tmp128__length1;
463
UnityPackageSearcher* _tmp130_;
465
UnityPackageSearchResult* _tmp132_;
466
UnityPackageSearchResult* tmpresults;
467
UnityApplicationsLensPurchaseInfoHelper* _tmp133_;
468
UnityPackageSearchResult* _tmp134_;
469
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp135_;
470
gint _tmp135__length1;
471
DeeSerializableModel* _tmp136_;
473
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp138_;
475
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp140_;
476
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** top_rated;
477
gint top_rated_length1;
478
gint _top_rated_size_;
479
UnityApplicationsLensPurchaseInfoHelper* _tmp141_;
480
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp142_;
481
gint _tmp142__length1;
483
UnityPackageSearcher* _tmp144_;
485
UnityPackageSearchResult* _tmp146_;
486
UnityApplicationsLensPurchaseInfoHelper* _tmp147_;
487
UnityPackageSearchResult* _tmp148_;
489
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp150_;
490
gint _tmp150__length1;
491
DeeSerializableModel* _tmp151_;
495
const gchar* _tmp154_;
500
DeeSerializableModel* _tmp159_;
502
UnityLensSearch* _tmp161_;
503
const gchar* _tmp162_;
505
UnityLensSearch* _tmp164_;
406
506
GError * _inner_error_;
1795
1962
_data_->_tmp11_ = NULL;
1796
1963
_data_->_tmp11_ = unity_applications_lens_daemon_prepare_pkg_search_string (_data_->self, _data_->_tmp9_, _data_->_tmp10_);
1797
1964
_data_->pkg_search_string = _data_->_tmp11_;
1798
_data_->_tmp12_ = _data_->search;
1799
_data_->_tmp13_ = FALSE;
1800
_data_->_tmp13_ = unity_applications_lens_utils_is_search_empty (_data_->_tmp12_);
1801
_data_->has_search = !_data_->_tmp13_;
1802
_data_->_tmp14_ = g_timer_new ();
1803
_data_->timer = _data_->_tmp14_;
1804
_data_->_tmp15_ = _data_->model;
1805
_data_->_tmp16_ = (DeeTransaction*) dee_transaction_new ((DeeModel*) _data_->_tmp15_);
1806
_data_->transaction = _data_->_tmp16_;
1807
_data_->_tmp17_ = _data_->transaction;
1808
dee_model_clear ((DeeModel*) _data_->_tmp17_);
1809
_data_->_tmp18_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
1810
_data_->installed_uris = (GeeSet*) _data_->_tmp18_;
1811
_data_->_tmp19_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
1812
_data_->available_uris = (GeeSet*) _data_->_tmp19_;
1813
_data_->_tmp21_ = _data_->has_search;
1814
if (_data_->_tmp21_) {
1815
_data_->_tmp20_ = UNITY_PACKAGE_SORT_BY_RELEVANCY;
1817
_data_->_tmp20_ = UNITY_PACKAGE_SORT_BY_NAME;
1819
_data_->_tmp22_ = _data_->self->appsearcher;
1820
_data_->_tmp23_ = _data_->pkg_search_string;
1821
_data_->_tmp24_ = _data_->_tmp20_;
1822
_data_->_tmp25_ = NULL;
1823
_data_->_tmp25_ = unity_package_searcher_search (_data_->_tmp22_, _data_->_tmp23_, (guint) 0, UNITY_PACKAGE_SEARCHTYPE_PREFIX, _data_->_tmp24_);
1824
_data_->appresults = _data_->_tmp25_;
1825
_data_->_tmp26_ = FALSE;
1826
_data_->_tmp26_ = unity_applications_lens_daemon_local_apps_active (_data_->self);
1827
if (_data_->_tmp26_) {
1828
_data_->_tmp27_ = _data_->has_search;
1829
if (_data_->_tmp27_) {
1830
_data_->_tmp28_ = _data_->appresults;
1831
unity_applications_lens_daemon_resort_pkg_search_results (_data_->self, _data_->_tmp28_);
1965
_data_->_tmp13_ = _data_->filter;
1966
if (_data_->_tmp13_ != NULL) {
1967
_data_->_tmp14_ = _data_->filter;
1968
_data_->_tmp15_ = unity_filter_get_filtering ((UnityFilter*) _data_->_tmp14_);
1969
_data_->_tmp16_ = _data_->_tmp15_;
1970
_data_->_tmp12_ = _data_->_tmp16_;
1972
_data_->_tmp12_ = FALSE;
1974
_data_->_tmp17_ = _data_->_tmp12_;
1975
_data_->has_filter = _data_->_tmp17_;
1976
_data_->_tmp18_ = _data_->search;
1977
_data_->_tmp19_ = FALSE;
1978
_data_->_tmp19_ = unity_applications_lens_utils_is_search_empty (_data_->_tmp18_);
1979
_data_->has_search = !_data_->_tmp19_;
1980
_data_->_tmp20_ = g_timer_new ();
1981
_data_->timer = _data_->_tmp20_;
1982
_data_->_tmp21_ = _data_->model;
1983
_data_->_tmp22_ = (DeeTransaction*) dee_transaction_new ((DeeModel*) _data_->_tmp21_);
1984
_data_->transaction = _data_->_tmp22_;
1985
_data_->_tmp23_ = _data_->transaction;
1986
dee_model_clear ((DeeModel*) _data_->_tmp23_);
1987
_data_->_tmp24_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
1988
_data_->installed_uris = (GeeSet*) _data_->_tmp24_;
1989
_data_->_tmp25_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
1990
_data_->available_uris = (GeeSet*) _data_->_tmp25_;
1991
_data_->_tmp27_ = _data_->has_search;
1992
if (_data_->_tmp27_) {
1993
_data_->_tmp26_ = UNITY_PACKAGE_SORT_BY_RELEVANCY;
1995
_data_->_tmp26_ = UNITY_PACKAGE_SORT_BY_NAME;
1997
_data_->_tmp28_ = _data_->self->appsearcher;
1998
_data_->_tmp29_ = _data_->pkg_search_string;
1999
_data_->_tmp30_ = _data_->_tmp26_;
2000
_data_->_tmp31_ = NULL;
2001
_data_->_tmp31_ = unity_package_searcher_search (_data_->_tmp28_, _data_->_tmp29_, (guint) 0, UNITY_PACKAGE_SEARCHTYPE_PREFIX, _data_->_tmp30_);
2002
_data_->appresults = _data_->_tmp31_;
2003
_data_->_tmp32_ = FALSE;
2004
_data_->_tmp32_ = unity_applications_lens_daemon_local_apps_active (_data_->self);
2005
if (_data_->_tmp32_) {
2006
_data_->_tmp33_ = _data_->has_search;
2007
if (_data_->_tmp33_) {
2008
_data_->_tmp34_ = _data_->appresults;
2009
unity_applications_lens_daemon_resort_pkg_search_results (_data_->self, _data_->_tmp34_);
1833
_data_->_tmp29_ = _data_->appresults;
1834
_data_->_tmp30_ = _data_->installed_uris;
1835
_data_->_tmp31_ = _data_->available_uris;
1836
_data_->_tmp32_ = _data_->transaction;
1837
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp29_, _data_->_tmp30_, _data_->_tmp31_, (DeeModel*) _data_->_tmp32_, UNITY_APPLICATIONS_LENS_CATEGORY_INSTALLED, (guint) 0);
2011
_data_->_tmp35_ = _data_->appresults;
2012
_data_->_tmp36_ = _data_->installed_uris;
2013
_data_->_tmp37_ = _data_->available_uris;
2014
_data_->_tmp38_ = _data_->transaction;
2015
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp35_, _data_->_tmp36_, _data_->_tmp37_, (DeeModel*) _data_->_tmp38_, UNITY_APPLICATIONS_LENS_CATEGORY_INSTALLED, (guint) 0);
1839
_data_->_tmp33_ = _data_->timer;
1840
g_timer_stop (_data_->_tmp33_);
1841
_data_->_tmp34_ = _data_->appresults;
1842
_data_->_tmp35_ = _data_->_tmp34_->num_hits;
1843
_data_->_tmp36_ = _data_->timer;
1844
_data_->_tmp37_ = 0.0;
1845
_data_->_tmp37_ = g_timer_elapsed (_data_->_tmp36_, NULL);
1846
_data_->_tmp38_ = _data_->pkg_search_string;
1847
g_debug ("daemon.vala:510: Entry search listed %i Installed apps in %fms for que" \
1848
"ry: %s", _data_->_tmp35_, _data_->_tmp37_ * 1000, _data_->_tmp38_);
1849
_data_->_tmp40_ = FALSE;
1850
_data_->_tmp40_ = unity_applications_lens_daemon_local_apps_active (_data_->self);
1851
if (_data_->_tmp40_) {
1852
_data_->_tmp41_ = _data_->self->priv->_display_recent_apps;
1853
_data_->_tmp39_ = _data_->_tmp41_;
2017
_data_->_tmp39_ = _data_->timer;
2018
g_timer_stop (_data_->_tmp39_);
2019
_data_->_tmp40_ = _data_->appresults;
2020
_data_->_tmp41_ = _data_->_tmp40_->num_hits;
2021
_data_->_tmp42_ = _data_->timer;
2022
_data_->_tmp43_ = 0.0;
2023
_data_->_tmp43_ = g_timer_elapsed (_data_->_tmp42_, NULL);
2024
_data_->_tmp44_ = _data_->pkg_search_string;
2025
g_debug ("daemon.vala:530: Entry search listed %i Installed apps in %fms for que" \
2026
"ry: %s", _data_->_tmp41_, _data_->_tmp43_ * 1000, _data_->_tmp44_);
2027
_data_->_tmp46_ = FALSE;
2028
_data_->_tmp46_ = unity_applications_lens_daemon_local_apps_active (_data_->self);
2029
if (_data_->_tmp46_) {
2030
_data_->_tmp47_ = _data_->self->priv->_display_recent_apps;
2031
_data_->_tmp45_ = _data_->_tmp47_;
1855
_data_->_tmp39_ = FALSE;
2033
_data_->_tmp45_ = FALSE;
1857
_data_->_tmp42_ = _data_->_tmp39_;
1858
if (_data_->_tmp42_) {
2035
_data_->_tmp48_ = _data_->_tmp45_;
2036
if (_data_->_tmp48_) {
1860
_data_->_tmp43_ = _data_->timer;
1861
g_timer_start (_data_->_tmp43_);
1862
_data_->_tmp44_ = _data_->filter;
1863
_data_->_tmp45_ = NULL;
1864
_data_->_tmp45_ = unity_applications_lens_daemon_prepare_zg_search_string (_data_->self, "", _data_->_tmp44_);
1865
_data_->zg_search_string = _data_->_tmp45_;
1866
_data_->_tmp46_ = _data_->self->priv->zg_index;
1867
_data_->_tmp47_ = _data_->zg_search_string;
1868
_data_->_tmp48_ = zeitgeist_time_range_new_anytime ();
1869
_data_->_tmp49_ = g_object_ref_sink (_data_->_tmp48_);
1870
_data_->_tmp50_ = _data_->self->priv->zg_templates;
1871
_data_->_tmp51_ = _g_ptr_array_ref0 (_data_->_tmp50_);
1872
_data_->_tmp52_ = _data_->cancellable;
2038
_data_->_tmp49_ = _data_->timer;
2039
g_timer_start (_data_->_tmp49_);
2040
_data_->_tmp50_ = _data_->filter;
2041
_data_->_tmp51_ = NULL;
2042
_data_->_tmp51_ = unity_applications_lens_daemon_prepare_zg_search_string (_data_->self, "", _data_->_tmp50_);
2043
_data_->zg_search_string = _data_->_tmp51_;
2044
_data_->_tmp52_ = _data_->self->priv->zg_index;
2045
_data_->_tmp53_ = _data_->zg_search_string;
2046
_data_->_tmp54_ = zeitgeist_time_range_new_anytime ();
2047
_data_->_tmp55_ = g_object_ref_sink (_data_->_tmp54_);
2048
_data_->_tmp56_ = _data_->self->priv->zg_templates;
2049
_data_->_tmp57_ = _g_ptr_array_ref0 (_data_->_tmp56_);
2050
_data_->_tmp58_ = _data_->cancellable;
1873
2051
_data_->_state_ = 1;
1874
zeitgeist_index_search (_data_->_tmp46_, _data_->_tmp47_, _data_->_tmp49_, _data_->_tmp51_, (guint32) 0, (guint32) 20, ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS, _data_->_tmp52_, unity_applications_lens_daemon_update_scope_search_ready, _data_);
2052
zeitgeist_index_search (_data_->_tmp52_, _data_->_tmp53_, _data_->_tmp55_, _data_->_tmp57_, (guint32) 0, (guint32) 20, ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS, _data_->_tmp58_, unity_applications_lens_daemon_update_scope_search_ready, _data_);
1877
_data_->_tmp53_ = NULL;
1878
_data_->_tmp53_ = zeitgeist_index_search_finish (_data_->_tmp46_, _data_->_res_, &_data_->_inner_error_);
1879
_data_->_tmp54_ = _data_->_tmp53_;
1880
_g_object_unref0 (_data_->_tmp49_);
1881
_data_->results = _data_->_tmp54_;
2055
_data_->_tmp59_ = NULL;
2056
_data_->_tmp59_ = zeitgeist_index_search_finish (_data_->_tmp52_, _data_->_res_, &_data_->_inner_error_);
2057
_data_->_tmp60_ = _data_->_tmp59_;
2058
_g_object_unref0 (_data_->_tmp55_);
2059
_data_->results = _data_->_tmp60_;
1882
2060
if (_data_->_inner_error_ != NULL) {
1883
2061
_g_free0 (_data_->zg_search_string);
1884
2062
if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
1972
2150
g_clear_error (&_data_->_inner_error_);
1975
_data_->_tmp74_ = FALSE;
1976
_data_->_tmp74_ = unity_applications_lens_daemon_usc_apps_active (_data_->self);
1977
if (_data_->_tmp74_) {
1978
_data_->_tmp75_ = _data_->self->priv->_display_available_apps;
1979
_data_->_tmp73_ = _data_->_tmp75_;
1981
_data_->_tmp73_ = FALSE;
1983
_data_->_tmp76_ = _data_->_tmp73_;
1984
if (_data_->_tmp76_) {
1985
_data_->_tmp77_ = _data_->self->priv->pkgsearcher;
1986
_data_->_tmp72_ = _data_->_tmp77_ != NULL;
1988
_data_->_tmp72_ = FALSE;
1990
_data_->_tmp78_ = _data_->_tmp72_;
1991
if (_data_->_tmp78_) {
1992
_data_->_tmp79_ = _data_->has_search;
1993
if (_data_->_tmp79_) {
1994
_data_->_tmp80_ = _data_->timer;
1995
g_timer_start (_data_->_tmp80_);
1996
_data_->_tmp81_ = _data_->self->priv->pkgsearcher;
1997
_data_->_tmp82_ = _data_->pkg_search_string;
1998
_data_->_tmp83_ = NULL;
1999
_data_->_tmp83_ = unity_package_searcher_search (_data_->_tmp81_, _data_->_tmp82_, (guint) 50, UNITY_PACKAGE_SEARCHTYPE_PREFIX, UNITY_PACKAGE_SORT_BY_RELEVANCY);
2000
_data_->pkgresults = _data_->_tmp83_;
2001
_data_->_tmp84_ = _data_->pkgresults;
2002
_data_->_tmp85_ = _data_->installed_uris;
2003
_data_->_tmp86_ = _data_->available_uris;
2004
_data_->_tmp87_ = _data_->model;
2005
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp84_, _data_->_tmp85_, _data_->_tmp86_, (DeeModel*) _data_->_tmp87_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, (guint) 0);
2006
_data_->_tmp88_ = _data_->timer;
2007
g_timer_stop (_data_->_tmp88_);
2008
_data_->_tmp89_ = _data_->pkgresults;
2009
_data_->_tmp90_ = _data_->_tmp89_->num_hits;
2010
_data_->_tmp91_ = _data_->timer;
2011
_data_->_tmp92_ = 0.0;
2012
_data_->_tmp92_ = g_timer_elapsed (_data_->_tmp91_, NULL);
2013
_data_->_tmp93_ = _data_->pkg_search_string;
2014
g_debug ("daemon.vala:561: Entry search listed %i Available apps in %fms for que" \
2015
"ry: %s", _data_->_tmp90_, _data_->_tmp92_ * 1000, _data_->_tmp93_);
2153
_data_->_tmp78_ = unity_applications_lens_purchase_info_helper_new ();
2154
_unity_applications_lens_purchase_info_helper_unref0 (_data_->self->priv->purchase_info);
2155
_data_->self->priv->purchase_info = _data_->_tmp78_;
2156
_data_->_tmp81_ = FALSE;
2157
_data_->_tmp81_ = unity_applications_lens_daemon_usc_apps_active (_data_->self);
2158
if (_data_->_tmp81_) {
2159
_data_->_tmp82_ = _data_->self->priv->_display_available_apps;
2160
_data_->_tmp80_ = _data_->_tmp82_;
2162
_data_->_tmp80_ = FALSE;
2164
_data_->_tmp83_ = _data_->_tmp80_;
2165
if (_data_->_tmp83_) {
2166
_data_->_tmp84_ = _data_->self->priv->pkgsearcher;
2167
_data_->_tmp79_ = _data_->_tmp84_ != NULL;
2169
_data_->_tmp79_ = FALSE;
2171
_data_->_tmp85_ = _data_->_tmp79_;
2172
if (_data_->_tmp85_) {
2173
_data_->_tmp86_ = _data_->has_search;
2174
if (_data_->_tmp86_) {
2175
_data_->_tmp87_ = _data_->timer;
2176
g_timer_start (_data_->_tmp87_);
2177
_data_->_tmp88_ = _data_->self->priv->pkgsearcher;
2178
_data_->_tmp89_ = _data_->pkg_search_string;
2179
_data_->_tmp90_ = NULL;
2180
_data_->_tmp90_ = unity_package_searcher_search (_data_->_tmp88_, _data_->_tmp89_, (guint) 50, UNITY_PACKAGE_SEARCHTYPE_PREFIX, UNITY_PACKAGE_SORT_BY_RELEVANCY);
2181
_data_->pkgresults = _data_->_tmp90_;
2182
_data_->_tmp91_ = _data_->pkgresults;
2183
_data_->_tmp92_ = _data_->installed_uris;
2184
_data_->_tmp93_ = _data_->available_uris;
2185
_data_->_tmp94_ = _data_->model;
2186
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp91_, _data_->_tmp92_, _data_->_tmp93_, (DeeModel*) _data_->_tmp94_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, (guint) 0);
2187
_data_->_tmp95_ = _data_->timer;
2188
g_timer_stop (_data_->_tmp95_);
2189
_data_->_tmp96_ = _data_->pkgresults;
2190
_data_->_tmp97_ = _data_->_tmp96_->num_hits;
2191
_data_->_tmp98_ = _data_->timer;
2192
_data_->_tmp99_ = 0.0;
2193
_data_->_tmp99_ = g_timer_elapsed (_data_->_tmp98_, NULL);
2194
_data_->_tmp100_ = _data_->pkg_search_string;
2195
g_debug ("daemon.vala:583: Entry search listed %i Available apps in %fms for que" \
2196
"ry: %s", _data_->_tmp97_, _data_->_tmp99_ * 1000, _data_->_tmp100_);
2016
2197
_unity_package_search_result_free0 (_data_->pkgresults);
2018
_data_->_tmp94_ = _data_->timer;
2019
g_timer_start (_data_->_tmp94_);
2020
_data_->_tmp95_ = _data_->search;
2021
_data_->_tmp96_ = _data_->filter;
2022
_data_->_tmp97_ = NULL;
2023
_data_->_tmp97_ = unity_applications_lens_daemon_prepare_pkg_search_string (_data_->self, _data_->_tmp95_, _data_->_tmp96_);
2024
_data_->filter_query = _data_->_tmp97_;
2025
_data_->_tmp98_ = _data_->self->priv->pkgsearcher;
2026
_data_->_tmp99_ = _data_->filter_query;
2027
_data_->_tmp100_ = NULL;
2028
_data_->_tmp100_ = unity_package_searcher_get_random_apps (_data_->_tmp98_, _data_->_tmp99_, (guint) 12);
2029
_data_->random_pkgresults = _data_->_tmp100_;
2030
_data_->_tmp101_ = _data_->random_pkgresults;
2031
_data_->_tmp102_ = _data_->installed_uris;
2032
_data_->_tmp103_ = _data_->available_uris;
2033
_data_->_tmp104_ = _data_->model;
2034
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp101_, _data_->_tmp102_, _data_->_tmp103_, (DeeModel*) _data_->_tmp104_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, (guint) 6);
2035
_data_->_tmp105_ = _data_->timer;
2036
g_timer_stop (_data_->_tmp105_);
2037
_data_->_tmp106_ = _data_->random_pkgresults;
2038
_data_->_tmp107_ = _data_->_tmp106_->num_hits;
2039
_data_->_tmp108_ = _data_->timer;
2040
_data_->_tmp109_ = 0.0;
2041
_data_->_tmp109_ = g_timer_elapsed (_data_->_tmp108_, NULL);
2042
g_debug ("daemon.vala:572: Entry search listed %i random Available apps in %fms", _data_->_tmp107_, _data_->_tmp109_ * 1000);
2043
_unity_package_search_result_free0 (_data_->random_pkgresults);
2044
_g_free0 (_data_->filter_query);
2199
_data_->_tmp101_ = _data_->has_filter;
2200
if (_data_->_tmp101_) {
2201
_data_->_tmp102_ = _data_->timer;
2202
g_timer_start (_data_->_tmp102_);
2203
_data_->_tmp103_ = _data_->search;
2204
_data_->_tmp104_ = _data_->filter;
2205
_data_->_tmp105_ = NULL;
2206
_data_->_tmp105_ = unity_applications_lens_daemon_prepare_pkg_search_string (_data_->self, _data_->_tmp103_, _data_->_tmp104_);
2207
_data_->filter_query = _data_->_tmp105_;
2208
_data_->_tmp106_ = _data_->self->priv->pkgsearcher;
2209
_data_->_tmp107_ = _data_->filter_query;
2210
_data_->_tmp108_ = NULL;
2211
_data_->_tmp108_ = unity_package_searcher_get_apps (_data_->_tmp106_, _data_->_tmp107_, UNITY_APPLICATIONS_LENS_MAX_APP_FOR_DOWNLOAD_FOR_EMPTY_QUERY, _unity_applications_lens_daemon_filter_cb_unity_package_app_filter_callback, _data_->self);
2212
_data_->_vala1_pkgresults = _data_->_tmp108_;
2213
_data_->_tmp109_ = _data_->self->priv->purchase_info;
2214
_data_->_tmp110_ = _data_->_vala1_pkgresults;
2215
unity_applications_lens_purchase_info_helper_from_pkgresults (_data_->_tmp109_, _data_->_tmp110_);
2216
_data_->_tmp111_ = _data_->_vala1_pkgresults;
2217
_data_->_tmp112_ = _data_->installed_uris;
2218
_data_->_tmp113_ = _data_->available_uris;
2219
_data_->_tmp114_ = _data_->model;
2220
unity_applications_lens_daemon_add_pkg_search_result (_data_->self, _data_->_tmp111_, _data_->_tmp112_, _data_->_tmp113_, (DeeModel*) _data_->_tmp114_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, UNITY_APPLICATIONS_LENS_MAX_APP_FOR_DOWNLOAD_FOR_EMPTY_QUERY);
2221
_data_->_tmp115_ = _data_->timer;
2222
g_timer_stop (_data_->_tmp115_);
2223
_data_->_tmp116_ = _data_->_vala1_pkgresults;
2224
_data_->_tmp117_ = _data_->_tmp116_->num_hits;
2225
_data_->_tmp118_ = _data_->timer;
2226
_data_->_tmp119_ = 0.0;
2227
_data_->_tmp119_ = g_timer_elapsed (_data_->_tmp118_, NULL);
2228
g_debug ("daemon.vala:595: Entry search listed %i Available apps in %fms", _data_->_tmp117_, _data_->_tmp119_ * 1000);
2229
_unity_package_search_result_free0 (_data_->_vala1_pkgresults);
2230
_g_free0 (_data_->filter_query);
2232
_data_->_tmp120_ = _data_->timer;
2233
g_timer_start (_data_->_tmp120_);
2234
_data_->hits = (guint) 0;
2236
_data_->_tmp121_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
2237
_data_->duplicates_lookup = (GeeSet*) _data_->_tmp121_;
2238
_data_->_tmp122_ = _data_->self->priv->sc_data_provider;
2239
if (_data_->_tmp122_ == NULL) {
2240
_data_->_tmp123_ = unity_applications_lens_software_center_data_cache_new (UNITY_APPLICATIONS_LENS_TOP_RATED_ITEMS_CACHE_LIFETIME);
2241
_g_object_unref0 (_data_->self->priv->sc_data_provider);
2242
_data_->self->priv->sc_data_provider = (UnityApplicationsLensSoftwareCenterDataProviderProxy*) _data_->_tmp123_;
2244
_data_->_tmp124_ = _data_->self->priv->sc_data_provider;
2245
_data_->_tmp125_ = 0;
2246
_data_->_tmp126_ = NULL;
2247
_data_->_tmp126_ = unity_applications_lens_software_center_data_provider_proxy_get_items_for_category (_data_->_tmp124_, "unity-whats-new", &_data_->_tmp125_, &_data_->_inner_error_);
2248
_data_->whats_new = _data_->_tmp126_;
2249
_data_->whats_new_length1 = _data_->_tmp125_;
2250
_data_->_whats_new_size_ = _data_->whats_new_length1;
2251
if (_data_->_inner_error_ != NULL) {
2252
_g_object_unref0 (_data_->duplicates_lookup);
2253
goto __catch4_g_error;
2255
_data_->_tmp127_ = _data_->self->priv->purchase_info;
2256
_data_->_tmp128_ = _data_->whats_new;
2257
_data_->_tmp128__length1 = _data_->whats_new_length1;
2258
_data_->_tmp129_ = NULL;
2259
_data_->_tmp129_ = unity_applications_lens_purchase_info_helper_create_pkgsearch_query (_data_->_tmp127_, _data_->_tmp128_, _data_->_tmp128__length1);
2260
_data_->query = _data_->_tmp129_;
2261
_data_->_tmp130_ = _data_->self->priv->pkgsearcher;
2262
_data_->_tmp131_ = _data_->query;
2263
_data_->_tmp132_ = NULL;
2264
_data_->_tmp132_ = unity_package_searcher_get_by_exact_names (_data_->_tmp130_, _data_->_tmp131_);
2265
_data_->tmpresults = _data_->_tmp132_;
2266
_data_->_tmp133_ = _data_->self->priv->purchase_info;
2267
_data_->_tmp134_ = _data_->tmpresults;
2268
unity_applications_lens_purchase_info_helper_from_pkgresults (_data_->_tmp133_, _data_->_tmp134_);
2269
_data_->_tmp135_ = _data_->whats_new;
2270
_data_->_tmp135__length1 = _data_->whats_new_length1;
2271
_data_->_tmp136_ = _data_->model;
2272
_data_->_tmp137_ = 0U;
2273
_data_->_tmp137_ = unity_applications_lens_daemon_add_sc_category_results (_data_->self, _data_->_tmp135_, _data_->_tmp135__length1, (DeeModel*) _data_->_tmp136_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, &_data_->duplicates_lookup, UNITY_APPLICATIONS_LENS_MAX_WHATS_NEW_APPS_FOR_EMPTY_QUERY);
2274
_data_->hits = _data_->_tmp137_;
2275
_data_->_tmp138_ = _data_->self->priv->sc_data_provider;
2276
_data_->_tmp139_ = 0;
2277
_data_->_tmp140_ = NULL;
2278
_data_->_tmp140_ = unity_applications_lens_software_center_data_provider_proxy_get_items_for_category (_data_->_tmp138_, "unity-top-rated", &_data_->_tmp139_, &_data_->_inner_error_);
2279
_data_->top_rated = _data_->_tmp140_;
2280
_data_->top_rated_length1 = _data_->_tmp139_;
2281
_data_->_top_rated_size_ = _data_->top_rated_length1;
2282
if (_data_->_inner_error_ != NULL) {
2283
_unity_package_search_result_free0 (_data_->tmpresults);
2284
__g_slist_free__g_free0_0 (_data_->query);
2285
_data_->whats_new = (_vala_array_free (_data_->whats_new, _data_->whats_new_length1, (GDestroyNotify) unity_applications_lens_software_center_data_provider_service_app_info_free), NULL);
2286
_g_object_unref0 (_data_->duplicates_lookup);
2287
goto __catch4_g_error;
2289
_data_->_tmp141_ = _data_->self->priv->purchase_info;
2290
_data_->_tmp142_ = _data_->top_rated;
2291
_data_->_tmp142__length1 = _data_->top_rated_length1;
2292
_data_->_tmp143_ = NULL;
2293
_data_->_tmp143_ = unity_applications_lens_purchase_info_helper_create_pkgsearch_query (_data_->_tmp141_, _data_->_tmp142_, _data_->_tmp142__length1);
2294
__g_slist_free__g_free0_0 (_data_->query);
2295
_data_->query = _data_->_tmp143_;
2296
_data_->_tmp144_ = _data_->self->priv->pkgsearcher;
2297
_data_->_tmp145_ = _data_->query;
2298
_data_->_tmp146_ = NULL;
2299
_data_->_tmp146_ = unity_package_searcher_get_by_exact_names (_data_->_tmp144_, _data_->_tmp145_);
2300
_unity_package_search_result_free0 (_data_->tmpresults);
2301
_data_->tmpresults = _data_->_tmp146_;
2302
_data_->_tmp147_ = _data_->self->priv->purchase_info;
2303
_data_->_tmp148_ = _data_->tmpresults;
2304
unity_applications_lens_purchase_info_helper_from_pkgresults (_data_->_tmp147_, _data_->_tmp148_);
2305
_data_->_tmp149_ = _data_->hits;
2306
_data_->_tmp150_ = _data_->top_rated;
2307
_data_->_tmp150__length1 = _data_->top_rated_length1;
2308
_data_->_tmp151_ = _data_->model;
2309
_data_->_tmp152_ = 0U;
2310
_data_->_tmp152_ = unity_applications_lens_daemon_add_sc_category_results (_data_->self, _data_->_tmp150_, _data_->_tmp150__length1, (DeeModel*) _data_->_tmp151_, UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE, &_data_->duplicates_lookup, UNITY_APPLICATIONS_LENS_MAX_TOP_RATED_APPS_FOR_EMPTY_QUERY);
2311
_data_->hits = _data_->_tmp149_ + _data_->_tmp152_;
2312
_data_->top_rated = (_vala_array_free (_data_->top_rated, _data_->top_rated_length1, (GDestroyNotify) unity_applications_lens_software_center_data_provider_service_app_info_free), NULL);
2313
_unity_package_search_result_free0 (_data_->tmpresults);
2314
__g_slist_free__g_free0_0 (_data_->query);
2315
_data_->whats_new = (_vala_array_free (_data_->whats_new, _data_->whats_new_length1, (GDestroyNotify) unity_applications_lens_software_center_data_provider_service_app_info_free), NULL);
2316
_g_object_unref0 (_data_->duplicates_lookup);
2321
_data_->_vala1_e = _data_->_inner_error_;
2322
_data_->_inner_error_ = NULL;
2323
_data_->_tmp153_ = _data_->_vala1_e;
2324
_data_->_tmp154_ = _data_->_tmp153_->message;
2325
g_warning ("daemon.vala:624: Failed to get top rated apps: %s", _data_->_tmp154_);
2326
_g_error_free0 (_data_->_vala1_e);
2329
if (_data_->_inner_error_ != NULL) {
2330
_unity_package_search_result_free0 (_data_->appresults);
2331
_g_object_unref0 (_data_->available_uris);
2332
_g_object_unref0 (_data_->installed_uris);
2333
_g_object_unref0 (_data_->transaction);
2334
_g_timer_destroy0 (_data_->timer);
2335
_g_free0 (_data_->pkg_search_string);
2336
_g_object_unref0 (_data_->filter);
2337
_g_object_unref0 (_data_->model);
2338
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
2339
g_clear_error (&_data_->_inner_error_);
2342
_data_->_tmp155_ = _data_->timer;
2343
g_timer_stop (_data_->_tmp155_);
2344
_data_->_tmp156_ = _data_->hits;
2345
_data_->_tmp157_ = _data_->timer;
2346
_data_->_tmp158_ = 0.0;
2347
_data_->_tmp158_ = g_timer_elapsed (_data_->_tmp157_, NULL);
2348
g_debug ("daemon.vala:628: Entry search listed %u top rated/new available apps i" \
2349
"n %fms", _data_->_tmp156_, _data_->_tmp158_ * 1000);
2047
_data_->_tmp110_ = _data_->model;
2048
_data_->_tmp111_ = 0U;
2049
_data_->_tmp111_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp110_);
2050
if (_data_->_tmp111_ == ((guint) 0)) {
2051
_data_->_tmp112_ = _data_->search;
2052
_data_->_tmp113_ = NULL;
2053
_data_->_tmp113_ = _ ("Sorry, there are no applications that match your search.");
2054
_data_->_tmp114_ = _variant_new4 (_data_->_tmp113_);
2055
unity_lens_search_set_reply_hint (_data_->_tmp112_, "no-results-hint", _data_->_tmp114_);
2353
_data_->_tmp159_ = _data_->model;
2354
_data_->_tmp160_ = 0U;
2355
_data_->_tmp160_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp159_);
2356
if (_data_->_tmp160_ == ((guint) 0)) {
2357
_data_->_tmp161_ = _data_->search;
2358
_data_->_tmp162_ = NULL;
2359
_data_->_tmp162_ = _ ("Sorry, there are no applications that match your search.");
2360
_data_->_tmp163_ = _variant_new4 (_data_->_tmp162_);
2361
unity_lens_search_set_reply_hint (_data_->_tmp161_, "no-results-hint", _data_->_tmp163_);
2057
_data_->_tmp115_ = _data_->search;
2058
g_signal_emit_by_name (_data_->_tmp115_, "finished");
2363
_data_->_tmp164_ = _data_->search;
2364
g_signal_emit_by_name (_data_->_tmp164_, "finished");
2059
2365
_unity_package_search_result_free0 (_data_->appresults);
2060
2366
_g_object_unref0 (_data_->available_uris);
2061
2367
_g_object_unref0 (_data_->installed_uris);
2751
GIcon* unity_applications_lens_daemon_find_pkg_icon (UnityApplicationsLensDaemon* self, UnityPackageInfo* pkginfo) {
3056
GIcon* unity_applications_lens_daemon_find_pkg_icon (UnityApplicationsLensDaemon* self, const gchar* desktop_file, const gchar* icon_name) {
2752
3057
GIcon* result = NULL;
2753
UnityPackageInfo* _tmp0_;
2754
const gchar* _tmp1_;
2755
gchar* _tmp2_ = NULL;
3058
const gchar* _tmp0_;
3059
gchar* _tmp1_ = NULL;
2756
3060
gchar* desktop_id;
2757
UnityAppInfoManager* _tmp3_ = NULL;
2758
UnityAppInfoManager* _tmp4_;
2759
const gchar* _tmp5_;
2760
GAppInfo* _tmp6_ = NULL;
3061
UnityAppInfoManager* _tmp2_ = NULL;
3062
UnityAppInfoManager* _tmp3_;
3063
const gchar* _tmp4_;
3064
GAppInfo* _tmp5_ = NULL;
2762
3068
gboolean _tmp8_;
2765
UnityPackageInfo* _tmp13_;
2766
const gchar* _tmp14_;
2767
gboolean _tmp15_ = FALSE;
2768
GThemedIcon* _tmp94_;
3069
const gchar* _tmp11_;
3070
gboolean _tmp12_ = FALSE;
3071
GThemedIcon* _tmp82_;
2769
3072
GThemedIcon* icon;
2770
GHashTable* _tmp95_;
2771
UnityPackageInfo* _tmp96_;
2772
const gchar* _tmp97_;
2774
GThemedIcon* _tmp99_;
3073
GHashTable* _tmp83_;
3074
const gchar* _tmp84_;
3076
GThemedIcon* _tmp86_;
2776
3078
g_return_val_if_fail (self != NULL, NULL);
2777
g_return_val_if_fail (pkginfo != NULL, NULL);
2779
_tmp1_ = _tmp0_->desktop_file;
2780
_tmp2_ = g_path_get_basename (_tmp1_);
2781
desktop_id = _tmp2_;
2782
_tmp3_ = unity_app_info_manager_get_default ();
2784
_tmp5_ = desktop_id;
2785
_tmp6_ = unity_app_info_manager_lookup (_tmp4_, _tmp5_);
2787
_tmp8_ = _tmp7_ != NULL;
2788
_g_object_unref0 (_tmp7_);
2789
_g_object_unref0 (_tmp4_);
2793
UnityPackageInfo* _tmp10_;
2794
const gchar* _tmp11_;
2795
GThemedIcon* _tmp12_;
2797
_tmp11_ = _tmp10_->icon;
2798
_tmp12_ = (GThemedIcon*) g_themed_icon_new (_tmp11_);
2799
result = (GIcon*) _tmp12_;
3079
g_return_val_if_fail (desktop_file != NULL, NULL);
3080
g_return_val_if_fail (icon_name != NULL, NULL);
3081
_tmp0_ = desktop_file;
3082
_tmp1_ = g_path_get_basename (_tmp0_);
3083
desktop_id = _tmp1_;
3084
_tmp2_ = unity_app_info_manager_get_default ();
3086
_tmp4_ = desktop_id;
3087
_tmp5_ = unity_app_info_manager_lookup (_tmp3_, _tmp4_);
3089
_tmp7_ = _tmp6_ != NULL;
3090
_g_object_unref0 (_tmp6_);
3091
_g_object_unref0 (_tmp3_);
3095
const gchar* _tmp9_;
3096
GThemedIcon* _tmp10_;
3098
_tmp10_ = (GThemedIcon*) g_themed_icon_new (_tmp9_);
3099
result = (GIcon*) _tmp10_;
2800
3100
_g_free0 (desktop_id);
2804
_tmp14_ = _tmp13_->icon;
2805
_tmp15_ = g_str_has_prefix (_tmp14_, "/");
2807
UnityPackageInfo* _tmp16_;
2808
const gchar* _tmp17_;
2809
GFile* _tmp18_ = NULL;
3103
_tmp11_ = icon_name;
3104
_tmp12_ = g_str_has_prefix (_tmp11_, "/");
3106
const gchar* _tmp13_;
3107
GFile* _tmp14_ = NULL;
3111
_tmp13_ = icon_name;
3112
_tmp14_ = g_file_new_for_path (_tmp13_);
3114
_tmp16_ = (GFileIcon*) g_file_icon_new (_tmp15_);
3115
_tmp17_ = (GIcon*) _tmp16_;
3116
_g_object_unref0 (_tmp15_);
3118
_g_free0 (desktop_id);
3121
GHashTable* _tmp18_;
3122
const gchar* _tmp19_;
3123
gconstpointer _tmp20_ = NULL;
2812
3124
GIcon* _tmp21_;
2814
_tmp17_ = _tmp16_->icon;
2815
_tmp18_ = g_file_new_for_path (_tmp17_);
2817
_tmp20_ = (GFileIcon*) g_file_icon_new (_tmp19_);
2818
_tmp21_ = (GIcon*) _tmp20_;
2819
_g_object_unref0 (_tmp19_);
2821
_g_free0 (desktop_id);
2824
GHashTable* _tmp22_;
2825
UnityPackageInfo* _tmp23_;
2826
const gchar* _tmp24_;
2827
gconstpointer _tmp25_ = NULL;
2831
3127
gchar* path = NULL;
2832
UnityPackageInfo* _tmp28_;
2833
const gchar* _tmp29_;
2834
gboolean _tmp30_ = FALSE;
2835
_tmp22_ = self->priv->file_icon_cache;
2837
_tmp24_ = _tmp23_->icon;
2838
_tmp25_ = g_hash_table_lookup (_tmp22_, _tmp24_);
2839
_tmp26_ = _g_object_ref0 ((GIcon*) _tmp25_);
2842
if (_tmp27_ != NULL) {
3128
const gchar* _tmp23_;
3129
gboolean _tmp24_ = FALSE;
3130
_tmp18_ = self->priv->file_icon_cache;
3131
_tmp19_ = icon_name;
3132
_tmp20_ = g_hash_table_lookup (_tmp18_, _tmp19_);
3133
_tmp21_ = _g_object_ref0 ((GIcon*) _tmp20_);
3136
if (_tmp22_ != NULL) {
2844
3138
_g_free0 (desktop_id);
2848
_tmp29_ = _tmp28_->icon;
2849
_tmp30_ = string_contains (_tmp29_, ".");
2851
const gchar* _tmp31_ = NULL;
2852
UnityPackageInfo* _tmp32_;
2853
const gchar* _tmp33_;
2854
const gchar* _tmp34_ = NULL;
2855
gchar* _tmp35_ = NULL;
2856
const gchar* _tmp36_;
2857
gboolean _tmp37_ = FALSE;
2858
const gchar* _tmp48_ = NULL;
2859
UnityPackageInfo* _tmp49_;
2860
const gchar* _tmp50_;
2861
gchar* _tmp51_ = NULL;
2862
const gchar* _tmp52_;
2863
gboolean _tmp53_ = FALSE;
2864
_tmp31_ = string_to_string (CONFIG_DATADIR);
2866
_tmp33_ = _tmp32_->icon;
2867
_tmp34_ = string_to_string (_tmp33_);
2868
_tmp35_ = g_strconcat (_tmp31_, "/app-install/icons/", _tmp34_, NULL);
3141
_tmp23_ = icon_name;
3142
_tmp24_ = string_contains (_tmp23_, ".");
3144
const gchar* _tmp25_ = NULL;
3145
const gchar* _tmp26_;
3146
const gchar* _tmp27_ = NULL;
3147
gchar* _tmp28_ = NULL;
3148
const gchar* _tmp29_;
3149
gboolean _tmp30_ = FALSE;
3150
const gchar* _tmp40_ = NULL;
3151
const gchar* _tmp41_;
3152
gchar* _tmp42_ = NULL;
3153
const gchar* _tmp43_;
3154
gboolean _tmp44_ = FALSE;
3155
_tmp25_ = string_to_string (CONFIG_DATADIR);
3156
_tmp26_ = icon_name;
3157
_tmp27_ = string_to_string (_tmp26_);
3158
_tmp28_ = g_strconcat (_tmp25_, "/app-install/icons/", _tmp27_, NULL);
2869
3159
_g_free0 (path);
2872
_tmp37_ = g_file_test (_tmp36_, G_FILE_TEST_EXISTS);
2874
const gchar* _tmp38_;
2875
GFile* _tmp39_ = NULL;
2878
GHashTable* _tmp42_;
2879
UnityPackageInfo* _tmp43_;
2880
const gchar* _tmp44_;
2885
_tmp39_ = g_file_new_for_path (_tmp38_);
2887
_tmp41_ = (GFileIcon*) g_file_icon_new (_tmp40_);
3162
_tmp30_ = g_file_test (_tmp29_, G_FILE_TEST_EXISTS);
3164
const gchar* _tmp31_;
3165
GFile* _tmp32_ = NULL;
3168
GHashTable* _tmp35_;
3169
const gchar* _tmp36_;
3174
_tmp32_ = g_file_new_for_path (_tmp31_);
3176
_tmp34_ = (GFileIcon*) g_file_icon_new (_tmp33_);
2888
3177
_g_object_unref0 (icon);
2889
icon = (GIcon*) _tmp41_;
2890
_g_object_unref0 (_tmp40_);
2891
_tmp42_ = self->priv->file_icon_cache;
2893
_tmp44_ = _tmp43_->icon;
2894
_tmp45_ = g_strdup (_tmp44_);
2896
_tmp47_ = _g_object_ref0 (_tmp46_);
2897
g_hash_table_insert (_tmp42_, _tmp45_, _tmp47_);
3178
icon = (GIcon*) _tmp34_;
3179
_g_object_unref0 (_tmp33_);
3180
_tmp35_ = self->priv->file_icon_cache;
3181
_tmp36_ = icon_name;
3182
_tmp37_ = g_strdup (_tmp36_);
3184
_tmp39_ = _g_object_ref0 (_tmp38_);
3185
g_hash_table_insert (_tmp35_, _tmp37_, _tmp39_);
2899
3187
_g_free0 (path);
2900
3188
_g_free0 (desktop_id);
2903
_tmp48_ = g_get_user_cache_dir ();
2905
_tmp50_ = _tmp49_->icon;
2906
_tmp51_ = g_build_filename (_tmp48_, "software-center", "icons", _tmp50_, NULL);
3191
_tmp40_ = g_get_user_cache_dir ();
3192
_tmp41_ = icon_name;
3193
_tmp42_ = g_build_filename (_tmp40_, "software-center", "icons", _tmp41_, NULL);
2907
3194
_g_free0 (path);
2910
_tmp53_ = g_file_test (_tmp52_, G_FILE_TEST_EXISTS);
2912
const gchar* _tmp54_;
2913
GFile* _tmp55_ = NULL;
2916
GHashTable* _tmp58_;
2917
UnityPackageInfo* _tmp59_;
2918
const gchar* _tmp60_;
2923
_tmp55_ = g_file_new_for_path (_tmp54_);
2925
_tmp57_ = (GFileIcon*) g_file_icon_new (_tmp56_);
3197
_tmp44_ = g_file_test (_tmp43_, G_FILE_TEST_EXISTS);
3199
const gchar* _tmp45_;
3200
GFile* _tmp46_ = NULL;
3203
GHashTable* _tmp49_;
3204
const gchar* _tmp50_;
3209
_tmp46_ = g_file_new_for_path (_tmp45_);
3211
_tmp48_ = (GFileIcon*) g_file_icon_new (_tmp47_);
2926
3212
_g_object_unref0 (icon);
2927
icon = (GIcon*) _tmp57_;
2928
_g_object_unref0 (_tmp56_);
2929
_tmp58_ = self->priv->file_icon_cache;
2931
_tmp60_ = _tmp59_->icon;
2932
_tmp61_ = g_strdup (_tmp60_);
2934
_tmp63_ = _g_object_ref0 (_tmp62_);
2935
g_hash_table_insert (_tmp58_, _tmp61_, _tmp63_);
3213
icon = (GIcon*) _tmp48_;
3214
_g_object_unref0 (_tmp47_);
3215
_tmp49_ = self->priv->file_icon_cache;
3216
_tmp50_ = icon_name;
3217
_tmp51_ = g_strdup (_tmp50_);
3219
_tmp53_ = _g_object_ref0 (_tmp52_);
3220
g_hash_table_insert (_tmp49_, _tmp51_, _tmp53_);
2937
3222
_g_free0 (path);
2938
3223
_g_free0 (desktop_id);
3683
* Sanitize executable name -- make it suitable for Home Lens.
3685
static gchar* unity_applications_lens_daemon_sanitize_binary_name (const gchar* name) {
3686
gchar* result = NULL;
3687
const gchar* _tmp0_;
3688
gchar* _tmp1_ = NULL;
3689
g_return_val_if_fail (name != NULL, NULL);
3691
_tmp1_ = g_path_get_basename (_tmp0_);
3697
static gchar* unity_applications_lens_daemon_get_annotated_icon (UnityApplicationsLensDaemon* self, GIcon* app_icon, const gchar* price, gboolean paid) {
3698
gchar* result = NULL;
3700
UnityAnnotatedIcon* _tmp1_;
3701
UnityAnnotatedIcon* annotated_icon;
3702
UnityAnnotatedIcon* _tmp2_;
3703
gboolean _tmp3_ = FALSE;
3704
const gchar* _tmp4_;
3706
UnityAnnotatedIcon* _tmp14_;
3707
gchar* _tmp15_ = NULL;
3708
g_return_val_if_fail (self != NULL, NULL);
3709
g_return_val_if_fail (app_icon != NULL, NULL);
3710
g_return_val_if_fail (price != NULL, NULL);
3712
_tmp1_ = unity_annotated_icon_new (_tmp0_);
3713
annotated_icon = _tmp1_;
3714
_tmp2_ = annotated_icon;
3715
unity_annotated_icon_set_category (_tmp2_, UNITY_CATEGORY_TYPE_APPLICATION);
3717
if (_tmp4_ != NULL) {
3718
const gchar* _tmp5_;
3720
_tmp3_ = g_strcmp0 (_tmp5_, "") != 0;
3729
UnityAnnotatedIcon* _tmp8_;
3730
const gchar* _tmp9_ = NULL;
3731
_tmp8_ = annotated_icon;
3732
_tmp9_ = _ ("Paid");
3733
unity_annotated_icon_set_ribbon (_tmp8_, _tmp9_);
3735
UnityAnnotatedIcon* _tmp10_;
3736
const gchar* _tmp11_;
3737
_tmp10_ = annotated_icon;
3739
unity_annotated_icon_set_ribbon (_tmp10_, _tmp11_);
3742
UnityAnnotatedIcon* _tmp12_;
3743
const gchar* _tmp13_ = NULL;
3744
_tmp12_ = annotated_icon;
3745
_tmp13_ = _ ("Free");
3746
unity_annotated_icon_set_ribbon (_tmp12_, _tmp13_);
3748
_tmp14_ = annotated_icon;
3749
_tmp15_ = unity_annotated_icon_to_string (_tmp14_);
3751
_g_object_unref0 (annotated_icon);
3757
* Add all results obtained from SoftwareCenterDataProvider
3759
static guint unity_applications_lens_daemon_add_sc_category_results (UnityApplicationsLensDaemon* self, UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** results, int results_length1, DeeModel* model, UnityApplicationsLensCategory category, GeeSet** duplicates_lookup, guint max_results) {
3762
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** _tmp0_;
3763
gint _tmp0__length1;
3764
g_return_val_if_fail (self != NULL, 0U);
3765
g_return_val_if_fail (model != NULL, 0U);
3766
g_return_val_if_fail (*duplicates_lookup != NULL, 0U);
3769
_tmp0__length1 = results_length1;
3771
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo** app_collection = NULL;
3772
gint app_collection_length1 = 0;
3773
gint _app_collection_size_ = 0;
3775
app_collection = _tmp0_;
3776
app_collection_length1 = _tmp0__length1;
3777
for (app_it = 0; app_it < _tmp0__length1; app_it = app_it + 1) {
3778
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp1_ = {0};
3779
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo app = {0};
3780
unity_applications_lens_software_center_data_provider_service_app_info_copy (app_collection[app_it], &_tmp1_);
3783
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp2_;
3784
const gchar* _tmp3_;
3785
const gchar* _tmp4_ = NULL;
3786
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp5_;
3787
const gchar* _tmp6_;
3788
const gchar* _tmp7_ = NULL;
3789
gchar* _tmp8_ = NULL;
3792
const gchar* _tmp10_;
3793
gboolean _tmp11_ = FALSE;
3794
gchar* icon_obj = NULL;
3795
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp12_;
3796
const gchar* _tmp13_;
3797
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp14_;
3798
const gchar* _tmp15_;
3799
GIcon* _tmp16_ = NULL;
3801
UnityApplicationsLensPurchaseInfoHelper* _tmp17_;
3802
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp18_;
3803
const gchar* _tmp19_;
3804
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp20_;
3805
const gchar* _tmp21_;
3806
UnityApplicationsLensPurchaseInfoHelperAppInfo* _tmp22_ = NULL;
3807
UnityApplicationsLensPurchaseInfoHelperAppInfo* pinfo;
3808
UnityApplicationsLensPurchaseInfoHelperAppInfo* _tmp23_;
3810
const gchar* _tmp40_;
3811
const gchar* _tmp41_;
3812
UnityApplicationsLensCategory _tmp42_;
3813
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp43_;
3814
const gchar* _tmp44_;
3815
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp45_;
3816
const gchar* _tmp46_;
3820
const gchar* _tmp50_;
3825
_tmp3_ = _tmp2_.package_name;
3826
_tmp4_ = string_to_string (_tmp3_);
3828
_tmp6_ = _tmp5_.application_name;
3829
_tmp7_ = string_to_string (_tmp6_);
3830
_tmp8_ = g_strconcat ("unity-install://", _tmp4_, "/", _tmp7_, NULL);
3832
_tmp9_ = *duplicates_lookup;
3834
_tmp11_ = gee_collection_contains ((GeeCollection*) _tmp9_, _tmp10_);
3837
unity_applications_lens_software_center_data_provider_service_app_info_destroy (&app);
3841
_tmp13_ = _tmp12_.desktop_file;
3843
_tmp15_ = _tmp14_.icon;
3844
_tmp16_ = unity_applications_lens_daemon_find_pkg_icon (self, _tmp13_, _tmp15_);
3846
_tmp17_ = self->priv->purchase_info;
3848
_tmp19_ = _tmp18_.application_name;
3850
_tmp21_ = _tmp20_.package_name;
3851
_tmp22_ = unity_applications_lens_purchase_info_helper_find (_tmp17_, _tmp19_, _tmp21_);
3854
if (_tmp23_ != NULL) {
3856
UnityApplicationsLensPurchaseInfoHelperAppInfo* _tmp25_;
3857
const gchar* _tmp26_;
3858
UnityApplicationsLensPurchaseInfoHelperAppInfo* _tmp27_;
3860
gchar* _tmp29_ = NULL;
3861
gchar* annotated_icon;
3862
const gchar* _tmp30_;
3863
const gchar* _tmp31_ = NULL;
3867
_tmp26_ = (*_tmp25_).formatted_price;
3869
_tmp28_ = (*_tmp27_).paid;
3870
_tmp29_ = unity_applications_lens_daemon_get_annotated_icon (self, _tmp24_, _tmp26_, _tmp28_);
3871
annotated_icon = _tmp29_;
3872
_tmp30_ = annotated_icon;
3873
_tmp31_ = string_to_string (_tmp30_);
3874
_tmp32_ = g_strdup (_tmp31_);
3875
_g_free0 (icon_obj);
3877
_g_free0 (annotated_icon);
3879
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp33_;
3880
const gchar* _tmp34_;
3881
UnityApplicationsLensSoftwareCenterDataProviderServiceAppInfo _tmp35_;
3882
const gchar* _tmp36_;
3884
gchar* _tmp38_ = NULL;
3886
_tmp34_ = _tmp33_.application_name;
3888
_tmp36_ = _tmp35_.package_name;
3889
g_warning ("daemon.vala:989: No purchase info for: %s, %s", _tmp34_, _tmp36_);
3891
_tmp38_ = g_icon_to_string (_tmp37_);
3892
_g_free0 (icon_obj);
3900
_tmp44_ = _tmp43_.application_name;
3902
_tmp46_ = _tmp45_.desktop_file;
3903
_tmp47_ = g_strconcat ("file://", _tmp46_, NULL);
3905
dee_model_append (_tmp39_, _tmp40_, _tmp41_, _tmp42_, "application/x-desktop", _tmp44_, "", _tmp48_, NULL);
3907
_tmp49_ = *duplicates_lookup;
3909
gee_collection_add ((GeeCollection*) _tmp49_, _tmp50_);
3913
_tmp53_ = max_results;
3914
if (_tmp52_ == _tmp53_) {
3915
_unity_applications_lens_purchase_info_helper_app_info_free0 (pinfo);
3916
_g_object_unref0 (app_icon);
3917
_g_free0 (icon_obj);
3919
unity_applications_lens_software_center_data_provider_service_app_info_destroy (&app);
3922
_unity_applications_lens_purchase_info_helper_app_info_free0 (pinfo);
3923
_g_object_unref0 (app_icon);
3924
_g_free0 (icon_obj);
3926
unity_applications_lens_software_center_data_provider_service_app_info_destroy (&app);
3402
3935
static void unity_applications_lens_daemon_add_pkg_search_result (UnityApplicationsLensDaemon* self, UnityPackageSearchResult* results, GeeSet* installed_uris, GeeSet* available_uris, DeeModel* model, UnityApplicationsLensCategory category, guint max_add) {
3403
3936
UnityAppInfoManager* _tmp0_ = NULL;
3404
3937
UnityAppInfoManager* appmanager;
3406
UnityFilter* _tmp2_ = NULL;
3407
UnityRatingsFilter* ratings_filter;
3409
UnityPackageSearchResult* _tmp3_;
3939
UnityPackageSearchResult* _tmp1_;
3411
3941
g_return_if_fail (self != NULL);
3412
3942
g_return_if_fail (results != NULL);
3413
3943
g_return_if_fail (installed_uris != NULL);
3415
3945
g_return_if_fail (model != NULL);
3416
3946
_tmp0_ = unity_app_info_manager_get_default ();
3417
3947
appmanager = _tmp0_;
3418
_tmp1_ = self->priv->scope;
3419
_tmp2_ = unity_scope_get_filter (_tmp1_, "rating");
3420
ratings_filter = UNITY_IS_RATINGS_FILTER (_tmp2_) ? ((UnityRatingsFilter*) _tmp2_) : NULL;
3421
3948
n_added = (guint) 0;
3423
_tmp4_ = _tmp3_->results;
3950
_tmp2_ = _tmp1_->results;
3425
3952
GSList* pkginfo_collection = NULL;
3426
3953
GSList* pkginfo_it = NULL;
3427
pkginfo_collection = _tmp4_;
3954
pkginfo_collection = _tmp2_;
3428
3955
for (pkginfo_it = pkginfo_collection; pkginfo_it != NULL; pkginfo_it = pkginfo_it->next) {
3429
3956
UnityPackageInfo* pkginfo = NULL;
3430
3957
pkginfo = (UnityPackageInfo*) pkginfo_it->data;
3959
UnityPackageInfo* _tmp3_;
3960
const gchar* _tmp4_;
3432
3961
UnityPackageInfo* _tmp5_;
3433
3962
const gchar* _tmp6_;
3434
UnityPackageInfo* _tmp7_;
3435
const gchar* _tmp8_;
3436
UnityApplicationsLensCategory _tmp9_;
3437
gchar* _tmp10_ = NULL;
3963
UnityApplicationsLensCategory _tmp7_;
3964
gchar* _tmp8_ = NULL;
3438
3965
gchar* desktop_id;
3439
3966
gchar* full_path = NULL;
3440
UnityAppInfoManager* _tmp11_;
3441
const gchar* _tmp12_;
3442
GAppInfo* _tmp13_ = NULL;
3967
UnityAppInfoManager* _tmp9_;
3968
const gchar* _tmp10_;
3969
GAppInfo* _tmp11_ = NULL;
3444
UnityAppInfoManager* _tmp14_;
3971
UnityAppInfoManager* _tmp12_;
3972
const gchar* _tmp13_;
3973
gchar* _tmp14_ = NULL;
3445
3974
const gchar* _tmp15_;
3446
gchar* _tmp16_ = NULL;
3447
const gchar* _tmp17_;
3448
const gchar* _tmp18_ = NULL;
3449
gchar* _tmp19_ = NULL;
3975
const gchar* _tmp16_ = NULL;
3976
gchar* _tmp17_ = NULL;
3451
gboolean _tmp20_ = FALSE;
3453
const gchar* _tmp22_;
3454
gboolean _tmp23_ = FALSE;
3978
gboolean _tmp18_ = FALSE;
3980
const gchar* _tmp20_;
3981
gboolean _tmp21_ = FALSE;
3456
3983
gchar* display_name = NULL;
3457
3984
gchar* comment = NULL;
3458
UnityApplicationsLensCategory _tmp28_;
3459
gboolean _tmp47_ = FALSE;
3462
UnityApplicationsLensCategory _tmp52_;
3463
UnityPackageInfo* _tmp79_;
3464
GIcon* _tmp80_ = NULL;
3985
UnityApplicationsLensCategory _tmp26_;
3986
gboolean _tmp45_ = FALSE;
3989
UnityPackageInfo* _tmp50_;
3990
const gchar* _tmp51_;
3991
UnityPackageInfo* _tmp52_;
3992
const gchar* _tmp53_;
3993
GIcon* _tmp54_ = NULL;
3466
const gchar* _tmp81_ = NULL;
3467
const gchar* _tmp82_;
3468
const gchar* _tmp84_ = NULL;
3469
const gchar* _tmp85_;
3470
gchar* _tmp87_ = NULL;
3471
const gchar* _tmp88_;
3473
const gchar* _tmp93_;
3475
gchar* _tmp95_ = NULL;
3477
UnityApplicationsLensCategory _tmp97_;
3478
const gchar* _tmp98_;
3479
const gchar* _tmp99_;
3480
const gchar* _tmp100_;
3482
gboolean _tmp102_ = FALSE;
3995
gchar* icon_str = NULL;
3996
UnityApplicationsLensCategory _tmp55_;
3997
const gchar* _tmp74_ = NULL;
3998
const gchar* _tmp75_;
3999
const gchar* _tmp77_ = NULL;
4000
const gchar* _tmp78_;
4001
gchar* _tmp80_ = NULL;
4002
const gchar* _tmp81_;
4004
const gchar* _tmp86_;
4005
const gchar* _tmp87_;
4006
UnityApplicationsLensCategory _tmp88_;
4007
const gchar* _tmp89_;
4008
const gchar* _tmp90_;
4009
const gchar* _tmp91_;
4011
gboolean _tmp93_ = FALSE;
4015
_tmp4_ = _tmp3_->desktop_file;
4016
if (_tmp4_ == NULL) {
3485
4019
_tmp5_ = pkginfo;
3486
4020
_tmp6_ = _tmp5_->desktop_file;
3487
if (_tmp6_ == NULL) {
3491
_tmp8_ = _tmp7_->desktop_file;
3493
_tmp10_ = unity_applications_lens_daemon_extract_desktop_id (self, _tmp8_, _tmp9_ == UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE);
3494
desktop_id = _tmp10_;
3495
_tmp11_ = appmanager;
3496
_tmp12_ = desktop_id;
3497
_tmp13_ = unity_app_info_manager_lookup (_tmp11_, _tmp12_);
3499
_tmp14_ = appmanager;
4022
_tmp8_ = unity_applications_lens_daemon_extract_desktop_id (self, _tmp6_, _tmp7_ == UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE);
4023
desktop_id = _tmp8_;
4024
_tmp9_ = appmanager;
4025
_tmp10_ = desktop_id;
4026
_tmp11_ = unity_app_info_manager_lookup (_tmp9_, _tmp10_);
4028
_tmp12_ = appmanager;
4029
_tmp13_ = desktop_id;
4030
_tmp14_ = unity_app_info_manager_get_path (_tmp12_, _tmp13_);
4031
_g_free0 (full_path);
4032
full_path = _tmp14_;
3500
4033
_tmp15_ = desktop_id;
3501
_tmp16_ = unity_app_info_manager_get_path (_tmp14_, _tmp15_);
3502
_g_free0 (full_path);
3503
full_path = _tmp16_;
3504
_tmp17_ = desktop_id;
3505
_tmp18_ = string_to_string (_tmp17_);
3506
_tmp19_ = g_strconcat ("application://", _tmp18_, NULL);
3508
_tmp21_ = installed_uris;
3510
_tmp23_ = gee_collection_contains ((GeeCollection*) _tmp21_, _tmp22_);
4034
_tmp16_ = string_to_string (_tmp15_);
4035
_tmp17_ = g_strconcat ("application://", _tmp16_, NULL);
4037
_tmp19_ = installed_uris;
4039
_tmp21_ = gee_collection_contains ((GeeCollection*) _tmp19_, _tmp20_);
3515
const gchar* _tmp25_;
3516
gboolean _tmp26_ = FALSE;
3517
_tmp24_ = available_uris;
3519
_tmp26_ = gee_collection_contains ((GeeCollection*) _tmp24_, _tmp25_);
4044
const gchar* _tmp23_;
4045
gboolean _tmp24_ = FALSE;
4046
_tmp22_ = available_uris;
4048
_tmp24_ = gee_collection_contains ((GeeCollection*) _tmp22_, _tmp23_);
3524
4053
_g_free0 (uri);
3525
4054
_g_object_unref0 (app);
3526
4055
_g_free0 (full_path);
3527
4056
_g_free0 (desktop_id);
3532
4061
case UNITY_APPLICATIONS_LENS_CATEGORY_INSTALLED:
3533
4062
case UNITY_APPLICATIONS_LENS_CATEGORY_APPLICATIONS:
3536
const gchar* _tmp30_;
3538
const gchar* _tmp32_ = NULL;
3541
const gchar* _tmp35_ = NULL;
3543
_tmp29_ = installed_uris;
3545
gee_collection_add ((GeeCollection*) _tmp29_, _tmp30_);
3547
_tmp32_ = g_app_info_get_display_name (_tmp31_);
3548
_tmp33_ = g_strdup (_tmp32_);
4065
const gchar* _tmp28_;
4067
const gchar* _tmp30_ = NULL;
4070
const gchar* _tmp33_ = NULL;
4071
gchar* _tmp34_ = NULL;
4072
_tmp27_ = installed_uris;
4074
gee_collection_add ((GeeCollection*) _tmp27_, _tmp28_);
4076
_tmp30_ = g_app_info_get_display_name (_tmp29_);
4077
_tmp31_ = g_strdup (_tmp30_);
3549
4078
_g_free0 (display_name);
3550
display_name = _tmp33_;
3552
_tmp35_ = g_app_info_get_description (_tmp34_);
3553
_tmp36_ = g_strdup (_tmp35_);
4079
display_name = _tmp31_;
4081
_tmp33_ = g_app_info_get_executable (_tmp32_);
4082
_tmp34_ = unity_applications_lens_daemon_sanitize_binary_name (_tmp33_);
3554
4083
_g_free0 (comment);
3558
4087
case UNITY_APPLICATIONS_LENS_CATEGORY_AVAILABLE:
4090
const gchar* _tmp36_;
4091
UnityPackageInfo* _tmp37_;
3561
4092
const gchar* _tmp38_;
3562
UnityPackageInfo* _tmp39_;
3563
const gchar* _tmp40_;
3566
_tmp37_ = available_uris;
3568
gee_collection_add ((GeeCollection*) _tmp37_, _tmp38_);
3570
_tmp40_ = _tmp39_->application_name;
3571
_tmp41_ = g_strdup (_tmp40_);
4095
_tmp35_ = available_uris;
4097
gee_collection_add ((GeeCollection*) _tmp35_, _tmp36_);
4099
_tmp38_ = _tmp37_->application_name;
4100
_tmp39_ = g_strdup (_tmp38_);
3572
4101
_g_free0 (display_name);
3573
display_name = _tmp41_;
3574
_tmp42_ = g_strdup ("");
4102
display_name = _tmp39_;
4103
_tmp40_ = g_strdup ("");
3575
4104
_g_free0 (comment);
3581
UnityApplicationsLensCategory _tmp43_;
3582
GEnumValue* _tmp44_;
3583
gchar* _tmp45_ = NULL;
3586
_tmp44_ = g_enum_get_value (g_type_class_ref (UNITY_APPLICATIONS_LENS_TYPE_CATEGORY), _tmp43_);
3587
_tmp45_ = g_strconcat ("Illegal category for package search ", (_tmp44_ != NULL) ? _tmp44_->value_name : NULL, NULL);
3589
g_warning ("daemon.vala:929: %s", _tmp46_);
4110
UnityApplicationsLensCategory _tmp41_;
4111
GEnumValue* _tmp42_;
4112
gchar* _tmp43_ = NULL;
4115
_tmp42_ = g_enum_get_value (g_type_class_ref (UNITY_APPLICATIONS_LENS_TYPE_CATEGORY), _tmp41_);
4116
_tmp43_ = g_strconcat ("Illegal category for package search ", (_tmp42_ != NULL) ? _tmp42_->value_name : NULL, NULL);
4118
g_warning ("daemon.vala:1053: %s", _tmp44_);
3595
if (_tmp48_ != NULL) {
3597
gboolean _tmp50_ = FALSE;
3599
_tmp50_ = g_app_info_should_show (_tmp49_);
4124
if (_tmp46_ != NULL) {
4126
gboolean _tmp48_ = FALSE;
4128
_tmp48_ = g_app_info_should_show (_tmp47_);
3606
4135
_g_free0 (comment);
3607
4136
_g_free0 (display_name);
3608
4137
_g_free0 (uri);
5026
5521
_tmp51_ = _tmp50_;
5027
5522
_g_hash_table_unref0 (_tmp51_);
5028
5523
if (_inner_error_ != NULL) {
5029
goto __catch11_g_error;
5524
goto __catch12_g_error;
5031
_tmp52_ = self->priv->sc_data_provider;
5032
_tmp53_ = unity_applications_lens_software_center_data_provider_proxy_get_icon (_tmp52_);
5034
_tmp55_ = (GThemedIcon*) g_themed_icon_new (_tmp54_);
5035
icon = (GIcon*) _tmp55_;
5037
_tmp56_ = self->priv->sc_data_provider;
5038
_tmp57_ = unity_applications_lens_software_center_data_provider_proxy_get_screenshot (_tmp56_);
5040
if (_tmp58_ != NULL) {
5041
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp59_;
5042
const gchar* _tmp60_;
5043
const gchar* _tmp61_;
5526
_tmp52_ = installed;
5528
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp53_;
5529
const gchar* _tmp54_;
5530
const gchar* _tmp55_;
5531
GThemedIcon* _tmp56_;
5532
_tmp53_ = self->priv->sc_data_provider;
5533
_tmp54_ = unity_applications_lens_software_center_data_provider_proxy_get_icon (_tmp53_);
5535
_tmp56_ = (GThemedIcon*) g_themed_icon_new (_tmp55_);
5536
_g_object_unref0 (icon);
5537
icon = (GIcon*) _tmp56_;
5539
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp57_;
5540
const gchar* _tmp58_;
5541
const gchar* _tmp59_;
5542
gchar* _tmp60_ = NULL;
5044
5544
GFile* _tmp62_ = NULL;
5046
5545
GFile* _tmp63_;
5047
5546
GFileIcon* _tmp64_;
5048
_tmp59_ = self->priv->sc_data_provider;
5049
_tmp60_ = unity_applications_lens_software_center_data_provider_proxy_get_screenshot (_tmp59_);
5547
_tmp57_ = self->priv->sc_data_provider;
5548
_tmp58_ = unity_applications_lens_software_center_data_provider_proxy_get_icon (_tmp57_);
5550
_tmp60_ = unity_applications_lens_daemon_find_app_install_icon_path (self, _tmp59_);
5050
5551
_tmp61_ = _tmp60_;
5051
_tmp62_ = g_file_new_for_uri (_tmp61_);
5552
_tmp62_ = g_file_new_for_path (_tmp61_);
5054
5554
_tmp64_ = (GFileIcon*) g_file_icon_new (_tmp63_);
5555
_g_object_unref0 (icon);
5556
icon = (GIcon*) _tmp64_;
5557
_g_object_unref0 (_tmp63_);
5561
_tmp65_ = self->priv->sc_data_provider;
5562
_tmp66_ = unity_applications_lens_software_center_data_provider_proxy_get_screenshot (_tmp65_);
5564
if (_tmp67_ != NULL) {
5565
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp68_;
5566
const gchar* _tmp69_;
5567
const gchar* _tmp70_;
5568
GFile* _tmp71_ = NULL;
5572
_tmp68_ = self->priv->sc_data_provider;
5573
_tmp69_ = unity_applications_lens_software_center_data_provider_proxy_get_screenshot (_tmp68_);
5575
_tmp71_ = g_file_new_for_uri (_tmp70_);
5578
_tmp73_ = (GFileIcon*) g_file_icon_new (_tmp72_);
5055
5579
_g_object_unref0 (screenshot);
5056
screenshot = (GIcon*) _tmp64_;
5580
screenshot = (GIcon*) _tmp73_;
5057
5581
_g_object_unref0 (scr_file);
5059
_tmp65_ = g_strdup ("");
5061
_tmp66_ = self->priv->sc_data_provider;
5062
_tmp67_ = unity_applications_lens_software_center_data_provider_proxy_get_version (_tmp66_);
5064
if (g_strcmp0 (_tmp68_, "") != 0) {
5065
const gchar* _tmp69_ = NULL;
5066
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp70_;
5067
const gchar* _tmp71_;
5068
const gchar* _tmp72_;
5069
gchar* _tmp73_ = NULL;
5070
_tmp69_ = _ ("Version %s");
5071
_tmp70_ = self->priv->sc_data_provider;
5072
_tmp71_ = unity_applications_lens_software_center_data_provider_proxy_get_version (_tmp70_);
5074
_tmp73_ = g_strdup_printf (_tmp69_, _tmp72_);
5075
_g_free0 (subtitle);
5078
_tmp74_ = self->priv->sc_data_provider;
5079
_tmp75_ = unity_applications_lens_software_center_data_provider_proxy_get_size (_tmp74_);
5081
if (_tmp76_ > ((gint64) 0)) {
5082
const gchar* _tmp77_;
5583
_tmp74_ = g_strdup ("");
5585
_tmp75_ = self->priv->sc_data_provider;
5586
_tmp76_ = unity_applications_lens_software_center_data_provider_proxy_get_version (_tmp75_);
5588
if (g_strcmp0 (_tmp77_, "") != 0) {
5589
const gchar* _tmp78_ = NULL;
5590
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp79_;
5083
5591
const gchar* _tmp80_;
5084
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp81_;
5087
gchar* _tmp84_ = NULL;
5089
gchar* _tmp86_ = NULL;
5093
if (g_strcmp0 (_tmp77_, "") != 0) {
5094
const gchar* _tmp78_;
5097
_tmp79_ = g_strconcat (_tmp78_, ", ", NULL);
5592
const gchar* _tmp81_;
5593
gchar* _tmp82_ = NULL;
5594
_tmp78_ = _ ("Version %s");
5595
_tmp79_ = self->priv->sc_data_provider;
5596
_tmp80_ = unity_applications_lens_software_center_data_provider_proxy_get_version (_tmp79_);
5598
_tmp82_ = g_strdup_printf (_tmp78_, _tmp81_);
5599
_g_free0 (subtitle);
5602
_tmp83_ = self->priv->sc_data_provider;
5603
_tmp84_ = unity_applications_lens_software_center_data_provider_proxy_get_size (_tmp83_);
5605
if (_tmp85_ > ((gint64) 0)) {
5606
const gchar* _tmp86_;
5607
const gchar* _tmp89_;
5608
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp90_;
5611
gchar* _tmp93_ = NULL;
5613
gchar* _tmp95_ = NULL;
5617
if (g_strcmp0 (_tmp86_, "") != 0) {
5618
const gchar* _tmp87_;
5621
_tmp88_ = g_strconcat (_tmp87_, ", ", NULL);
5098
5622
_g_free0 (subtitle);
5102
_tmp81_ = self->priv->sc_data_provider;
5103
_tmp82_ = unity_applications_lens_software_center_data_provider_proxy_get_size (_tmp81_);
5105
_tmp84_ = g_format_size_full ((guint64) _tmp83_, G_FORMAT_SIZE_DEFAULT);
5107
_tmp86_ = g_strdup_printf ("Size %s", _tmp85_);
5109
_tmp88_ = g_strconcat (_tmp80_, _tmp87_, NULL);
5626
_tmp90_ = self->priv->sc_data_provider;
5627
_tmp91_ = unity_applications_lens_software_center_data_provider_proxy_get_size (_tmp90_);
5629
_tmp93_ = g_format_size_full ((guint64) _tmp92_, G_FORMAT_SIZE_DEFAULT);
5631
_tmp95_ = g_strdup_printf ("Size %s", _tmp94_);
5633
_tmp97_ = g_strconcat (_tmp89_, _tmp96_, NULL);
5110
5634
_g_free0 (subtitle);
5115
_tmp89_ = self->priv->sc_data_provider;
5116
_tmp90_ = unity_applications_lens_software_center_data_provider_proxy_get_name (_tmp89_);
5119
_tmp93_ = self->priv->sc_data_provider;
5120
_tmp94_ = unity_applications_lens_software_center_data_provider_proxy_get_description (_tmp93_);
5123
_tmp97_ = screenshot;
5124
_tmp98_ = unity_application_preview_new (_tmp91_, _tmp92_, _tmp95_, _tmp96_, _tmp97_);
5639
_tmp98_ = self->priv->sc_data_provider;
5640
_tmp99_ = unity_applications_lens_software_center_data_provider_proxy_get_name (_tmp98_);
5642
_tmp101_ = subtitle;
5643
_tmp102_ = self->priv->sc_data_provider;
5644
_tmp103_ = unity_applications_lens_software_center_data_provider_proxy_get_description (_tmp102_);
5645
_tmp104_ = _tmp103_;
5647
_tmp106_ = screenshot;
5648
_tmp107_ = unity_application_preview_new (_tmp100_, _tmp101_, _tmp104_, _tmp105_, _tmp106_);
5125
5649
_g_object_unref0 (preview);
5128
_tmp100_ = self->priv->sc_data_provider;
5129
_tmp101_ = unity_applications_lens_software_center_data_provider_proxy_get_license (_tmp100_);
5130
_tmp102_ = _tmp101_;
5131
unity_application_preview_set_license (_tmp99_, _tmp102_);
5132
_tmp103_ = self->priv->ratings;
5133
if (_tmp103_ != NULL) {
5652
_tmp109_ = self->priv->sc_data_provider;
5653
_tmp110_ = unity_applications_lens_software_center_data_provider_proxy_get_license (_tmp109_);
5654
_tmp111_ = _tmp110_;
5655
unity_application_preview_set_license (_tmp108_, _tmp111_);
5656
_tmp112_ = self->priv->ratings;
5657
if (_tmp112_ != NULL) {
5134
5658
UnityRatingsResult _result_ = {0};
5135
UnityRatingsDatabase* _tmp104_;
5136
const gchar* _tmp105_;
5137
UnityRatingsResult _tmp106_ = {0};
5138
UnityApplicationPreview* _tmp107_;
5139
UnityRatingsResult _tmp108_;
5141
UnityRatingsResult _tmp110_;
5143
_tmp104_ = self->priv->ratings;
5145
unity_ratings_database_query (_tmp104_, _tmp105_, &_tmp106_);
5146
_result_ = _tmp106_;
5148
_tmp108_ = _result_;
5149
_tmp109_ = _tmp108_.average_rating;
5150
_tmp110_ = _result_;
5151
_tmp111_ = _tmp110_.total_rating;
5152
unity_application_preview_set_rating (_tmp107_, (gfloat) _tmp109_, (guint) _tmp111_);
5154
_tmp112_ = self->priv->sc_data_provider;
5155
_tmp113_ = unity_applications_lens_software_center_data_provider_proxy_get_hardware_requirements (_tmp112_);
5156
_tmp114_ = _tmp113_;
5157
if (g_strcmp0 (_tmp114_, "") != 0) {
5158
UnityApplicationPreview* _tmp115_;
5159
const gchar* _tmp116_ = NULL;
5160
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp117_;
5161
const gchar* _tmp118_;
5162
const gchar* _tmp119_;
5163
UnityInfoHint* _tmp120_;
5164
UnityInfoHint* _tmp121_;
5166
_tmp116_ = _ ("Hardware requirements");
5167
_tmp117_ = self->priv->sc_data_provider;
5168
_tmp118_ = unity_applications_lens_software_center_data_provider_proxy_get_hardware_requirements (_tmp117_);
5169
_tmp119_ = _tmp118_;
5170
_tmp120_ = unity_info_hint_new ("hardware-requirements", _tmp116_, NULL, _tmp119_);
5171
_tmp121_ = g_object_ref_sink (_tmp120_);
5172
unity_preview_add_info ((UnityPreview*) _tmp115_, _tmp121_);
5173
_g_object_unref0 (_tmp121_);
5176
_tmp123_ = g_str_has_prefix (_tmp122_, "unity-install://");
5178
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp124_;
5179
UnityApplicationsLensSoftwareCenterDataProviderProxyPackageState _tmp125_;
5180
UnityApplicationsLensSoftwareCenterDataProviderProxyPackageState _tmp126_;
5181
gboolean _tmp161_ = FALSE;
5182
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp162_;
5183
const gchar* _tmp163_;
5184
const gchar* _tmp164_;
5186
_tmp124_ = self->priv->sc_data_provider;
5187
_tmp125_ = unity_applications_lens_software_center_data_provider_proxy_get_pkg_state (_tmp124_);
5188
_tmp126_ = _tmp125_;
5189
if (_tmp126_ == UNITY_APPLICATIONS_LENS_SOFTWARE_CENTER_DATA_PROVIDER_PROXY_PACKAGE_STATE_NEEDS_PURCHASE) {
5190
const gchar* _tmp127_ = NULL;
5659
UnityRatingsDatabase* _tmp113_;
5660
const gchar* _tmp114_;
5661
UnityRatingsResult _tmp115_ = {0};
5662
UnityApplicationPreview* _tmp116_;
5663
UnityRatingsResult _tmp117_;
5665
UnityRatingsResult _tmp119_;
5667
_tmp113_ = self->priv->ratings;
5669
unity_ratings_database_query (_tmp113_, _tmp114_, &_tmp115_);
5670
_result_ = _tmp115_;
5672
_tmp117_ = _result_;
5673
_tmp118_ = _tmp117_.average_rating;
5674
_tmp119_ = _result_;
5675
_tmp120_ = _tmp119_.total_rating;
5676
unity_application_preview_set_rating (_tmp116_, _tmp118_ / 5.0f, (guint) _tmp120_);
5678
_tmp121_ = self->priv->sc_data_provider;
5679
_tmp122_ = unity_applications_lens_software_center_data_provider_proxy_get_hardware_requirements (_tmp121_);
5680
_tmp123_ = _tmp122_;
5681
if (g_strcmp0 (_tmp123_, "") != 0) {
5682
UnityApplicationPreview* _tmp124_;
5683
const gchar* _tmp125_ = NULL;
5684
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp126_;
5685
const gchar* _tmp127_;
5686
const gchar* _tmp128_;
5687
UnityInfoHint* _tmp129_;
5688
UnityInfoHint* _tmp130_;
5690
_tmp125_ = _ ("Hardware requirements");
5691
_tmp126_ = self->priv->sc_data_provider;
5692
_tmp127_ = unity_applications_lens_software_center_data_provider_proxy_get_hardware_requirements (_tmp126_);
5693
_tmp128_ = _tmp127_;
5694
_tmp129_ = unity_info_hint_new ("hardware-requirements", _tmp125_, NULL, _tmp128_);
5695
_tmp130_ = g_object_ref_sink (_tmp129_);
5696
unity_preview_add_info ((UnityPreview*) _tmp124_, _tmp130_);
5697
_g_object_unref0 (_tmp130_);
5700
_tmp132_ = g_str_has_prefix (_tmp131_, "unity-install://");
5702
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp133_;
5703
UnityApplicationsLensSoftwareCenterDataProviderProxyPackageState _tmp134_;
5704
UnityApplicationsLensSoftwareCenterDataProviderProxyPackageState _tmp135_;
5705
gboolean _tmp175_ = FALSE;
5706
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp176_;
5707
const gchar* _tmp177_;
5708
const gchar* _tmp178_;
5710
_tmp133_ = self->priv->sc_data_provider;
5711
_tmp134_ = unity_applications_lens_software_center_data_provider_proxy_get_pkg_state (_tmp133_);
5712
_tmp135_ = _tmp134_;
5713
if (_tmp135_ == UNITY_APPLICATIONS_LENS_SOFTWARE_CENTER_DATA_PROVIDER_PROXY_PACKAGE_STATE_NEEDS_PURCHASE) {
5714
const gchar* _tmp136_ = NULL;
5192
5716
gchar* buy_str;
5193
gboolean _tmp129_ = FALSE;
5194
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp130_;
5195
const gchar* _tmp131_;
5196
const gchar* _tmp132_;
5198
const gchar* _tmp144_;
5199
UnityPreviewAction* _tmp145_;
5717
gboolean _tmp138_ = FALSE;
5718
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp139_;
5719
const gchar* _tmp140_;
5720
const gchar* _tmp141_;
5722
const gchar* _tmp153_;
5723
UnityPreviewAction* _tmp154_;
5200
5724
UnityPreviewAction* buy_action;
5201
UnityPreviewAction* _tmp146_;
5202
UnityApplicationPreview* _tmp147_;
5203
UnityPreviewAction* _tmp148_;
5204
_tmp127_ = _ ("Buy");
5205
_tmp128_ = g_strdup (_tmp127_);
5207
_tmp130_ = self->priv->sc_data_provider;
5208
_tmp131_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp130_);
5209
_tmp132_ = _tmp131_;
5210
if (_tmp132_ != NULL) {
5211
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp133_;
5212
const gchar* _tmp134_;
5213
const gchar* _tmp135_;
5214
_tmp133_ = self->priv->sc_data_provider;
5215
_tmp134_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp133_);
5216
_tmp135_ = _tmp134_;
5217
_tmp129_ = g_strcmp0 (_tmp135_, "") != 0;
5725
UnityPreviewAction* _tmp155_;
5726
UnityApplicationPreview* _tmp156_;
5727
UnityPreviewAction* _tmp157_;
5728
_tmp136_ = _ ("Buy");
5729
_tmp137_ = g_strdup (_tmp136_);
5731
_tmp139_ = self->priv->sc_data_provider;
5732
_tmp140_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp139_);
5733
_tmp141_ = _tmp140_;
5734
if (_tmp141_ != NULL) {
5735
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp142_;
5736
const gchar* _tmp143_;
5737
const gchar* _tmp144_;
5738
_tmp142_ = self->priv->sc_data_provider;
5739
_tmp143_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp142_);
5740
_tmp144_ = _tmp143_;
5741
_tmp138_ = g_strcmp0 (_tmp144_, "") != 0;
5221
_tmp136_ = _tmp129_;
5223
const gchar* _tmp137_;
5224
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp138_;
5225
const gchar* _tmp139_;
5226
const gchar* _tmp140_;
5231
_tmp138_ = self->priv->sc_data_provider;
5232
_tmp139_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp138_);
5233
_tmp140_ = _tmp139_;
5234
_tmp141_ = g_strconcat (" ", _tmp140_, NULL);
5235
_tmp142_ = _tmp141_;
5236
_tmp143_ = g_strconcat (_tmp137_, _tmp142_, NULL);
5745
_tmp145_ = _tmp138_;
5747
const gchar* _tmp146_;
5748
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp147_;
5749
const gchar* _tmp148_;
5750
const gchar* _tmp149_;
5755
_tmp147_ = self->priv->sc_data_provider;
5756
_tmp148_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp147_);
5757
_tmp149_ = _tmp148_;
5758
_tmp150_ = g_strconcat (" ", _tmp149_, NULL);
5759
_tmp151_ = _tmp150_;
5760
_tmp152_ = g_strconcat (_tmp146_, _tmp151_, NULL);
5237
5761
_g_free0 (buy_str);
5239
_g_free0 (_tmp142_);
5763
_g_free0 (_tmp151_);
5242
_tmp145_ = unity_preview_action_new ("buy", _tmp144_, NULL);
5243
buy_action = _tmp145_;
5244
_tmp146_ = buy_action;
5245
g_signal_connect_object (_tmp146_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_buy_unity_preview_action_activated, self, 0);
5247
_tmp148_ = buy_action;
5248
unity_preview_add_action ((UnityPreview*) _tmp147_, _tmp148_);
5766
_tmp154_ = unity_preview_action_new ("buy", _tmp153_, NULL);
5767
buy_action = _tmp154_;
5768
_tmp155_ = buy_action;
5769
g_signal_connect_object (_tmp155_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_buy_unity_preview_action_activated, self, 0);
5771
_tmp157_ = buy_action;
5772
unity_preview_add_action ((UnityPreview*) _tmp156_, _tmp157_);
5249
5773
_g_object_unref0 (buy_action);
5250
5774
_g_free0 (buy_str);
5252
5776
UnityPreviewAction* install_action;
5253
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp149_;
5254
const gchar* _tmp150_;
5255
const gchar* _tmp151_;
5256
UnityApplicationPreview* _tmp159_;
5257
UnityPreviewAction* _tmp160_;
5777
gboolean _tmp158_ = FALSE;
5778
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp159_;
5779
const gchar* _tmp160_;
5780
const gchar* _tmp161_;
5782
UnityApplicationPreview* _tmp173_;
5783
UnityPreviewAction* _tmp174_;
5258
5784
install_action = NULL;
5259
_tmp149_ = self->priv->sc_data_provider;
5260
_tmp150_ = unity_applications_lens_software_center_data_provider_proxy_get_price (_tmp149_);
5261
_tmp151_ = _tmp150_;
5262
if (g_strcmp0 (_tmp151_, "") == 0) {
5263
const gchar* _tmp152_ = NULL;
5264
UnityPreviewAction* _tmp153_;
5265
UnityPreviewAction* _tmp154_;
5266
_tmp152_ = _ ("Free Download");
5267
_tmp153_ = unity_preview_action_new ("install", _tmp152_, NULL);
5268
_g_object_unref0 (install_action);
5269
install_action = _tmp153_;
5270
_tmp154_ = install_action;
5271
g_signal_connect_object (_tmp154_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_unity_preview_action_activated, self, 0);
5273
const gchar* _tmp155_ = NULL;
5274
UnityPreviewAction* _tmp156_;
5275
UnityPreviewAction* _tmp157_;
5276
UnityPreviewAction* _tmp158_;
5277
_tmp155_ = _ ("Install");
5278
_tmp156_ = unity_preview_action_new ("install", _tmp155_, NULL);
5279
_g_object_unref0 (install_action);
5280
install_action = _tmp156_;
5281
_tmp157_ = install_action;
5282
g_signal_connect_object (_tmp157_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_commercial_unity_preview_action_activated, self, 0);
5283
_tmp158_ = install_action;
5284
g_signal_connect_object (_tmp158_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_unity_preview_action_activated, self, 0);
5287
_tmp160_ = install_action;
5288
unity_preview_add_action ((UnityPreview*) _tmp159_, _tmp160_);
5785
_tmp159_ = self->priv->sc_data_provider;
5786
_tmp160_ = unity_applications_lens_software_center_data_provider_proxy_get_raw_price (_tmp159_);
5787
_tmp161_ = _tmp160_;
5788
if (_tmp161_ == NULL) {
5791
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp162_;
5792
const gchar* _tmp163_;
5793
const gchar* _tmp164_;
5794
_tmp162_ = self->priv->sc_data_provider;
5795
_tmp163_ = unity_applications_lens_software_center_data_provider_proxy_get_raw_price (_tmp162_);
5796
_tmp164_ = _tmp163_;
5797
_tmp158_ = g_strcmp0 (_tmp164_, "") == 0;
5799
_tmp165_ = _tmp158_;
5801
const gchar* _tmp166_ = NULL;
5802
UnityPreviewAction* _tmp167_;
5803
UnityPreviewAction* _tmp168_;
5804
_tmp166_ = _ ("Free Download");
5805
_tmp167_ = unity_preview_action_new ("install", _tmp166_, NULL);
5806
_g_object_unref0 (install_action);
5807
install_action = _tmp167_;
5808
_tmp168_ = install_action;
5809
g_signal_connect_object (_tmp168_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_unity_preview_action_activated, self, 0);
5811
const gchar* _tmp169_ = NULL;
5812
UnityPreviewAction* _tmp170_;
5813
UnityPreviewAction* _tmp171_;
5814
UnityPreviewAction* _tmp172_;
5815
_tmp169_ = _ ("Install");
5816
_tmp170_ = unity_preview_action_new ("install", _tmp169_, NULL);
5817
_g_object_unref0 (install_action);
5818
install_action = _tmp170_;
5819
_tmp171_ = install_action;
5820
g_signal_connect_object (_tmp171_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_commercial_unity_preview_action_activated, self, 0);
5821
_tmp172_ = install_action;
5822
g_signal_connect_object (_tmp172_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_install_unity_preview_action_activated, self, 0);
5825
_tmp174_ = install_action;
5826
unity_preview_add_action ((UnityPreview*) _tmp173_, _tmp174_);
5289
5827
_g_object_unref0 (install_action);
5291
_tmp162_ = self->priv->sc_data_provider;
5292
_tmp163_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp162_);
5293
_tmp164_ = _tmp163_;
5294
if (_tmp164_ != NULL) {
5295
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp165_;
5296
const gchar* _tmp166_;
5297
const gchar* _tmp167_;
5298
_tmp165_ = self->priv->sc_data_provider;
5299
_tmp166_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp165_);
5300
_tmp167_ = _tmp166_;
5301
_tmp161_ = g_strcmp0 (_tmp167_, "") != 0;
5829
_tmp176_ = self->priv->sc_data_provider;
5830
_tmp177_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp176_);
5831
_tmp178_ = _tmp177_;
5832
if (_tmp178_ != NULL) {
5833
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp179_;
5834
const gchar* _tmp180_;
5835
const gchar* _tmp181_;
5836
_tmp179_ = self->priv->sc_data_provider;
5837
_tmp180_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp179_);
5838
_tmp181_ = _tmp180_;
5839
_tmp175_ = g_strcmp0 (_tmp181_, "") != 0;
5305
_tmp168_ = _tmp161_;
5307
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp169_;
5308
const gchar* _tmp170_;
5309
const gchar* _tmp171_;
5311
const gchar* _tmp173_ = NULL;
5312
UnityPreviewAction* _tmp174_;
5843
_tmp182_ = _tmp175_;
5845
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp183_;
5846
const gchar* _tmp184_;
5847
const gchar* _tmp185_;
5849
const gchar* _tmp187_ = NULL;
5850
UnityPreviewAction* _tmp188_;
5313
5851
UnityPreviewAction* website_action;
5314
UnityPreviewAction* _tmp175_;
5315
UnityApplicationPreview* _tmp176_;
5316
UnityPreviewAction* _tmp177_;
5317
_tmp169_ = self->priv->sc_data_provider;
5318
_tmp170_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp169_);
5319
_tmp171_ = _tmp170_;
5320
_tmp172_ = g_strdup (_tmp171_);
5852
UnityPreviewAction* _tmp189_;
5853
UnityApplicationPreview* _tmp190_;
5854
UnityPreviewAction* _tmp191_;
5855
_tmp183_ = self->priv->sc_data_provider;
5856
_tmp184_ = unity_applications_lens_software_center_data_provider_proxy_get_website (_tmp183_);
5857
_tmp185_ = _tmp184_;
5858
_tmp186_ = g_strdup (_tmp185_);
5321
5859
_g_free0 (self->priv->preview_developer_website);
5322
self->priv->preview_developer_website = _tmp172_;
5323
_tmp173_ = _ ("Developer Site");
5324
_tmp174_ = unity_preview_action_new ("website", _tmp173_, NULL);
5325
website_action = _tmp174_;
5326
_tmp175_ = website_action;
5327
g_signal_connect_object (_tmp175_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_website_unity_preview_action_activated, self, 0);
5329
_tmp177_ = website_action;
5330
unity_preview_add_action ((UnityPreview*) _tmp176_, _tmp177_);
5860
self->priv->preview_developer_website = _tmp186_;
5861
_tmp187_ = _ ("Developer Site");
5862
_tmp188_ = unity_preview_action_new ("website", _tmp187_, NULL);
5863
website_action = _tmp188_;
5864
_tmp189_ = website_action;
5865
g_signal_connect_object (_tmp189_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_website_unity_preview_action_activated, self, 0);
5867
_tmp191_ = website_action;
5868
unity_preview_add_action ((UnityPreview*) _tmp190_, _tmp191_);
5331
5869
_g_object_unref0 (website_action);
5334
UnityApplicationPreview* _tmp178_;
5335
const gchar* _tmp179_ = NULL;
5336
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp180_;
5337
const gchar* _tmp181_;
5338
const gchar* _tmp182_;
5339
UnityInfoHint* _tmp183_;
5340
UnityInfoHint* _tmp184_;
5341
const gchar* _tmp185_ = NULL;
5342
UnityPreviewAction* _tmp186_;
5872
UnityApplicationPreview* _tmp192_;
5873
const gchar* _tmp193_ = NULL;
5874
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp194_;
5875
const gchar* _tmp195_;
5876
const gchar* _tmp196_;
5877
UnityInfoHint* _tmp197_;
5878
UnityInfoHint* _tmp198_;
5879
const gchar* _tmp199_ = NULL;
5880
UnityPreviewAction* _tmp200_;
5343
5881
UnityPreviewAction* launch_action;
5344
UnityApplicationPreview* _tmp187_;
5345
UnityPreviewAction* _tmp188_;
5346
const gchar* _tmp189_ = NULL;
5347
UnityPreviewAction* _tmp190_;
5348
UnityPreviewAction* uninstall_action;
5349
UnityPreviewAction* _tmp191_;
5350
UnityApplicationPreview* _tmp192_;
5351
UnityPreviewAction* _tmp193_;
5353
_tmp179_ = _ ("Installed on");
5354
_tmp180_ = self->priv->sc_data_provider;
5355
_tmp181_ = unity_applications_lens_software_center_data_provider_proxy_get_installation_date (_tmp180_);
5356
_tmp182_ = _tmp181_;
5357
_tmp183_ = unity_info_hint_new ("date-installed", _tmp179_, NULL, _tmp182_);
5358
_tmp184_ = g_object_ref_sink (_tmp183_);
5359
unity_preview_add_info ((UnityPreview*) _tmp178_, _tmp184_);
5360
_g_object_unref0 (_tmp184_);
5361
_tmp185_ = _ ("Launch");
5362
_tmp186_ = unity_preview_action_new ("launch", _tmp185_, NULL);
5363
launch_action = _tmp186_;
5365
_tmp188_ = launch_action;
5366
unity_preview_add_action ((UnityPreview*) _tmp187_, _tmp188_);
5367
_tmp189_ = _ ("Uninstall");
5368
_tmp190_ = unity_preview_action_new ("uninstall", _tmp189_, NULL);
5369
uninstall_action = _tmp190_;
5370
_tmp191_ = uninstall_action;
5371
g_signal_connect_object (_tmp191_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_uninstall_unity_preview_action_activated, self, 0);
5882
UnityApplicationPreview* _tmp201_;
5883
UnityPreviewAction* _tmp202_;
5884
UnityApplicationsLensSoftwareCenterDataProviderProxy* _tmp203_;
5372
5887
_tmp192_ = preview;
5373
_tmp193_ = uninstall_action;
5374
unity_preview_add_action ((UnityPreview*) _tmp192_, _tmp193_);
5375
_g_object_unref0 (uninstall_action);
5888
_tmp193_ = _ ("Installed on");
5889
_tmp194_ = self->priv->sc_data_provider;
5890
_tmp195_ = unity_applications_lens_software_center_data_provider_proxy_get_installation_date (_tmp194_);
5891
_tmp196_ = _tmp195_;
5892
_tmp197_ = unity_info_hint_new ("date-installed", _tmp193_, NULL, _tmp196_);
5893
_tmp198_ = g_object_ref_sink (_tmp197_);
5894
unity_preview_add_info ((UnityPreview*) _tmp192_, _tmp198_);
5895
_g_object_unref0 (_tmp198_);
5896
_tmp199_ = _ ("Launch");
5897
_tmp200_ = unity_preview_action_new ("launch", _tmp199_, NULL);
5898
launch_action = _tmp200_;
5900
_tmp202_ = launch_action;
5901
unity_preview_add_action ((UnityPreview*) _tmp201_, _tmp202_);
5902
_tmp203_ = self->priv->sc_data_provider;
5903
_tmp204_ = unity_applications_lens_software_center_data_provider_proxy_get_is_desktop_dependency (_tmp203_);
5904
_tmp205_ = _tmp204_;
5906
const gchar* _tmp206_ = NULL;
5907
UnityPreviewAction* _tmp207_;
5908
UnityPreviewAction* uninstall_action;
5909
UnityPreviewAction* _tmp208_;
5910
UnityApplicationPreview* _tmp209_;
5911
UnityPreviewAction* _tmp210_;
5912
_tmp206_ = _ ("Uninstall");
5913
_tmp207_ = unity_preview_action_new ("uninstall", _tmp206_, NULL);
5914
uninstall_action = _tmp207_;
5915
_tmp208_ = uninstall_action;
5916
g_signal_connect_object (_tmp208_, "activated", (GCallback) _unity_applications_lens_daemon_app_preview_uninstall_unity_preview_action_activated, self, 0);
5918
_tmp210_ = uninstall_action;
5919
unity_preview_add_action ((UnityPreview*) _tmp209_, _tmp210_);
5920
_g_object_unref0 (uninstall_action);
5376
5922
_g_object_unref0 (launch_action);
5378
_tmp194_ = self->priv->sc_data_provider;
5379
_tmp195_ = unity_applications_lens_software_center_data_provider_proxy_get_desktop_file (_tmp194_);
5380
_tmp196_ = _tmp195_;
5381
_tmp197_ = g_strdup (_tmp196_);
5924
_tmp211_ = self->priv->sc_data_provider;
5925
_tmp212_ = unity_applications_lens_software_center_data_provider_proxy_get_desktop_file (_tmp211_);
5926
_tmp213_ = _tmp212_;
5927
_tmp214_ = g_strdup (_tmp213_);
5382
5928
_g_free0 (self->priv->preview_installable_desktop_file);
5383
self->priv->preview_installable_desktop_file = _tmp197_;
5384
_tmp198_ = self->priv->sc_data_provider;
5385
_tmp199_ = unity_applications_lens_software_center_data_provider_proxy_get_icon (_tmp198_);
5386
_tmp200_ = _tmp199_;
5387
_tmp201_ = g_strdup (_tmp200_);
5929
self->priv->preview_installable_desktop_file = _tmp214_;
5930
_tmp215_ = self->priv->sc_data_provider;
5931
_tmp216_ = unity_applications_lens_software_center_data_provider_proxy_get_icon (_tmp215_);
5932
_tmp217_ = _tmp216_;
5933
_tmp218_ = g_strdup (_tmp217_);
5388
5934
_g_free0 (self->priv->preview_installable_icon_file);
5389
self->priv->preview_installable_icon_file = _tmp201_;
5935
self->priv->preview_installable_icon_file = _tmp218_;
5390
5936
_g_free0 (subtitle);
5391
5937
_g_object_unref0 (screenshot);
5392
5938
_g_object_unref0 (icon);
5397
5943
GError* e = NULL;
5398
const gchar* _tmp202_;
5400
const gchar* _tmp204_;
5944
const gchar* _tmp219_;
5946
const gchar* _tmp221_;
5401
5947
e = _inner_error_;
5402
5948
_inner_error_ = NULL;
5405
_tmp204_ = _tmp203_->message;
5406
g_warning ("daemon.vala:1267: Failed to get package details for '%s': %s", _tmp202_, _tmp204_);
5951
_tmp221_ = _tmp220_->message;
5952
g_warning ("daemon.vala:1393: Failed to get package details for '%s': %s", _tmp219_, _tmp221_);
5407
5953
_g_object_unref0 (preview);
5408
5954
preview = NULL;
5409
5955
_g_error_free0 (e);
5412
5958
if (_inner_error_ != NULL) {
5413
5959
_g_free0 (desktopfile);
5414
5960
_g_free0 (appname);
6511
7063
_g_object_unref0 (self->priv->scope);
6512
7064
self->priv->scope = _tmp35_;
6513
7065
_tmp36_ = self->priv->scope;
6514
_tmp37_ = unity_scope_get_sources (_tmp36_);
6516
_tmp39_ = _ ("Local Apps");
6517
_tmp40_ = unity_options_filter_add_option (_tmp38_, "local", _tmp39_, NULL);
7066
unity_scope_set_provides_personal_content (_tmp36_, TRUE);
7067
_tmp37_ = self->priv->scope;
7068
_tmp38_ = unity_scope_get_sources (_tmp37_);
7070
_tmp40_ = _ ("Local Apps");
7071
_tmp41_ = unity_options_filter_add_option (_tmp39_, "local", _tmp40_, NULL);
6518
7072
_g_object_unref0 (self->priv->local_apps_option);
6519
self->priv->local_apps_option = _tmp40_;
6520
_tmp41_ = self->priv->_display_available_apps;
6522
UnityScope* _tmp42_;
6523
UnityOptionsFilter* _tmp43_;
7073
self->priv->local_apps_option = _tmp41_;
7074
_tmp42_ = self->priv->_display_available_apps;
7076
UnityScope* _tmp43_;
6524
7077
UnityOptionsFilter* _tmp44_;
6525
const gchar* _tmp45_ = NULL;
6526
UnityFilterOption* _tmp46_ = NULL;
6527
_tmp42_ = self->priv->scope;
6528
_tmp43_ = unity_scope_get_sources (_tmp42_);
6530
_tmp45_ = _ ("Software Center");
6531
_tmp46_ = unity_options_filter_add_option (_tmp44_, "usc", _tmp45_, NULL);
7078
UnityOptionsFilter* _tmp45_;
7079
const gchar* _tmp46_ = NULL;
7080
UnityFilterOption* _tmp47_ = NULL;
7081
_tmp43_ = self->priv->scope;
7082
_tmp44_ = unity_scope_get_sources (_tmp43_);
7084
_tmp46_ = _ ("Software Center");
7085
_tmp47_ = unity_options_filter_add_option (_tmp45_, "usc", _tmp46_, NULL);
6532
7086
_g_object_unref0 (self->priv->usc_apps_option);
6533
self->priv->usc_apps_option = _tmp46_;
7087
self->priv->usc_apps_option = _tmp47_;
6535
_tmp47_ = self->priv->scope;
6536
g_signal_connect_object (_tmp47_, "generate-search-key", (GCallback) __unity_applications_lens_daemon___lambda12__unity_scope_generate_search_key, self, 0);
6537
7089
_tmp48_ = self->priv->scope;
6538
g_signal_connect_object (_tmp48_, "search-changed", (GCallback) __unity_applications_lens_daemon___lambda13__unity_scope_search_changed, self, 0);
7090
g_signal_connect_object (_tmp48_, "generate-search-key", (GCallback) __unity_applications_lens_daemon___lambda12__unity_scope_generate_search_key, self, 0);
6539
7091
_tmp49_ = self->priv->scope;
6540
g_signal_connect_object (_tmp49_, "filters-changed", (GCallback) __unity_applications_lens_daemon___lambda14__unity_scope_filters_changed, self, 0);
7092
g_signal_connect_object (_tmp49_, "search-changed", (GCallback) __unity_applications_lens_daemon___lambda13__unity_scope_search_changed, self, 0);
6541
7093
_tmp50_ = self->priv->scope;
6542
g_signal_connect_object (_tmp50_, "active-sources-changed", (GCallback) __unity_applications_lens_daemon___lambda15__unity_scope_active_sources_changed, self, 0);
7094
g_signal_connect_object (_tmp50_, "filters-changed", (GCallback) __unity_applications_lens_daemon___lambda14__unity_scope_filters_changed, self, 0);
6543
7095
_tmp51_ = self->priv->scope;
6544
g_signal_connect_object (_tmp51_, "activate-uri", (GCallback) _unity_applications_lens_daemon_activate_unity_scope_activate_uri, self, 0);
7096
g_signal_connect_object (_tmp51_, "active-sources-changed", (GCallback) __unity_applications_lens_daemon___lambda15__unity_scope_active_sources_changed, self, 0);
6545
7097
_tmp52_ = self->priv->scope;
6546
g_signal_connect_object (_tmp52_, "preview-uri", (GCallback) _unity_applications_lens_daemon_preview_unity_scope_preview_uri, self, 0);
6547
_tmp53_ = unity_app_info_manager_get_default ();
6549
g_signal_connect_object (_tmp54_, "changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_app_info_manager_changed, self, 0);
6550
_g_object_unref0 (_tmp54_);
6551
_tmp55_ = unity_applications_lens_runner_new (self);
7098
g_signal_connect_object (_tmp52_, "activate-uri", (GCallback) _unity_applications_lens_daemon_activate_unity_scope_activate_uri, self, 0);
7099
_tmp53_ = self->priv->scope;
7100
g_signal_connect_object (_tmp53_, "preview-uri", (GCallback) _unity_applications_lens_daemon_preview_unity_scope_preview_uri, self, 0);
7101
_tmp54_ = unity_app_info_manager_get_default ();
7103
g_signal_connect_object (_tmp55_, "changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_app_info_manager_changed, self, 0);
7104
_g_object_unref0 (_tmp55_);
7105
_tmp56_ = unity_applications_lens_runner_new (self);
6552
7106
_g_object_unref0 (self->priv->runner);
6553
self->priv->runner = _tmp55_;
7107
self->priv->runner = _tmp56_;
6556
7109
GRegex* _tmp57_;
6557
7110
GRegex* _tmp58_;
6558
7111
GRegex* _tmp59_;
6559
_tmp56_ = g_regex_new ("^[a-z]+:.+$", 0, 0, &_inner_error_);
7113
_tmp57_ = g_regex_new ("^[a-z]+:.+$", 0, 0, &_inner_error_);
6561
7115
if (_inner_error_ != NULL) {
6562
7116
if (_inner_error_->domain == G_REGEX_ERROR) {
6563
goto __catch16_g_regex_error;
7117
goto __catch17_g_regex_error;
6565
7119
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6566
7120
g_clear_error (&_inner_error_);
6568
7122
_g_regex_unref0 (self->priv->uri_regex);
6569
self->priv->uri_regex = _tmp57_;
6570
_tmp58_ = g_regex_new ("((ftp|ssh|sftp|smb|dav)://).+", 0, 0, &_inner_error_);
7123
self->priv->uri_regex = _tmp58_;
7124
_tmp59_ = g_regex_new ("((ftp|ssh|sftp|smb|dav)://).+", 0, 0, &_inner_error_);
6572
7126
if (_inner_error_ != NULL) {
6573
7127
if (_inner_error_->domain == G_REGEX_ERROR) {
6574
goto __catch16_g_regex_error;
7128
goto __catch17_g_regex_error;
6576
7130
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6577
7131
g_clear_error (&_inner_error_);
6579
7133
_g_regex_unref0 (self->priv->mountable_regex);
6580
self->priv->mountable_regex = _tmp59_;
7134
self->priv->mountable_regex = _tmp60_;
6583
__catch16_g_regex_error:
7137
__catch17_g_regex_error:
6585
7139
GError* e = NULL;
6586
7140
e = _inner_error_;
6587
7141
_inner_error_ = NULL;
6588
7142
_g_regex_unref0 (self->priv->uri_regex);
6589
7143
self->priv->uri_regex = NULL;
6590
g_critical ("daemon.vala:212: Failed to compile URI regex. URL launching will be di" \
7144
g_critical ("daemon.vala:229: Failed to compile URI regex. URL launching will be di" \
6592
7146
_g_error_free0 (e);
6595
7149
if (_inner_error_ != NULL) {
6596
7150
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6597
7151
g_clear_error (&_inner_error_);
6599
_tmp60_ = unity_launcher_favorites_get_default ();
6600
_tmp61_ = _g_object_ref0 (_tmp60_);
7153
_tmp61_ = unity_launcher_favorites_get_default ();
7154
_tmp62_ = _g_object_ref0 (_tmp61_);
6601
7155
_g_object_unref0 (self->priv->favorite_apps);
6602
self->priv->favorite_apps = _tmp61_;
6603
_tmp62_ = self->priv->favorite_apps;
6604
g_signal_connect_object (_tmp62_, "changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_launcher_favorites_changed, self, 0);
6605
_tmp63_ = unity_applications_lens_app_watcher_new ();
7156
self->priv->favorite_apps = _tmp62_;
7157
_tmp63_ = self->priv->favorite_apps;
7158
g_signal_connect_object (_tmp63_, "changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_launcher_favorites_changed, self, 0);
7159
_tmp64_ = unity_applications_lens_app_watcher_new ();
6606
7160
_g_object_unref0 (self->priv->app_watcher);
6607
self->priv->app_watcher = _tmp63_;
6608
_tmp64_ = self->priv->app_watcher;
6609
g_signal_connect_object (_tmp64_, "running-applications-changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_applications_lens_app_watcher_running_applications_changed, self, 0);
6610
_tmp65_ = unity_applications_lens_aptd_proxy_new ();
7161
self->priv->app_watcher = _tmp64_;
7162
_tmp65_ = self->priv->app_watcher;
7163
g_signal_connect_object (_tmp65_, "running-applications-changed", (GCallback) _unity_applications_lens_daemon_mark_dirty_unity_applications_lens_app_watcher_running_applications_changed, self, 0);
7164
_tmp66_ = unity_applications_lens_aptd_proxy_new ();
6611
7165
_g_object_unref0 (self->priv->aptdclient);
6612
self->priv->aptdclient = _tmp65_;
6613
_tmp66_ = unity_applications_lens_launcher_proxy_new ();
7166
self->priv->aptdclient = _tmp66_;
7167
_tmp67_ = unity_applications_lens_launcher_proxy_new ();
6614
7168
_g_object_unref0 (self->priv->launcherservice);
6615
self->priv->launcherservice = _tmp66_;
6616
_tmp67_ = unity_lens_new ("/com/canonical/unity/lens/applications", "applications");
7169
self->priv->launcherservice = _tmp67_;
7170
_tmp68_ = unity_lens_new ("/com/canonical/unity/lens/applications", "applications");
6617
7171
_g_object_unref0 (self->priv->lens);
6618
self->priv->lens = _tmp67_;
6619
_tmp68_ = self->priv->lens;
6620
_tmp69_ = _ ("Search Applications");
6621
unity_lens_set_search_hint (_tmp68_, _tmp69_);
6622
_tmp70_ = self->priv->lens;
6623
unity_lens_set_visible (_tmp70_, TRUE);
7172
self->priv->lens = _tmp68_;
7173
_tmp69_ = self->priv->lens;
7174
_tmp70_ = _ ("Search Applications");
7175
unity_lens_set_search_hint (_tmp69_, _tmp70_);
6624
7176
_tmp71_ = self->priv->lens;
6625
unity_lens_set_search_in_global (_tmp71_, TRUE);
7177
unity_lens_set_visible (_tmp71_, TRUE);
6626
7178
_tmp72_ = self->priv->lens;
6627
_tmp73_ = _ ("Sources");
6628
unity_lens_set_sources_display_name (_tmp72_, _tmp73_);
7179
unity_lens_set_search_in_global (_tmp72_, TRUE);
7180
_tmp73_ = self->priv->lens;
7181
_tmp74_ = _ ("Sources");
7182
unity_lens_set_sources_display_name (_tmp73_, _tmp74_);
6629
7183
unity_applications_lens_daemon_populate_categories (self);
6630
7184
unity_applications_lens_daemon_populate_filters (self);
6631
_tmp74_ = self->priv->lens;
6632
_tmp75_ = self->priv->scope;
6633
unity_lens_add_local_scope (_tmp74_, _tmp75_);
6634
_tmp76_ = self->priv->lens;
6635
unity_lens_export (_tmp76_, &_inner_error_);
7185
_tmp75_ = self->priv->lens;
7186
_tmp76_ = self->priv->scope;
7187
unity_lens_add_local_scope (_tmp75_, _tmp76_);
7188
_tmp77_ = self->priv->lens;
7189
unity_lens_export (_tmp77_, &_inner_error_);
6636
7190
if (_inner_error_ != NULL) {
6637
7191
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6638
7192
g_clear_error (&_inner_error_);