| 229 | } |
| 230 | |
| 231 | static void |
| 232 | chapter_list_export (GtkFileChooser *chooser, |
| 233 | GtkResponseType response, signal_user_data_t *ud) |
| 234 | { |
| 235 | gchar *filename, *dir; |
| 236 | const gchar *exportDir; |
| 237 | GhbValue *chapter_list; |
| 238 | |
| 239 | if (response == GTK_RESPONSE_ACCEPT) |
| 240 | { |
| 241 | |
| 242 | chapter_list = ghb_get_job_chapter_list(ud->settings); |
| 243 | |
| 244 | if (chapter_list == NULL) |
| 245 | { |
| 246 | ghb_file_chooser_destroy(chooser); |
| 247 | return; |
| 248 | } |
| 249 | |
| 250 | filename = ghb_file_chooser_get_filename(chooser); |
| 251 | |
| 252 | chapter_list_export_xml(filename, chapter_list); |
| 253 | exportDir = ghb_dict_get_string(ud->prefs, "ExportDirectory"); |
| 254 | dir = g_path_get_dirname(filename); |
| 255 | if (strcmp(dir, exportDir) != 0) |
| 256 | { |
| 257 | ghb_dict_set_string(ud->prefs, "ExportDirectory", dir); |
| 258 | ghb_pref_save(ud->prefs, "ExportDirectory"); |
| 259 | } |
| 260 | g_free(dir); |
| 261 | g_free(filename); |
| 262 | } |
| 263 | ghb_file_chooser_destroy(chooser); |
| 264 | } |
| 265 | |
| 266 | static xmlNodePtr |
| 267 | xml_get_node (xmlNodePtr node, const char *child_name) |
nothing calls this directly
no test coverage detected