mp3splt-gtk
preferences_tab.c File Reference
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <string.h>
#include <libmp3splt/mp3splt.h>
#include "preferences_tab.h"
#include "player.h"
#include "util.h"
#include "player_tab.h"
#include "utilities.h"
#include "main_win.h"
#include "preferences_manager.h"
#include "widgets_helper.h"
#include "combo_helper.h"
#include "radio_helper.h"
#include "options_manager.h"
#include "ui_manager.h"
Include dependency graph for preferences_tab.c:

Go to the source code of this file.

Functions

void adjust_event (GtkToggleButton *adjust_mode, gpointer user_data)
void browse_dir_button_event (GtkWidget *widget, gpointer data)
void change_tags_options (GtkToggleButton *button, gpointer data)
void clear_current_description (void)
void copy_filename_to_current_description (const gchar *fname)
GtkWidget * create_choose_preferences ()
GtkWidget * create_directory_box ()
GtkWidget * create_language_box ()
GtkWidget * create_output_filename_box ()
GtkWidget * create_player_options_box ()
GtkWidget * create_pref_language_page ()
GtkWidget * create_pref_output_page ()
GtkWidget * create_pref_player_page ()
GtkWidget * create_pref_splitpoints_page ()
GtkWidget * create_pref_tags_page ()
GtkWidget * create_scrolled_window ()
GtkWidget * create_split_options_box ()
GtkWidget * create_tags_options_box ()
GtkWidget * create_tags_version_box ()
void disable_adjust_spinners ()
void enable_adjust_spinners ()
void frame_event (GtkToggleButton *frame_mode, gpointer user_data)
GString * get_checked_language ()
gboolean get_checked_output_radio_box ()
gint get_checked_tags_version_radio_box ()
gboolean output_entry_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
void output_radio_box_event (GtkToggleButton *radio_b, gpointer data)
gchar * outputdirectory_get ()
void outputdirectory_set (gchar *dirname)
void player_combo_box_event (GtkComboBox *widget, gpointer data)
void save_preferences (GtkWidget *widget, gpointer data)
void set_default_prefs_event (GtkWidget *widget, gpointer data)
void song_dir_button_event (GtkWidget *widget, gpointer data)
void splitpoints_from_filename_event (GtkToggleButton *frame_mode, gpointer user_data)
void test_regex_event (GtkWidget *widget, gpointer data)

Variables

GtkWidget * adjust_mode = NULL
GtkWidget * create_dirs_from_output_files = NULL
GtkWidget * directory_entry = NULL
gint file_browsed
GtkWidget * frame_mode = NULL
GtkWidget * names_from_filename = NULL
GtkWidget * output_entry = NULL
GtkWidget * output_label = NULL
GString * outputdirname = NULL
GtkWidget * player_box
GtkWidget * player_combo_box = NULL
GList * player_pref_list = NULL
GtkWidget * queue_files_button
GtkWidget * radio_button = NULL
GtkWidget * radio_output = NULL
gint selected_player = PLAYER_GSTREAMER
gint selected_split_mode
GtkWidget * spinner_equal_tracks
GtkWidget * spinner_time
gint split_file_mode
GtkWidget * tags_radio = NULL
GtkWidget * tags_version_radio = NULL
GList * text_options_list = NULL
splt_statethe_state
ui_stateui
GtkWidget * spinner_adjust_gap = NULL
GtkWidget * gap_label = NULL
GtkWidget * spinner_adjust_offset = NULL
GtkWidget * offset_label = NULL
GtkWidget * spinner_adjust_threshold = NULL
GtkWidget * threshold_label = NULL
GtkWidget * replace_underscore_by_space_check_box = NULL
GtkComboBox * artist_text_properties_combo = NULL
GtkComboBox * album_text_properties_combo = NULL
GtkComboBox * title_text_properties_combo = NULL
GtkComboBox * comment_text_properties_combo = NULL
GtkComboBox * genre_combo = NULL
GtkWidget * comment_tag_entry = NULL
GtkWidget * regex_entry = NULL
GtkWidget * test_regex_fname_entry = NULL
GtkWidget * sample_result_label = NULL
GtkWidget * extract_tags_box = NULL

Detailed Description


The preferences tab

this file contains the code for the preferences tab where the preferences can be chosen.

Definition in file preferences_tab.c.


Function Documentation

void adjust_event ( GtkToggleButton *  adjust_mode,
gpointer  user_data 
)

adjust event

Definition at line 556 of file preferences_tab.c.

References disable_adjust_spinners(), enable_adjust_spinners(), and frame_mode.

Referenced by create_split_options_box().

Here is the call graph for this function:

Here is the caller graph for this function:

