+
+// Populates the list_icons list
+void launcher_load_icons(Launcher *launcher)
+{
+ // Load apps (.desktop style launcher items)
+ GSList* app = launcher->list_apps;
+ while (app != NULL) {
+ DesktopEntry entry;
+ launcher_read_desktop_file(app->data, &entry);
+ if (entry.exec) {
+ LauncherIcon *launcherIcon = calloc(1, sizeof(LauncherIcon));
+ launcherIcon->is_app_desktop = 1;
+ launcherIcon->cmd = strdup(entry.exec);
+ launcherIcon->icon_name = entry.icon ? strdup(entry.icon) : strdup(ICON_FALLBACK);
+ launcherIcon->icon_size = 1;
+ free_desktop_entry(&entry);
+ launcher->list_icons = g_slist_append(launcher->list_icons, launcherIcon);
+ }
+ app = g_slist_next(app);
+ }
+}
+
+
+// Populates the list_themes list