mp3splt-gtk
main_win.c File Reference
#include <string.h>
#include "export.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libmp3splt/mp3splt.h>
#include <gdk/gdkkeysyms.h>
#include "util.h"
#include "main_win.h"
#include "mp3splt-gtk.h"
#include "tree_tab.h"
#include "split_files.h"
#include "utilities.h"
#include "preferences_tab.h"
#include "freedb_tab.h"
#include "special_split.h"
#include "player_tab.h"
#include "player.h"
#include "messages.h"
#include "import.h"
#include "preferences_manager.h"
#include "ui_manager.h"
Include dependency graph for main_win.c:

Go to the source code of this file.

Macros

#define PACKAGE_NAME   "mp3splt-gtk"
 
#define VERSION   "0.7.2"
 

Functions

void about_window (GtkWidget *widget, gpointer *data)
 
void activate_url (GtkAboutDialog *about, const gchar *link, gpointer data)
 
void cancel_button_event (GtkWidget *widget, gpointer data)
 
gboolean configure_window_callback (GtkWindow *window, GdkEvent *event, gpointer data)
 
void create_all ()
 
GtkWidget * create_cool_button (gchar *stock_id, gchar *label_text, gint toggle_or_not)
 
GtkWidget * create_main_vbox ()
 
GtkWidget * create_menu_bar ()
 
GtkWidget * create_toolbar ()
 
void initialize_window ()
 
void main_window_drag_data_received (GtkWidget *window, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data)
 
void print_status_bar_confirmation (gint confirmation)
 
void put_status_message (const gchar *text)
 
void put_status_message_with_type (const gchar *text, splt_message_type mess_type)
 
void quit (GtkWidget *widget, gpointer data)
 
void remove_status_message ()
 
void show_messages_history_dialog (GtkWidget *widget, gpointer data)
 
void ShowHelp ()
 
void split_button_event (GtkWidget *widget, gpointer data)
 

Variables

GtkWidget * cancel_button = NULL
 
GtkWidget * da
 
gchar * filename_path_of_split
 
gchar * filename_to_split
 
gint max_split_files
 
GtkWidget * mess_history_dialog
 
gint number_of_silence_points
 
GtkWidget * percent_progress_bar
 
GtkWidget * player_box
 
GList * player_pref_list
 
GtkWidget * player_vbox = NULL
 
GtkWidget * playlist_box = NULL
 
gint preferences_tab = FALSE
 
GtkWidget * progress_bar
 
splt_freedb_resultssearch_results
 
gint selected_id
 
gint selected_player
 
silence_wavesilence_points
 
gchar ** split_files
 
GtkWidget * split_freedb_button
 
GArray * splitpoints
 
GtkWidget * status_bar
 
GList * text_options_list
 
splt_statethe_state
 
ui_stateui
 
gint we_are_splitting = FALSE
 
gint we_quit_main_program = FALSE
 
GtkWidget * window = NULL
 
GtkAccelGroup * window_accel_group = NULL
 

Detailed Description


The main window

main file that initialises the menubar, the toolbar, the tabs, about window, status error messages

Definition in file main_win.c.

Function Documentation

void cancel_button_event ( GtkWidget *  widget,
gpointer  data 
)

event for the cancel button

Definition at line 436 of file main_win.c.

References print_status_bar_confirmation(), and put_status_message().

Referenced by create_main_vbox(), enable_show_silence_wave(), and scan_for_silence_wave().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_cool_button ( gchar *  stock_id,
gchar *  label_text,
gint  toggle_or_not 
)

creates a cool button with image from stock

Parameters
label_textThe text that has to be displayed on the button
stock_idThe name of the stock image to be displayed on the button
toggle_or_notTRUE means we create a toggle button

Definition at line 635 of file main_win.c.

Referenced by create_delete_buttons_hbox(), create_directory_box(), create_freedb_frame(), create_init_special_buttons(), create_init_spinners_buttons(), create_main_vbox(), create_player_buttons_hbox(), create_queue_buttons_hbox(), create_split_options_box(), and create_text_component().

Here is the caller graph for this function:

GtkWidget* create_menu_bar ( )

creates the menu bar

Definition at line 542 of file main_win.c.

References browse_button_event(), ChooseCueExportFile(), create_toolbar(), import_event(), show_messages_history_dialog(), and split_button_event().

Here is the call graph for this function:

GtkWidget* create_toolbar ( )

creates the toolbar

Definition at line 495 of file main_win.c.

References split_button_event().

Referenced by create_menu_bar().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_status_bar_confirmation ( gint  confirmation)

Output an error message from libmp3splt to the status bar.

Parameters
Theerror number from the library.

Definition at line 872 of file main_win.c.

References put_status_message().

Referenced by cancel_button_event(), detect_silence_and_set_splitpoints(), fix_ogg_stream(), freedb_search(), main(), output_entry_event(), split_it(), update_output_options(), update_splitpoints_from_the_state(), and write_freedbfile().

Here is the call graph for this function:

Here is the caller graph for this function:

void put_status_message ( const gchar *  text)

Output a info message to the status message bar.

The message type is automatically set to SPLT_MESSAGE_INFO. If you don't want that use put_status_message instead.

Parameters
textThe text that has to be displayed.

Definition at line 407 of file main_win.c.

References put_status_message_with_type(), and SPLT_MESSAGE_INFO.

Referenced by add_splitpoint(), cancel_button_event(), export_file(), freedb_search(), gstreamer_start(), mytimer(), player_quick_preview(), preview_song(), print_processing_file(), print_status_bar_confirmation(), put_split_filename(), split_button_event(), split_it(), update_splitpoint(), and write_freedbfile().

Here is the call graph for this function:

Here is the caller graph for this function:

void put_status_message_with_type ( const gchar *  text,
splt_message_type  mess_type 
)

Output a message to the status message bar.

Parameters
textThe text that has to be displayed.
splt_message_typeThe type of the message.

If the type is to be set to SPLT_MESSAGE_INFO put_status_message can be used instead; The enum for the message types is defined in libmp3splt.h

Definition at line 421 of file main_win.c.

References put_message_in_history(), and SPLT_MESSAGE_INFO.

Referenced by put_message_from_library(), and put_status_message().

Here is the call graph for this function:

Here is the caller graph for this function:

void remove_status_message ( )

Removes status bar message.

Used for the ok button event.

Definition at line 393 of file main_win.c.

Referenced by add_splitpoint(), browse_button_event(), da_unpress_event(), handle_import(), import_event(), output_entry_event(), remove_all_rows(), remove_splitpoint(), and select_splitpoint().

Here is the caller graph for this function:

void show_messages_history_dialog ( GtkWidget *  widget,
gpointer  data 
)

event for the "messages history" button

Definition at line 523 of file main_win.c.

Referenced by create_main_vbox(), and create_menu_bar().

Here is the caller graph for this function:

void split_button_event ( GtkWidget *  widget,
gpointer  data 
)

event for the split button

Definition at line 450 of file main_win.c.

References get_checked_output_radio_box(), inputfilename_get(), outputdirectory_get(), put_options_from_preferences(), put_status_message(), split_it(), SPLT_OPT_OUTPUT_FILENAMES, SPLT_OPT_SPLIT_MODE, SPLT_OPTION_NORMAL_MODE, SPLT_OUTPUT_DEFAULT, and SPLT_OUTPUT_FORMAT.

Referenced by create_menu_bar(), and create_toolbar().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

GList* player_pref_list

list where we stock the preferences combo box content

Definition at line 81 of file preferences_tab.c.

ui_state* ui

move all options inside

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