void browse_dir_button_event ( GtkWidget *  widget,
gpointer  data 
)

Events for browse dir button.

Definition at line 499 of file preferences_tab.c.

References outputdirectory_set().

Referenced by create_directory_box().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_choose_preferences ( )

creates the preferences tab

Definition at line 1244 of file preferences_tab.c.

References create_pref_language_page(), create_pref_output_page(), create_pref_player_page(), create_pref_splitpoints_page(), and create_pref_tags_page().

Referenced by create_main_vbox().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_directory_box ( )

Creates the box the output directory can be choosen in.

Definition at line 642 of file preferences_tab.c.

References browse_dir_button_event(), create_cool_button(), directory_entry, outputdirectory_get(), song_dir_button_event(), and wh_set_title_and_get_vbox().

Referenced by create_pref_splitpoints_page().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_language_box ( )

Create the "select language" box.

Definition at line 448 of file preferences_tab.c.

References radio_button, and wh_set_title_and_get_vbox().

Referenced by create_pref_language_page().

Here is the call graph for this function:

Here is the caller graph for this function:

Create the box the output file name is displayed in.

Definition at line 887 of file preferences_tab.c.

References output_entry, output_entry_event(), output_radio_box_event(), radio_output, and wh_set_title_and_get_vbox().

Referenced by create_pref_output_page().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_player_options_box ( )

Create the box the player backend can be selected with.

Definition at line 822 of file preferences_tab.c.

References player_combo_box, player_combo_box_event(), and wh_set_title_and_get_vbox().

Referenced by create_pref_player_page().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_pref_language_page ( )

Creates the language preferences page.

Definition at line 474 of file preferences_tab.c.

References create_language_box(), and create_scrolled_window().

Referenced by create_choose_preferences().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_pref_output_page ( )

creates the output preferences page

Definition at line 930 of file preferences_tab.c.

References create_output_filename_box(), and create_scrolled_window().

Referenced by create_choose_preferences().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_pref_player_page ( )

creates the player preferences page

Definition at line 848 of file preferences_tab.c.

References create_player_options_box(), and create_scrolled_window().

Referenced by create_choose_preferences().

Here is the call graph for this function:

Here is the caller graph for this function:

creates the splitpoints preferences page

Definition at line 776 of file preferences_tab.c.

References create_directory_box(), create_scrolled_window(), and create_split_options_box().

Referenced by create_choose_preferences().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_pref_tags_page ( )

Create the tags settings tab.

Definition at line 1221 of file preferences_tab.c.

References create_scrolled_window(), create_tags_options_box(), and create_tags_version_box().

Referenced by create_choose_preferences().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_scrolled_window ( )

creates a scrolled window

Definition at line 410 of file preferences_tab.c.

Referenced by create_pref_language_page(), create_pref_output_page(), create_pref_player_page(), create_pref_splitpoints_page(), and create_pref_tags_page().

Here is the caller graph for this function:

GtkWidget* create_split_options_box ( )

Creates the box for split mode selection.

Definition at line 674 of file preferences_tab.c.

References adjust_event(), adjust_mode, create_cool_button(), disable_adjust_spinners(), frame_event(), set_default_prefs_event(), spinner_adjust_gap, and wh_set_title_and_get_vbox().

Referenced by create_pref_splitpoints_page().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_tags_options_box ( )

Create the box for the Tags options.

Definition at line 967 of file preferences_tab.c.

References SPLT_FALSE, tags_radio, and wh_set_title_and_get_vbox().

Referenced by create_pref_tags_page().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_tags_version_box ( )

Create the box we can select with if to create ID1 and/or ID2 Tags.

Definition at line 1188 of file preferences_tab.c.

References wh_set_title_and_get_vbox().

Referenced by create_pref_tags_page().

Here is the call graph for this function:

Here is the caller graph for this function:

disables adjust parameters

Definition at line 534 of file preferences_tab.c.

References spinner_adjust_gap.

Referenced by adjust_event(), and create_split_options_box().

Here is the caller graph for this function:

enables adjust parameters

Definition at line 545 of file preferences_tab.c.

References spinner_adjust_gap.

Referenced by adjust_event().

Here is the caller graph for this function:

void frame_event ( GtkToggleButton *  frame_mode,
gpointer  user_data 
)

frame mode event

Definition at line 577 of file preferences_tab.c.

References adjust_mode.

Referenced by create_split_options_box().

Here is the caller graph for this function:

GString* get_checked_language ( )

Returns the selected language.

must be free() the result after using it.

Definition at line 155 of file preferences_tab.c.

References radio_button.

returns the checked output radio box

Definition at line 180 of file preferences_tab.c.

References radio_output.

Referenced by detect_silence_and_set_splitpoints(), output_radio_box_event(), split_button_event(), update_output_options(), and write_freedbfile().

