mp3splt-gtk

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

- File List
- Globals

Functions | Variables
mp3splt-gtk.c File Reference
`#include <signal.h>`
`#include <locale.h>`
`#include <string.h>`
`#include <ctype.h>`
`#include <unistd.h>`
`#include <sys/stat.h>`
`#include <sys/types.h>`
`#include <glib/gi18n.h>`
`#include <glib.h>`
`#include <gtk/gtk.h>`
`#include <libmp3splt/mp3splt.h>`
`#include "util.h"`
`#include "special_split.h"`
`#include "player.h"`
`#include "utilities.h"`
`#include "tree_tab.h"`
`#include "main_win.h"`
`#include "snackamp_control.h"`
`#include "split_files.h"`
`#include "preferences_tab.h"`
`#include "multiple_files.h"`
`#include "preferences_manager.h"`
`#include "player_tab.h"`
`#include "import.h"`
`#include "mp3splt-gtk.h"`
`#include "ui_manager.h"`
Include dependency graph for mp3splt-gtk.c:

Go to the source code of this file.

## Functions

void | change_window_progress_bar (splt_progress *p_bar)
GThread * | create_thread (GThreadFunc func, gpointer data, gboolean joinable, GError **error)
void | enter_threads ()
void | exit_threads ()
gint | main (gint argc, gchar *argv[], gchar **envp)
void | put_message_from_library (const char *message, splt_message_type mess_type)
void | put_split_filename (const char *filename, int progress_data)
void | sigint_handler (gint sig)
void | sigpipe_handler (gint sig)
gpointer | split_it (gpointer data)

## Variables

GtkWidget * | adjust_mode
GtkWidget * | cancel_button
GtkWidget * | create_dirs_from_output_files
gchar * | filename_path_of_split
gchar * | filename_to_split
GtkWidget * | frame_mode
GtkWidget * | multiple_files_tree
gint | multiple_files_tree_number
GtkWidget * | output_entry
GtkWidget * | percent_progress_bar
GtkWidget * | progress_bar
GtkWidget * | queue_files_button
GtkWidget * | remove_all_files_button
gint | selected_player
gboolean | sigint_called = FALSE
GtkWidget * | silence_remove_silence
GtkWidget * | spinner_adjust_gap
GtkWidget * | spinner_adjust_offset
GtkWidget * | spinner_adjust_threshold
GtkWidget * | spinner_silence_minimum
GtkWidget * | spinner_silence_number_tracks
GtkWidget * | spinner_silence_offset
GtkWidget * | spinner_silence_threshold
GtkWidget * | spinner_time
gint | split_file_mode
gint | split_files = 0
gint | splitnumber
GArray * | splitpoints
splt_state * | the_state = NULL
ui_state * | ui = NULL
gint | we_are_splitting
gint | we_quit_main_program

## Detailed Description

The main file,

this file contains the main() function as well as some globally used functions.

Definition in file mp3splt-gtk.c.

## Function Documentation

void change_window_progress_bar | ( | splt_progress * | p_bar | ) |

Allows to set the value shown by the progress bar.

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

References splt_progres::current_split, splt_progres::filename_shorted, splt_progres::max_splits, splt_progres::percent_progress, splt_progres::progress_type, splt_progres::silence_db_level, splt_progres::silence_found_tracks, SPLT_PROGRESS_CREATE, SPLT_PROGRESS_PREPARE, SPLT_PROGRESS_SCAN_SILENCE, and SPLT_PROGRESS_SEARCH_SYNC.

Referenced by main().

Here is the caller graph for this function:

gint main | ( | gint | argc,
|  | gchar * | argv[],
|  | gchar ** | envp
| ) |  |

The traditional C main function.

Todo:
  - Handle the case that more than one input file is specified at the command line. Until now we just open the first one of the specified files which on windows is basically what notepad does.
    And decide what to do in this case:
    - Going into the multiple files mode will mean that our functionality is enabled if several files are opened at once in Windows
    - And opening a separate instance of our program would mean that windows and nautilus behaviour are consistent (nautilus seems to open every file separately) but - does this really make sense?
  - Handle the case that the specified inputfile is a playlist file
  - Set the full path to the file to make sure that the player will find it even if we are called in a different directory than the file is in and stuff.
  - Gstreamer needs a fully qualified path to the audio file in order to be able to play it back. Don't know why. But what I know is that on solaris realpath() may return a relative filename. And there might be an old system around that does not malloc() memory for a pathname if the pathname we give to it is 0 => find a solution that works everywhere.

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

