mp3splt-gtk
tree_tab.h File Reference
#include "util.h"
Include dependency graph for tree_tab.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  COL_CHECK, COL_DESCRIPTION, COL_MINUTES, COL_SECONDS,
  COL_HUNDR_SECS, COL_NUMBER, COL_PREVIEW, COL_SPLIT_PREVIEW,
  NUM_COLUMNS = 8
}
 

Functions

void add_row (gint checked)
 
void add_splitpoint (Split_point my_split_point, gint old_index)
 
void add_splitpoint_from_player (GtkWidget *widget, gpointer data)
 
void cell_edited_event (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer data)
 
gboolean check_if_description_exists (gchar *descr, gint number)
 
gboolean check_if_splitpoint_does_not_exists (GtkTreeView *tree_view, gint minutes, gint seconds, gint hundr_secs, gint current_split)
 
void close_popup_window_event (GtkWidget *window, gpointer data)
 
GtkWidget * create_choose_splitpoints_frame (GtkTreeView *tree_view)
 
void create_columns (GtkTreeView *tree_view)
 
GtkWidget * create_init_spinner (GtkWidget *bottomhbox1, gint min, gint max, gchar *label_text, gint type)
 
GtkWidget * create_init_spinners_buttons (GtkTreeView *tree_view)
 
GtkTreeModel * create_model ()
 
GtkTreeView * create_tree_view ()
 
void exchange_elements_from_array (gint element_number1, gint element_number2)
 
void exchange_rows_in_the_tree (gint i, gint j, GtkTreeView *tree_view)
 
gint get_first_splitpoint_selected ()
 
gchar * get_splitpoint_name (gint index)
 
gint get_splitpoint_time (gint this_splitpoint)
 
void handle_detached_event (GtkHandleBox *handlebox, GtkWidget *widget, gpointer data)
 
void order_length_column (GtkTreeView *tree_view)
 
void preview_song (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data)
 
void put_splitpoints_in_the_state (splt_state *state)
 
void remove_all_rows (GtkWidget *widget, gpointer data)
 
void remove_row (GtkWidget *widget, gpointer data)
 
void remove_splitpoint (gint index, gint stop_preview)
 
void row_selection_event ()
 
void select_splitpoint (gint index)
 
void sort_tree (GtkTreeView *tree_view)
 
void update_add_button ()
 
void update_current_description (gchar *descr, gint number)
 
void update_hundr_secs_from_spinner (GtkWidget *widget, gpointer data)
 
void update_minutes_from_spinner (GtkWidget *widget, gpointer data)
 
void update_seconds_from_spinner (GtkWidget *widget, gpointer data)
 
void update_splitpoint (gint index, Split_point new_point)
 
void update_splitpoint_check (gint index)
 
void update_splitpoint_from_time (gint index, gdouble time)
 

Variables

enum { ... }  tree_columns
 
GtkTreeView * tree_view
 

Detailed Description


header of tree_tab.c the tree_tab.c file is used for the Splitpoints tab (for the splitpoints table)

Definition in file tree_tab.h.

Enumeration Type Documentation

anonymous enum

The enum telling which item is kept in which column of the splitpoint tree.

Enumerator:
COL_CHECK 

if we enable this splitpoint for split

COL_DESCRIPTION 

the filename of the split

COL_MINUTES 

minutes

COL_SECONDS 

seconds

COL_HUNDR_SECS 

hundreths of a second

COL_NUMBER 

length of the split song

COL_PREVIEW 

preview button

COL_SPLIT_PREVIEW 

split preview button

Definition at line 110 of file tree_tab.h.

Function Documentation

void add_splitpoint ( Split_point  my_split_point,
gint  old_index 
)

adds a splitpoint

Parameters
my_split_pointThe data for our new split point
old_indexused when we update a splitpoint to see where we had the play_preview point

Definition at line 905 of file tree_tab.c.

References cancel_quick_preview(), cancel_quick_preview_all(), check_if_splitpoint_does_not_exists(), check_update_down_progress_bar(), COL_CHECK, COL_DESCRIPTION, COL_HUNDR_SECS, COL_MINUTES, COL_SECONDS, first_splitpoint_selected, get_splitpoint_time(), inputfilename_get(), order_length_column(), preview_start_splitpoint, put_status_message(), quick_preview, quick_preview_end_splitpoint, remove_status_message(), splitnumber, splitpoints, tree_view, update_add_button(), and update_current_description().

Referenced by add_row(), and update_splitpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void cell_edited_event ( GtkCellRendererText *  cell,
gchar *  path_string,
gchar *  new_text,
gpointer  data 
)

event for editing a cell

Definition at line 744 of file tree_tab.c.

References COL_DESCRIPTION, COL_HUNDR_SECS, COL_MINUTES, COL_SECONDS, inputfilename_get(), splitpoints, tree_view, update_current_description(), and update_splitpoint().

Referenced by create_columns().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean check_if_description_exists ( gchar *  descr,
gint  number 
)

checks if the name of the current track is already in use

