mp3splt-gtk
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 "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 * 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_statethe_state
GtkComboBox * title_text_properties_combo
ui_stateui

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 771 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:

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 103 of file preferences_manager.c.

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

Here is the caller graph for this function:

void set_language ( )

sets the language, loaded only at start

Definition at line 805 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 99 of file preferences_tab.c.

GtkWidget* frame_mode

frame mode option

Definition at line 97 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().

list where we stock the preferences combo box content

Definition at line 80 of file preferences_tab.c.

GtkWidget* radio_button

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

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.

GtkWidget* spinner_adjust_gap

defgroup modeparameters adjust mode parameters

Definition at line 108 of file preferences_tab.c.

GtkWidget* tags_radio

radio button for tags options

Definition at line 92 of file preferences_tab.c.

move all options inside

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