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));
60 gint error = SPLT_OUTPUT_FORMAT_OK;
61 mp3splt_set_oformat(ui->mp3splt_state, data, &error);
81 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->frame_mode)))
90 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->adjust_mode)))
94 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->spinner_adjust_offset)));
96 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_adjust_gap)));
98 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->spinner_adjust_threshold)));
108 if (get_split_file_mode_safe(ui) == FILE_MODE_SINGLE)
114 switch (get_selected_split_mode_safe(ui))
116 case SELECTED_SPLIT_NORMAL:
119 case SELECTED_SPLIT_WRAP:
122 case SELECTED_SPLIT_TIME:
125 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_time)));
127 case SELECTED_SPLIT_EQUAL_TIME_TRACKS:
130 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->spinner_equal_tracks)));
132 case SELECTED_SPLIT_SILENCE:
135 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_threshold)));
137 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_offset)));
139 gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gui->all_spinner_silence_number_tracks)));
141 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_silence_minimum)));
143 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_track_minimum)));
144 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->all_silence_remove_silence)))
153 case SELECTED_SPLIT_TRIM_SILENCE:
156 gtk_spin_button_get_value(GTK_SPIN_BUTTON(gui->all_spinner_trim_silence_threshold)));
158 case SELECTED_SPLIT_ERROR:
166 gint selected_tags_value = rh_get_active_value(gui->tags_radio);
167 if (selected_tags_value == NO_TAGS)
171 else if (selected_tags_value == DEFAULT_TAGS)
175 else if (selected_tags_value == ORIGINAL_FILE_TAGS)
179 else if (selected_tags_value == TAGS_FROM_FILENAME)
181 put_tags_from_filename_regex_options(ui);
185 if (tags_radio_choice == 0)
189 else if (tags_radio_choice == 1)
193 else if (tags_radio_choice == 2)
197 else if (tags_radio_choice == 3)
203 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->create_dirs_from_output_files)));
206 void put_tags_from_filename_regex_options(
ui_state *ui)
213 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui->replace_underscore_by_space_check_box));
217 ch_get_active_value(gui->artist_text_properties_combo));
219 ch_get_active_value(gui->album_text_properties_combo));
221 ch_get_active_value(gui->title_text_properties_combo));
223 ch_get_active_value(gui->comment_text_properties_combo));
225 const gchar *regular_expression = gtk_entry_get_text(GTK_ENTRY(gui->regex_entry));
228 const gchar *default_comment = gtk_entry_get_text(GTK_ENTRY(gui->comment_tag_entry));
229 if (strlen(default_comment) == 0)
231 default_comment = NULL;
233 mp3splt_set_default_comment_tag(ui->mp3splt_state, default_comment);
235 mp3splt_set_default_genre_tag(ui->mp3splt_state, ch_get_active_str_value(gui->genre_combo));