MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / import_file_changed_cb

Function import_file_changed_cb

gtk/src/subtitlehandler.c:993–1017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

991}
992
993G_MODULE_EXPORT void
994import_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
1019G_MODULE_EXPORT void
1020import_lang_changed_cb (GtkWidget *widget, GParamSpec *pspec, gpointer userdata)

Callers

nothing calls this directly

Calls 5

ghb_udFunction · 0.85
ghb_widget_to_settingFunction · 0.85
import_setting_updateFunction · 0.85
ghb_dict_set_stringFunction · 0.85
ghb_pref_saveFunction · 0.85

Tested by

no test coverage detected