38
39
gboolean unity_applications_place_utils_check_actor_has_category (const gchar* actor, GeeSet* categories);
39
40
gboolean unity_applications_place_utils_search_is_invalid (UnityPlaceSearch* search);
40
41
gboolean unity_applications_place_utils_search_has_really_changed (UnityPlaceSearch* old_search, UnityPlaceSearch* new_search);
42
gchar* unity_applications_place_utils_subst_tilde (const gchar* s);
43
45
GAppInfo* unity_applications_place_utils_get_app_info_for_actor (const gchar* actor) {
444
static gchar string_get (const gchar* self, glong index) {
446
g_return_val_if_fail (self != NULL, '\0');
447
result = ((gchar*) self)[index];
452
static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
454
gchar* _tmp0_ = NULL;
456
g_return_val_if_fail (self != NULL, 0);
457
g_return_val_if_fail (needle != NULL, 0);
458
_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
460
if (_result_ != NULL) {
461
result = (gint) (_result_ - ((gchar*) self));
470
gchar* unity_applications_place_utils_subst_tilde (const gchar* s) {
471
gchar* result = NULL;
474
struct passwd* pw = NULL;
476
gboolean _tmp2_ = FALSE;
479
struct passwd* _tmp13_ = NULL;
480
g_return_val_if_fail (s != NULL, NULL);
481
_tmp0_ = string_get (s, (glong) 0);
484
_tmp1_ = g_strdup (s);
494
_tmp4_ = string_get (s, (glong) 1);
495
_tmp2_ = _tmp4_ == '/';
498
const gchar* _tmp5_ = NULL;
499
gchar* _tmp6_ = NULL;
503
_tmp5_ = g_get_home_dir ();
504
_tmp6_ = string_substring (s, (glong) 1, (glong) (-1));
506
_tmp8_ = g_strconcat (_tmp5_, _tmp7_, NULL);
513
_tmp10_ = string_index_of (s, "/", 0);
516
gchar* _tmp11_ = NULL;
517
_tmp11_ = string_substring (s, (glong) 1, (glong) (-1));
521
gchar* _tmp12_ = NULL;
522
_tmp12_ = string_substring (s, (glong) 1, (glong) (k - 1));
526
_tmp13_ = getpwnam (name);
530
_tmp14_ = g_strdup (s);
537
_tmp15_ = g_strdup (pw->pw_dir);
542
gchar* _tmp16_ = NULL;
546
_tmp16_ = string_substring (s, (glong) k, (glong) (-1));
548
_tmp18_ = g_strconcat (pw->pw_dir, _tmp17_, NULL);