static void free_data(gpointer user_data) { FmAppChooserComboBoxData* data = (FmAppChooserComboBoxData*)user_data; if(data->initial_sel_app) g_object_unref(data->initial_sel_app); if(data->mime_type) fm_mime_type_unref(data->mime_type); if(data->custom_apps) { g_list_foreach(data->custom_apps, (GFunc)g_object_unref, NULL); g_list_free(data->custom_apps); } g_slice_free(FmAppChooserComboBoxData, data); }
static void on_dlg_destroy(AppChooserData* data, GObject* dlg) { if(data->mime_type) fm_mime_type_unref(data->mime_type); g_slice_free(AppChooserData, data); }