| 2122 | } |
| 2123 | |
| 2124 | static gboolean |
| 2125 | preset_exists (const char *category, const char *name) |
| 2126 | { |
| 2127 | hb_preset_index_t *index; |
| 2128 | char *path; |
| 2129 | gboolean exists = FALSE; |
| 2130 | |
| 2131 | path = g_strdup_printf("/%s/%s", category, name); |
| 2132 | index = hb_preset_search_index(path, FALSE, HB_PRESET_TYPE_ALL); |
| 2133 | |
| 2134 | if (index != NULL && index->depth > 0) |
| 2135 | exists = TRUE; |
| 2136 | |
| 2137 | g_free(index); |
| 2138 | g_free(path); |
| 2139 | return exists; |
| 2140 | } |
| 2141 | |
| 2142 | static void |
| 2143 | preset_import_response_cb (GtkFileChooser *chooser, GtkResponseType response, |
no test coverage detected