const gchar* app_type = &hint[12];
GtkSettings* settings;
gint icon_width = 16;
+ GtkTreeIter iter_none;
+ GAppInfo* info;
settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU,
if (!g_strcmp0 (string, ""))
katze_assign (string, NULL);
- if (apps)
+ gtk_list_store_insert_with_values (model, &iter_none, 0,
+ 0, NULL, 1, NULL, 2, _("None"), 3, icon_width, -1);
+
+ if (apps != NULL)
{
- GtkTreeIter iter_none;
gint i = 0;
- GAppInfo* info;
-
- gtk_list_store_insert_with_values (model, &iter_none, 0,
- 0, NULL, 1, NULL, 2, _("None"), 3, icon_width, -1);
while ((info = g_list_nth_data (apps, i++)))
{
g_free (icon_name);
}
+ g_list_free (apps);
+ }
+ {
info = g_app_info_create_from_commandline ("",
"", G_APP_INFO_CREATE_NONE, NULL);
gtk_list_store_insert_with_values (model, NULL, G_MAXINT,
gtk_combo_box_set_active_iter (combo, &iter_none);
}
}
- g_list_free (apps);
g_signal_connect (widget, "changed",
G_CALLBACK (proxy_combo_box_apps_changed_cb), object);
}