mp3splt-gtk

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

freedb_window.c
Go to the documentation of this file.
1 /**********************************************************
2 *
3 * mp3splt-gtk -- utility based on mp3splt,
4 * for mp3/ogg splitting without decoding
5 *
6 * Copyright: (C) 2005-2013 Alexandru Munteanu
7 * Contact: m@ioalex.net
8 *
9 * http://mp3splt.sourceforge.net/
10 *
11 *********************************************************/
12
13 /**********************************************************
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
28 * USA.
29 *
30 *********************************************************/
31
32 /*!********************************************************
33 * \file
34 * The freedb tab
35 *
36 * this file is used for the cddb tab
37 * (for searching on freedb)
38 *********************************************************/
39
40 #include "freedb_window.h"
41
42 enum {
43 ALBUM_NAME,
44 NUMBER,
45 FREEDB_TABLE
46 };
47
49 static void add_freedb_row(gchar *album_name, gint album_id, gint revisions_number, ui_state *ui)
50 {
51 GtkTreeModel *model = gtk_tree_view_get_model(ui->gui->freedb_tree);
52
53 GtkTreeIter iter;
54 gtk_tree_store_append (GTK_TREE_STORE(model), &iter,NULL);
55 gtk_tree_store_set(GTK_TREE_STORE(model), &iter,
56 ALBUM_NAME, album_name, NUMBER, album_id, -1);
57
58 gint malloc_number = strlen(album_name) + 20;
59 gchar *number = malloc(malloc_number * sizeof(gchar *));
60 gint i;
61 for(i = 0; i < revisions_number; i++)
62 {
63 g_snprintf(number,malloc_number, _("%s Revision %d"),album_name, i);
64
65 GtkTreeIter child_iter;
66 gtk_tree_store_append(GTK_TREE_STORE(model), &child_iter, &iter);
67 gtk_tree_store_set(GTK_TREE_STORE(model), &child_iter,
68 ALBUM_NAME, number, NUMBER, album_id + i + 1, -1);
69 }
70
71 ui->infos->freedb_table_number++;
72 g_free(number);
73 }
74
76 static GtkTreeModel *create_freedb_model()
77 {
78 GtkTreeStore *model = gtk_tree_store_new(FREEDB_TABLE, G_TYPE_STRING, G_TYPE_INT);
79 return GTK_TREE_MODEL(model);
80 }
81
83 static GtkTreeView *create_freedb_tree()
84 {
85 GtkTreeModel *model = create_freedb_model();
86 return GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
87 }
88
90 static void create_freedb_columns(GtkTreeView *freedb_tree)
91 {
92 GtkCellRendererText *renderer = GTK_CELL_RENDERER_TEXT(gtk_cell_renderer_text_new());
93 g_object_set_data(G_OBJECT(renderer), "col", GINT_TO_POINTER(ALBUM_NAME));
94 GtkTreeViewColumn *name_column = gtk_tree_view_column_new_with_attributes
95 (_("Album title"), GTK_CELL_RENDERER(renderer), "text", ALBUM_NAME, NULL);
96
97 gtk_tree_view_insert_column(freedb_tree, GTK_TREE_VIEW_COLUMN(name_column), ALBUM_NAME);
98
99 gtk_tree_view_column_set_alignment(GTK_TREE_VIEW_COLUMN(name_column), 0.5);
100 gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(name_column), GTK_TREE_VIEW_COLUMN_AUTOSIZE);
101 gtk_tree_view_column_set_expand(GTK_TREE_VIEW_COLUMN(name_column), TRUE);
102
103 gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(name_column), TRUE);
104 }
105
106 static void set_freedb_selected_id_safe(gint selected_id, ui_state *ui)
107 {
108 lock_mutex(&ui->variables_mutex);
109 ui->infos->freedb_selected_id = selected_id;
110 unlock_mutex(&ui->variables_mutex);
111 }
112
113 static gint get_freedb_selected_id_safe(ui_state *ui)
114 {
115 lock_mutex(&ui->variables_mutex);
116 gint selected_id = ui->infos->freedb_selected_id;
117 unlock_mutex(&ui->variables_mutex);
118 return selected_id;
119 }
120
122 static void freedb_selection_changed(GtkTreeSelection *selection, ui_state *ui)
123 {
124 GtkTreeModel *model = gtk_tree_view_get_model(ui->gui->freedb_tree);
125
126 GtkTreeIter iter;
127 if (gtk_tree_selection_get_selected(selection, &model, &iter))
128 {
129 gchar *info;
130 gint selected_id;
131 gtk_tree_model_get(model, &iter, ALBUM_NAME, &info, NUMBER, &selected_id, -1);
132 g_free(info);
133
134 set_freedb_selected_id_safe(selected_id, ui);
135
136 gtk_widget_set_sensitive(ui->gui->freedb_add_button, TRUE);
137 }
138 else
139 {
140 gtk_widget_set_sensitive(ui->gui->freedb_add_button, FALSE);
141 }
142 }
143
145 static void remove_all_freedb_rows(ui_state *ui)
146 {
147 GtkTreeModel *model = gtk_tree_view_get_model(ui->gui->freedb_tree);
148 while (ui->infos->freedb_table_number > 0)
149 {
150 GtkTreeIter iter;
151 gtk_tree_model_get_iter_first(model, &iter);
152 gtk_tree_store_remove(GTK_TREE_STORE(model), &iter);
153 ui->infos->freedb_table_number--;
154 }
155 }
156
157 static gboolean freedb_search_start(ui_state *ui)
158 {
159 gui_state *gui = ui->gui;
160
161 gtk_widget_hide(gui->freedb_search_button);
162 gtk_widget_show(gui->freedb_spinner);
163 gtk_spinner_start(GTK_SPINNER(gui->freedb_spinner));
164
165 gtk_widget_set_sensitive(gui->freedb_add_button, FALSE);
166 gtk_widget_set_sensitive(gui->freedb_entry, FALSE);
167 gtk_widget_set_sensitive(GTK_WIDGET(gui->freedb_tree), FALSE);
168
169 put_status_message(_("please wait... contacting tracktype.org"), ui);
170
171 return FALSE;
172 }
173
174 static gboolean freedb_search_end(ui_with_err *ui_err)
175 {
176 gui_state *gui = ui_err->ui->gui;
177 ui_infos *infos = ui_err->ui->infos;
178
179 remove_all_freedb_rows(ui_err->ui);
180
181 if (ui_err->err >= 0 && infos->freedb_search_results)
182 {
183 gboolean we_have_results = FALSE;
184
185 mp3splt_freedb_init_iterator(infos->freedb_search_results);
186 const splt_freedb_one_result *result = NULL;
187 while ((result = mp3splt_freedb_next(infos->freedb_search_results)))
188 {
189 const char *old_name = mp3splt_freedb_get_name(result);
190 if (old_name == NULL)
191 {
192 add_freedb_row("",
193 mp3splt_freedb_get_id(result),
194 mp3splt_freedb_get_number_of_revisions(result),
195 ui_err->ui);
196 we_have_results = TRUE;
197 continue;
198 }
199
200 char *name = strdup(old_name);
201
202 gint must_be_freed = SPLT_FALSE;
203 name = transform_to_utf8(name, TRUE, &must_be_freed);
204 add_freedb_row(name,
205 mp3splt_freedb_get_id(result),
206 mp3splt_freedb_get_number_of_revisions(result),
207 ui_err->ui);
208 if (must_be_freed) { free(name); }
209
210 we_have_results = TRUE;
211 }
212
213 if (we_have_results)
214 {
215 GtkTreeSelection *selection = gtk_tree_view_get_selection(gui->freedb_tree);
216 GtkTreeModel *model = gtk_tree_view_get_model(gui->freedb_tree);
217 GtkTreePath *path = gtk_tree_path_new_from_indices (0 ,-1);
218
219 GtkTreeIter iter;
220 gtk_tree_model_get_iter(model, &iter, path);
221 gtk_tree_selection_select_iter(selection, &iter);
222 gtk_tree_path_free(path);
223 }
224 }
225
226 gtk_widget_show(gui->freedb_search_button);
227 gtk_spinner_stop(GTK_SPINNER(gui->freedb_spinner));
228 gtk_widget_hide(gui->freedb_spinner);
229
230 gtk_widget_set_sensitive(gui->freedb_entry, TRUE);
231 gtk_widget_set_sensitive(GTK_WIDGET(gui->freedb_tree), TRUE);
232
233 set_process_in_progress_and_wait_safe(FALSE, ui_err->ui);
234
235 g_free(ui_err);
236
237 return FALSE;
238 }
239
241 static gpointer freedb_search(ui_state *ui)
242 {
243 set_process_in_progress_and_wait_safe(TRUE, ui);
244
245 gdk_threads_add_idle_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)freedb_search_start, ui, NULL);
246
247 gint err = SPLT_OK;
248
249 enter_threads();
250 const gchar *freedb_search_value = gtk_entry_get_text(GTK_ENTRY(ui->gui->freedb_entry));
251 exit_threads();
252
253 //freedb_search_results is only used in the idle of the end of the thread, so no mutex needed
254 ui->infos->freedb_search_results =
255 mp3splt_get_freedb_search(ui->mp3splt_state, freedb_search_value, &err,
256 SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI, "\0", -1);
257
258 print_status_bar_confirmation_in_idle(err, ui);
259
260 ui_with_err *ui_err = g_malloc0(sizeof(ui_with_err));
261 ui_err->err = err;
262 ui_err->ui = ui;
263 gdk_threads_add_idle_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)freedb_search_end, ui_err, NULL);
264
265 return NULL;
266 }
267
269 static void freedb_search_start_thread(ui_state *ui)
270 {
271 create_thread((GThreadFunc)freedb_search, ui);
272 }
273
275 static void freedb_search_button_event(GtkWidget *widget, ui_state *ui)
276 {
277 freedb_search_start_thread(ui);
278 }
279
284 static void freedb_entry_activate_event(GtkEntry *entry, ui_state *ui)
285 {
286 freedb_search_start_thread(ui);
287 }
288
290 static void get_secs_mins_hundr(gfloat time, gint *mins,gint *secs, gint *hundr)
291 {
292 *mins = (gint)(time / 6000);
293 *secs = (gint)(time - (*mins * 6000)) / 100;
294 *hundr = (gint)(time - (*mins * 6000) - (*secs * 100));
295 }
296
297 static void update_tags_from_mp3splt_state(gint number_of_rows, ui_state *ui)
298 {
299 gint err = SPLT_OK;
300 splt_tags_group *tags_group = mp3splt_get_tags_group(ui->mp3splt_state, &err);
301 print_status_bar_confirmation(err, ui);
302
303 if (tags_group == NULL)
304 {
305 return;
306 }
307
308 mp3splt_tags_group_init_iterator(tags_group);
309
310 GtkTreeModel *model = gtk_tree_view_get_model(ui->gui->tree_view);
311
312 splt_tags *tags = NULL;
313 gint current_row = 0;
314 while ((tags = mp3splt_tags_group_next(tags_group)))
315 {
316 if ((current_row + 1) > number_of_rows)
317 {
318 break;
319 }
320
321 GtkTreePath *path = gtk_tree_path_new_from_indices(current_row, -1);
322 GtkTreeIter iter;
323 gtk_tree_model_get_iter(model, &iter, path);
324 gtk_tree_path_free(path);
325
326 char *utf8_str;
327 char *year_str = mp3splt_tags_get(tags, SPLT_TAGS_YEAR);
328 if (year_str != NULL)
329 {
330 gint must_be_freed = SPLT_FALSE;
331 utf8_str = transform_to_utf8(year_str, TRUE, &must_be_freed);
332 gint year = atoi(utf8_str);
333 if (must_be_freed) { free(utf8_str); }
334 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_YEAR, year, -1);
335 }
336
337 char *track_str = mp3splt_tags_get(tags, SPLT_TAGS_TRACK);
338 if (track_str != NULL)
339 {
340 gint must_be_freed = SPLT_FALSE;
341 utf8_str = transform_to_utf8(track_str, TRUE, &must_be_freed);
342 gint track = atoi(utf8_str);
343 if (must_be_freed) { free(utf8_str); }
344 if (track < 0) { track = 0; }
345 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TRACK, track, -1);
346 }
347
348 char *title = mp3splt_tags_get(tags, SPLT_TAGS_TITLE);
349 if (title != NULL)
350 {
351 gint must_be_freed = SPLT_FALSE;
352 utf8_str = transform_to_utf8(title, TRUE, &must_be_freed);
353 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TITLE, utf8_str, -1);
354 if (must_be_freed) { free(utf8_str); }
355 }
356
357 char *artist = mp3splt_tags_get(tags, SPLT_TAGS_ARTIST);
358 if (artist != NULL)
359 {
360 gint must_be_freed = SPLT_FALSE;
361 utf8_str = transform_to_utf8(artist, TRUE, &must_be_freed);
362 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_ARTIST, utf8_str, -1);
363 if (must_be_freed) { free(utf8_str); }
364 }
365
366 char *album = mp3splt_tags_get(tags, SPLT_TAGS_ALBUM);
367 if (album != NULL)
368 {
369 gint must_be_freed = SPLT_FALSE;
370 utf8_str = transform_to_utf8(album, TRUE, &must_be_freed);
371 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_ALBUM, utf8_str, -1);
372 if (must_be_freed) { free(utf8_str); }
373 }
374
375 char *genre = mp3splt_tags_get(tags, SPLT_TAGS_GENRE);
376 if (genre != NULL)
377 {
378 gint must_be_freed = SPLT_FALSE;
379 utf8_str = transform_to_utf8(genre, TRUE, &must_be_freed);
380 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_GENRE, utf8_str, -1);
381 if (must_be_freed) { free(utf8_str); }
382 }
383
384 char *comment = mp3splt_tags_get(tags, SPLT_TAGS_COMMENT);
385 if (comment != NULL)
386 {
387 gint must_be_freed = SPLT_FALSE;
388 utf8_str = transform_to_utf8(comment, TRUE, &must_be_freed);
389 gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_COMMENT, utf8_str, -1);
390 if (must_be_freed) { free(utf8_str); }
391 }
392
393 current_row++;
394 }
395 }
396
403 void update_splitpoints_from_mp3splt_state(ui_state *ui)
404 {
405 gint err = SPLT_OK;
406 splt_points *points = mp3splt_get_splitpoints(ui->mp3splt_state, &err);
407 print_status_bar_confirmation(err, ui);
408 if (points == NULL) { return; }
409
410 ui->status->lock_cue_export = SPLT_TRUE;
411
412 remove_all_rows(ui->gui->remove_all_button, ui);
413
414 mp3splt_points_init_iterator(points);
415 const splt_point *point = NULL;
416 gint number_of_rows = 0;
417 while ((point = mp3splt_points_next(points)))
418 {
419 //ugly hack because we use maximum ints in the GUI
420 //-GUI must be changed to accept long values
421 long old_point_value = mp3splt_point_get_value(point);
422 int point_value = (int) old_point_value;
423 if (old_point_value > INT_MAX)
424 {
425 point_value = INT_MAX;
426 }
427
428 get_secs_mins_hundr(point_value,
429 &ui->status->spin_mins, &ui->status->spin_secs, &ui->status->spin_hundr_secs);
430
431 gchar *result_utf8 = mp3splt_point_get_name(point);
432 if (result_utf8 != NULL)
433 {
434 gint must_be_free = FALSE;
435 result_utf8 = transform_to_utf8(result_utf8, FALSE, &must_be_free);
436 g_snprintf(ui->status->current_description, 255, "%s", result_utf8);
437 }
438 else
439 {
440 g_snprintf(ui->status->current_description, 255, "%s", _("description here"));
441 }
442
443 g_free(result_utf8);
444 result_utf8 = NULL;
445
446 splt_type_of_splitpoint type = mp3splt_point_get_type(point);
447 if (type == SPLT_SPLITPOINT)
448 {
449 add_row(TRUE, ui);
450 }
451 else if (type == SPLT_SKIPPOINT)
452 {
453 add_row(FALSE, ui);
454 }
455
456 number_of_rows++;
457 }
458
459 update_tags_from_mp3splt_state(number_of_rows, ui);
460
461 g_snprintf(ui->status->current_description, 255, "%s", _("description here"));
462
463 update_minutes_from_spinner(ui->gui->spinner_minutes, ui);
464 update_seconds_from_spinner(ui->gui->spinner_seconds, ui);
465 update_hundr_secs_from_spinner(ui->gui->spinner_hundr_secs, ui);
466
467 ui->status->lock_cue_export = SPLT_FALSE;
468
469 export_cue_file_in_configuration_directory(ui);
470 }
471
472 static gboolean put_freedb_splitpoints_start(ui_state *ui)
473 {
474 gtk_widget_set_sensitive(ui->gui->freedb_add_button, FALSE);
475 gtk_widget_set_sensitive(GTK_WIDGET(ui->gui->freedb_tree), FALSE);
476
477 put_status_message(_("please wait... contacting tracktype.org"), ui);
478
479 return FALSE;
480 }
481
482 static gboolean put_freedb_splitpoints_end(ui_state *ui)
483 {
484 update_splitpoints_from_mp3splt_state(ui);
485
486 gtk_widget_set_sensitive(ui->gui->freedb_add_button, TRUE);
487 gtk_widget_set_sensitive(GTK_WIDGET(ui->gui->freedb_tree), TRUE);
488
489 set_process_in_progress_and_wait_safe(FALSE, ui);
490
491 return FALSE;
492 }
493
494 static gpointer put_freedb_splitpoints(ui_state *ui)
495 {
496 set_process_in_progress_and_wait_safe(TRUE, ui);
497
498 gint selected_id = get_freedb_selected_id_safe(ui);
499
500 gdk_threads_add_idle_full(G_PRIORITY_HIGH_IDLE,
501 (GSourceFunc)put_freedb_splitpoints_start, ui, NULL);
502
503 gchar *configuration_directory = get_configuration_directory();
504 gint malloc_number = strlen(configuration_directory) + 20;
505 gchar *filename = malloc(malloc_number * sizeof(gchar));
506 g_snprintf(filename, malloc_number, "%s%s%s", configuration_directory, G_DIR_SEPARATOR_S,
507 "query.cddb");
508 g_free(configuration_directory);
509
510 gint err = mp3splt_write_freedb_file_result(ui->mp3splt_state, selected_id,
511 filename, SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI, "\0",-1);
512 print_status_bar_confirmation_in_idle(err, ui);
513
514 enter_threads();
515 if (get_checked_output_radio_box(ui))
516 {
517 exit_threads();
518 mp3splt_set_int_option(ui->mp3splt_state, SPLT_OPT_OUTPUT_FILENAMES, SPLT_OUTPUT_DEFAULT);
519 }
520 else
521 {
522 const char *data = gtk_entry_get_text(GTK_ENTRY(ui->gui->output_entry));
523 exit_threads();
524
525 mp3splt_set_int_option(ui->mp3splt_state, SPLT_OPT_OUTPUT_FILENAMES, SPLT_OUTPUT_FORMAT);
526
527 gint error = mp3splt_set_oformat(ui->mp3splt_state, data);
528 print_status_bar_confirmation_in_idle(error, ui);
529 }
530
531 err = mp3splt_import(ui->mp3splt_state, CDDB_IMPORT, filename);
532 print_status_bar_confirmation_in_idle(err, ui);
533
534 if (filename)
535 {
536 g_free(filename);
537 filename = NULL;
538 }
539
540 gdk_threads_add_idle_full(G_PRIORITY_HIGH_IDLE,
541 (GSourceFunc)put_freedb_splitpoints_end, ui, NULL);
542
543 return NULL;
544 }
545
547 static void freedb_add_button_clicked_event(GtkButton *button, ui_state *ui)
548 {
549 create_thread((GThreadFunc)put_freedb_splitpoints, ui);
550 }
551
553 GtkWidget *create_freedb_frame(ui_state *ui)
554 {
555 GtkWidget *freedb_hbox = wh_hbox_new();
556 gtk_container_set_border_width(GTK_CONTAINER(freedb_hbox), 0);
557
558 GtkWidget *freedb_vbox = wh_vbox_new();
559 gtk_box_pack_start(GTK_BOX(freedb_hbox), freedb_vbox, TRUE, TRUE, 4);
560
561 /* search box */
562 GtkWidget *search_hbox = wh_hbox_new();
563 gtk_box_pack_start(GTK_BOX(freedb_vbox), search_hbox, FALSE, FALSE, 2);
564
565 GtkWidget *label = gtk_label_new(_("Search tracktype.org:"));
566 gtk_box_pack_start(GTK_BOX(search_hbox), label, FALSE, FALSE, 0);
567
568 GtkWidget *freedb_entry = gtk_entry_new();
569 ui->gui->freedb_entry = freedb_entry;
570 gtk_editable_set_editable(GTK_EDITABLE(freedb_entry), TRUE);
571 gtk_box_pack_start(GTK_BOX(search_hbox), freedb_entry, TRUE, TRUE, 6);
572 g_signal_connect(G_OBJECT(freedb_entry), "activate",
573 G_CALLBACK(freedb_entry_activate_event), ui);
574
575 GtkWidget *freedb_search_button = wh_create_cool_button(GTK_STOCK_FIND, _("_Search"),FALSE);
576 ui->gui->freedb_search_button = freedb_search_button;
577 g_signal_connect(G_OBJECT(freedb_search_button), "clicked",
578 G_CALLBACK(freedb_search_button_event), ui);
579 gtk_box_pack_start(GTK_BOX(search_hbox), freedb_search_button, FALSE, FALSE, 0);
580
581 GtkWidget *freedb_spinner = gtk_spinner_new();
582 ui->gui->freedb_spinner = freedb_spinner;
583 gtk_box_pack_start(GTK_BOX(search_hbox), freedb_spinner, FALSE, FALSE, 4);
584
585 /* freedb scrolled window and the tree */
586 GtkTreeView *freedb_tree = create_freedb_tree();
587 ui->gui->freedb_tree = freedb_tree;
588
589 GtkWidget *scrolled_window = gtk_scrolled_window_new(NULL, NULL);
590 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_NONE);
591 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
592 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
593 gtk_box_pack_start(GTK_BOX(freedb_vbox), scrolled_window, TRUE, TRUE, 1);
594
595 create_freedb_columns(freedb_tree);
596
597 gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(freedb_tree));
598
599 GtkTreeSelection *freedb_tree_selection = gtk_tree_view_get_selection(freedb_tree);
600 g_signal_connect(G_OBJECT(freedb_tree_selection), "changed",
601 G_CALLBACK(freedb_selection_changed), ui);
602
603 /* add button */
604 GtkWidget *freedb_add_button = wh_create_cool_button(GTK_STOCK_ADD,_("_Add splitpoints"), FALSE);
605 ui->gui->freedb_add_button = freedb_add_button;
606
607 gtk_widget_set_sensitive(freedb_add_button, FALSE);
608 g_signal_connect(G_OBJECT(freedb_add_button), "clicked",
609 G_CALLBACK(freedb_add_button_clicked_event), ui);
610 gtk_widget_set_tooltip_text(freedb_add_button, _("Set splitpoints to the splitpoints table"));
611
612 return freedb_hbox;
613 }
614
615 void hide_freedb_spinner(gui_state *gui)
616 {
617 gtk_widget_hide(gui->freedb_spinner);
618 }
619
620
update_hundr_secs_from_spinner
void update_hundr_secs_from_spinner(GtkWidget *widget, ui_state *ui)
updates the hundredth of seconds for the spinner
Definition: splitpoints_window.c:122
create_freedb_frame
GtkWidget * create_freedb_frame(ui_state *ui)
creates the freedb box
Definition: freedb_window.c:553
update_splitpoints_from_mp3splt_state
void update_splitpoints_from_mp3splt_state(ui_state *ui)
updates the current splitpoints in ui-&gt;mp3splt_state
Definition: freedb_window.c:403
print_status_bar_confirmation
void print_status_bar_confirmation(gint error, ui_state *ui)
Output an error message from libmp3splt to the status bar.
Definition: main_window.c:1115
remove_all_rows
void remove_all_rows(GtkWidget *widget, ui_state *ui)
removes all rows from the table
Definition: splitpoints_window.c:1363
ui_infos
Definition: ui_types.h:99
transform_to_utf8
gchar * transform_to_utf8(gchar *text, gint free_or_not, gint *must_be_freed)
transform text to utf8
Definition: utilities.c:132
ui_state
Definition: ui_types.h:485
update_seconds_from_spinner
void update_seconds_from_spinner(GtkWidget *widget, ui_state *ui)
updates the seconds from the spinner
Definition: splitpoints_window.c:115
put_status_message
void put_status_message(const gchar *text, ui_state *ui)
Output a info message to the status message bar.
Definition: main_window.c:264
get_checked_output_radio_box
gboolean get_checked_output_radio_box(ui_state *ui)
returns the checked output radio box
Definition: preferences_window.c:71
ui_with_err
Definition: ui_types.h:504
gui_state
Definition: ui_types.h:202
add_row
void add_row(gboolean checked, ui_state *ui)
adds a row to the table
Definition: splitpoints_window.c:930
wh_create_cool_button
GtkWidget * wh_create_cool_button(gchar *stock_id, gchar *label_text, gint toggle_or_not)
creates a cool button with image from stock
Definition: widgets_helper.c:348
update_minutes_from_spinner
void update_minutes_from_spinner(GtkWidget *widget, ui_state *ui)
updates the minutes from the spinner
Definition: splitpoints_window.c:108