Parameters
descrThe name of the current track
numberThe number of the track we don't want to compare our track name with
Returns
TRUE if the new track name for track (number) is unique

Definition at line 430 of file tree_tab.c.

References COL_DESCRIPTION, and tree_view.

Referenced by update_current_description().

Here is the caller graph for this function:

gboolean check_if_splitpoint_does_not_exists ( GtkTreeView *  tree_view,
gint  minutes,
gint  seconds,
gint  hundr_secs,
gint  current_split 
)

checks if splitpoints exists in the table and is different from current_split

Definition at line 356 of file tree_tab.c.

References COL_HUNDR_SECS, COL_MINUTES, and COL_SECONDS.

Referenced by add_splitpoint(), update_add_button(), and update_splitpoint().

Here is the caller graph for this function:

void close_popup_window_event ( GtkWidget *  window,
gpointer  data 
)

Issued when closing the new window after detaching.

Definition at line 2103 of file tree_tab.c.

Referenced by handle_detached_event().

Here is the caller graph for this function:

GtkWidget* create_choose_splitpoints_frame ( GtkTreeView *  tree_view)

creates the choose splitpoints frame

This frame contains the spinners, arrows, the tree, add, remove buttons

Definition at line 2140 of file tree_tab.c.

References create_columns(), create_init_special_buttons(), create_init_spinners_buttons(), and handle_detached_event().

Referenced by create_main_vbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_columns ( GtkTreeView *  tree_view)

creates columns for the tree

Definition at line 1923 of file tree_tab.c.

References cell_edited_event(), COL_CHECK, COL_DESCRIPTION, COL_HUNDR_SECS, COL_MINUTES, COL_NUMBER, COL_PREVIEW, COL_SECONDS, and COL_SPLIT_PREVIEW.

Referenced by create_choose_splitpoints_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_init_spinner ( GtkWidget *  bottomhbox1,
gint  min,
gint  max,
gchar *  label_text,
gint  type 
)

creates and and initialise a spinner

Definition at line 1589 of file tree_tab.c.

References update_hundr_secs_from_spinner(), update_minutes_from_spinner(), and update_seconds_from_spinner().

Referenced by create_init_spinners_buttons().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_init_spinners_buttons ( GtkTreeView *  tree_view)

minutes ,seconds spinners ; add, delete buttons

Definition at line 1625 of file tree_tab.c.

References create_cool_button(), create_init_spinner(), remove_all_rows(), remove_row(), spinner_hundr_secs, spinner_minutes, and spinner_seconds.

Referenced by create_choose_splitpoints_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkTreeModel* create_model ( )

creates the model for the tree, gtkliststore

Definition at line 245 of file tree_tab.c.

Referenced by create_tree_view().

Here is the caller graph for this function:

GtkTreeView* create_tree_view ( )

creates the tree view

Definition at line 2249 of file tree_tab.c.

References create_model(), preview_song(), row_selection_event(), and tree_view.

Referenced by create_main_vbox().

Here is the call graph for this function:

Here is the caller graph for this function:

gint get_first_splitpoint_selected ( )

Gets the number of the first splitpoint with selected "Keep" checkbox.

Definition at line 486 of file tree_tab.c.

References tree_view.

Referenced by draw_motif_splitpoints(), remove_splitpoint(), and update_splitpoint().

Here is the caller graph for this function:

gchar* get_splitpoint_name ( gint  index)

returns the name of the splitpoint

result must be g_free'd after use

Definition at line 1721 of file tree_tab.c.

References COL_DESCRIPTION, and tree_view.

Referenced by check_update_down_progress_bar(), and update_splitpoint().

Here is the caller graph for this function:

gint get_splitpoint_time ( gint  this_splitpoint)

returns a splitpoint from the table

Definition at line 1752 of file tree_tab.c.

References splitpoint_to_hundreths(), and splitpoints.

Referenced by add_splitpoint(), change_progress_bar(), da_notify_event(), da_press_event(), da_unpress_event(), mytimer(), player_quick_preview(), and preview_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void handle_detached_event ( GtkHandleBox *  handlebox,
GtkWidget *  widget,
gpointer  data 
)

Issued when we detach the handle.

Definition at line 2116 of file tree_tab.c.

References close_popup_window_event().

Referenced by create_choose_splitpoints_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

void order_length_column ( GtkTreeView *  tree_view)

order the number column

Definition at line 261 of file tree_tab.c.

References COL_HUNDR_SECS, COL_MINUTES, COL_NUMBER, COL_SECONDS, and splitnumber.

Referenced by add_splitpoint(), and remove_splitpoint().

Here is the caller graph for this function:

void preview_song ( GtkTreeView *  tree_view,
GtkTreePath *  path,
GtkTreeViewColumn *  col,
gpointer  user_data 
)

the row clicked event, preview the song

Definition at line 1851 of file tree_tab.c.

References COL_PREVIEW, COL_SPLIT_PREVIEW, get_splitpoint_time(), player_quick_preview(), preview_start_position, put_status_message(), quick_preview_end_splitpoint, and this_row.

Referenced by create_tree_view().

Here is the call graph for this function:

