mp3splt-gtk

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Functions | Variables
preferences_manager.c File Reference
`#include <string.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <gtk/gtk.h>`
`#include <glib/gi18n.h>`
`#include <glib/gstdio.h>`
`#include <libmp3splt/mp3splt.h>`
`#include "player.h"`
`#include "player_tab.h"`
`#include "preferences_tab.h"`
`#include "special_split.h"`
`#include "combo_helper.h"`
`#include "radio_helper.h"`
`#include "ui_manager.h"`
Include dependency graph for preferences_manager.c:

Go to the source code of this file.

## Functions

void | check_pref_file ()
gchar * | get_preferences_filename ()
void | load_preferences ()
void | set_language ()
void | write_default_preferences_file ()

## Variables

GtkWidget * | adjust_mode
GtkComboBox * | album_text_properties_combo
GtkComboBox * | artist_text_properties_combo
GtkWidget * | comment_tag_entry
GtkComboBox * | comment_text_properties_combo
GtkWidget * | create_dirs_from_output_files
GtkWidget * | file_mode_radio_button
GtkWidget * | frame_mode
GtkComboBox * | genre_combo
GtkWidget * | names_from_filename
GtkWidget * | output_entry
GtkWidget * | output_label
GtkWidget * | player_combo_box
GList * | player_pref_list
GtkWidget * | player_refresh_rate_spinner
GtkWidget * | radio_button
GtkWidget * | radio_output
GtkWidget * | regex_entry
GtkWidget * | replace_underscore_by_space_check_box
gint | selected_player
GtkWidget * | spinner_adjust_gap
GtkWidget * | spinner_adjust_offset
GtkWidget * | spinner_adjust_threshold
GtkWidget * | spinner_equal_tracks
GtkWidget * | spinner_time
GtkWidget * | tags_radio
GtkWidget * | tags_version_radio
GtkWidget * | test_regex_fname_entry
splt_state * | the_state
GtkComboBox * | title_text_properties_combo
ui_state * | ui

## Detailed Description

Save and read preferences

This file contains the functions to save the preferences on the hard disk and to read them again at the next start of the program.

Definition in file preferences_manager.c.

## Function Documentation

void check_pref_file | ( |  | ) |

Create a preferences file — if needed.

checks if preferences file exists and if it does not, create it

Definition at line 782 of file preferences_manager.c.

References get_preferences_filename().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* get_preferences_filename | ( |  | ) |

Get the name of the preferences file.

Attention
  filename returned must be freed after that functions also checks if we have a directory .mp3splt-gtk and if not it creates it. if we have a file .mp3splt-gtk, it makes a backup and then creates the directory result must be freed!!!!

Definition at line 105 of file preferences_manager.c.

Referenced by check_pref_file(), load_preferences(), and set_language().

Here is the caller graph for this function:

void load_preferences | ( |  | ) |

Read the preferences from the preferences file.

Definition at line 184 of file preferences_manager.c.

References adjust_mode, frame_mode, get_preferences_filename(), output_entry, outputdirectory_get(), outputdirectory_set(), player_combo_box, radio_button, radio_output, replace_underscore_by_space_check_box, select_split_mode(), spinner_adjust_gap, and tags_radio.

Here is the call graph for this function:

void set_language | ( |  | ) |

sets the language, loaded only at start

Definition at line 816 of file preferences_manager.c.

References get_preferences_filename().

Here is the call graph for this function:

## Variable Documentation

GtkWidget* adjust_mode

auto-adjust option

Definition at line 100 of file preferences_tab.c.

GtkWidget* frame_mode

frame mode option

Definition at line 98 of file preferences_tab.c.

GtkWidget* output_entry

output for the cddb,cue and freedb file output

Definition at line 73 of file preferences_tab.c.

GtkWidget* player_combo_box

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

list where we stock the preferences combo box content

Definition at line 81 of file preferences_tab.c.

GtkWidget* radio_button

the language radio button

Definition at line 87 of file preferences_tab.c.

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

GtkWidget* radio_output

radio button for choosing default or custom output options

Definition at line 90 of file preferences_tab.c.

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

GtkWidget* replace_underscore_by_space_check_box

defgroup options for tags from filename

Definition at line 120 of file preferences_tab.c.

GtkWidget* spinner_adjust_gap

defgroup modeparameters adjust mode parameters

Definition at line 109 of file preferences_tab.c.

GtkWidget* tags_radio

radio button for tags options

Definition at line 93 of file preferences_tab.c.

ui_state* ui

move all options inside

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