Here is the caller graph for this function:

returns the checked tags radio box

Definition at line 203 of file preferences_tab.c.

Referenced by put_options_from_preferences().

Here is the caller graph for this function:

gboolean output_entry_event ( GtkWidget *  widget,
GdkEventKey *  event,
gpointer  user_data 
)

update the save buttons on an output entry event

Definition at line 871 of file preferences_tab.c.

References output_entry, print_status_bar_confirmation(), and remove_status_message().

Referenced by create_output_filename_box().

Here is the call graph for this function:

Here is the caller graph for this function:

void output_radio_box_event ( GtkToggleButton *  radio_b,
gpointer  data 
)

cddb and cue output mode radio box event

Definition at line 422 of file preferences_tab.c.

References get_checked_output_radio_box(), output_entry, SPLT_OPT_OUTPUT_FILENAMES, SPLT_OUTPUT_DEFAULT, and SPLT_OUTPUT_FORMAT.

Referenced by create_output_filename_box().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* outputdirectory_get ( )

Get the name of the output directory.

Returns:
  • The name of the output directory, if a directory is set.
  • NULL, otherwise.

Definition at line 251 of file preferences_tab.c.

References outputdirname.

Referenced by create_directory_box(), load_preferences(), and split_button_event().

Here is the caller graph for this function:

void outputdirectory_set ( gchar *  dirname)

Set the name of the output directory.

Definition at line 229 of file preferences_tab.c.

References directory_entry, and outputdirname.

Referenced by browse_dir_button_event(), load_preferences(), main(), and song_dir_button_event().

Here is the caller graph for this function:

void player_combo_box_event ( GtkComboBox *  widget,
gpointer  data 
)

event when changing the combo box player

Definition at line 800 of file preferences_tab.c.

References disconnect_button_event(), hide_connect_button(), queue_files_button, and show_connect_button().

Referenced by create_player_options_box().

Here is the call graph for this function:

Here is the caller graph for this function:

void set_default_prefs_event ( GtkWidget *  widget,
gpointer  data 
)

action for the set default prefs button

Definition at line 616 of file preferences_tab.c.

References adjust_mode, spinner_adjust_gap, SPLT_DEFAULT_PARAM_GAP, SPLT_DEFAULT_PARAM_OFFSET, and SPLT_DEFAULT_PARAM_THRESHOLD.

Referenced by create_split_options_box().

Here is the caller graph for this function:

void song_dir_button_event ( GtkWidget *  widget,
gpointer  data 
)

events for the "set current song directory"

Definition at line 635 of file preferences_tab.c.

References outputdirectory_set().

Referenced by create_directory_box().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

GtkWidget* adjust_mode = NULL
GtkWidget* directory_entry = NULL

The textbox that shows the name of the output directory.

Definition at line 70 of file preferences_tab.c.

Referenced by create_directory_box(), and outputdirectory_set().

Tells us if the file was browsed or not.

Definition at line 75 of file player_tab.c.

Referenced by connect_button_event(), and connect_with_song().

GtkWidget* frame_mode = NULL

frame mode option

Definition at line 97 of file preferences_tab.c.

Referenced by adjust_event(), load_preferences(), and put_options_from_preferences().

GString* outputdirname = NULL

The name of the output directory.

Can be accessed by void outputdirectory_set() and outputdirectory_get().

Definition at line 67 of file preferences_tab.c.

Referenced by outputdirectory_get(), and outputdirectory_set().

GtkWidget* player_combo_box = NULL

choose the player box

Definition at line 77 of file preferences_tab.c.

Referenced by create_player_options_box(), and load_preferences().

GList* player_pref_list = NULL

list where we stock the preferences combo box content

Definition at line 80 of file preferences_tab.c.

GtkWidget* queue_files_button

queue files button

Definition at line 62 of file split_files.c.

GtkWidget* radio_button = NULL

the language radio button

Definition at line 86 of file preferences_tab.c.

Referenced by create_language_box(), get_checked_language(), and load_preferences().

GtkWidget* radio_output = NULL

radio button for choosing default or custom output options

Definition at line 89 of file preferences_tab.c.

Referenced by create_output_filename_box(), get_checked_output_radio_box(), and load_preferences().

defgroup options for tags from filename

Definition at line 119 of file preferences_tab.c.

Referenced by load_preferences().

GtkWidget* spinner_adjust_gap = NULL
GtkWidget* tags_radio = NULL

radio button for tags options

Definition at line 92 of file preferences_tab.c.

Referenced by create_tags_options_box(), load_preferences(), and put_options_from_preferences().

move all options inside

Definition at line 144 of file mp3splt-gtk.c.