References change_window_progress_bar(), check_if_dir(), check_if_file(), check_pref_file(), handle_import(), inputfilename, mp3splt_new_state(), mp3splt_set_message_function(), mp3splt_set_progress_function(), mp3splt_set_split_filename_function(), outputdirectory_set(), print_status_bar_confirmation(), put_message_from_library(), put_split_filename(), sigint_handler(), sigpipe_handler(), splitpoints, SPLT_FALSE, SPLT_OPT_DEBUG_MODE, SPLT_OPT_SET_FILE_FROM_CUE_IF_FILE_TAG_FOUND, and SPLT_TRUE.

Here is the call graph for this function:

void put_message_from_library | ( | const char * | message,
|  | splt_message_type | mess_type
| ) |  |

prints a message from the library

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

References put_status_message_with_type().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void put_split_filename | ( | const char * | filename,
|  | int | progress_data
| ) |  |

Add another file to the split_file tab.

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

References add_split_row(), put_status_message(), queue_files_button, and remove_all_files_button.

Referenced by detect_silence_and_set_splitpoints(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void sigint_handler | ( | gint | sig | ) |

handler for the SIGINT signal

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

Referenced by main().

Here is the caller graph for this function:

void sigpipe_handler | ( | gint | sig | ) |

handler for the SIGPIPE signal

This signal is issued by snackamp on close.

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

References disconnect_snackamp(), and player_is_running().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

gpointer split_it | ( | gpointer | data | ) |

Split the file.

reenable default output if necessary

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

References mp3splt_erase_all_splitpoints(), mp3splt_set_filename_to_split(), mp3splt_set_path_of_split(), output_entry, print_processing_file(), print_status_bar_confirmation(), put_splitpoints_in_the_state(), put_status_message(), remove_all_split_rows(), SPLT_CURRENT_TAGS, SPLT_FALSE, SPLT_OPT_OUTPUT_FILENAMES, SPLT_OPT_SPLIT_MODE, SPLT_OPT_TAGS, SPLT_OPTION_NORMAL_MODE, SPLT_OUTPUT_CUSTOM, and SPLT_TRUE.

Referenced by split_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

## Variable Documentation

GtkWidget* adjust_mode

auto-adjust option

Definition at line 100 of file preferences_tab.c.

Referenced by create_split_options_box(), frame_event(), load_preferences(), put_options_from_preferences(), and set_default_prefs_event().

GtkWidget* frame_mode

frame mode option

Definition at line 98 of file preferences_tab.c.

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

GtkWidget* output_entry

output for the cddb,cue and freedb file output

Definition at line 73 of file preferences_tab.c.

GtkWidget* queue_files_button

queue files button

Definition at line 62 of file split_files.c.

Referenced by create_queue_buttons_hbox(), player_combo_box_event(), put_split_filename(), remove_all_files_button_event(), and remove_file_button_event().

GtkWidget* remove_all_files_button

remove file button

Definition at line 66 of file split_files.c.

Referenced by create_queue_buttons_hbox(), put_split_filename(), remove_all_files_button_event(), and remove_file_button_event().

GtkWidget* spinner_adjust_gap

defgroup modeparameters adjust mode parameters

Definition at line 109 of file preferences_tab.c.

Referenced by create_split_options_box(), disable_adjust_spinners(), enable_adjust_spinners(), load_preferences(), put_options_from_preferences(), and set_default_prefs_event().

gint splitnumber

The total number of splitpoints.

Definition at line 81 of file tree_tab.c.

Referenced by add_splitpoint(), draw_splitpoints(), get_splitpoint_clicked(), order_length_column(), put_splitpoints_in_the_state(), remove_all_rows(), remove_row(), remove_splitpoint(), and update_current_description().

GArray* splitpoints

The array all splitpoints are kept in.

The splitpoints themself will be in the

Definition at line 69 of file tree_tab.c.

ui_state* ui = NULL

move all options inside

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