Here is the caller graph for this function:

void put_splitpoints_in_the_state ( splt_state state)

puts the splitpoints into the state

Definition at line 2206 of file tree_tab.c.

References COL_DESCRIPTION, mp3splt_append_splitpoint(), splitnumber, splitpoints, and tree_view.

Referenced by split_it().

Here is the call graph for this function:

Here is the caller graph for this function:

void remove_all_rows ( GtkWidget *  widget,
gpointer  data 
)

removes all rows from the table

Definition at line 1555 of file tree_tab.c.

References cancel_quick_preview_all(), check_update_down_progress_bar(), remove_status_message(), splitnumber, splitpoints, tree_view, and update_add_button().

Referenced by create_init_spinners_buttons(), and update_splitpoints_from_the_state().

Here is the call graph for this function:

Here is the caller graph for this function:

void remove_row ( GtkWidget *  widget,
gpointer  data 
)

remove a row from the table

Definition at line 1510 of file tree_tab.c.

References remove_splitpoint(), splitnumber, and tree_view.

Referenced by create_init_spinners_buttons().

Here is the call graph for this function:

Here is the caller graph for this function:

void remove_splitpoint ( gint  index,
gint  stop_preview 
)

removes a splitpoint

Parameters
indexNumber of the split point
stop_previewmeans we stop preview if necessary

Definition at line 612 of file tree_tab.c.

References cancel_quick_preview_all(), check_update_down_progress_bar(), get_first_splitpoint_selected(), order_length_column(), preview_start_splitpoint, quick_preview_end_splitpoint, remove_status_message(), splitnumber, splitpoints, tree_view, and update_add_button().

Referenced by da_press_event(), remove_row(), and update_splitpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void row_selection_event ( )

row selection event

Definition at line 522 of file tree_tab.c.

Referenced by create_tree_view().

Here is the caller graph for this function:

void select_splitpoint ( gint  index)

selects a splitpoint

Definition at line 586 of file tree_tab.c.

References remove_status_message(), and tree_view.

Referenced by da_press_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_add_button ( )

updates add button

Makes the add button show whether the spinners splitpoint is already in the table or not

Definition at line 203 of file tree_tab.c.

References check_if_splitpoint_does_not_exists(), and tree_view.

Referenced by add_splitpoint(), remove_all_rows(), remove_splitpoint(), update_hundr_secs_from_spinner(), update_minutes_from_spinner(), update_seconds_from_spinner(), and update_splitpoints_from_the_state().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_current_description ( gchar *  descr,
gint  number 
)

Set the name of the splitpoint (number) to (descr)

Parameters
descrthe new name of the split point
numberThe number of the split point

If any split point with a different number already uses the name we want we chose for this split point this function adds a number as a postfix (or updates the already-existing postfix) to force the new splitpoint's name. do be unique.

Definition at line 538 of file tree_tab.c.

References check_if_description_exists(), and splitnumber.

Referenced by add_splitpoint(), and cell_edited_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_hundr_secs_from_spinner ( GtkWidget *  widget,
gpointer  data 
)

updates the hundredth of seconds for the spinner

Definition at line 236 of file tree_tab.c.

References spinner_hundr_secs, and update_add_button().

Referenced by create_init_spinner(), and update_splitpoints_from_the_state().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_minutes_from_spinner ( GtkWidget *  widget,
gpointer  data 
)

updates the minutes from the spinner

Definition at line 219 of file tree_tab.c.

References spinner_minutes, and update_add_button().

Referenced by create_init_spinner(), and update_splitpoints_from_the_state().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_seconds_from_spinner ( GtkWidget *  widget,
gpointer  data 
)

updates the seconds from the spinner

Definition at line 227 of file tree_tab.c.

References spinner_seconds, and update_add_button().

Referenced by create_init_spinner(), and update_splitpoints_from_the_state().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_splitpoint ( gint  index,
Split_point  new_point 
)

Set all values of a split point.

Parameters
new_pointAll values for this split point
indexThe number of this split point

Will display an error in the message bar if a splitpoint with a different index number with exactly the same time value exists and otherwise update the split point.

Definition at line 676 of file tree_tab.c.

References add_splitpoint(), check_if_splitpoint_does_not_exists(), first_splitpoint_selected, get_first_splitpoint_selected(), get_splitpoint_name(), put_status_message(), remove_splitpoint(), splitpoints, and tree_view.

Referenced by cell_edited_event(), update_splitpoint_check(), and update_splitpoint_from_time().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_splitpoint_check ( gint  index)

Toggles a splitpoint's "Keep" flag.

Parameters
indexis the position in the GArray with splitpoints aka the split point's number

Definition at line 736 of file tree_tab.c.

References splitpoints, and update_splitpoint().

Referenced by da_press_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_splitpoint_from_time ( gint  index,
gdouble  time 
)

Set a splitpoint's time value.

Parameters
indexThe split point's number
timethe new time value

Definition at line 717 of file tree_tab.c.

References get_hundr_secs_mins_time(), splitpoints, and update_splitpoint().

Referenced by da_unpress_event().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation