41 #include "options_manager.h"
52 lock_mutex(&ui->variables_mutex);
54 unlock_mutex(&ui->variables_mutex);
59 const char *data = gtk_entry_get_text(GTK_ENTRY(ui->gui->output_entry));
80 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->frame_mode)))
89 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->adjust_mode)))
93 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->spinner_adjust_offset)));
95 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_adjust_gap)));
97 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->spinner_adjust_threshold)));
99 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->spinner_adjust_min)));
109 if (get_split_file_mode_safe(ui) == FILE_MODE_SINGLE)
115 switch (get_selected_split_mode_safe(ui))
117 case SELECTED_SPLIT_NORMAL:
120 case SELECTED_SPLIT_WRAP:
123 case SELECTED_SPLIT_TIME:
126 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_time)) * 100);
128 case SELECTED_SPLIT_EQUAL_TIME_TRACKS:
131 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_equal_tracks)));
133 case SELECTED_SPLIT_SILENCE:
136 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_threshold)));
138 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_offset)));
140 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->all_spinner_silence_number_tracks)));
142 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_minimum)));
144 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_track_minimum)));
145 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->all_silence_remove_silence)))
154 case SELECTED_SPLIT_TRIM_SILENCE:
157 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_trim_silence_threshold)));
159 case SELECTED_SPLIT_ERROR:
167 gint selected_tags_value = rh_get_active_value(gui->tags_radio);
168 if (selected_tags_value == NO_TAGS)
172 else if (selected_tags_value == DEFAULT_TAGS)
176 else if (selected_tags_value == ORIGINAL_FILE_TAGS)
180 else if (selected_tags_value == TAGS_FROM_FILENAME)
182 put_tags_from_filename_regex_options(ui);
186 if (tags_radio_choice == 0)
190 else if (tags_radio_choice == 1)
194 else if (tags_radio_choice == 2)
198 else if (tags_radio_choice == 3)
204 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->create_dirs_from_output_files)));
207 void put_tags_from_filename_regex_options(
ui_state *ui)
214 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->replace_underscore_by_space_check_box));
218 ch_get_active_value(gui->artist_text_properties_combo));
220 ch_get_active_value(gui->album_text_properties_combo));
222 ch_get_active_value(gui->title_text_properties_combo));
224 ch_get_active_value(gui->comment_text_properties_combo));
226 const gchar *regular_expression = gtk_entry_get_text(GTK_ENTRY(gui->regex_entry));
229 const gchar *default_comment = gtk_entry_get_text(GTK_ENTRY(gui->comment_tag_entry));
230 if (strlen(default_comment) == 0)
232 default_comment = NULL;