| 991 | } |
| 992 | |
| 993 | G_MODULE_EXPORT void |
| 994 | import_file_changed_cb (GtkWidget *widget, gpointer data) |
| 995 | { |
| 996 | signal_user_data_t *ud = ghb_ud(); |
| 997 | ghb_widget_to_setting(ud->settings, widget); |
| 998 | GhbValue *val = ghb_dict_get(ud->settings, "ImportFile"); |
| 999 | import_setting_update(ghb_value_dup(val), "Filename", ud); |
| 1000 | |
| 1001 | // Update SrtDir preference |
| 1002 | const gchar *filename; |
| 1003 | gchar *dirname; |
| 1004 | |
| 1005 | filename = ghb_value_get_string(val); |
| 1006 | if (g_file_test(filename, G_FILE_TEST_IS_DIR)) |
| 1007 | { |
| 1008 | ghb_dict_set_string(ud->prefs, "SrtDir", filename); |
| 1009 | } |
| 1010 | else |
| 1011 | { |
| 1012 | dirname = g_path_get_dirname(filename); |
| 1013 | ghb_dict_set_string(ud->prefs, "SrtDir", dirname); |
| 1014 | g_free(dirname); |
| 1015 | } |
| 1016 | ghb_pref_save(ud->prefs, "SrtDir"); |
| 1017 | } |
| 1018 | |
| 1019 | G_MODULE_EXPORT void |
| 1020 | import_lang_changed_cb (GtkWidget *widget, GParamSpec *pspec, gpointer userdata) |
nothing calls this directly
no test coverage detected