You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(315) |
Feb
(50) |
Mar
(36) |
Apr
(200) |
May
(65) |
Jun
(100) |
Jul
(110) |
Aug
(115) |
Sep
(52) |
Oct
(20) |
Nov
(27) |
Dec
(42) |
2005 |
Jan
(19) |
Feb
(11) |
Mar
(58) |
Apr
(3) |
May
(10) |
Jun
(38) |
Jul
(44) |
Aug
(106) |
Sep
(36) |
Oct
(35) |
Nov
|
Dec
|
From: <mde...@us...> - 2003-12-30 12:50:00
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv25903 Modified Files: dirbrowser.c Log Message: Removed static path for testing Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** dirbrowser.c 30 Dec 2003 12:15:23 -0000 1.28 --- dirbrowser.c 30 Dec 2003 12:49:57 -0000 1.29 *************** *** 727,749 **** model = gtk_tree_view_get_model(treeview); paths = bmp_db_get_paths_from_selection(treeview); - gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, paths->data); - gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 3, - &data_name_nonutf8, -1); ! if (data_name_nonutf8) { ! ! if (do_play) ! playlist_clear(); ! if (g_file_test(data_name_nonutf8, G_FILE_TEST_IS_REGULAR)) ! playlist_add_url_string(data_name_nonutf8); ! if (do_play) ! playlist_play(); ! gtk_tree_selection_unselect_all(gtk_tree_view_get_selection (treeview)); ! ! } } --- 727,752 ---- model = gtk_tree_view_get_model(treeview); paths = bmp_db_get_paths_from_selection(treeview); ! if (do_play) ! playlist_clear(); ! while (paths) { ! gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, paths->data); ! gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 3, ! &data_name_nonutf8, -1); ! ! if (data_name_nonutf8) { ! if (g_file_test(data_name_nonutf8, G_FILE_TEST_IS_REGULAR)) ! playlist_add_url_string(data_name_nonutf8); ! } ! paths = paths->next; ! } ! gtk_tree_selection_unselect_all(gtk_tree_view_get_selection (treeview)); ! if (do_play) ! playlist_play(); ! } *************** *** 1221,1230 **** gpointer user_data) { - gchar *cmp_a; gchar *cmp_b; ! gtk_tree_model_get(model, a, 1, &cmp_a, -1); ! gtk_tree_model_get(model, b, 1, &cmp_b, -1); /* FIXME: Is this here right? */ --- 1224,1232 ---- gpointer user_data) { gchar *cmp_a; gchar *cmp_b; ! gtk_tree_model_get(model, a, 2, &cmp_a, -1); ! gtk_tree_model_get(model, b, 2, &cmp_b, -1); /* FIXME: Is this here right? */ *************** *** 1296,1299 **** --- 1298,1302 ---- GtkTreeStore *file_store; GdkPixbuf *buf_file; + file_store = *************** *** 1361,1365 **** GtkWidget *treeview; ! GtkCellRenderer *renderer; GtkTreeViewColumn *column; --- 1364,1368 ---- GtkWidget *treeview; ! GtkTreeSelection *l_selection; GtkCellRenderer *renderer; GtkTreeViewColumn *column; *************** *** 1372,1377 **** --- 1375,1384 ---- gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), FALSE); + l_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); + gtk_tree_selection_set_mode(l_selection, GTK_SELECTION_MULTIPLE); + renderer = gtk_cell_renderer_pixbuf_new(); column = gtk_tree_view_column_new(); + gtk_tree_view_column_set_clickable(column, TRUE); gtk_tree_view_column_set_title(column, "Filename"); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); *************** *** 1390,1393 **** --- 1397,1401 ---- renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new(); + gtk_tree_view_column_set_clickable(column, TRUE); gtk_tree_view_column_set_title(column, "Pathname"); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); *************** *** 1499,1504 **** GList *paths = NULL; ! // paths = g_list_append(paths, g_strdup(g_get_home_dir())); ! paths = g_list_append(paths, "/reiser4/completed"); fstore = bmp_db_return_filestore_fresh(paths); --- 1507,1511 ---- GList *paths = NULL; ! paths = g_list_append(paths, ""); fstore = bmp_db_return_filestore_fresh(paths); *************** *** 1577,1582 **** GDK_PROP_MODE_REPLACE, (guchar *) data, 2); gdk_window_set_icon(win->window, NULL, icon, mask); ! gdk_window_set_icon_name(win->window, _("bmp :: Add Files...")); ! gdk_window_set_title(win->window, _("bmp :: Add Files...")); gdk_window_set_group(win->window, mainwin->window); } --- 1584,1589 ---- GDK_PROP_MODE_REPLACE, (guchar *) data, 2); gdk_window_set_icon(win->window, NULL, icon, mask); ! gdk_window_set_icon_name(win->window, _("bmp: Add Files...")); ! gdk_window_set_title(win->window, _("bmp: Add Files...")); gdk_window_set_group(win->window, mainwin->window); } *************** *** 1586,1592 **** gpointer user_data) { - - - if (event->button == 3) { gtk_item_factory_popup_with_data(bmp_db_popup, --- 1593,1596 ---- |
From: <mde...@us...> - 2003-12-30 12:15:30
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv20771 Added Files: dirbrowser.c Log Message: Re-added for readding |
From: <mde...@us...> - 2003-12-30 12:14:53
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv20569 Removed Files: dirbrowser.c Log Message: Removed for re-adding --- dirbrowser.c DELETED --- |
From: <des...@us...> - 2003-12-30 02:36:48
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv4644 Modified Files: dirbrowser.c Log Message: - fixed dirbrowser crash with invalid UTF-8 filenames, and when adding files with nothing selected Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** dirbrowser.c 30 Dec 2003 00:10:56 -0000 1.25 --- dirbrowser.c 30 Dec 2003 02:36:45 -0000 1.26 *************** *** 722,725 **** --- 722,731 ---- model = gtk_tree_view_get_model(treeview); paths = bmp_db_get_paths_from_selection(treeview); + + if (!paths) { + g_message("No files selected."); + return; + } + gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, paths->data); gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, FILENAME_COL, *************** *** 793,796 **** --- 799,803 ---- model = gtk_tree_view_get_model(treeview); paths = bmp_db_get_paths_from_selection(treeview); + gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, paths->data); gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, FILENAME_COL, *************** *** 1360,1368 **** if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = ! g_list_append(files, ! g_filename_to_utf8(name_real, -1, ! NULL, NULL, ! NULL)); } } --- 1367,1371 ---- if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = g_list_append(files, name_real); } } *************** *** 1418,1422 **** files->data, sort_model); - g_message("dirbrowser.c: %s", (gchar *) files->data); g_free(files->data); g_free(artist); --- 1421,1424 ---- *************** *** 1427,1430 **** --- 1429,1434 ---- files = files->next; } + + g_list_free(files); gdouble frac = 1 / length_pl; |
From: <des...@us...> - 2003-12-30 00:14:03
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv13864 Modified Files: dirbrowser.c Log Message: - fixed last merge of dirbrowser.c Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** dirbrowser.c 29 Dec 2003 23:32:44 -0000 1.24 --- dirbrowser.c 30 Dec 2003 00:10:56 -0000 1.25 *************** *** 497,520 **** GdkPixbuf *buf; - model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); - buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), - harddisk_pixbuf, TRUE, NULL); - /* create root node */ /* add data to the tree store */ - nodes = g_ptr_array_new(); - filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS)) { ! g_free(filename); ! return NULL; ! } ! ! if (!g_file_get_contents(filename, &buffer, &filesize, NULL)) { ! g_free(filename); ! return NULL; } --- 497,510 ---- GdkPixbuf *buf; /* create root node */ /* add data to the tree store */ filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS) || ! !g_file_get_contents(filename, &buffer, &filesize, NULL)) { ! g_message("Unable to read from '%s'", filename); ! buffer = g_strdup("/:/"); } *************** *** 522,531 **** g_free(buffer); current_line = lines; while (*current_line) { ! if (strlen(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_malloc0(sizeof(DbNode)); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); --- 512,526 ---- g_free(buffer); + model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); + buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), + harddisk_pixbuf, TRUE, NULL); + nodes = g_ptr_array_new(); + current_line = lines; while (*current_line) { ! if (*(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_new0(DbNode, 1); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); *************** *** 774,790 **** static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { - bmp_db_mdb_enq_play(button, treeview, FALSE); - } static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) { - bmp_db_mdb_enq_play(button, treeview, TRUE); - } - static void bmp_db_mdb_row_activated(GtkTreeView * treeview, GtkTreePath * arg1, --- 769,780 ---- *************** *** 1428,1432 **** files->data, sort_model); ! g_message("dirbrowser.c: %s", files->data); g_free(files->data); g_free(artist); --- 1418,1422 ---- files->data, sort_model); ! g_message("dirbrowser.c: %s", (gchar *) files->data); g_free(files->data); g_free(artist); *************** *** 1585,1591 **** button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); ! button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, --- 1575,1583 ---- button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); ! button_play = gtk_button_new_with_label(_("Play")); button_box = gtk_hbutton_box_new(); ! ! gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), ! GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, *************** *** 1593,1608 **** gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, ! FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_play, FALSE, FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); - g_signal_connect(G_OBJECT(button_play), "clicked", G_CALLBACK(bmp_db_mdb_play), fstore); - g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); --- 1585,1598 ---- gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(button_box), button_enqueue, FALSE, ! FALSE, 4); ! gtk_box_pack_start(GTK_BOX(button_box), button_play, FALSE, FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); g_signal_connect(G_OBJECT(button_play), "clicked", G_CALLBACK(bmp_db_mdb_play), fstore); g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); *************** *** 1634,1639 **** gtk_window_add_accel_group(GTK_WINDOW(window), db_accel); - - return window; --- 1624,1627 ---- |
From: <mde...@us...> - 2003-12-29 23:32:51
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv7197 Modified Files: dirbrowser.c Log Message: indent -kr dirbrowser.c Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** dirbrowser.c 29 Dec 2003 23:16:35 -0000 1.23 --- dirbrowser.c 29 Dec 2003 23:32:44 -0000 1.24 *************** *** 110,116 **** * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) --- 110,116 ---- * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) *************** *** 296,300 **** /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); --- 296,300 ---- /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); *************** *** 343,347 **** } ! static gchar *bmp_db_get_path_real(const gchar * path, GtkTreeModel * model, GtkTreeIter * iter) { --- 343,348 ---- } ! static gchar *bmp_db_get_path_real(const gchar * path, ! GtkTreeModel * model, GtkTreeIter * iter) { *************** *** 378,383 **** root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) ! { g_free(root_utf8); g_free(root_real); --- 379,383 ---- root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) { g_free(root_utf8); g_free(root_real); *************** *** 418,423 **** continue; ! name_real = ! g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { --- 418,422 ---- continue; ! name_real = g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { *************** *** 510,521 **** g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS)) ! { g_free(filename); return NULL; } ! if (!g_file_get_contents(filename, &buffer, &filesize, NULL)) ! { g_free(filename); return NULL; --- 509,518 ---- g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS)) { g_free(filename); return NULL; } ! if (!g_file_get_contents(filename, &buffer, &filesize, NULL)) { g_free(filename); return NULL; *************** *** 688,693 **** gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = ! bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); --- 685,689 ---- gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); *************** *** 716,721 **** ! static void bmp_db_mdb_enq_play(GtkButton * button, gpointer treeview, gboolean do_play) { ! GtkTreeIter iter; GtkTreeIter iter_child; --- 712,719 ---- ! static void bmp_db_mdb_enq_play(GtkButton * button, gpointer treeview, ! gboolean do_play) ! { ! GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 774,794 **** } ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { ! ! bmp_db_mdb_enq_play(button, treeview, FALSE); ! } ! static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) { ! ! bmp_db_mdb_enq_play(button, treeview, TRUE); ! } static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) { GtkTreeIter iter; GtkTreeIter iter_child; --- 772,795 ---- } ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) ! { ! ! bmp_db_mdb_enq_play(button, treeview, FALSE); ! } ! static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) ! { ! ! bmp_db_mdb_enq_play(button, treeview, TRUE); ! } static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) ! { GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 881,885 **** g_free(path); g_free(path_real); ! paths = paths->next; --- 882,886 ---- g_free(path); g_free(path_real); ! paths = paths->next; *************** *** 992,996 **** node->path_real = dir; ! gchar *tmp = g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); --- 993,998 ---- node->path_real = dir; ! gchar *tmp = ! g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); *************** *** 1368,1372 **** if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = g_list_append(files, g_filename_to_utf8(name_real, -1, NULL, NULL,NULL)); } } --- 1370,1378 ---- if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = ! g_list_append(files, ! g_filename_to_utf8(name_real, -1, ! NULL, NULL, ! NULL)); } } *************** *** 1422,1426 **** files->data, sort_model); ! g_message("dirbrowser.c: %s",files->data); g_free(files->data); g_free(artist); --- 1428,1432 ---- files->data, sort_model); ! g_message("dirbrowser.c: %s", files->data); g_free(files->data); g_free(artist); *************** *** 1491,1496 **** GtkWidget *button_enqueue, *button_play; GtkWidget *button_box; ! ! if (!window) { --- 1497,1502 ---- GtkWidget *button_enqueue, *button_play; GtkWidget *button_box; ! ! if (!window) { *************** *** 1579,1591 **** button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); ! button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_play, FALSE, FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", --- 1585,1600 ---- button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); ! button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, ! 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, ! FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_play, FALSE, ! FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", *************** *** 1626,1631 **** gtk_window_add_accel_group(GTK_WINDOW(window), db_accel); ! ! return window; } --- 1635,1640 ---- gtk_window_add_accel_group(GTK_WINDOW(window), db_accel); ! ! return window; } |
From: <mde...@us...> - 2003-12-29 23:16:49
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv4285 Modified Files: dirbrowser.c Log Message: Fixed problems introduced trough merger problem before last commit ... Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dirbrowser.c 29 Dec 2003 23:12:33 -0000 1.22 --- dirbrowser.c 29 Dec 2003 23:16:35 -0000 1.23 *************** *** 110,116 **** * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) --- 110,116 ---- * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) *************** *** 296,300 **** /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); --- 296,300 ---- /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); *************** *** 343,348 **** } ! static gchar *bmp_db_get_path_real(const gchar * path, ! GtkTreeModel * model, GtkTreeIter * iter) { --- 343,347 ---- } ! static gchar *bmp_db_get_path_real(const gchar * path, GtkTreeModel * model, GtkTreeIter * iter) { *************** *** 379,383 **** root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) { g_free(root_utf8); g_free(root_real); --- 378,383 ---- root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) ! { g_free(root_utf8); g_free(root_real); *************** *** 418,422 **** continue; ! name_real = g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { --- 418,423 ---- continue; ! name_real = ! g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { *************** *** 497,510 **** GdkPixbuf *buf; /* create root node */ /* add data to the tree store */ filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS) || ! !g_file_get_contents(filename, &buffer, &filesize, NULL)) { ! g_message("Unable to read from '%s'", filename); ! buffer = g_strdup("/:/"); } --- 498,523 ---- GdkPixbuf *buf; + model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); + buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), + harddisk_pixbuf, TRUE, NULL); + /* create root node */ /* add data to the tree store */ + nodes = g_ptr_array_new(); + filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS)) ! { ! g_free(filename); ! return NULL; ! } ! ! if (!g_file_get_contents(filename, &buffer, &filesize, NULL)) ! { ! g_free(filename); ! return NULL; } *************** *** 512,526 **** g_free(buffer); - model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); - buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), - harddisk_pixbuf, TRUE, NULL); - nodes = g_ptr_array_new(); - current_line = lines; while (*current_line) { ! if (*(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_new0(DbNode, 1); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); --- 525,534 ---- g_free(buffer); current_line = lines; while (*current_line) { ! if (strlen(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_malloc0(sizeof(DbNode)); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); *************** *** 680,684 **** gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); --- 688,693 ---- gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = ! bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); *************** *** 706,725 **** } - static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { - - bmp_db_mdb_enq_play(button, treeview, FALSE); - - } - - static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) { - - bmp_db_mdb_enq_play(button, treeview, TRUE); - - } static void bmp_db_mdb_enq_play(GtkButton * button, gpointer treeview, gboolean do_play) { ! ! { ! GtkTreeIter iter; GtkTreeIter iter_child; --- 715,721 ---- } static void bmp_db_mdb_enq_play(GtkButton * button, gpointer treeview, gboolean do_play) { ! GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 778,786 **** } static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) ! { GtkTreeIter iter; GtkTreeIter iter_child; --- 774,794 ---- } + static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { + + bmp_db_mdb_enq_play(button, treeview, FALSE); + + } + + static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) { + + bmp_db_mdb_enq_play(button, treeview, TRUE); + + } + + static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) { GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 873,877 **** g_free(path); g_free(path_real); ! paths = paths->next; --- 881,885 ---- g_free(path); g_free(path_real); ! paths = paths->next; *************** *** 984,989 **** node->path_real = dir; ! gchar *tmp = ! g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); --- 992,996 ---- node->path_real = dir; ! gchar *tmp = g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); *************** *** 1361,1369 **** if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = ! g_list_append(files, ! g_filename_to_utf8(name_real, -1, ! NULL, NULL, ! NULL)); } } --- 1368,1372 ---- if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = g_list_append(files, g_filename_to_utf8(name_real, -1, NULL, NULL,NULL)); } } *************** *** 1419,1423 **** files->data, sort_model); ! g_message("dirbrowser.c: %s", (gchar *) files->data); g_free(files->data); g_free(artist); --- 1422,1426 ---- files->data, sort_model); ! g_message("dirbrowser.c: %s",files->data); g_free(files->data); g_free(artist); *************** *** 1488,1493 **** GtkWidget *button_enqueue, *button_play; GtkWidget *button_box; ! ! if (!window) { --- 1491,1496 ---- GtkWidget *button_enqueue, *button_play; GtkWidget *button_box; ! ! if (!window) { *************** *** 1578,1583 **** button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), ! GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, --- 1581,1585 ---- button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, |
From: <mde...@us...> - 2003-12-29 23:12:40
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv3598 Modified Files: dirbrowser.c mainwin.c mainwin.h playlistwin.c Log Message: Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dirbrowser.c 29 Dec 2003 23:04:54 -0000 1.21 --- dirbrowser.c 29 Dec 2003 23:12:33 -0000 1.22 *************** *** 706,711 **** } ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { --- 706,723 ---- } + static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { + + bmp_db_mdb_enq_play(button, treeview, FALSE); + + } ! static void bmp_db_mdb_play(GtkButton * button, gpointer treeview) { ! ! bmp_db_mdb_enq_play(button, treeview, TRUE); ! ! } ! ! static void bmp_db_mdb_enq_play(GtkButton * button, gpointer treeview, gboolean do_play) { ! { *************** *** 727,731 **** if (node_name && entry_type == IS_TRACK) { ! if (click_play) playlist_clear(); --- 739,743 ---- if (node_name && entry_type == IS_TRACK) { ! if (do_play) playlist_clear(); *************** *** 733,737 **** playlist_add_url_string(node_name); ! if (click_play) playlist_play(); --- 745,749 ---- playlist_add_url_string(node_name); ! if (do_play) playlist_play(); *************** *** 1474,1478 **** GtkWidget *label_header; GtkWidget *paned; ! GtkWidget *button_enqueue; GtkWidget *button_box; --- 1486,1490 ---- GtkWidget *label_header; GtkWidget *paned; ! GtkWidget *button_enqueue, *button_play; GtkWidget *button_box; *************** *** 1487,1491 **** window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(window), _("bmp :: Add Files...")); gtk_container_set_border_width(GTK_CONTAINER(window), 8); gtk_window_set_destroy_with_parent(GTK_WINDOW(window), TRUE); --- 1499,1503 ---- window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(window), _("bmp: Add Files...")); gtk_container_set_border_width(GTK_CONTAINER(window), 8); gtk_window_set_destroy_with_parent(GTK_WINDOW(window), TRUE); *************** *** 1564,1567 **** --- 1576,1580 ---- button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); + button_play = gtk_button_new_with_label("Play"); button_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), *************** *** 1570,1581 **** gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, ! 4); ! gtk_box_pack_start(GTK_BOX(button_box), button_enqueue, FALSE, ! FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); --- 1583,1597 ---- gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_play, FALSE, FALSE, 4); g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); + g_signal_connect(G_OBJECT(button_play), "clicked", + G_CALLBACK(bmp_db_mdb_play), fstore); + + g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); *************** *** 1608,1611 **** --- 1624,1629 ---- gtk_window_add_accel_group(GTK_WINDOW(window), db_accel); + + return window; } Index: mainwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/mainwin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mainwin.c 28 Dec 2003 21:11:46 -0000 1.12 --- mainwin.c 29 Dec 2003 23:12:33 -0000 1.13 *************** *** 1799,1807 **** } ! void mainwin_show_dirbrowser(void) { ! if (!mainwin_dir_browser) { mainwin_dir_browser = bmp_db_create(cfg.filesel_path); ! gtk_widget_show_all(mainwin_dir_browser); } else gtk_window_present(GTK_WINDOW(mainwin_dir_browser)); --- 1799,1816 ---- } ! void mainwin_dirbrowser_destroy(GtkWidget * widget, GdkEvent * event, ! gpointer data) { ! gtk_widget_hide(widget); ! } ! ! ! void mainwin_dirbrowser_show(void) ! { ! if (mainwin_dir_browser == NULL) { mainwin_dir_browser = bmp_db_create(cfg.filesel_path); ! g_signal_connect(G_OBJECT(mainwin_dir_browser), "delete_event", ! G_CALLBACK(mainwin_dirbrowser_destroy), NULL); ! gtk_widget_show_all(mainwin_dir_browser); } else gtk_window_present(GTK_WINDOW(mainwin_dir_browser)); *************** *** 2365,2369 **** break; case MAINWIN_GENERAL_PLAYDIRECTORY: ! mainwin_show_dirbrowser(); break; case MAINWIN_GENERAL_PLAYCD: --- 2374,2378 ---- break; case MAINWIN_GENERAL_PLAYDIRECTORY: ! mainwin_dirbrowser_show(); break; case MAINWIN_GENERAL_PLAYCD: Index: mainwin.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/mainwin.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mainwin.h 28 Dec 2003 21:11:46 -0000 1.8 --- mainwin.h 29 Dec 2003 23:12:33 -0000 1.9 *************** *** 96,100 **** void mainwin_update_jtf(); void mainwin_set_title(const gchar * text); ! void mainwin_show_dirbrowser(void); void mainwin_show_add_url_window(void); void mainwin_minimize_cb(void); --- 96,103 ---- void mainwin_update_jtf(); void mainwin_set_title(const gchar * text); ! void mainwin_dirbrowser_show(void); ! void mainwin_dirbrowser_destroy( GtkWidget *widget, ! GdkEvent *event, ! gpointer data ); void mainwin_show_add_url_window(void); void mainwin_minimize_cb(void); Index: playlistwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlistwin.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** playlistwin.c 28 Dec 2003 21:11:46 -0000 1.15 --- playlistwin.c 29 Dec 2003 23:12:33 -0000 1.16 *************** *** 721,725 **** void playlistwin_show_dirbrowser(void) { ! mainwin_show_dirbrowser(); } --- 721,725 ---- void playlistwin_show_dirbrowser(void) { ! mainwin_dirbrowser_show(); } |
From: <des...@us...> - 2003-12-29 23:05:00
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv2053/beep Modified Files: controlsocket.c dirbrowser.c main.h Log Message: - main.c: replaced hard coded sizes with #defines - controlsocket.c: change int to gint - dirbrowser.c: dirbrowser now shows tree if dbrc does not exist Index: controlsocket.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/controlsocket.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** controlsocket.c 25 Dec 2003 23:26:13 -0000 1.10 --- controlsocket.c 29 Dec 2003 23:04:54 -0000 1.11 *************** *** 85,89 **** for (i = 0;; i++) { saddr.sun_family = AF_UNIX; ! g_snprintf(saddr.sun_path, 108, "%s/%s_%s.%d", g_get_tmp_dir(), CTRLSOCKET_NAME, g_get_user_name(), i); if (xmms_remote_is_running(i)) { --- 85,90 ---- for (i = 0;; i++) { saddr.sun_family = AF_UNIX; ! g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), ! "%s/%s_%s.%d", g_get_tmp_dir(), CTRLSOCKET_NAME, g_get_user_name(), i); if (xmms_remote_is_running(i)) { *************** *** 177,181 **** } left -= written; ! buf = (char *) buf + written; g_timer_elapsed(timer, &usec); } --- 178,182 ---- } left -= written; ! buf = (gchar *) buf + written; g_timer_elapsed(timer, &usec); } *************** *** 409,415 **** case CMD_PLAYLIST_INS_URL_STRING: if (pkt->data) { ! int pos = *(int *) pkt->data; ! char *ptr = pkt->data; ! ptr += sizeof(int); playlist_ins_url_string(ptr, pos); } --- 410,416 ---- case CMD_PLAYLIST_INS_URL_STRING: if (pkt->data) { ! gint pos = *(gint *) pkt->data; ! gchar *ptr = pkt->data; ! ptr += sizeof(gint); playlist_ins_url_string(ptr, pos); } Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dirbrowser.c 29 Dec 2003 21:22:52 -0000 1.20 --- dirbrowser.c 29 Dec 2003 23:04:54 -0000 1.21 *************** *** 110,116 **** * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) --- 110,116 ---- * needed. Think of it as a "mkdir -p". */ static void bmp_db_mdb_add_track(const gchar * arg_artist_p, ! const gchar * arg_album_p, const gchar * arg_track_p, ! guint arg_tracknum, const gchar * arg_path, GtkTreeModel * model_sort) *************** *** 296,300 **** /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); --- 296,300 ---- /* tag field unknown */ return g_strdup(_("(unknown)")); ! tmp = g_strstrip(g_strdup(value)); branches = g_strsplit(tmp, " ", 0); *************** *** 343,347 **** } ! static gchar *bmp_db_get_path_real(const gchar * path, GtkTreeModel * model, GtkTreeIter * iter) { --- 343,348 ---- } ! static gchar *bmp_db_get_path_real(const gchar * path, ! GtkTreeModel * model, GtkTreeIter * iter) { *************** *** 378,383 **** root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) ! { g_free(root_utf8); g_free(root_real); --- 379,383 ---- root_real = bmp_db_get_path_real(root, model, &parent_iter); ! if (!g_file_test(root_real, G_FILE_TEST_IS_DIR)) { g_free(root_utf8); g_free(root_real); *************** *** 418,423 **** continue; ! name_real = ! g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { --- 418,422 ---- continue; ! name_real = g_build_filename(root_real, dirent, NULL); if (g_file_test(name_real, G_FILE_TEST_IS_DIR)) { *************** *** 498,523 **** GdkPixbuf *buf; - model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); - buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), - harddisk_pixbuf, TRUE, NULL); - /* create root node */ /* add data to the tree store */ - nodes = g_ptr_array_new(); - filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS)) ! { ! g_free(filename); ! return NULL; ! } ! ! if (!g_file_get_contents(filename, &buffer, &filesize, NULL)) ! { ! g_free(filename); ! return NULL; } --- 497,510 ---- GdkPixbuf *buf; /* create root node */ /* add data to the tree store */ filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "dbrc", NULL); ! if (!g_file_test(filename, G_FILE_TEST_EXISTS) || ! !g_file_get_contents(filename, &buffer, &filesize, NULL)) { ! g_message("Unable to read from '%s'", filename); ! buffer = g_strdup("/:/"); } *************** *** 525,534 **** g_free(buffer); current_line = lines; while (*current_line) { ! if (strlen(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_malloc0(sizeof(DbNode)); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); --- 512,526 ---- g_free(buffer); + model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); + buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), + harddisk_pixbuf, TRUE, NULL); + nodes = g_ptr_array_new(); + current_line = lines; while (*current_line) { ! if (*(*current_line)) { frags = g_strsplit(*current_line, ":", 0); ! node = g_new0(DbNode, 1); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); *************** *** 688,693 **** gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = ! bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); --- 680,684 ---- gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &node_name, -1); ! tmp = bmp_db_path_get_full(GTK_TREE_MODEL(model), node_name, iter); path = g_locale_from_utf8(tmp, -1, NULL, NULL, NULL); *************** *** 716,721 **** ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { ! GtkTreeIter iter; GtkTreeIter iter_child; --- 707,713 ---- ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) ! { ! GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 773,781 **** } } ! static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) { GtkTreeIter iter; GtkTreeIter iter_child; --- 765,774 ---- } } ! static void bmp_db_mdb_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) ! { GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 868,872 **** g_free(path); g_free(path_real); ! paths = paths->next; --- 861,865 ---- g_free(path); g_free(path_real); ! paths = paths->next; *************** *** 979,983 **** node->path_real = dir; ! gchar *tmp = g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); --- 972,977 ---- node->path_real = dir; ! gchar *tmp = ! g_strconcat(_("Choose a Name for:\n"), name, NULL); gtk_label_set_text(variable, tmp); g_free(tmp); *************** *** 1355,1359 **** if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = g_list_append(files, g_filename_to_utf8(name_real, -1, NULL, NULL,NULL)); } } --- 1349,1357 ---- if (g_file_test(name_real, G_FILE_TEST_IS_REGULAR)) { if (bmp_db_check_file(name_real)) { ! files = ! g_list_append(files, ! g_filename_to_utf8(name_real, -1, ! NULL, NULL, ! NULL)); } } *************** *** 1409,1413 **** files->data, sort_model); ! g_message("dirbrowser.c: %s",files->data); g_free(files->data); g_free(artist); --- 1407,1411 ---- files->data, sort_model); ! g_message("dirbrowser.c: %s", (gchar *) files->data); g_free(files->data); g_free(artist); *************** *** 1478,1483 **** GtkWidget *button_enqueue; GtkWidget *button_box; ! ! if (!window) { --- 1476,1481 ---- GtkWidget *button_enqueue; GtkWidget *button_box; ! ! if (!window) { *************** *** 1567,1577 **** button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, FALSE, FALSE, 4); ! g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); --- 1565,1578 ---- button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); button_box = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), ! GTK_BUTTONBOX_START); gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, FALSE, 4); ! gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, ! 4); ! gtk_box_pack_start(GTK_BOX(button_box), button_enqueue, FALSE, ! FALSE, 4); ! g_signal_connect(G_OBJECT(button_enqueue), "clicked", G_CALLBACK(bmp_db_mdb_enqueue), fstore); Index: main.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/main.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main.h 28 Dec 2003 21:11:46 -0000 1.8 --- main.h 29 Dec 2003 23:04:54 -0000 1.9 *************** *** 25,30 **** #include "vis.h" ! #define PLAYER_HEIGHT ((cfg.player_shaded ? 14 : 116) * (cfg.doublesize + 1)) ! #define PLAYER_WIDTH (275 * (cfg.doublesize + 1)) typedef struct { --- 25,33 ---- #include "vis.h" ! #define PLAYER_HEIGHT \ ! ((cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : MAINWIN_HEIGHT) * (cfg.doublesize + 1)) ! ! #define PLAYER_WIDTH \ ! (MAINWIN_WIDTH * (cfg.doublesize + 1)) typedef struct { |
From: <mde...@us...> - 2003-12-29 21:23:02
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv14050 Modified Files: dirbrowser.c Log Message: Readded "Add" button in dirbrowser Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dirbrowser.c 26 Dec 2003 20:16:02 -0000 1.19 --- dirbrowser.c 29 Dec 2003 21:22:52 -0000 1.20 *************** *** 54,58 **** GdkPixbuf *image; ! } db_node; static void bmp_db_menu_callback(gpointer data, guint action, --- 54,58 ---- GdkPixbuf *image; ! } DbNode; static void bmp_db_menu_callback(gpointer data, guint action, *************** *** 349,353 **** GtkTreePath *current; guint64 node_idx; ! db_node *node; gboolean error; --- 349,353 ---- GtkTreePath *current; guint64 node_idx; ! DbNode *node; gboolean error; *************** *** 490,494 **** GtkTreeStore *model; GtkTreeIter iter; ! db_node *node; gchar *filename; gsize filesize; --- 490,494 ---- GtkTreeStore *model; GtkTreeIter iter; ! DbNode *node; gchar *filename; gsize filesize; *************** *** 530,534 **** frags = g_strsplit(*current_line, ":", 0); ! node = g_malloc0(sizeof(db_node)); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); --- 530,534 ---- frags = g_strsplit(*current_line, ":", 0); ! node = g_malloc0(sizeof(DbNode)); node->name = g_strdup(frags[0]); node->path_real = g_strdup(frags[1]); *************** *** 585,589 **** GtkTreeIter iter_parent; GtkTreeIter iter_root; ! db_node *node; gchar *str_parent = NULL; --- 585,589 ---- GtkTreeIter iter_parent; GtkTreeIter iter_root; ! DbNode *node; gchar *str_parent = NULL; *************** *** 716,727 **** ! static void bmp_db_filestore_row_activated(GtkTreeView * treeview, ! GtkTreePath * arg1, ! GtkTreeViewColumn * arg2, ! gpointer user_data) ! { GtkTreeIter iter; GtkTreeIter iter_child; --- 716,781 ---- ! static void bmp_db_mdb_enqueue(GtkButton * button, gpointer treeview) { ! ! GtkTreeIter iter; ! GtkTreeIter iter_child; ! GList *paths = NULL; + gchar *node_name; + gint entry_type = -1; + GtkTreeModel *model; + model = gtk_tree_view_get_model(treeview); + paths = bmp_db_get_paths_from_selection(treeview); + gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, paths->data); + gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, FILENAME_COL, + &node_name, 4, &entry_type, -1); + + if (node_name && entry_type == IS_TRACK) { + + if (click_play) + playlist_clear(); + + if (g_file_test(node_name, G_FILE_TEST_IS_REGULAR)) + playlist_add_url_string(node_name); + + if (click_play) + playlist_play(); + + gtk_tree_selection_unselect_all(gtk_tree_view_get_selection + (treeview)); + + } else { + + if (entry_type == IS_ALBUM) { + if (gtk_tree_model_iter_children(model, &iter_child, &iter)) { + if (click_play) + playlist_clear(); + gboolean valid = TRUE; + while (valid) { + gtk_tree_model_get(GTK_TREE_MODEL(model), &iter_child, + FILENAME_COL, &node_name, -1); + if (node_name) { + if (g_file_test(node_name, G_FILE_TEST_IS_REGULAR)) { + playlist_add_url_string(node_name); + } + valid = + gtk_tree_model_iter_next(model, &iter_child); + } + } + if (click_play) + playlist_play(); + } + } + gtk_tree_selection_unselect_all(gtk_tree_view_get_selection + (treeview)); + } + } + + static void bmp_db_mdb_row_activated(GtkTreeView * treeview, + GtkTreePath * arg1, + GtkTreeViewColumn * arg2, + gpointer user_data) { GtkTreeIter iter; GtkTreeIter iter_child; *************** *** 918,926 **** if (g_file_test(path_real, G_FILE_TEST_IS_DIR)) { ! db_node *node; gchar *dir = g_strdup(path_real); gchar *name = g_strdup(path_real); ! node = g_malloc0(sizeof(db_node)); node->path_real = dir; --- 972,980 ---- if (g_file_test(path_real, G_FILE_TEST_IS_DIR)) { ! DbNode *node; gchar *dir = g_strdup(path_real); gchar *name = g_strdup(path_real); ! node = g_malloc0(sizeof(DbNode)); node->path_real = dir; *************** *** 990,994 **** if (gtk_tree_model_get_iter_from_string (model, &iter, gtk_tree_path_to_string(paths->data))) { ! db_node *node; gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); --- 1044,1048 ---- if (gtk_tree_model_get_iter_from_string (model, &iter, gtk_tree_path_to_string(paths->data))) { ! DbNode *node; gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); *************** *** 1099,1103 **** gchar *filename; FILE *file; ! db_node *node; guint i; --- 1153,1157 ---- gchar *filename; FILE *file; ! DbNode *node; guint i; *************** *** 1355,1358 **** --- 1409,1414 ---- files->data, sort_model); + g_message("dirbrowser.c: %s",files->data); + g_free(files->data); g_free(artist); g_free(title); *************** *** 1420,1424 **** GtkWidget *label_header; GtkWidget *paned; ! if (!window) { --- 1476,1483 ---- GtkWidget *label_header; GtkWidget *paned; ! GtkWidget *button_enqueue; ! GtkWidget *button_box; ! ! if (!window) { *************** *** 1474,1479 **** gtk_box_pack_start(GTK_BOX(vbox_left), sw, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(vbox_right), sw_right, TRUE, TRUE, 4); - gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, - FALSE, 4); paned = gtk_hpaned_new(); --- 1533,1536 ---- *************** *** 1508,1511 **** --- 1565,1580 ---- gtk_container_add(GTK_CONTAINER(sw_right), fstore); + button_enqueue = gtk_button_new_from_stock(GTK_STOCK_ADD); + button_box = gtk_hbutton_box_new(); + gtk_button_box_set_layout(button_box, GTK_BUTTONBOX_START); + + gtk_box_pack_start(GTK_BOX(vbox_right), progressbar_db, FALSE, + FALSE, 4); + gtk_box_pack_start(GTK_BOX(vbox_right), button_box, FALSE, FALSE, 4); + gtk_box_pack_start(GTK_CONTAINER(button_box), button_enqueue, FALSE, FALSE, 4); + + g_signal_connect(G_OBJECT(button_enqueue), "clicked", + G_CALLBACK(bmp_db_mdb_enqueue), fstore); + g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); *************** *** 1516,1520 **** G_CALLBACK(bmp_db_row_activated), fstore); g_signal_connect(G_OBJECT(fstore), "row-activated", ! G_CALLBACK(bmp_db_filestore_row_activated), NULL); /* bmp_db_apply_setup(GTK_TREE_VIEW(treeview)); */ --- 1585,1589 ---- G_CALLBACK(bmp_db_row_activated), fstore); g_signal_connect(G_OBJECT(fstore), "row-activated", ! G_CALLBACK(bmp_db_mdb_row_activated), NULL); /* bmp_db_apply_setup(GTK_TREE_VIEW(treeview)); */ |
From: <mde...@us...> - 2003-12-29 13:18:31
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv17202 Modified Files: skin.c Log Message: Index: skin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/skin.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** skin.c 29 Dec 2003 13:16:11 -0000 1.15 --- skin.c 29 Dec 2003 13:18:22 -0000 1.16 *************** *** 755,761 **** { GdkBitmap **masks; - g_assert(skin != NULL); ! g_assert(mi < SKIN_MID_LAST); masks = (doublesize ? skin->ds_masks : skin->masks); --- 755,760 ---- { GdkBitmap **masks; g_assert(skin != NULL); ! g_assert(mi < SKIN_MID_LAST); masks = (doublesize ? skin->ds_masks : skin->masks); |
From: <mde...@us...> - 2003-12-29 13:16:22
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv16840 Modified Files: skin.c Log Message: Index: skin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/skin.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** skin.c 29 Dec 2003 13:00:52 -0000 1.14 --- skin.c 29 Dec 2003 13:16:11 -0000 1.15 *************** *** 222,226 **** g_free(tmpstr); ! *pm = &sk->pixmaps[id]; gpm = read_bmp(filename); --- 222,226 ---- g_free(tmpstr); ! pm = &sk->pixmaps[id]; gpm = read_bmp(filename); *************** *** 837,841 **** g_assert(skin != NULL); ! *eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; if (eqmainpm->pixmap != NULL && eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) --- 837,841 ---- g_assert(skin != NULL); ! eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; if (eqmainpm->pixmap != NULL && eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) |
From: <mde...@us...> - 2003-12-29 13:00:58
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv14097 Modified Files: skin.c Log Message: Fixed compile problems with gcc 2.95.x Index: skin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/skin.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** skin.c 26 Dec 2003 08:30:16 -0000 1.13 --- skin.c 29 Dec 2003 13:00:52 -0000 1.14 *************** *** 188,192 **** GdkPixmap *gpm; gboolean retval = FALSE; ! if (id >= SKIN_PMID_LAST) { g_warning("skin pixmap id out of range (%u).", id); --- 188,193 ---- GdkPixmap *gpm; gboolean retval = FALSE; ! SkinPixmap *pm = NULL; ! if (id >= SKIN_PMID_LAST) { g_warning("skin pixmap id out of range (%u).", id); *************** *** 221,225 **** g_free(tmpstr); ! SkinPixmap *pm = &sk->pixmaps[id]; gpm = read_bmp(filename); --- 222,226 ---- g_free(tmpstr); ! *pm = &sk->pixmaps[id]; gpm = read_bmp(filename); *************** *** 753,760 **** gboolean shaded) { - g_assert(skin != NULL); - GdkBitmap **masks; g_assert(mi < SKIN_MID_LAST); masks = (doublesize ? skin->ds_masks : skin->masks); --- 754,761 ---- gboolean shaded) { GdkBitmap **masks; + g_assert(skin != NULL); + g_assert(mi < SKIN_MID_LAST); masks = (doublesize ? skin->ds_masks : skin->masks); *************** *** 833,838 **** GdkPixmap *pixmap; GdkImage *img; g_assert(skin != NULL); ! SkinPixmap *eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; if (eqmainpm->pixmap != NULL && eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) --- 834,841 ---- GdkPixmap *pixmap; GdkImage *img; + SkinPixmap *eqmainpm; + g_assert(skin != NULL); ! *eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; if (eqmainpm->pixmap != NULL && eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) |
From: <mde...@us...> - 2003-12-29 00:33:33
|
Update of /cvsroot/beepmp/bmp In directory sc8-pr-cvs1:/tmp/cvs-serv7792 Modified Files: TODO configure.in Removed Files: TODO.bmp Log Message: TODO: updated configure.in: Added fr to ALL_LINGUAS po/LINGUAS: touch due to check TODO.bmp: removed, use TODO Index: TODO =================================================================== RCS file: /cvsroot/beepmp/bmp/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 19 Nov 2003 16:02:22 -0000 1.1.1.1 --- TODO 29 Dec 2003 00:33:27 -0000 1.2 *************** *** 1,32 **** ! Developers TODO list: [#bugzilla id] ! ==================================== ! ! * Move all the streaming code out of the mpg123 plugin and into libxmms, ! pave the way to having more input plugins supporting streaming media ! (preferably without needing to know about the transport medium- ftp/http ! etc). BMP: In case case BMP becomes a GNOME app, on which i am undecided ! as of now, most of this could be handled trough GNOME VFS, except ! where unsuitable for a plugin. ! ! * Add a dir browser to the skins dialog so users don't have to add ! SKINSDIR variable. Instead use a file dialog and save the skin ! dirs in the ~/.beep/config file. ! ! * Ability to load playlists without the .m3u extension at startup ! eg. xmms -pl playlistname ! ! * Add a new enqueue function to XMMS from the command line, -ep, which ! enqueues the file and plays it. ! ! * Parse dirs in m3u files to load all files in that dir (recursive?) when ! XMMS loads the playlist. [#82] ! ! * Parse m3u files in m3u files (protect against endless recursion?) [#262] ! ! * Add support for totem playlist, disregarding files bmp cannot play (hint: use input_check_file() ) ! ! * Read playlists from http [#125] ! * Seeking in streams [#296/#311] --- 1,13 ---- ! Developers TODO list: ! ===================== ! 0.9.7: + * Removal of all remaining GtkCList's + * Fix buffer overflow bug + * Fix the dirbrowser (re-add buttons and make feature-complete) + * Speedup of rendering code in the playlist widget if possible + * Readd all remaining plugins (trivial) + * Add libmodplug + * Write development docs about what has changed and what potential plugin devs should be aware of Index: configure.in =================================================================== RCS file: /cvsroot/beepmp/bmp/configure.in,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** configure.in 26 Dec 2003 23:59:38 -0000 1.16 --- configure.in 29 Dec 2003 00:33:27 -0000 1.17 *************** *** 247,251 **** dnl This is just a copy of po/LINGUAS and is here to avoid breaking dnl compatibility with automake 1.4 ! ALL_LINGUAS="" AM_GNU_GETTEXT --- 247,251 ---- dnl This is just a copy of po/LINGUAS and is here to avoid breaking dnl compatibility with automake 1.4 ! ALL_LINGUAS="fr" AM_GNU_GETTEXT --- TODO.bmp DELETED --- |
From: <des...@us...> - 2003-12-28 21:24:40
|
Update of /cvsroot/beepmp/bmp/libbeep In directory sc8-pr-cvs1:/tmp/cvs-serv9476/libbeep Modified Files: util.c util.h Log Message: - reverted libbeep utility function names, add #define BMP name aliases instead Index: util.c =================================================================== RCS file: /cvsroot/beepmp/bmp/libbeep/util.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** util.c 28 Dec 2003 21:11:46 -0000 1.8 --- util.c 28 Dec 2003 21:24:35 -0000 1.9 *************** *** 34,41 **** #endif ! GtkWidget *bmp_info_dialog(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data) { GtkWidget *dialog, *vbox, *bbox, *button; --- 34,41 ---- #endif ! GtkWidget *xmms_show_message(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data) { GtkWidget *dialog, *vbox, *bbox, *button; *************** *** 93,97 **** } ! gboolean bmp_check_realtime_priority(void) { #ifdef HAVE_SCHED_SETSCHEDULER --- 93,97 ---- } ! gboolean xmms_check_realtime_priority(void) { #ifdef HAVE_SCHED_SETSCHEDULER *************** *** 102,106 **** * non-present syscall warnings in kernel log). */ ! int val = 0, len; len = sizeof(val); --- 102,106 ---- * non-present syscall warnings in kernel log). */ ! gint val = 0, len; len = sizeof(val); *************** *** 116,120 **** } ! void bmp_usleep(gint usec) { #ifdef HAVE_NANOSLEEP --- 116,120 ---- } ! void xmms_usleep(gint usec) { #ifdef HAVE_NANOSLEEP Index: util.h =================================================================== RCS file: /cvsroot/beepmp/bmp/libbeep/util.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** util.h 28 Dec 2003 21:11:46 -0000 1.3 --- util.h 28 Dec 2003 21:24:35 -0000 1.4 *************** *** 5,16 **** /* XMMS names */ ! #define xmms_show_message(title, text, button_text, model, button_action, action_data) \ ! bmp_info_dialog(title, text, button_text, model, button_action, action_data) ! #define xmms_usleep(usec) \ ! bmp_usleep(usec) ! #define xmms_check_realtime_priority() \ ! bmp_check_realtime_priority() --- 5,16 ---- /* XMMS names */ ! #define bmp_info_dialog(title, text, button_text, model, button_action, action_data) \ ! xmms_show_message(title, text, button_text, model, button_action, action_data) ! #define bmp_usleep(usec) \ ! xmms_usleep(usec) ! #define bmp_check_realtime_priority() \ ! xmms_check_realtime_priority() *************** *** 19,28 **** #endif ! GtkWidget *bmp_info_dialog(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data); ! gboolean bmp_check_realtime_priority(void); ! void bmp_usleep(gint usec); #ifdef __cplusplus --- 19,28 ---- #endif ! GtkWidget *xmms_show_message(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data); ! gboolean xmms_check_realtime_priority(void); ! void xmms_usleep(gint usec); #ifdef __cplusplus |
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv6632/beep Modified Files: main.c main.h mainwin.c mainwin.h playlist.c playlistwin.c pluginenum.c prefswin.c prefswin.h Log Message: - fixed memory leak in vorbis/fileinfo.c:add_tag() - renamed Config to BmpConfig, option_info to BmpOptionInfo - renamed various *_cb() callback functions to *_callback() - renamed libbeep/util.c functions, added XMMS name aliases to keep compatibility - miscellaneous cleanups (Glibize types, add constness to string parameters etc.) Index: main.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/main.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** main.c 27 Dec 2003 01:05:33 -0000 1.31 --- main.c 28 Dec 2003 21:11:46 -0000 1.32 *************** *** 73,77 **** ! Config cfg; GList *disabled_iplugins = NULL; --- 73,77 ---- ! BmpConfig cfg; GList *disabled_iplugins = NULL; *************** *** 116,120 **** } ! static void read_config(void) { ConfigFile *cfgfile; --- 116,120 ---- } ! void bmp_config_load(void) { ConfigFile *cfgfile; *************** *** 122,126 **** gint i, length; ! memset(&cfg, 0, sizeof(Config)); cfg.autoscroll = TRUE; cfg.player_x = 20; --- 122,126 ---- gint i, length; ! memset(&cfg, 0, sizeof(BmpConfig)); cfg.autoscroll = TRUE; cfg.player_x = 20; *************** *** 389,393 **** } ! void save_config(void) { GList *d_iplist, *node; --- 389,393 ---- } ! void bmp_config_save(void) { GList *d_iplist, *node; *************** *** 828,832 **** ! void segfault_handler(int sig) { g_printf(_("\nReceived SIGSEGV\n\n" --- 828,832 ---- ! void segfault_handler(gint sig) { g_printf(_("\nReceived SIGSEGV\n\n" *************** *** 1009,1013 **** #endif ! read_config(); if (geteuid() == 0) { --- 1009,1013 ---- #endif ! bmp_config_load(); if (geteuid() == 0) { Index: main.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/main.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.h 24 Dec 2003 14:03:17 -0000 1.7 --- main.h 28 Dec 2003 21:11:46 -0000 1.8 *************** *** 66,72 **** gboolean softvolume_enable; gboolean xmms_compat_mode; ! } Config; ! extern Config cfg; extern GList *disabled_iplugins; --- 66,76 ---- gboolean softvolume_enable; gboolean xmms_compat_mode; ! } BmpConfig; ! enum { ! VOLSET_STARTUP, VOLSET_UPDATE, VOLUME_ADJUSTED, VOLUME_SET ! }; ! ! extern BmpConfig cfg; extern GList *disabled_iplugins; *************** *** 74,82 **** extern gboolean pposition_broken; ! void save_config(void); ! ! enum { ! VOLSET_STARTUP, VOLSET_UPDATE, VOLUME_ADJUSTED, VOLUME_SET ! }; #endif --- 78,83 ---- extern gboolean pposition_broken; ! void bmp_config_save(void); ! void bmp_config_load(void); #endif Index: mainwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/mainwin.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mainwin.c 26 Dec 2003 21:19:24 -0000 1.11 --- mainwin.c 28 Dec 2003 21:11:46 -0000 1.12 *************** *** 545,549 **** gtk_timeout_remove(mainwin_timeout_tag); util_set_cursor(NULL); ! save_config(); cleanup_ctrlsocket(); playlist_stop_get_info_thread(); --- 545,549 ---- gtk_timeout_remove(mainwin_timeout_tag); util_set_cursor(NULL); ! bmp_config_save(); cleanup_ctrlsocket(); playlist_stop_get_info_thread(); *************** *** 676,680 **** } ! void mainwin_lock_info_text(gchar * text) { mainwin_info_text_locked = TRUE; --- 676,680 ---- } ! void mainwin_lock_info_text(const gchar * text) { mainwin_info_text_locked = TRUE; *************** *** 2606,2611 **** void read_volume(gint when) { ! int vl, vr, b, v; ! static int pvl = 0, pvr = 0, times = VOLSET_DISP_TIMES; static gboolean changing = FALSE; --- 2606,2611 ---- void read_volume(gint when) { ! gint vl, vr, b, v; ! static gint pvl = 0, pvr = 0, times = VOLSET_DISP_TIMES; static gboolean changing = FALSE; *************** *** 2666,2670 **** tmp = g_strdup_printf(_("BALANCE: CENTER")); else { /* (vl < vr) */ - tmp = g_strdup_printf(_("BALANCE: %d%% RIGHT"), b); } --- 2666,2669 ---- Index: mainwin.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/mainwin.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mainwin.h 26 Dec 2003 08:30:15 -0000 1.7 --- mainwin.h 28 Dec 2003 21:11:46 -0000 1.8 *************** *** 57,61 **** void draw_main_window(gboolean); void mainwin_quit_cb(void); ! void mainwin_lock_info_text(gchar * text); void mainwin_release_info_text(void); void mainwin_play_pushed(void); --- 57,61 ---- void draw_main_window(gboolean); void mainwin_quit_cb(void); ! void mainwin_lock_info_text(const gchar * text); void mainwin_release_info_text(void); void mainwin_play_pushed(void); Index: playlist.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** playlist.c 26 Dec 2003 23:59:38 -0000 1.26 --- playlist.c 28 Dec 2003 21:11:46 -0000 1.27 *************** *** 134,142 **** node = playlist; while (node) { ! entry = (PlaylistEntry *) node->data; ! if (entry->filename) ! g_free(entry->filename); ! if (entry->title) ! g_free(entry->title); g_free(entry); node = node->next; --- 134,140 ---- node = playlist; while (node) { ! entry = PLAYLIST_ENTRY(node->data); ! g_free(entry->filename); ! g_free(entry->title); g_free(entry); node = node->next; *************** *** 188,195 **** g_list_position(playlist, node)) *set_info_text = TRUE; ! if (entry->filename) ! g_free(entry->filename); ! if (entry->title) ! g_free(entry->title); shuffle_list = g_list_remove(shuffle_list, entry); playlist = g_list_remove_link(playlist, node); --- 186,193 ---- g_list_position(playlist, node)) *set_info_text = TRUE; ! ! g_free(entry->filename); ! g_free(entry->title); ! shuffle_list = g_list_remove(shuffle_list, entry); playlist = g_list_remove_link(playlist, node); *************** *** 947,951 **** title = g_path_get_basename(playlist_position->filename); ! if (!g_utf8_validate(title, -1, NULL)) title = g_path_get_basename(playlist_position->filename); /* --- 945,949 ---- title = g_path_get_basename(playlist_position->filename); ! if (!title || !g_utf8_validate(title, -1, NULL)) title = g_path_get_basename(playlist_position->filename); /* *************** *** 1243,1247 **** gint playlist_get_position(void) { ! int retval; PLAYLIST_LOCK(); --- 1241,1245 ---- gint playlist_get_position(void) { ! gint retval; PLAYLIST_LOCK(); *************** *** 1254,1258 **** gchar *playlist_get_filename(gint pos) { ! char *ret; PlaylistEntry *entry; GList *node; --- 1252,1256 ---- gchar *playlist_get_filename(gint pos) { ! gchar *ret; PlaylistEntry *entry; GList *node; *************** *** 1679,1683 **** if (playlist_position) { ! int i = g_list_index(shuffle_list, playlist_position); node = g_list_nth(shuffle_list, i); shuffle_list = g_list_remove_link(shuffle_list, node); --- 1677,1681 ---- if (playlist_position) { ! gint i = g_list_index(shuffle_list, playlist_position); node = g_list_nth(shuffle_list, i); shuffle_list = g_list_remove_link(shuffle_list, node); *************** *** 2046,2051 **** PlaylistEntry *entry = node->data; ! if (entry->title) ! g_free(entry->title); entry->title = NULL; entry->length = -1; --- 2044,2048 ---- PlaylistEntry *entry = node->data; ! g_free(entry->title); entry->title = NULL; entry->length = -1; Index: playlistwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlistwin.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** playlistwin.c 28 Dec 2003 16:36:01 -0000 1.14 --- playlistwin.c 28 Dec 2003 21:11:46 -0000 1.15 *************** *** 427,431 **** playlistwin_update_info(); playlistwin_update_sinfo(); ! // mainwin_update_jtf(); } --- 427,431 ---- playlistwin_update_info(); playlistwin_update_sinfo(); ! /* mainwin_update_jtf(); */ } *************** *** 865,869 **** gchar *slash; ! int len; gboolean pls = FALSE; --- 865,869 ---- gchar *slash; ! gint len; gboolean pls = FALSE; *************** *** 1235,1243 **** } } else if (event->button == 1 && REGION_L(12, 37, 29, 11)) { ! int nx[] = { 0, 0, 0 }, ny[] = { 111, 130, 149}; ! int sx[] = { 23, 23, 23 }, sy[] = { 111, 130, 149}; ! int barx = 48, bary = 111; playlist_popup(xpos + 12, --- 1235,1243 ---- } } else if (event->button == 1 && REGION_L(12, 37, 29, 11)) { ! gint nx[] = { 0, 0, 0 }, ny[] = { 111, 130, 149}; ! gint sx[] = { 23, 23, 23 }, sy[] = { 111, 130, 149}; ! gint barx = 48, bary = 111; playlist_popup(xpos + 12, *************** *** 1247,1255 **** grab = FALSE; } else if (event->button == 1 && REGION_L(41, 66, 29, 11)) { ! int nx[] = { 54, 54, 54, 54 }, ny[] = { 168, 111, 130, 149}; ! int sx[] = { 77, 77, 77, 77 }, sy[] = { 168, 111, 130, 149}; ! int barx = 100, bary = 111; playlist_popup(xpos + 41, --- 1247,1255 ---- grab = FALSE; } else if (event->button == 1 && REGION_L(41, 66, 29, 11)) { ! gint nx[] = { 54, 54, 54, 54 }, ny[] = { 168, 111, 130, 149}; ! gint sx[] = { 77, 77, 77, 77 }, sy[] = { 168, 111, 130, 149}; ! gint barx = 100, bary = 111; playlist_popup(xpos + 41, *************** *** 1259,1267 **** grab = FALSE; } else if (event->button == 1 && REGION_L(70, 95, 29, 11)) { ! int nx[] = { 104, 104, 104 }, ny[] = { 111, 130, 149}; ! int sx[] = { 127, 127, 127 }, sy[] = { 111, 130, 149}; ! int barx = 150, bary = 111; playlist_popup(xpos + 70, --- 1259,1267 ---- grab = FALSE; } else if (event->button == 1 && REGION_L(70, 95, 29, 11)) { ! gint nx[] = { 104, 104, 104 }, ny[] = { 111, 130, 149}; ! gint sx[] = { 127, 127, 127 }, sy[] = { 111, 130, 149}; ! gint barx = 150, bary = 111; playlist_popup(xpos + 70, *************** *** 1271,1279 **** grab = FALSE; } else if (event->button == 1 && REGION_L(99, 124, 29, 11)) { ! int nx[] = { 154, 154, 154 }, ny[] = { 111, 130, 149}; ! int sx[] = { 177, 177, 177 }, sy[] = { 111, 130, 149}; ! int barx = 200, bary = 111; playlist_popup(xpos + 99, --- 1271,1279 ---- grab = FALSE; } else if (event->button == 1 && REGION_L(99, 124, 29, 11)) { ! gint nx[] = { 154, 154, 154 }, ny[] = { 111, 130, 149}; ! gint sx[] = { 177, 177, 177 }, sy[] = { 111, 130, 149}; ! gint barx = 200, bary = 111; playlist_popup(xpos + 99, *************** *** 1283,1291 **** grab = FALSE; } else if (event->button == 1 && REGION_R(46, 23, 29, 11)) { ! int nx[] = { 204, 204, 204 }, ny[] = { 111, 130, 149}; ! int sx[] = { 227, 227, 227 }, sy[] = { 111, 130, 149}; ! int barx = 250, bary = 111; playlist_popup(xpos + cfg.playlist_width - 46, --- 1283,1291 ---- grab = FALSE; } else if (event->button == 1 && REGION_R(46, 23, 29, 11)) { ! gint nx[] = { 204, 204, 204 }, ny[] = { 111, 130, 149}; ! gint sx[] = { 227, 227, 227 }, sy[] = { 111, 130, 149}; ! gint barx = 250, bary = 111; playlist_popup(xpos + cfg.playlist_width - 46, *************** *** 1354,1365 **** } else if (event->button == 3 && inside_widget(event->x, event->y, playlistwin_list)) { ! int pos, sensitive; ! // GtkWidget *w; pos = playlist_list_get_playlist_position(playlistwin_list, event->x, event->y); ! sensitive = pos != -1; ! // w = gtk_item_factory_get_widget(playlistwin_popup_menu, ! // "/View "); ! // gtk_widget_set_sensitive(w, sensitive); playlistwin_set_sensitive_sortmenu(); --- 1354,1365 ---- } else if (event->button == 3 && inside_widget(event->x, event->y, playlistwin_list)) { ! gint pos, sensitive; ! /* GtkWidget *w; */ pos = playlist_list_get_playlist_position(playlistwin_list, event->x, event->y); ! sensitive = (pos != -1); ! /* w = gtk_item_factory_get_widget(playlistwin_popup_menu, */ ! /* "/View "); */ ! /* gtk_widget_set_sensitive(w, sensitive); */ playlistwin_set_sensitive_sortmenu(); *************** *** 2188,2192 **** xmms_drag_dest_set(playlistwin); ! // DnD stuff g_signal_connect(G_OBJECT(playlistwin), "drag-leave", G_CALLBACK(playlistwin_drag_end), NULL); --- 2188,2192 ---- xmms_drag_dest_set(playlistwin); ! /* DnD stuff */ g_signal_connect(G_OBJECT(playlistwin), "drag-leave", G_CALLBACK(playlistwin_drag_end), NULL); *************** *** 2207,2217 **** G_CALLBACK(selection_received), NULL); ! // if (!cfg.show_wm_decorations) ! // gdk_window_set_decorations(playlistwin->window, 0); gdk_window_set_back_pixmap(playlistwin->window, playlistwin_bg, 0); playlistwin_create_mask(); - - } --- 2207,2215 ---- G_CALLBACK(selection_received), NULL); ! /* if (!cfg.show_wm_decorations) */ ! /* gdk_window_set_decorations(playlistwin->window, 0); */ gdk_window_set_back_pixmap(playlistwin->window, playlistwin_bg, 0); playlistwin_create_mask(); } *************** *** 2348,2352 **** GtkWidget * w) { ! int pos = GPOINTER_TO_INT(gtk_item_factory_popup_data_from_widget(w)); switch (action) { case ADD_DIR: --- 2346,2350 ---- GtkWidget * w) { ! gint pos = GPOINTER_TO_INT(gtk_item_factory_popup_data_from_widget(w)); switch (action) { case ADD_DIR: Index: pluginenum.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/pluginenum.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pluginenum.c 28 Dec 2003 14:37:58 -0000 1.16 --- pluginenum.c 28 Dec 2003 21:11:46 -0000 1.17 *************** *** 54,58 **** } ! static int outputlist_compare_func(gconstpointer a, gconstpointer b) { const OutputPlugin *ap = a, *bp = b; --- 54,58 ---- } ! static gint outputlist_compare_func(gconstpointer a, gconstpointer b) { const OutputPlugin *ap = a, *bp = b; *************** *** 60,64 **** } ! static int effectlist_compare_func(gconstpointer a, gconstpointer b) { const EffectPlugin *ap = a, *bp = b; --- 60,64 ---- } ! static gint effectlist_compare_func(gconstpointer a, gconstpointer b) { const EffectPlugin *ap = a, *bp = b; *************** *** 66,70 **** } ! static int generallist_compare_func(gconstpointer a, gconstpointer b) { const GeneralPlugin *ap = a, *bp = b; --- 66,70 ---- } ! static gint generallist_compare_func(gconstpointer a, gconstpointer b) { const GeneralPlugin *ap = a, *bp = b; *************** *** 72,76 **** } ! static int vislist_compare_func(gconstpointer a, gconstpointer b) { const VisPlugin *ap = a, *bp = b; --- 72,76 ---- } ! static gint vislist_compare_func(gconstpointer a, gconstpointer b) { const VisPlugin *ap = a, *bp = b; *************** *** 85,89 **** } ! static int plugin_check_duplicate(char *filename) { GList *l; --- 85,89 ---- } ! static gint plugin_check_duplicate(gchar *filename) { GList *l; *************** *** 96,120 **** for (l = ip_data->input_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(((InputPlugin *) l->data)->filename))) return 1; for (l = op_data->output_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(((OutputPlugin *) l->data)->filename))) return 1; for (l = ep_data->effect_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(((EffectPlugin *) l->data)->filename))) return 1; for (l = gp_data->general_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(((GeneralPlugin *) l->data)->filename))) return 1; for (l = vp_data->vis_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(((VisPlugin *) l->data)->filename))) return 1; --- 96,120 ---- for (l = ip_data->input_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(INPUT_PLUGIN(l->data)->filename))) return 1; for (l = op_data->output_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(OUTPUT_PLUGIN(l->data)->filename))) return 1; for (l = ep_data->effect_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(EFFECT_PLUGIN(l->data)->filename))) return 1; for (l = gp_data->general_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(GENERAL_PLUGIN(l->data)->filename))) return 1; for (l = vp_data->vis_list; l; l = l->next) if (!strcmp(base_filename, ! g_basename(VIS_PLUGIN(l->data)->filename))) return 1; *************** *** 187,191 **** while ((entry = g_dir_read_name(dir))) { ! filename = g_build_filename(dirname, entry,NULL); if (g_file_test(filename, G_FILE_TEST_IS_REGULAR) && (ext = strrchr(entry, '.')) != NULL) --- 187,191 ---- while ((entry = g_dir_read_name(dir))) { ! filename = g_build_filename(dirname, entry, NULL); if (g_file_test(filename, G_FILE_TEST_IS_REGULAR) && (ext = strrchr(entry, '.')) != NULL) *************** *** 231,235 **** #ifndef DISABLE_USER_PLUGIN_DIR ! dir = g_build_filename(g_get_home_dir(), BMP_RCPATH, "plugins",NULL); bmp_scan_plugins(dir); g_free(dir); --- 231,236 ---- #ifndef DISABLE_USER_PLUGIN_DIR ! ! dir = g_build_filename(g_get_home_dir(), BMP_RCPATH, "plugins", NULL); bmp_scan_plugins(dir); g_free(dir); *************** *** 246,251 **** */ while (plugin_dir_list[dirsel]) { ! dir = g_strconcat(g_get_home_dir(), "/", BMP_RCPATH, "/Plugins/", ! plugin_dir_list[dirsel++], NULL); bmp_scan_plugins(dir); g_free(dir); --- 247,252 ---- */ while (plugin_dir_list[dirsel]) { ! dir = g_build_filename(g_get_home_dir(), BMP_RCPATH, "Plugins", ! plugin_dir_list[dirsel++], NULL); bmp_scan_plugins(dir); g_free(dir); *************** *** 255,260 **** while (plugin_dir_list[dirsel]) { ! dir = g_strconcat(PLUGIN_DIR, "/", ! plugin_dir_list[dirsel++], NULL); bmp_scan_plugins(dir); g_free(dir); --- 256,261 ---- while (plugin_dir_list[dirsel]) { ! dir = g_build_filename(PLUGIN_DIR, plugin_dir_list[dirsel++], ! NULL); bmp_scan_plugins(dir); g_free(dir); *************** *** 290,294 **** node = op_data->output_list; while (node) { ! op = (OutputPlugin *) node->data; /* * Only test basename to avoid problems when changing --- 291,295 ---- node = op_data->output_list; while (node) { ! op = OUTPUT_PLUGIN(node->data); /* * Only test basename to avoid problems when changing *************** *** 307,311 **** while (node) { ! ip = (InputPlugin *) node->data; temp = g_path_get_basename(ip->filename); if (g_list_find_custom --- 308,312 ---- while (node) { ! ip = INPUT_PLUGIN(node->data); temp = g_path_get_basename(ip->filename); if (g_list_find_custom *************** *** 320,328 **** } ! node = disabled_iplugin_names; ! while (node) { ! g_free(node->data); ! node = node->next; ! } g_list_free(disabled_iplugin_names); --- 321,325 ---- } ! g_list_foreach(disabled_iplugin_names, (GFunc) g_free, NULL); g_list_free(disabled_iplugin_names); *************** *** 345,349 **** node = get_input_list(); while (node) { ! ip = (InputPlugin *) node->data; if (ip && ip->cleanup) { ip->cleanup(); --- 342,346 ---- node = get_input_list(); while (node) { ! ip = INPUT_PLUGIN(node->data); if (ip && ip->cleanup) { ip->cleanup(); *************** *** 362,366 **** node = get_output_list(); while (node) { ! op = (OutputPlugin *) node->data; dynamic_lib_close(op->handle); node = node->next; --- 359,363 ---- node = get_output_list(); while (node) { ! op = OUTPUT_PLUGIN(node->data); dynamic_lib_close(op->handle); node = node->next; *************** *** 372,376 **** node = get_effect_list(); while (node) { ! ep = (EffectPlugin *) node->data; if (ep && ep->cleanup) { ep->cleanup(); --- 369,373 ---- node = get_effect_list(); while (node) { ! ep = EFFECT_PLUGIN(node->data); if (ep && ep->cleanup) { ep->cleanup(); *************** *** 389,393 **** node = get_general_enabled_list(); while (node) { ! gp = (GeneralPlugin *) node->data; next = node->next; enable_general_plugin(g_list_index(gp_data->general_list, gp), --- 386,390 ---- node = get_general_enabled_list(); while (node) { ! gp = GENERAL_PLUGIN(node->data); next = node->next; enable_general_plugin(g_list_index(gp_data->general_list, gp), *************** *** 404,408 **** node = get_general_list(); while (node) { ! gp = (GeneralPlugin *) node->data; dynamic_lib_close(gp->handle); node = node->next; --- 401,405 ---- node = get_general_list(); while (node) { ! gp = GENERAL_PLUGIN(node->data); dynamic_lib_close(gp->handle); node = node->next; *************** *** 413,417 **** node = get_vis_enabled_list(); while (node) { ! vp = (VisPlugin *) node->data; next = node->next; enable_vis_plugin(g_list_index(vp_data->vis_list, vp), FALSE); --- 410,414 ---- node = get_vis_enabled_list(); while (node) { ! vp = VIS_PLUGIN(node->data); next = node->next; enable_vis_plugin(g_list_index(vp_data->vis_list, vp), FALSE); *************** *** 427,431 **** node = get_vis_list(); while (node) { ! vp = (VisPlugin *) node->data; dynamic_lib_close(vp->handle); node = node->next; --- 424,428 ---- node = get_vis_list(); while (node) { ! vp = VIS_PLUGIN(node->data); dynamic_lib_close(vp->handle); node = node->next; Index: prefswin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/prefswin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** prefswin.c 27 Dec 2003 01:05:33 -0000 1.12 --- prefswin.c 28 Dec 2003 21:11:46 -0000 1.13 *************** *** 82,94 **** static GList *option_list = NULL; ! void add_input_plugins(GtkCList * clist); ! void add_general_plugins(GtkCList * clist); ! void add_vis_plugins(GtkCList * clist); ! void add_effect_plugins(GtkCList * clist); ! void add_output_plugins(GtkOptionMenu * omenu); static void prefswin_options_write_data(void); ! gint prefswin_delete_event(GtkWidget * widget, GdkEvent * event, ! gpointer data) { gtk_widget_hide(prefswin); --- 82,94 ---- static GList *option_list = NULL; ! static void add_input_plugins(GtkCList * clist); ! static void add_general_plugins(GtkCList * clist); ! static void add_vis_plugins(GtkCList * clist); ! static void add_effect_plugins(GtkCList * clist); ! static void add_output_plugins(GtkOptionMenu * omenu); static void prefswin_options_write_data(void); ! static gint prefswin_delete_event(GtkWidget * widget, GdkEvent * event, ! gpointer data) { gtk_widget_hide(prefswin); *************** *** 96,101 **** } ! void prefswin_ilist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { InputPlugin *ip; --- 96,101 ---- } ! static void prefswin_ilist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { InputPlugin *ip; *************** *** 136,140 **** } ! void prefswin_iconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 136,140 ---- } ! static void prefswin_iconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 143,147 **** } ! void prefswin_iabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 143,147 ---- } ! static void prefswin_iabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 150,164 **** } ! void prefswin_oconfigure(GtkWidget * w, gpointer data) { output_configure(selected_oplugin); } ! void prefswin_oabout(GtkWidget * w, gpointer data) { output_about(selected_oplugin); } ! void prefswin_gconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 150,164 ---- } ! static void prefswin_oconfigure(GtkWidget * w, gpointer data) { output_configure(selected_oplugin); } ! static void prefswin_oabout(GtkWidget * w, gpointer data) { output_about(selected_oplugin); } ! static void prefswin_gconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 168,172 **** } ! void prefswin_gabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 168,172 ---- } ! static void prefswin_gabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 176,180 **** } ! void prefswin_glist_clicked(GtkCList * clist, gint row, gint column, GdkEventButton * event, gpointer data) { --- 176,180 ---- } ! static void prefswin_glist_clicked(GtkCList * clist, gint row, gint column, GdkEventButton * event, gpointer data) { *************** *** 215,219 **** } ! void prefswin_vconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 215,219 ---- } ! static void prefswin_vconfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 223,227 **** } ! void prefswin_vabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 223,227 ---- } ! static void prefswin_vabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 231,236 **** } ! void prefswin_vlist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { VisPlugin *vp; --- 231,236 ---- } ! static void prefswin_vlist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { VisPlugin *vp; *************** *** 270,274 **** } ! void prefswin_econfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 270,274 ---- } ! static void prefswin_econfigure(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 278,282 **** } ! void prefswin_eabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); --- 278,282 ---- } ! static void prefswin_eabout(GtkButton * w, gpointer data) { GtkCList *clist = GTK_CLIST(data); *************** *** 286,291 **** } ! void prefswin_elist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { EffectPlugin *ep; --- 286,291 ---- } ! static void prefswin_elist_clicked(GtkCList * clist, gint row, gint column, ! GdkEventButton * event, gpointer data) { EffectPlugin *ep; *************** *** 326,330 **** ! void prefswin_rt_callback(GtkToggleButton * w, gpointer data) { if (!gtk_toggle_button_get_active(w) || is_opening) --- 326,330 ---- ! static void prefswin_rt_callback(GtkToggleButton * w, gpointer data) { if (!gtk_toggle_button_get_active(w) || is_opening) *************** *** 372,376 **** } ! void prefswin_apply_changes(void) { gboolean show_wm_old = cfg.show_wm_decorations; --- 372,376 ---- } ! static void prefswin_apply_changes(void) { gboolean show_wm_old = cfg.show_wm_decorations; *************** *** 425,429 **** prefswin_toggle_wm_decorations(); ! save_config(); /* FIXME: It's _very_ slow doing this again for say several --- 425,429 ---- prefswin_toggle_wm_decorations(); ! bmp_config_save(); /* FIXME: It's _very_ slow doing this again for say several *************** *** 438,442 **** } ! void prefswin_ok_cb(GtkWidget * w, gpointer data) { /* prefswin_apply_changes(); */ --- 438,442 ---- } ! static void prefswin_ok_callback(GtkWidget * w, gpointer data) { /* prefswin_apply_changes(); */ *************** *** 444,458 **** } ! void prefswin_cancel_cb(GtkWidget * w, gpointer data) { gtk_widget_hide(prefswin); } ! void prefswin_apply_cb(GtkWidget * w, gpointer data) { prefswin_apply_changes(); } ! void prefswin_font_browse_cb(GtkWidget * w, gpointer data) { static GtkWidget *fontsel = NULL; --- 444,458 ---- } ! static void prefswin_cancel_callback(GtkWidget * w, gpointer data) { gtk_widget_hide(prefswin); } ! static void prefswin_apply_callback(GtkWidget * w, gpointer data) { prefswin_apply_changes(); } ! static void prefswin_font_browse_callback(GtkWidget * w, gpointer data) { static GtkWidget *fontsel = NULL; *************** *** 501,505 **** ! void prefswin_mainwin_font_browse_cb(GtkWidget * w, gpointer data) { static GtkWidget *fontsel = NULL; --- 501,505 ---- ! void prefswin_mainwin_font_browse_callback(GtkWidget * w, gpointer data) { static GtkWidget *fontsel = NULL; *************** *** 544,553 **** } ! ! ! ! ! ! void prefswin_gplugins_use_cb(GtkToggleButton * w, gpointer data) { gint sel; --- 544,548 ---- } ! void prefswin_gplugins_use_callback(GtkToggleButton * w, gpointer data) { gint sel; *************** *** 590,594 **** } ! void prefswin_vplugins_use_cb(GtkToggleButton * w, gpointer data) { gint sel; --- 585,589 ---- } ! void prefswin_vplugins_use_callback(GtkToggleButton * w, gpointer data) { gint sel; *************** *** 625,629 **** } ! void prefswin_eplugins_use_cb(GtkToggleButton * w, gpointer data) { gint sel; --- 620,624 ---- } ! void prefswin_eplugins_use_callback(GtkToggleButton * w, gpointer data) { gint sel; *************** *** 666,671 **** static GtkWidget *prefswin_option_new(gboolean * cfg) { ! struct option_info *info; ! info = g_malloc(sizeof(struct option_info)); info->button = gtk_check_button_new(); info->cfg = cfg; --- 661,666 ---- static GtkWidget *prefswin_option_new(gboolean * cfg) { ! BmpOptionInfo *info; ! info = g_malloc(sizeof(BmpOptionInfo)); info->button = gtk_check_button_new(); info->cfg = cfg; *************** *** 713,723 **** GtkRadioButton * group) { ! struct option_info *info; ! GtkWidget *button = gtk_radio_button_new_from_widget(group); if (cfg != NULL) { ! info = g_malloc(sizeof(struct option_info)); info->button = button; info->cfg = cfg; --- 708,717 ---- GtkRadioButton * group) { ! BmpOptionInfo *info; GtkWidget *button = gtk_radio_button_new_from_widget(group); if (cfg != NULL) { ! info = g_malloc(sizeof(BmpOptionInfo)); info->button = button; info->cfg = cfg; *************** *** 747,751 **** for (node = option_list; node; node = g_list_next(node)) { ! struct option_info *info = node->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(info->button), *(info->cfg)); --- 741,745 ---- for (node = option_list; node; node = g_list_next(node)) { ! BmpOptionInfo *info = node->data; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(info->button), *(info->cfg)); *************** *** 758,762 **** for (node = option_list; node; node = g_list_next(node)) { ! struct option_info *info = node->data; *info->cfg = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(info->button)); --- 752,756 ---- for (node = option_list; node; node = g_list_next(node)) { ! BmpOptionInfo *info = node->data; *info->cfg = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(info->button)); *************** *** 806,810 **** GtkWidget *label; ! char *titles[1]; PangoAttrList *attrs; --- 800,804 ---- GtkWidget *label; ! gchar *titles[1]; PangoAttrList *attrs; *************** *** 1021,1025 **** gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_eplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_eplugins_use_cb), prefswin_eplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_eplugins_hbox), --- 1015,1019 ---- gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_eplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_eplugins_use_callback), prefswin_eplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_eplugins_hbox), *************** *** 1089,1093 **** gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_gplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_gplugins_use_cb), prefswin_gplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_gplugins_hbox), --- 1083,1087 ---- gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_gplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_gplugins_use_callback), prefswin_gplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_gplugins_hbox), *************** *** 1163,1167 **** gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_vplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_vplugins_use_cb), prefswin_vplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_vplugins_hbox), --- 1157,1161 ---- gtk_check_button_new_with_label(_("Enable plugin")); g_signal_connect(G_OBJECT(prefswin_vplugins_use_cbox), "toggled", ! G_CALLBACK(prefswin_vplugins_use_callback), prefswin_vplugins_list); gtk_box_pack_start(GTK_BOX(prefswin_vplugins_hbox), *************** *** 1409,1413 **** g_signal_connect(G_OBJECT(prefswin_options_font_browse), "clicked", ! G_CALLBACK(prefswin_font_browse_cb), NULL); gtk_table_attach(GTK_TABLE(prefswin_fonts_vbox), prefswin_options_font_browse, 1, 4, 1, 2, --- 1403,1407 ---- g_signal_connect(G_OBJECT(prefswin_options_font_browse), "clicked", ! G_CALLBACK(prefswin_font_browse_callback), NULL); gtk_table_attach(GTK_TABLE(prefswin_fonts_vbox), prefswin_options_font_browse, 1, 4, 1, 2, *************** *** 1433,1437 **** g_signal_connect(G_OBJECT(prefswin_mainwin_font_browse), "clicked", ! G_CALLBACK(prefswin_mainwin_font_browse_cb), NULL); --- 1427,1431 ---- g_signal_connect(G_OBJECT(prefswin_mainwin_font_browse), "clicked", ! G_CALLBACK(prefswin_mainwin_font_browse_callback), NULL); *************** *** 1490,1494 **** prefswin_apply = gtk_button_new_from_stock(GTK_STOCK_APPLY); g_signal_connect(G_OBJECT(prefswin_apply), "clicked", ! G_CALLBACK(prefswin_apply_cb), NULL); GTK_WIDGET_SET_FLAGS(prefswin_apply, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(prefswin_hbox), prefswin_apply, TRUE, TRUE, --- 1484,1488 ---- prefswin_apply = gtk_button_new_from_stock(GTK_STOCK_APPLY); g_signal_connect(G_OBJECT(prefswin_apply), "clicked", ! G_CALLBACK(prefswin_apply_callback), NULL); GTK_WIDGET_SET_FLAGS(prefswin_apply, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(prefswin_hbox), prefswin_apply, TRUE, TRUE, *************** *** 1497,1501 **** prefswin_ok = gtk_button_new_from_stock(GTK_STOCK_CLOSE); g_signal_connect(G_OBJECT(prefswin_ok), "clicked", ! G_CALLBACK(prefswin_ok_cb), NULL); GTK_WIDGET_SET_FLAGS(prefswin_ok, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(prefswin_hbox), prefswin_ok, TRUE, TRUE, 0); --- 1491,1495 ---- prefswin_ok = gtk_button_new_from_stock(GTK_STOCK_CLOSE); g_signal_connect(G_OBJECT(prefswin_ok), "clicked", ! G_CALLBACK(prefswin_ok_callback), NULL); GTK_WIDGET_SET_FLAGS(prefswin_ok, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(prefswin_hbox), prefswin_ok, TRUE, TRUE, 0); *************** *** 1674,1678 **** } ! void add_input_plugins(GtkCList * clist) { GList *ilist = get_input_list(); --- 1668,1672 ---- } ! static void add_input_plugins(GtkCList * clist) { GList *ilist = get_input_list(); *************** *** 1709,1713 **** ! void __show_prefs_window(void) { gchar temp[10]; --- 1703,1707 ---- ! static void __show_prefs_window(void) { gchar temp[10]; Index: prefswin.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/prefswin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** prefswin.h 26 Dec 2003 06:47:05 -0000 1.3 --- prefswin.h 28 Dec 2003 21:11:46 -0000 1.4 *************** *** 23,35 **** #include <gtk/gtk.h> void create_prefs_window(void); void show_prefs_window(void); void prefswin_vplugins_rescan(void); void prefswin_show_vis_plugins_page(void); - - struct option_info { - GtkWidget *button; - gboolean *cfg; - }; #endif --- 23,36 ---- #include <gtk/gtk.h> + #define BMP_OPTION_INFO(x) ((BmpOptionInfo *)(x)) + typedef struct { + GtkWidget *button; + gboolean *cfg; + } BmpOptionInfo; + void create_prefs_window(void); void show_prefs_window(void); void prefswin_vplugins_rescan(void); void prefswin_show_vis_plugins_page(void); #endif |
From: <des...@us...> - 2003-12-28 21:11:50
|
Update of /cvsroot/beepmp/bmp/libbeep In directory sc8-pr-cvs1:/tmp/cvs-serv6632/libbeep Modified Files: util.c util.h Log Message: - fixed memory leak in vorbis/fileinfo.c:add_tag() - renamed Config to BmpConfig, option_info to BmpOptionInfo - renamed various *_cb() callback functions to *_callback() - renamed libbeep/util.c functions, added XMMS name aliases to keep compatibility - miscellaneous cleanups (Glibize types, add constness to string parameters etc.) Index: util.c =================================================================== RCS file: /cvsroot/beepmp/bmp/libbeep/util.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** util.c 24 Dec 2003 17:45:40 -0000 1.7 --- util.c 28 Dec 2003 21:11:46 -0000 1.8 *************** *** 34,41 **** #endif ! GtkWidget *xmms_show_message(gchar * title, gchar * text, ! gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data) { GtkWidget *dialog, *vbox, *bbox, *button; --- 34,41 ---- #endif ! GtkWidget *bmp_info_dialog(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data) { GtkWidget *dialog, *vbox, *bbox, *button; *************** *** 93,97 **** } ! gboolean xmms_check_realtime_priority(void) { #ifdef HAVE_SCHED_SETSCHEDULER --- 93,97 ---- } ! gboolean bmp_check_realtime_priority(void) { #ifdef HAVE_SCHED_SETSCHEDULER *************** *** 116,122 **** } ! void xmms_usleep(gint usec) { ! //#ifdef HAVE_NANOSLEEP struct timespec req; --- 116,122 ---- } ! void bmp_usleep(gint usec) { ! #ifdef HAVE_NANOSLEEP struct timespec req; *************** *** 126,136 **** nanosleep(&req, NULL); ! /*#else ! struct timeval tv; ! tv.tv_sec = usec / 1000000; ! usec -= tv.tv_sec * 1000000; ! tv.tv_usec = usec; ! select(0, NULL, NULL, NULL, &tv); ! #endif*/ } --- 126,136 ---- nanosleep(&req, NULL); ! #else ! struct timeval tv; ! tv.tv_sec = usec / 1000000; ! usec -= tv.tv_sec * 1000000; ! tv.tv_usec = usec; ! select(0, NULL, NULL, NULL, &tv); ! #endif } Index: util.h =================================================================== RCS file: /cvsroot/beepmp/bmp/libbeep/util.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** util.h 24 Dec 2003 14:06:09 -0000 1.2 --- util.h 28 Dec 2003 21:11:46 -0000 1.3 *************** *** 3,16 **** #include <gtk/gtk.h> #ifdef __cplusplus extern "C" { #endif ! GtkWidget *xmms_show_message(gchar * title, gchar * text, ! gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data); ! gboolean xmms_check_realtime_priority(void); ! void xmms_usleep(gint usec); #ifdef __cplusplus --- 3,28 ---- #include <gtk/gtk.h> + /* XMMS names */ + + #define xmms_show_message(title, text, button_text, model, button_action, action_data) \ + bmp_info_dialog(title, text, button_text, model, button_action, action_data) + + #define xmms_usleep(usec) \ + bmp_usleep(usec) + + #define xmms_check_realtime_priority() \ + bmp_check_realtime_priority() + + #ifdef __cplusplus extern "C" { #endif ! GtkWidget *bmp_info_dialog(const gchar * title, const gchar * text, ! const gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data); ! gboolean bmp_check_realtime_priority(void); ! void bmp_usleep(gint usec); #ifdef __cplusplus |
From: <des...@us...> - 2003-12-28 21:11:49
|
Update of /cvsroot/beepmp/bmp/Input/vorbis In directory sc8-pr-cvs1:/tmp/cvs-serv6632/Input/vorbis Modified Files: configure.c fileinfo.c http.c http.h Log Message: - fixed memory leak in vorbis/fileinfo.c:add_tag() - renamed Config to BmpConfig, option_info to BmpOptionInfo - renamed various *_cb() callback functions to *_callback() - renamed libbeep/util.c functions, added XMMS name aliases to keep compatibility - miscellaneous cleanups (Glibize types, add constness to string parameters etc.) Index: configure.c =================================================================== RCS file: /cvsroot/beepmp/bmp/Input/vorbis/configure.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.c 24 Dec 2003 13:57:29 -0000 1.3 --- configure.c 28 Dec 2003 21:11:46 -0000 1.4 *************** *** 479,483 **** vorbis_cfg.tag_override); g_signal_connect(G_OBJECT(title_tag_override), "clicked", ! title_tag_override_cb, NULL); gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_override, FALSE, FALSE, 0); --- 479,483 ---- vorbis_cfg.tag_override); g_signal_connect(G_OBJECT(title_tag_override), "clicked", ! G_CALLBACK(title_tag_override_cb), NULL); gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_override, FALSE, FALSE, 0); *************** *** 528,532 **** gtk_box_pack_start(GTK_BOX(rg_vbox), rg_type_frame, FALSE, FALSE, 0); ! g_signal_connect(G_OBJECT(rg_switch), "toggled", rg_switch_cb, rg_type_frame); --- 528,532 ---- gtk_box_pack_start(GTK_BOX(rg_vbox), rg_type_frame, FALSE, FALSE, 0); ! g_signal_connect(G_OBJECT(rg_switch), "toggled", G_CALLBACK(rg_switch_cb), rg_type_frame); Index: fileinfo.c =================================================================== RCS file: /cvsroot/beepmp/bmp/Input/vorbis/fileinfo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fileinfo.c 24 Dec 2003 13:57:29 -0000 1.4 --- fileinfo.c 28 Dec 2003 21:11:46 -0000 1.5 *************** *** 49,53 **** } vte; ! static void fail(gchar * error); static void save_cb(GtkWidget * w, gpointer data); static void remove_cb(GtkWidget * w, gpointer data); --- 49,53 ---- } vte; ! static void fail(const gchar * error); static void save_cb(GtkWidget * w, gpointer data); static void remove_cb(GtkWidget * w, gpointer data); *************** *** 131,140 **** } ! static char **get_comment_list(vorbis_comment * vc) { ! int i; ! char **strv; ! strv = g_new0(char *, vc->comments + 1); for (i = 0; i < vc->comments; i++) { g_message(vc->user_comments[i]); --- 131,140 ---- } ! static gchar **get_comment_list(vorbis_comment * vc) { ! gint i; ! gchar **strv; ! strv = g_new0(gchar *, vc->comments + 1); for (i = 0; i < vc->comments; i++) { g_message(vc->user_comments[i]); *************** *** 145,170 **** } ! static char **add_tag(char **list, char *label, char *tag) { ! char **ptr = list, *reallabel = g_strconcat(label, "=", NULL); - g_strstrip(tag); if (strlen(tag) == 0) tag = NULL; /* * There can be several tags with the same label. We clear * them all. */ ! while (*ptr != NULL) { ! if (!g_strncasecmp(reallabel, *ptr, strlen(reallabel))) { g_free(*ptr); ! if (tag != NULL) { ! tag = g_locale_to_utf8(tag, -1, NULL, NULL, NULL); ! *ptr = g_strconcat(reallabel, tag, NULL); ! g_free(tag); ! tag = NULL; ptr++; } else { ! char **str; for (str = ptr; *str; str++) *str = *(str + 1); --- 145,178 ---- } ! static gchar **add_tag(gchar **list, const gchar *label, const gchar *tag_p) { ! gchar **ptr = list; ! gchar *label_actual = g_strconcat(label, "=", NULL); ! gchar *tag = g_strstrip(g_strdup(tag_p)); if (strlen(tag) == 0) + { + g_free(tag); tag = NULL; + } /* * There can be several tags with the same label. We clear * them all. */ ! ! gchar *tag_utf8 = g_locale_to_utf8(tag, -1, NULL, NULL, NULL); ! ! while (*ptr) { ! if (!g_strcasecmp(label_actual, *ptr)) { g_free(*ptr); ! *ptr = NULL; ! ! if (tag) { ! tag_utf8 = g_locale_to_utf8(tag, -1, NULL, NULL, NULL); ! *ptr = g_strconcat(label_actual, tag_utf8, NULL); ! g_free(tag_utf8); ptr++; } else { ! gchar **str; for (str = ptr; *str; str++) *str = *(str + 1); *************** *** 174,193 **** ptr++; } if (tag) { ! int i = 0; for (ptr = list; *ptr; ptr++) i++; ! list = g_renew(char *, list, i + 2); ! tag = g_locale_to_utf8(tag, -1, NULL, NULL, NULL); ! list[i] = g_strconcat(reallabel, tag, NULL); list[i + 1] = NULL; g_free(tag); } ! g_free(reallabel); return list; } ! static void add_list(vorbis_comment * vc, char **comments) { while (*comments) --- 182,207 ---- ptr++; } + if (tag) { ! gint i = 0; ! for (ptr = list; *ptr; ptr++) i++; ! list = g_renew(gchar *, list, i + 1); ! ! tag_utf8 = g_locale_to_utf8(tag, -1, NULL, NULL, NULL); ! list[i] = g_strconcat(label_actual, tag_utf8, NULL); list[i + 1] = NULL; + g_free(tag_utf8); + g_free(tag); } ! ! g_free(label_actual); return list; } ! static void add_list(vorbis_comment * vc, gchar **comments) { while (*comments) *************** *** 196,206 **** ! static void fail(gchar * error) { gchar *errorstring; errorstring = g_strdup_printf(_("An error occured:\n%s"), error); ! xmms_show_message_test(_("Error!"), ! errorstring, _("Ok"), FALSE, NULL, NULL); g_free(errorstring); --- 210,219 ---- ! static void fail(const gchar * error) { gchar *errorstring; errorstring = g_strdup_printf(_("An error occured:\n%s"), error); ! xmms_show_message(_("Error!"), errorstring, _("Ok"), FALSE, NULL, NULL); g_free(errorstring); *************** *** 211,222 **** static void save_cb(GtkWidget * w, gpointer data) { ! gchar *track_name, *performer, *album_name, *date, *track_number; ! gchar *genre, *user_comment; #ifdef ALL_VORBIS_TAGS ! gchar *description, *version, *isrc, *copyright, *organization; ! gchar *location; #endif ! gchar *rg_track_gain, *rg_album_gain, *rg_track_peak, *rg_album_peak; ! char **comment_list; vcedit_state *state; vorbis_comment *comment; --- 224,235 ---- static void save_cb(GtkWidget * w, gpointer data) { ! const gchar *track_name, *performer, *album_name, *date, *track_number; ! const gchar *genre, *user_comment; #ifdef ALL_VORBIS_TAGS ! const gchar *description, *version, *isrc, *copyright, *organization; ! const gchar *location; #endif ! const gchar *rg_track_gain, *rg_album_gain, *rg_track_peak, *rg_album_peak; ! gchar **comment_list; vcedit_state *state; vorbis_comment *comment; *************** *** 323,333 **** fail(_("Failed to modify tag")); } else { ! gtk_entry_set_text(title_entry, ""); ! gtk_entry_set_text(album_entry, ""); ! gtk_entry_set_text(performer_entry, ""); ! gtk_entry_set_text(tracknumber_entry, ""); ! gtk_entry_set_text(date_entry, ""); ! gtk_entry_set_text(genre_combo, ""); ! gtk_entry_set_text(user_comment_entry, ""); } --- 336,346 ---- fail(_("Failed to modify tag")); } else { ! gtk_entry_set_text(GTK_ENTRY(title_entry), ""); ! gtk_entry_set_text(GTK_ENTRY(album_entry), ""); ! gtk_entry_set_text(GTK_ENTRY(performer_entry), ""); ! gtk_entry_set_text(GTK_ENTRY(tracknumber_entry), ""); ! gtk_entry_set_text(GTK_ENTRY(date_entry), ""); ! gtk_entry_set_text(GTK_ENTRY(genre_combo), ""); ! gtk_entry_set_text(GTK_ENTRY(user_comment_entry), ""); } *************** *** 336,340 **** vcedit_clear(state); g_mutex_unlock(vf_mutex); ! // gtk_widget_destroy(window); } --- 349,353 ---- vcedit_clear(state); g_mutex_unlock(vf_mutex); ! /* gtk_widget_destroy(window); */ } *************** *** 432,436 **** ! static void label_set_text(GtkWidget * label, char *str, ...) { va_list args; --- 445,449 ---- ! static void label_set_text(GtkWidget * label, gchar *str, ...) { va_list args; *************** *** 452,457 **** static void press_save(GtkWidget * w, gpointer data) { ! gtk_button_clicked(save_button); ! } --- 465,469 ---- static void press_save(GtkWidget * w, gpointer data) { ! gtk_button_clicked(GTK_BUTTON(save_button)); } *************** *** 459,463 **** /***********************************************************************/ ! void vorbis_file_info_box(char *fn) { gchar *track_name, *performer, *album_name, *date, *track_number; --- 471,475 ---- /***********************************************************************/ ! void vorbis_file_info_box(gchar *fn) { gchar *track_name, *performer, *album_name, *date, *track_number; *************** *** 483,489 **** *filesize_label_val; ! static GtkWidget *replaygain_label, *audiophilegain_label, *peak_label; ! static GtkWidget *replaygain_label_val, *audiophilegain_label_val, ! *peak_label_val; static GtkWidget *filename_entry, *tag_frame; --- 495,501 ---- *filesize_label_val; ! /* static GtkWidget *replaygain_label, *audiophilegain_label, *peak_label; */ ! /* static GtkWidget *replaygain_label_val, *audiophilegain_label_val, */ ! /* *peak_label_val; */ static GtkWidget *filename_entry, *tag_frame; *************** *** 562,566 **** tag_frame = gtk_frame_new(_(" Ogg Vorbis Tag ")); ! gtk_table_attach(left_vbox, tag_frame, 2, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 4); // gtk_box_pack_start(GTK_BOX(left_vbox), tag_frame, FALSE, --- 574,578 ---- tag_frame = gtk_frame_new(_(" Ogg Vorbis Tag ")); ! gtk_table_attach(GTK_TABLE(left_vbox), tag_frame, 2, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 4); // gtk_box_pack_start(GTK_BOX(left_vbox), tag_frame, FALSE, *************** *** 737,746 **** gtk_container_add(GTK_CONTAINER(boxx), save_button); ! gtk_table_attach(table, boxx, 0, 5, 6, 7, GTK_FILL, 0, 0, 8); rg_show_button = gtk_toggle_button_new(); GtkImage *img = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_MENU); ! gtk_container_add(rg_show_button, img); g_signal_connect(G_OBJECT(rg_show_button), "toggled", G_CALLBACK(rg_show_cb), NULL); --- 749,758 ---- gtk_container_add(GTK_CONTAINER(boxx), save_button); ! gtk_table_attach(GTK_TABLE(table), boxx, 0, 5, 6, 7, GTK_FILL, 0, 0, 8); rg_show_button = gtk_toggle_button_new(); GtkImage *img = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_MENU); ! gtk_container_add(GTK_CONTAINER(rg_show_button), GTK_WIDGET(img)); g_signal_connect(G_OBJECT(rg_show_button), "toggled", G_CALLBACK(rg_show_cb), NULL); *************** *** 752,756 **** rg_frame = gtk_frame_new(_(" Ogg Vorbis ReplayGain ")); ! gtk_table_attach(left_vbox, rg_frame, 5, 6, 0, 4, GTK_FILL, GTK_FILL, 0, 4); rg_table = gtk_table_new(16, 4, FALSE); --- 764,768 ---- rg_frame = gtk_frame_new(_(" Ogg Vorbis ReplayGain ")); ! gtk_table_attach(GTK_TABLE(left_vbox), rg_frame, 5, 6, 0, 4, GTK_FILL, GTK_FILL, 0, 4); rg_table = gtk_table_new(16, 4, FALSE); *************** *** 817,821 **** ! gtk_table_attach(left_vbox, bbox, 0, 4, 1, 2, GTK_FILL, 0, 0, 8); gtk_table_set_col_spacing(GTK_TABLE(left_vbox), 1, 10); --- 829,833 ---- ! gtk_table_attach(GTK_TABLE(left_vbox), bbox, 0, 4, 1, 2, GTK_FILL, 0, 0, 8); gtk_table_set_col_spacing(GTK_TABLE(left_vbox), 1, 10); *************** *** 823,829 **** info_frame = gtk_frame_new(_(" Ogg Vorbis Info ")); ! gtk_table_attach(left_vbox, info_frame, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 4); ! // gtk_box_pack_start(GTK_BOX(hbox), info_frame, FALSE, FALSE, 0); info_box = gtk_vbox_new(FALSE, 5); --- 835,841 ---- info_frame = gtk_frame_new(_(" Ogg Vorbis Info ")); ! gtk_table_attach(GTK_TABLE(left_vbox), info_frame, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 4); ! /* gtk_box_pack_start(GTK_BOX(hbox), info_frame, FALSE, FALSE, 0); */ info_box = gtk_vbox_new(FALSE, 5); *************** *** 832,836 **** gtk_box_set_spacing(GTK_BOX(info_box), 0); ! // FIXME: Obvious... GtkWidget *test_table = gtk_table_new(2, 10, FALSE); gtk_container_set_border_width(GTK_CONTAINER(test_table), 0); --- 844,848 ---- gtk_box_set_spacing(GTK_BOX(info_box), 0); ! /* FIXME: Obvious... */ GtkWidget *test_table = gtk_table_new(2, 10, FALSE); gtk_container_set_border_width(GTK_CONTAINER(test_table), 0); *************** *** 922,938 **** audiophilegain_label = gtk_label_new(""); ! // gtk_misc_set_alignment(GTK_MISC(audiophilegain_label), 0, 0); ! // gtk_label_set_justify(GTK_LABEL(audiophilegain_label), ! // GTK_JUSTIFY_LEFT); ! // gtk_box_pack_start(GTK_BOX(info_box), audiophilegain_label, FALSE, ! // FALSE, 0); peak_label = gtk_label_new(""); ! // gtk_misc_set_alignment(GTK_MISC(peak_label), 0, 0); ! // gtk_label_set_justify(GTK_LABEL(peak_label), ! // GTK_JUSTIFY_LEFT); ! // gtk_box_pack_start(GTK_BOX(info_box), peak_label, FALSE, ! // FALSE, 0); ! */ } else --- 934,949 ---- audiophilegain_label = gtk_label_new(""); ! gtk_misc_set_alignment(GTK_MISC(audiophilegain_label), 0, 0); ! gtk_label_set_justify(GTK_LABEL(audiophilegain_label), ! GTK_JUSTIFY_LEFT); ! gtk_box_pack_start(GTK_BOX(info_box), audiophilegain_label, FALSE, ! FALSE, 0); peak_label = gtk_label_new(""); ! gtk_misc_set_alignment(GTK_MISC(peak_label), 0, 0); ! gtk_label_set_justify(GTK_LABEL(peak_label), ! GTK_JUSTIFY_LEFT); ! gtk_box_pack_start(GTK_BOX(info_box), peak_label, FALSE, ! FALSE, 0); */ } else *************** *** 1106,1110 **** gtk_widget_realize(window); ! gtk_window_set_position(window, GTK_WIN_POS_CENTER); gtk_widget_show_all(window); gtk_widget_hide(rg_frame); --- 1117,1121 ---- gtk_widget_realize(window); ! gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_widget_show_all(window); gtk_widget_hide(rg_frame); *************** *** 1112,1116 **** gtk_widget_set_sensitive(save_button, FALSE); gtk_widget_set_sensitive(remove_button, FALSE); ! // rg_hide(); g_free(tmp); --- 1123,1127 ---- gtk_widget_set_sensitive(save_button, FALSE); gtk_widget_set_sensitive(remove_button, FALSE); ! /* rg_hide(); */ g_free(tmp); *************** *** 1139,1188 **** static void vorbis_advanced_tag_edit() { ! } ! ! GtkWidget *xmms_show_message_test(gchar * title, gchar * text, ! gchar * button_text, gboolean modal, ! GtkSignalFunc button_action, ! gpointer action_data) ! { ! GtkWidget *dialog, *vbox, *label, *bbox, *button; ! ! dialog = gtk_dialog_new(); ! gtk_window_set_title(GTK_WINDOW(dialog), title); ! gtk_window_set_modal(GTK_WINDOW(dialog), modal); ! ! vbox = gtk_vbox_new(FALSE, 0); ! gtk_container_set_border_width(GTK_CONTAINER(vbox), 15); ! gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox, TRUE, TRUE, ! 0); ! ! label = gtk_label_new(text); ! gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); ! gtk_widget_show(label); ! gtk_widget_show(vbox); ! ! bbox = gtk_hbutton_box_new(); ! gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD); ! gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); ! gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), bbox, ! FALSE, FALSE, 0); ! ! button = gtk_button_new_with_label(button_text); ! if (button_action) ! g_signal_connect(G_OBJECT(button), "clicked", button_action, ! action_data); ! g_signal_connect_swapped(G_OBJECT(button), "clicked", ! G_CALLBACK(gtk_widget_destroy), ! GTK_OBJECT(dialog)); ! gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); ! GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); ! gtk_widget_grab_default(button); ! gtk_widget_show(button); ! ! gtk_widget_show(bbox); ! gtk_window_set_position(dialog, GTK_WIN_POS_CENTER); ! gtk_widget_set_usize(dialog, 340, 190); ! gtk_widget_show(dialog); ! ! return dialog; } --- 1150,1153 ---- static void vorbis_advanced_tag_edit() { ! /* empty */ } Index: http.c =================================================================== RCS file: /cvsroot/beepmp/bmp/Input/vorbis/http.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** http.c 24 Dec 2003 13:57:29 -0000 1.2 --- http.c 28 Dec 2003 21:11:46 -0000 1.3 *************** *** 563,572 **** } ! int vorbis_http_open(gchar * _url) { gchar *url; - - url = g_strdup(_url); --- 563,570 ---- } ! gint vorbis_http_open(const gchar * _url) { gchar *url; url = g_strdup(_url); *************** *** 586,595 **** } ! char *vorbis_http_get_title(char *url) { if (ice_name) return g_strdup(ice_name); ! if (g_basename(url) && strlen(g_basename(url)) > 0) ! return g_strdup(g_basename(url)); return g_strdup(url); } --- 584,599 ---- } ! gchar *vorbis_http_get_title(const gchar *url) { if (ice_name) return g_strdup(ice_name); ! ! gchar *url_basename = g_path_get_basename(url); ! ! if (strlen(url_basename) > 0) ! return url_basename; ! ! g_free(url_basename); ! return g_strdup(url); } Index: http.h =================================================================== RCS file: /cvsroot/beepmp/bmp/Input/vorbis/http.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** http.h 24 Dec 2003 13:57:29 -0000 1.2 --- http.h 28 Dec 2003 21:11:46 -0000 1.3 *************** *** 2,9 **** #define __HTTP_H__ ! int vorbis_http_open(char *url); ! int vorbis_http_read(gpointer data, gint length); void vorbis_http_close(void); ! gchar *vorbis_http_get_title(gchar * url); gint vorbis_http_get_ice_bitrate(void); --- 2,9 ---- #define __HTTP_H__ ! gint vorbis_http_open(const gchar *url); ! gint vorbis_http_read(gpointer data, gint length); void vorbis_http_close(void); ! gchar *vorbis_http_get_title(const gchar * url); gint vorbis_http_get_ice_bitrate(void); |
From: <mde...@us...> - 2003-12-28 16:36:06
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv20775 Modified Files: playlist_list.c playlistwin.c Log Message: playlistwin.c: fixed loading of playlists trough the file dialog Index: playlist_list.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist_list.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** playlist_list.c 26 Dec 2003 23:59:38 -0000 1.19 --- playlist_list.c 28 Dec 2003 16:36:01 -0000 1.20 *************** *** 1,7 **** ! /* XMMS - Cross-platform multimedia player * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, * Thomas Nilsson and 4Front Technologies * Copyright (C) 1999-2003 Haavard Kvaalen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by --- 1,16 ---- ! /* ! * BMP - Handy versatile multi platform media player ! * See AUTHORS for Authors ! * ! * ! * based on: ! * ! * XMMS - Cross-platform multimedia player * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, * Thomas Nilsson and 4Front Technologies * Copyright (C) 1999-2003 Haavard Kvaalen * + * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by *************** *** 19,24 **** */ ! ! /* A note about Pango and some funky spacey fonts: Weirdly baselined fonts, or fonts * with weird ascents or descents _will_ display a little bit weird in the playlist * widget, but the display engine won't make it look too bad, just a little deranged. --- 28,33 ---- */ ! /* ! * A note about Pango and some funky spacey fonts: Weirdly baselined fonts, or fonts * with weird ascents or descents _will_ display a little bit weird in the playlist * widget, but the display engine won't make it look too bad, just a little deranged. *************** *** 28,40 **** * A second note: The numbers aren't perfectly aligned, but in the end it looks better when * using a single Pango layout for each number. - * For who ever wants to see it done different, link playlist_list_pango_new.c to playlist.c - * and recompile. It monospaces the digits in any font (probably not technically, but basically - * similar to e.g. gnome-terminal) so that they align much better. - * But... for one: it's slower. And 2ndly, the numbers, when using some non straight font - * (see above), look much worse. */ - /* FIXME: This is all still too slow. */ - #include "playlist_list.h" --- 37,42 ---- *************** *** 408,414 **** /* FIXME: this can be done more efficiently by working on the * playlist instead */ ! if (! ! (title = g_locale_to_utf8(entry->title, -1, NULL, NULL, NULL))) title = g_path_get_basename(entry->filename); convert_title_text(title); --- 410,419 ---- /* FIXME: this can be done more efficiently by working on the * playlist instead */ ! if (entry->title == NULL) { title = g_path_get_basename(entry->filename); + } else { + title = g_locale_to_utf8(entry->title, -1, NULL, NULL, NULL); + } + convert_title_text(title); Index: playlistwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlistwin.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** playlistwin.c 27 Dec 2003 01:05:33 -0000 1.13 --- playlistwin.c 28 Dec 2003 16:36:01 -0000 1.14 *************** *** 968,988 **** gchar *filename, *tmp; ! if (util_filebrowser_is_dir(GTK_FILE_SELECTION(filesel))) return; filename = g_strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION(filesel))); ! if ((tmp = strrchr(filename, '/')) != NULL) ! *(tmp + 1) = '\0'; g_free(cfg.playlist_path); cfg.playlist_path = filename; ! if (filename && *filename) { playlist_clear(); mainwin_clear_song_info(); mainwin_set_info_text(); ! playlist_load(filename); playlist_set_current_name(filename); } --- 968,991 ---- gchar *filename, *tmp; ! if (util_filebrowser_is_dir(GTK_FILE_SELECTION(filesel))) { ! return; + } filename = g_strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION(filesel))); ! ! g_free(cfg.playlist_path); cfg.playlist_path = filename; ! if (filename != NULL) { playlist_clear(); mainwin_clear_song_info(); mainwin_set_info_text(); ! ! playlist_load(filename); playlist_set_current_name(filename); } *************** *** 1025,1029 **** g_signal_connect_swapped(object, "clicked", G_CALLBACK(gtk_widget_destroy), ! GTK_OBJECT(load_filesel)); g_signal_connect(G_OBJECT(load_filesel), "destroy", G_CALLBACK(gtk_widget_destroyed), &load_filesel); --- 1028,1032 ---- g_signal_connect_swapped(object, "clicked", G_CALLBACK(gtk_widget_destroy), ! G_OBJECT(load_filesel)); g_signal_connect(G_OBJECT(load_filesel), "destroy", G_CALLBACK(gtk_widget_destroyed), &load_filesel); |
From: <mde...@us...> - 2003-12-28 14:38:04
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv29570/beep Modified Files: pluginenum.c Log Message: Added terminating null to pluginenum.c: init_plugins()::g_build_filename() Index: pluginenum.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/pluginenum.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pluginenum.c 26 Dec 2003 08:30:16 -0000 1.15 --- pluginenum.c 28 Dec 2003 14:37:58 -0000 1.16 *************** *** 187,191 **** while ((entry = g_dir_read_name(dir))) { ! filename = g_build_filename(dirname, entry); if (g_file_test(filename, G_FILE_TEST_IS_REGULAR) && (ext = strrchr(entry, '.')) != NULL) --- 187,191 ---- while ((entry = g_dir_read_name(dir))) { ! filename = g_build_filename(dirname, entry,NULL); if (g_file_test(filename, G_FILE_TEST_IS_REGULAR) && (ext = strrchr(entry, '.')) != NULL) *************** *** 231,235 **** #ifndef DISABLE_USER_PLUGIN_DIR ! dir = g_build_filename(g_get_home_dir(), BMP_RCPATH, "plugins"); bmp_scan_plugins(dir); g_free(dir); --- 231,235 ---- #ifndef DISABLE_USER_PLUGIN_DIR ! dir = g_build_filename(g_get_home_dir(), BMP_RCPATH, "plugins",NULL); bmp_scan_plugins(dir); g_free(dir); |
From: <des...@us...> - 2003-12-27 01:05:36
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv22989 Modified Files: main.c playlistwin.c prefswin.c Log Message: - main.c: fixed double g_free() bug in save_config() (introduced in last commit) - cleanups Index: main.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/main.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** main.c 26 Dec 2003 23:59:38 -0000 1.30 --- main.c 27 Dec 2003 01:05:33 -0000 1.31 *************** *** 334,342 **** (cfgfile, "xmms", "url_history_length", &length)) { for (i = 1; i <= length; i++) { ! gchar str[19], *temp; g_snprintf(str, sizeof(str), "url_history%d", i); ! if (xmms_cfg_read_string(cfgfile, "xmms", str, &temp)) ! cfg.url_history = g_list_append(cfg.url_history, temp); } } --- 334,342 ---- (cfgfile, "xmms", "url_history_length", &length)) { for (i = 1; i <= length; i++) { ! gchar str[19], *tmp; g_snprintf(str, sizeof(str), "url_history%d", i); ! if (xmms_cfg_read_string(cfgfile, "xmms", str, &tmp)) ! cfg.url_history = g_list_append(cfg.url_history, tmp); } } *************** *** 392,396 **** { GList *d_iplist, *node; ! gchar *temp; gchar *filename, *str; gint i; --- 392,396 ---- { GList *d_iplist, *node; ! gchar *tmp; gchar *filename, *str; gint i; *************** *** 405,414 **** d_iplist = d_iplist->next; while (d_iplist) { ! temp = cfg.disabled_iplugins; cfg.disabled_iplugins = g_strconcat(cfg.disabled_iplugins, ",", g_basename(INPUT_PLUGIN(d_iplist->data)-> filename), NULL); ! g_free(temp); d_iplist = d_iplist->next; } --- 405,414 ---- d_iplist = d_iplist->next; while (d_iplist) { ! tmp = cfg.disabled_iplugins; cfg.disabled_iplugins = g_strconcat(cfg.disabled_iplugins, ",", g_basename(INPUT_PLUGIN(d_iplist->data)-> filename), NULL); ! g_free(tmp); d_iplist = d_iplist->next; } *************** *** 419,423 **** g_build_filename(g_get_home_dir(), BMP_RCPATH, "config", NULL); cfgfile = xmms_cfg_open_file(filename); - g_free(filename); if (!cfgfile) --- 419,422 ---- *************** *** 915,919 **** /* GdkAtom save_yourself; */ ! /* Atom *temp, *temp2; */ /* int i, n; */ --- 914,918 ---- /* GdkAtom save_yourself; */ ! /* Atom *tmp, *tmp2; */ /* int i, n; */ *************** *** 934,950 **** gdk_window_add_filter(mainwin->window, save_yourself_filter, NULL); if (XGetWMProtocols ! (GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), &temp, &n)) { for (i = 0; i < n; i++) ! if (temp[i] == save_yourself) return; ! temp2 = g_new(Atom, n + 1); for (i = 0; i < n; i++) ! temp2[i] = temp[i]; ! temp2[i] = save_yourself; XSetWMProtocols(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), ! temp2, n + 1); if (n > 0) ! XFree(temp); ! g_free(temp2); } else XSetWMProtocols(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), --- 933,949 ---- gdk_window_add_filter(mainwin->window, save_yourself_filter, NULL); if (XGetWMProtocols ! (GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), &tmp, &n)) { for (i = 0; i < n; i++) ! if (tmp[i] == save_yourself) return; ! tmp2 = g_new(Atom, n + 1); for (i = 0; i < n; i++) ! tmp2[i] = tmp[i]; ! tmp2[i] = save_yourself; XSetWMProtocols(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), ! tmp2, n + 1); if (n > 0) ! XFree(tmp); ! g_free(tmp2); } else XSetWMProtocols(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mainwin->window), Index: playlistwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlistwin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** playlistwin.c 26 Dec 2003 15:47:45 -0000 1.12 --- playlistwin.c 27 Dec 2003 01:05:33 -0000 1.13 *************** *** 61,65 **** GtkWidget *playlistwin; ! // static GtkWidget *playlistwin_url_window = NULL; static GtkItemFactory *playlistwin_sort_menu, *playlistwin_sub_menu; static GtkItemFactory *playlistwin_popup_menu, *playlistwin_save_menu, --- 61,65 ---- GtkWidget *playlistwin; ! /* static GtkWidget *playlistwin_url_window = NULL; */ static GtkItemFactory *playlistwin_sort_menu, *playlistwin_sub_menu; static GtkItemFactory *playlistwin_popup_menu, *playlistwin_save_menu, *************** *** 69,80 **** static GdkBitmap *playlistwin_mask; static GdkGC *playlistwin_gc; ! static int playlistwin_resizing, playlistwin_resize_x, playlistwin_resize_y; ! static int playlistwin_save_type; ! GtkAccelGroup *playlistwin_accel; gboolean playlistwin_focus = FALSE; ! gboolean playlistwin_hint_flag = FALSE; PlayList_List *playlistwin_list = NULL; --- 69,80 ---- static GdkBitmap *playlistwin_mask; static GdkGC *playlistwin_gc; ! static gint playlistwin_resizing, playlistwin_resize_x, playlistwin_resize_y; ! static gint playlistwin_save_type; ! static GtkAccelGroup *playlistwin_accel; gboolean playlistwin_focus = FALSE; ! static gboolean playlistwin_hint_flag = FALSE; PlayList_List *playlistwin_list = NULL; *************** *** 93,103 **** static struct { ! int w, h; } playlistwin_resizeq = { -1, -1}; struct overwrite_data { ! char *filename; ! int pls; GtkWidget *fsel; }; --- 93,103 ---- static struct { ! gint w, h; } playlistwin_resizeq = { -1, -1}; struct overwrite_data { ! gchar *filename; ! gint pls; GtkWidget *fsel; }; *************** *** 115,129 **** }; ! void playlistwin_sort_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! void playlistwin_sub_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! void playlistwin_save_type_cb(gpointer cb_data, guint action, ! GtkWidget * w); ! void playlistwin_set_hints(void); ! GtkItemFactory *playlistwin_play_menu; ! GtkItemFactoryEntry playlistwin_play_menu_entries[] = { {N_("/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "<StockItem>", GTK_STOCK_JUMP_TO}, --- 115,128 ---- }; ! static void playlistwin_sort_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! static void playlistwin_sub_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! static void playlistwin_save_type_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! static GtkItemFactory *playlistwin_play_menu; ! static GtkItemFactoryEntry playlistwin_play_menu_entries[] = { {N_("/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "<StockItem>", GTK_STOCK_JUMP_TO}, *************** *** 150,154 **** }; ! static const int playlistwin_play_menu_entries_num = sizeof(playlistwin_play_menu_entries) / sizeof(playlistwin_play_menu_entries[0]); --- 149,153 ---- }; ! static const gint playlistwin_play_menu_entries_num = sizeof(playlistwin_play_menu_entries) / sizeof(playlistwin_play_menu_entries[0]); *************** *** 162,166 **** }; ! GtkItemFactoryEntry playlistwin_sort_menu_entries[] = { {N_("/Sort List"), NULL, NULL, 0, "<Branch>"}, {N_("/Sort List/By Title"), NULL, playlistwin_sort_menu_callback, --- 161,165 ---- }; ! static GtkItemFactoryEntry playlistwin_sort_menu_entries[] = { {N_("/Sort List"), NULL, NULL, 0, "<Branch>"}, {N_("/Sort List/By Title"), NULL, playlistwin_sort_menu_callback, *************** *** 187,191 **** }; ! static const int playlistwin_sort_menu_entries_num = sizeof(playlistwin_sort_menu_entries) / sizeof(playlistwin_sort_menu_entries[0]); --- 186,190 ---- }; ! static const gint playlistwin_sort_menu_entries_num = sizeof(playlistwin_sort_menu_entries) / sizeof(playlistwin_sort_menu_entries[0]); *************** *** 197,205 **** static GtkItemFactoryEntry playlistwin_playlist_filetypes[] = { ! {N_("/By extension"), NULL, playlistwin_save_type_cb, PLAYLISTWIN_SAVE_EXTENSION, NULL}, {"/-", NULL, NULL, 0, "<Separator>"}, ! {"/m3u", NULL, playlistwin_save_type_cb, PLAYLISTWIN_SAVE_M3U, NULL}, ! {"/pls", NULL, playlistwin_save_type_cb, PLAYLISTWIN_SAVE_PLS, NULL}, }; --- 196,206 ---- static GtkItemFactoryEntry playlistwin_playlist_filetypes[] = { ! {N_("/By extension"), NULL, playlistwin_save_type_callback, PLAYLISTWIN_SAVE_EXTENSION, NULL}, {"/-", NULL, NULL, 0, "<Separator>"}, ! {"/m3u", NULL, playlistwin_save_type_callback, PLAYLISTWIN_SAVE_M3U, ! NULL}, ! {"/pls", NULL, playlistwin_save_type_callback, PLAYLISTWIN_SAVE_PLS, ! NULL}, }; *************** *** 213,229 **** }; ! GtkItemFactoryEntry playlistwin_sub_menu_entries[] = { {N_("/Remove Unavailable Files"), NULL, playlistwin_sub_menu_callback, PLAYLISTWIN_REMOVE_DEAD_FILES, "<Item>"}, }; ! static const int playlistwin_sub_menu_entries_num = sizeof(playlistwin_sub_menu_entries) / sizeof(playlistwin_sub_menu_entries[0]); ! void playlistwin_popup_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! GtkItemFactoryEntry playlistwin_popup_menu_entries[] = { {N_("/View Track Details"), NULL, playlistwin_popup_menu_callback, MISC_FILEINFO, "<ImageItem>", my_pixbuf}, --- 214,230 ---- }; ! static GtkItemFactoryEntry playlistwin_sub_menu_entries[] = { {N_("/Remove Unavailable Files"), NULL, playlistwin_sub_menu_callback, PLAYLISTWIN_REMOVE_DEAD_FILES, "<Item>"}, }; ! static const gint playlistwin_sub_menu_entries_num = sizeof(playlistwin_sub_menu_entries) / sizeof(playlistwin_sub_menu_entries[0]); ! static void playlistwin_popup_menu_callback(gpointer cb_data, guint action, ! GtkWidget * w); ! static GtkItemFactoryEntry playlistwin_popup_menu_entries[] = { {N_("/View Track Details"), NULL, playlistwin_popup_menu_callback, MISC_FILEINFO, "<ImageItem>", my_pixbuf}, *************** *** 248,257 **** }; ! static const int playlistwin_popup_menu_entries_num = sizeof(playlistwin_popup_menu_entries) / sizeof(playlistwin_popup_menu_entries[0]); ! GtkItemFactoryEntry playlist_menu_entries[] = { {N_("/New List"), NULL, playlistwin_popup_menu_callback, PLIST_NEW, "<StockItem>", GTK_STOCK_DELETE} --- 249,258 ---- }; ! static const gint playlistwin_popup_menu_entries_num = sizeof(playlistwin_popup_menu_entries) / sizeof(playlistwin_popup_menu_entries[0]); ! static GtkItemFactoryEntry playlist_menu_entries[] = { {N_("/New List"), NULL, playlistwin_popup_menu_callback, PLIST_NEW, "<StockItem>", GTK_STOCK_DELETE} *************** *** 306,310 **** sizeof(playlist_menu_entries) / sizeof(playlist_menu_entries[0]); ! void playlistwin_draw_frame(void); static void playlistwin_update_info(void) --- 307,311 ---- sizeof(playlist_menu_entries) / sizeof(playlist_menu_entries[0]); ! static void playlistwin_draw_frame(void); static void playlistwin_update_info(void) *************** *** 411,415 **** } ! void playlistwin_set_toprow(int toprow) { if (playlistwin_list) --- 412,416 ---- } ! void playlistwin_set_toprow(gint toprow) { if (playlistwin_list) *************** *** 795,800 **** } ! static void playlistwin_check_overwrite_cb(GtkButton * w, ! gpointer user_data) { struct overwrite_data *odata = user_data; --- 796,801 ---- } ! static void playlistwin_check_overwrite_callback(GtkButton * w, ! gpointer user_data) { struct overwrite_data *odata = user_data; *************** *** 839,843 **** overwrite = gtk_button_new_with_label(_("Overwrite")); g_signal_connect(overwrite, "clicked", ! G_CALLBACK(playlistwin_check_overwrite_cb), data); g_signal_connect_swapped(overwrite, "clicked", G_CALLBACK(gtk_widget_destroy), dialog); --- 840,845 ---- overwrite = gtk_button_new_with_label(_("Overwrite")); g_signal_connect(overwrite, "clicked", ! G_CALLBACK(playlistwin_check_overwrite_callback), ! data); g_signal_connect_swapped(overwrite, "clicked", G_CALLBACK(gtk_widget_destroy), dialog); *************** *** 1076,1081 **** } ! void playlistwin_save_type_cb(gpointer cb_data, guint action, ! GtkWidget * w) { playlistwin_save_type = action; --- 1078,1083 ---- } ! void playlistwin_save_type_callback(gpointer cb_data, guint action, ! GtkWidget * w) { playlistwin_save_type = action; *************** *** 1725,1729 **** } ! void playlistwin_draw_frame(void) { gint w, h, y, i, c; --- 1727,1731 ---- } ! static void playlistwin_draw_frame(void) { gint w, h, y, i, c; *************** *** 1996,2000 **** } ! void playlistwin_close_cb(void) { playlistwin_show(FALSE); --- 1998,2002 ---- } ! static void playlistwin_close_callback(void) { playlistwin_show(FALSE); *************** *** 2026,2030 **** cfg.playlist_shaded ? 138 : 167, cfg.playlist_shaded ? 45 : 3, 52, 42, ! playlistwin_close_cb, SKIN_PLEDIT); playlistwin_close->pb_allow_draw = FALSE; playlistwin_list = --- 2028,2032 ---- cfg.playlist_shaded ? 138 : 167, cfg.playlist_shaded ? 45 : 3, 52, 42, ! playlistwin_close_callback, SKIN_PLEDIT); playlistwin_close->pb_allow_draw = FALSE; playlistwin_list = *************** *** 2349,2353 **** break; case CLOSE_PL_WINDOW: ! playlistwin_close_cb(); break; case MISC_FILEINFO: --- 2351,2355 ---- break; case CLOSE_PL_WINDOW: ! playlistwin_close_callback(); break; case MISC_FILEINFO: Index: prefswin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/prefswin.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** prefswin.c 26 Dec 2003 20:04:28 -0000 1.11 --- prefswin.c 27 Dec 2003 01:05:33 -0000 1.12 *************** *** 72,79 **** static GtkTooltips *prefswin_tooltips; ! GtkWidget *label_font; ! PangoFontDescription *playlist_list_font; ! GtkWidget *label_font_main; ! PangoFontDescription *mainwin_font; static gboolean is_opening = FALSE; --- 72,79 ---- static GtkTooltips *prefswin_tooltips; ! static GtkWidget *label_font; ! static PangoFontDescription *playlist_list_font; ! static GtkWidget *label_font_main; ! static PangoFontDescription *mainwin_font; static gboolean is_opening = FALSE; *************** *** 392,398 **** set_current_output_plugin(selected_oplugin); - - - equalizerwin_set_doublesize(cfg.doublesize --- 392,395 ---- |
From: <des...@us...> - 2003-12-26 23:59:42
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv11860/beep Modified Files: input.c input.h main.c playlist.c playlist.h playlist_list.c Log Message: - changed version number to 0.9.6.2 - fixed a few memory leaks with temp. g_build_filename() usage Index: input.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/input.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** input.c 26 Dec 2003 09:22:55 -0000 1.16 --- input.c 26 Dec 2003 23:59:38 -0000 1.17 *************** *** 333,340 **** ! gboolean input_check_file(gchar * filename, gboolean show_warning) { GList *node; InputPlugin *ip; node = get_input_list(); --- 333,343 ---- ! gboolean input_check_file(const gchar * filename_p, gboolean show_warning) { GList *node; InputPlugin *ip; + gchar *filename; + + filename = g_strdup(filename_p); node = get_input_list(); *************** *** 351,354 **** --- 354,359 ---- input_file_not_playable(filename); } + + g_free(filename); return FALSE; Index: input.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/input.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** input.h 26 Dec 2003 08:30:15 -0000 1.9 --- input.h 26 Dec 2003 23:59:38 -0000 1.10 *************** *** 33,37 **** void set_current_input_plugin(InputPlugin * ip); InputVisType input_get_vis_type(); ! gboolean input_check_file(gchar * filename, gboolean show_warning); void input_play(gchar * filename); void input_stop(void); --- 33,37 ---- void set_current_input_plugin(InputPlugin * ip); InputVisType input_get_vis_type(); ! gboolean input_check_file(const gchar * filename, gboolean show_warning); void input_play(gchar * filename); void input_stop(void); Index: main.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/main.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** main.c 26 Dec 2003 15:55:56 -0000 1.29 --- main.c 26 Dec 2003 23:59:38 -0000 1.30 *************** *** 25,31 **** #include <glib.h> #include <glib/gprintf.h> #include <stdlib.h> #include <string.h> - #include <gdk/gdk.h> #include <getopt.h> #include <ctype.h> --- 25,31 ---- #include <glib.h> #include <glib/gprintf.h> + #include <gdk/gdk.h> #include <stdlib.h> #include <string.h> #include <getopt.h> #include <ctype.h> *************** *** 82,87 **** /* For x11r5 session management */ ! static char **restart_argv; ! static int restart_argc; gboolean pposition_broken = FALSE; --- 82,87 ---- /* For x11r5 session management */ ! static gchar **restart_argv; ! static gint restart_argc; gboolean pposition_broken = FALSE; *************** *** 101,115 **** gchar *filename; ! filename = g_strconcat(g_get_home_dir(), "/", BMP_RCPATH, NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); filename = ! g_strconcat(g_get_home_dir(), "/", BMP_RCPATH, "/Skins", NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); filename = ! g_strconcat(g_get_home_dir(), "/", BMP_RCPATH, "/Plugins", NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); --- 101,115 ---- gchar *filename; ! filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); filename = ! g_build_filename(g_get_home_dir(), BMP_RCPATH, "Skins", NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); filename = ! g_build_filename(g_get_home_dir(), BMP_RCPATH, "Plugins", NULL); mkdir(filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); g_free(filename); *************** *** 402,413 **** d_iplist = disabled_iplugins; cfg.disabled_iplugins = ! g_strdup(g_basename ! (((InputPlugin *) d_iplist->data)->filename)); d_iplist = d_iplist->next; ! while (d_iplist != NULL) { temp = cfg.disabled_iplugins; cfg.disabled_iplugins = ! g_strconcat(temp, ",", ! g_basename(((InputPlugin *) d_iplist->data)-> filename), NULL); g_free(temp); --- 402,412 ---- d_iplist = disabled_iplugins; cfg.disabled_iplugins = ! g_path_get_basename(INPUT_PLUGIN(d_iplist->data)->filename); d_iplist = d_iplist->next; ! while (d_iplist) { temp = cfg.disabled_iplugins; cfg.disabled_iplugins = ! g_strconcat(cfg.disabled_iplugins, ",", ! g_basename(INPUT_PLUGIN(d_iplist->data)-> filename), NULL); g_free(temp); *************** *** 420,423 **** --- 419,424 ---- g_build_filename(g_get_home_dir(), BMP_RCPATH, "config", NULL); cfgfile = xmms_cfg_open_file(filename); + g_free(filename); + if (!cfgfile) cfgfile = xmms_cfg_new(); *************** *** 609,614 **** g_free(filename); ! playlist_save(g_build_filename ! (g_get_home_dir(), BMP_RCPATH, "bmp.m3u", NULL), FALSE); } --- 610,617 ---- g_free(filename); ! filename = ! g_build_filename(g_get_home_dir(), BMP_RCPATH, "bmp.m3u", NULL); ! playlist_save(filename, FALSE); ! g_free(filename); } *************** *** 757,762 **** filename = g_strdup(argv[i]); else { ! char *tmp = g_get_current_dir(); ! filename = g_strconcat(tmp, "/", argv[i], NULL); g_free(tmp); } --- 760,765 ---- filename = g_strdup(argv[i]); else { ! gchar *tmp = g_get_current_dir(); ! filename = g_build_filename(tmp, argv[i], NULL); g_free(tmp); } *************** *** 902,906 **** #endif ! static void enable_x11r5_session_management(int argc, char **argv) { /* --- 905,909 ---- #endif ! static void enable_x11r5_session_management(gint argc, gchar ** argv) { /* *************** *** 916,920 **** restart_argc = 1; ! restart_argv = g_malloc(sizeof(char *)); restart_argv[0] = g_strdup(argv[0]); --- 919,923 ---- restart_argc = 1; ! restart_argv = g_malloc(sizeof(gchar *)); restart_argv[0] = g_strdup(argv[0]); *************** *** 974,977 **** --- 977,982 ---- #endif + gchar *filename; + if (!gtk_init_check(&argc, &argv)) { if (argc < 2) { *************** *** 982,986 **** exit(0); } - #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); --- 987,990 ---- *************** *** 1063,1068 **** read_volume(VOLSET_STARTUP); ! playlist_load(g_build_filename ! (g_get_home_dir(), BMP_RCPATH, "bmp.m3u", NULL)); playlist_set_position(cfg.playlist_position); --- 1067,1074 ---- read_volume(VOLSET_STARTUP); ! filename = g_build_filename(g_get_home_dir(), BMP_RCPATH, "bmp.m3u", ! NULL); ! playlist_load(filename); ! g_free(filename); playlist_set_position(cfg.playlist_position); Index: playlist.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** playlist.c 26 Dec 2003 09:22:55 -0000 1.25 --- playlist.c 26 Dec 2003 23:59:38 -0000 1.26 *************** *** 65,73 **** static int playlist_sort_str_by_path_cmpfunc(gconstpointer a, gconstpointer b); ! static guint playlist_load_ins(gchar * filename, glong pos); ! static void playlist_load_ins_file(gchar * filename, gchar * playlist_name, ! glong pos, gchar * title, gint len); static void playlist_generate_shuffle_list(void); ! static void __playlist_generate_shuffle_list(void); void playlist_clear_selected(void); --- 65,74 ---- static int playlist_sort_str_by_path_cmpfunc(gconstpointer a, gconstpointer b); ! static guint playlist_load_ins(const gchar * filename, glong pos); ! static void playlist_load_ins_file(const gchar * filename, ! const gchar * playlist_name, glong pos, ! gchar * title, gint len); static void playlist_generate_shuffle_list(void); ! static void playlist_generate_shuffle_list_nolock(void); void playlist_clear_selected(void); *************** *** 327,331 **** ! gboolean playlist_ins(gchar * filename, glong pos) { gboolean ispl = FALSE; --- 328,332 ---- ! gboolean playlist_ins(const gchar * filename, glong pos) { gboolean ispl = FALSE; *************** *** 397,401 **** } ! static GList *playlist_dir_find_files(gchar * path, gboolean background, GHashTable * htab) { --- 398,403 ---- } ! static GList *playlist_dir_find_files(const gchar * path, ! gboolean background, GHashTable * htab) { *************** *** 692,696 **** else if (cfg.repeat) { playlist_position = NULL; ! __playlist_generate_shuffle_list(); if (cfg.shuffle) playlist_position = shuffle_list->data; --- 694,698 ---- else if (cfg.repeat) { playlist_position = NULL; ! playlist_generate_shuffle_list_nolock(); if (cfg.shuffle) playlist_position = shuffle_list->data; *************** *** 741,745 **** GList *node; playlist_position = NULL; ! __playlist_generate_shuffle_list(); if (cfg.shuffle) node = g_list_last(shuffle_list); --- 743,747 ---- GList *node; playlist_position = NULL; ! playlist_generate_shuffle_list_nolock(); if (cfg.shuffle) node = g_list_last(shuffle_list); *************** *** 896,900 **** if (cfg.shuffle) { playlist_position = NULL; ! __playlist_generate_shuffle_list(); } else playlist_position = playlist->data; --- 898,902 ---- if (cfg.shuffle) { playlist_position = NULL; ! playlist_generate_shuffle_list_nolock(); } else playlist_position = playlist->data; *************** *** 1010,1014 **** if (is_pls) { - is_pls = TRUE; g_fprintf(file, "[playlist]\n"); g_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length()); --- 1012,1015 ---- *************** *** 1025,1029 **** else { if (entry->title && cfg.use_pl_metadata) { ! int seconds; if (entry->length > 0) --- 1026,1030 ---- else { if (entry->title && cfg.use_pl_metadata) { ! gint seconds; if (entry->length > 0) *************** *** 1047,1056 **** } ! static void playlist_load_ins_file(gchar * filename, gchar * playlist_name, ! glong pos, gchar * title, gint len) { gchar *temp, *path; ! filename = g_strstrip(filename); if (cfg.use_backslash_as_dir_delimiter) { --- 1048,1059 ---- } ! static void playlist_load_ins_file(const gchar * filename_p, ! const gchar * playlist_name, glong pos, ! gchar * title, gint len) { + gchar *filename; gchar *temp, *path; ! filename = g_strstrip(g_strdup(filename_p)); if (cfg.use_backslash_as_dir_delimiter) { *************** *** 1074,1077 **** --- 1077,1082 ---- } else __playlist_ins_with_info(filename, pos, title, len); + + g_free(filename); } *************** *** 1079,1083 **** gint * length) { ! char *str; *title = NULL; --- 1084,1088 ---- gint * length) { ! gchar *str; *title = NULL; *************** *** 1104,1108 **** } ! static guint playlist_load_ins(gchar * filename, glong pos) { FILE *file; --- 1109,1113 ---- } ! static guint playlist_load_ins(const gchar * filename, glong pos) { FILE *file; *************** *** 1116,1124 **** ext = strrchr(filename, '.'); if (ext && !strcasecmp(ext, ".pls")) { ! int noe, i; ! char key[10]; line = read_ini_string(filename, "playlist", "NumberOfEntries"); ! if (line == NULL) return 0; --- 1121,1129 ---- ext = strrchr(filename, '.'); if (ext && !strcasecmp(ext, ".pls")) { ! gint noe, i; ! gchar key[10]; line = read_ini_string(filename, "playlist", "NumberOfEntries"); ! if (!line) return 0; *************** *** 1127,1131 **** for (i = 1; i <= noe; i++) { ! g_snprintf(key, 10, "File%d", i); line = read_ini_string(filename, "playlist", key); if (line != NULL) { --- 1132,1136 ---- for (i = 1; i <= noe; i++) { ! g_snprintf(key, sizeof(key), "File%d", i); line = read_ini_string(filename, "playlist", key); if (line != NULL) { *************** *** 1207,1215 **** if (g_ascii_strcasecmp(filename, "xmms.m3u")) { playlist_set_current_name(NULL); ! } ! ! else { playlist_set_current_name(filename); - } --- 1212,1217 ---- if (g_ascii_strcasecmp(filename, "xmms.m3u")) { playlist_set_current_name(NULL); ! } else { playlist_set_current_name(filename); } *************** *** 1624,1635 **** { GList *node = NULL; ! int i = 0; ! // PLAYLIST_LOCK(); for (node = playlist_get(); node != 0; node = g_list_next(node), i++) { ! PlaylistEntry *entry = node->data; ! entry->selected = FALSE; } ! // PLAYLIST_UNLOCK(); } --- 1626,1636 ---- { GList *node = NULL; ! gint i = 0; ! PLAYLIST_LOCK(); for (node = playlist_get(); node != 0; node = g_list_next(node), i++) { ! PLAYLIST_ENTRY(node->data)->selected = FALSE; } ! PLAYLIST_UNLOCK(); } *************** *** 1639,1643 **** { GList *node; ! int num = 0; PLAYLIST_LOCK(); --- 1640,1644 ---- { GList *node; ! gint num = 0; PLAYLIST_LOCK(); *************** *** 1655,1663 **** { PLAYLIST_LOCK(); ! __playlist_generate_shuffle_list(); PLAYLIST_UNLOCK(); } ! static void __playlist_generate_shuffle_list(void) { /* Caller should hold playlist mutex */ --- 1656,1664 ---- { PLAYLIST_LOCK(); ! playlist_generate_shuffle_list_nolock(); PLAYLIST_UNLOCK(); } ! static void playlist_generate_shuffle_list_nolock(void) { /* Caller should hold playlist mutex */ *************** *** 2059,2063 **** PLAYLIST_LOCK(); cfg.shuffle = shuffle; ! __playlist_generate_shuffle_list(); PLAYLIST_UNLOCK(); } --- 2060,2064 ---- PLAYLIST_LOCK(); cfg.shuffle = shuffle; ! playlist_generate_shuffle_list_nolock(); PLAYLIST_UNLOCK(); } Index: playlist.h =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** playlist.h 26 Dec 2003 09:22:55 -0000 1.12 --- playlist.h 26 Dec 2003 23:59:38 -0000 1.13 *************** *** 35,39 **** /* void playlist_add(gchar * filename); */ #define playlist_add(filename) playlist_ins(filename, -1) ! gboolean playlist_ins(gchar * filename, glong pos); /* void playlist_add_dir(gchar * dir); */ #define playlist_add_dir(directory) playlist_ins_dir(directory, -1, TRUE) --- 35,39 ---- /* void playlist_add(gchar * filename); */ #define playlist_add(filename) playlist_ins(filename, -1) ! gboolean playlist_ins(const gchar * filename, glong pos); /* void playlist_add_dir(gchar * dir); */ #define playlist_add_dir(directory) playlist_ins_dir(directory, -1, TRUE) Index: playlist_list.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist_list.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** playlist_list.c 26 Dec 2003 21:19:24 -0000 1.18 --- playlist_list.c 26 Dec 2003 23:59:38 -0000 1.19 *************** *** 39,43 **** #include "playlist_list.h" ! #include <X11/Xatom.h> #include "main.h" --- 39,44 ---- #include "playlist_list.h" ! #include <stdlib.h> ! #include <string.h> #include "main.h" *************** *** 47,63 **** #include "util.h" ! PangoFontDescription *playlist_list_font = NULL; ! guint ascent, descent, width_delta_digit_one; ! gboolean has_slant; - // I know this is possible with pango_font_metrics_get_approximate_char_width(), - // but at this point of time i simply don't know how to use that. I had to work - // from include files only since i have no internet conn. at home. I'll check into - // it as soon as possible and fix it, but i needed something to work with. ! guint width_approx_letters; ! guint width_colon, width_colon_third; ! guint width_approx_digits, width_approx_digits_half; static gint playlist_list_auto_drag_down_func(gpointer data) --- 48,62 ---- #include "util.h" ! #include <X11/Xatom.h> + static PangoFontDescription *playlist_list_font = NULL; + static guint ascent, descent, width_delta_digit_one; + static gboolean has_slant; ! /* FIXME: the following globals should not be needed. */ ! static guint width_approx_letters; ! static guint width_colon, width_colon_third; ! static guint width_approx_digits, width_approx_digits_half; static gint playlist_list_auto_drag_down_func(gpointer data) *************** *** 293,297 **** if (cfg.show_numbers_in_pl) { ! gchar *pos_string = g_strdup_printf("%d", ppos); plist_length_int = gint_count_digits(playlist_get_length_nolock()) + 1; --- 292,296 ---- if (cfg.show_numbers_in_pl) { ! gchar *pos_string = g_strdup_printf("%d", ppos); plist_length_int = gint_count_digits(playlist_get_length_nolock()) + 1; *************** *** 335,339 **** pango_layout_set_font_description(layout, playlist_list_font); gdk_draw_layout(pl->pl_widget.parent, pl->pl_widget.gc, ! pl->pl_widget.x + padding + width_approx_letters , pl->pl_widget.y + (line - 1) * pl->pl_fheight + ascent + abs(descent), layout); --- 334,338 ---- pango_layout_set_font_description(layout, playlist_list_font); gdk_draw_layout(pl->pl_widget.parent, pl->pl_widget.gc, ! pl->pl_widget.x + padding + width_approx_letters, pl->pl_widget.y + (line - 1) * pl->pl_fheight + ascent + abs(descent), layout); *************** *** 623,627 **** PlayList_List *pl; ! pl = (PlayList_List *) g_malloc0(sizeof(PlayList_List)); pl->pl_widget.parent = parent; pl->pl_widget.gc = gc; --- 622,626 ---- PlayList_List *pl; ! pl = PLAYLIST_LIST(g_malloc0(sizeof(PlayList_List))); pl->pl_widget.parent = parent; pl->pl_widget.gc = gc; |
From: <des...@us...> - 2003-12-26 23:59:41
|
Update of /cvsroot/beepmp/bmp In directory sc8-pr-cvs1:/tmp/cvs-serv11860 Modified Files: configure.in Log Message: - changed version number to 0.9.6.2 - fixed a few memory leaks with temp. g_build_filename() usage Index: configure.in =================================================================== RCS file: /cvsroot/beepmp/bmp/configure.in,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** configure.in 26 Dec 2003 08:48:04 -0000 1.15 --- configure.in 26 Dec 2003 23:59:38 -0000 1.16 *************** *** 2,6 **** AC_INIT(beep/main.c) ! VERSION=0.9.7 PACKAGE=bmp AM_INIT_AUTOMAKE($PACKAGE, $VERSION) --- 2,6 ---- AC_INIT(beep/main.c) ! VERSION=0.9.6.1 PACKAGE=bmp AM_INIT_AUTOMAKE($PACKAGE, $VERSION) |
From: <mde...@us...> - 2003-12-26 21:19:28
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv21005/beep Modified Files: mainwin.c playlist_list.c Log Message: Fixed JTF treeview needs focus for enter keypress to have an effect (now also works when the GtkEntry has focus) Index: mainwin.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/mainwin.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mainwin.c 26 Dec 2003 09:22:55 -0000 1.10 --- mainwin.c 26 Dec 2003 21:19:24 -0000 1.11 *************** *** 1228,1231 **** --- 1228,1232 ---- } + static gboolean mainwin_jump_to_file_keypress_cb(GtkWidget * widget, GdkEventKey * event, *************** *** 1235,1240 **** gtk_widget_destroy(mainwin_jtf); return TRUE; ! } else ! return FALSE; } --- 1236,1272 ---- gtk_widget_destroy(mainwin_jtf); return TRUE; ! }; ! ! if (event && (event->keyval == GDK_Return)) { ! ! GtkTreeIter iter; ! gchar *pos; ! gint64 pos_gint = -1; ! ! GtkTreeModel *model; ! ! model = gtk_tree_view_get_model(userdata); ! if (gtk_tree_model_get_iter_first(model, &iter)) { ! ! gtk_tree_model_get(model, &iter, 0, &pos, -1); ! ! // This *is* kinda retarded, yeah.. ! // FIXME: The whole column should be integer not text ! pos_gint = g_ascii_strtoull(pos, NULL, 10); ! ! if (pos_gint >= 0) { ! if (get_input_playing()) { ! input_stop(); ! } ! playlist_set_position(pos_gint - 1); ! playlist_play(); ! } ! } ! ! return TRUE; ! }; ! ! ! return FALSE; } *************** *** 1534,1538 **** G_CALLBACK(mainwin_jump_to_file_real_cb), treeview); g_signal_connect(G_OBJECT(mainwin_jtf), "key_press_event", ! G_CALLBACK(mainwin_jump_to_file_keypress_cb), NULL); gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 3); --- 1566,1570 ---- G_CALLBACK(mainwin_jump_to_file_real_cb), treeview); g_signal_connect(G_OBJECT(mainwin_jtf), "key_press_event", ! G_CALLBACK(mainwin_jump_to_file_keypress_cb), treeview); gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 3); Index: playlist_list.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist_list.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** playlist_list.c 26 Dec 2003 15:47:45 -0000 1.17 --- playlist_list.c 26 Dec 2003 21:19:24 -0000 1.18 *************** *** 40,44 **** #include <X11/Xatom.h> - #include <pango/pangoft2.h> #include "main.h" --- 40,43 ---- *************** *** 294,298 **** if (cfg.show_numbers_in_pl) { ! gchar *pos_string = g_strdup_printf("%d", ppos); plist_length_int = gint_count_digits(playlist_get_length_nolock()) + 1; --- 293,297 ---- if (cfg.show_numbers_in_pl) { ! gchar *pos_string = g_strdup_printf("%d", ppos); plist_length_int = gint_count_digits(playlist_get_length_nolock()) + 1; *************** *** 336,340 **** pango_layout_set_font_description(layout, playlist_list_font); gdk_draw_layout(pl->pl_widget.parent, pl->pl_widget.gc, ! pl->pl_widget.x + padding, pl->pl_widget.y + (line - 1) * pl->pl_fheight + ascent + abs(descent), layout); --- 335,339 ---- pango_layout_set_font_description(layout, playlist_list_font); gdk_draw_layout(pl->pl_widget.parent, pl->pl_widget.gc, ! pl->pl_widget.x + padding + width_approx_letters , pl->pl_widget.y + (line - 1) * pl->pl_fheight + ascent + abs(descent), layout); |
From: <des...@us...> - 2003-12-26 20:16:35
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv11165/beep Modified Files: dirbrowser.c Log Message: - added translatable strings for dirbrowser - plugged some more leaks in dirbrowser Index: dirbrowser.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/dirbrowser.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dirbrowser.c 26 Dec 2003 20:04:28 -0000 1.18 --- dirbrowser.c 26 Dec 2003 20:16:02 -0000 1.19 *************** *** 294,298 **** if (!value) ! return g_strdup("(unknown)"); tmp = g_strstrip(g_strdup(value)); --- 294,299 ---- if (!value) ! /* tag field unknown */ ! return g_strdup(_("(unknown)")); tmp = g_strstrip(g_strdup(value)); *************** *** 924,930 **** node->path_real = dir; ! gtk_label_set_text(variable, ! g_strconcat("Choose a Name for:\n", name, ! NULL)); gtk_dialog_run(GTK_DIALOG(dialog)); node->name = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); --- 925,932 ---- node->path_real = dir; ! gchar *tmp = g_strconcat(_("Choose a Name for:\n"), name, NULL); ! gtk_label_set_text(variable, tmp); ! g_free(tmp); ! gtk_dialog_run(GTK_DIALOG(dialog)); node->name = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); *************** *** 1428,1432 **** window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(window), "bmp :: Add Files..."); gtk_container_set_border_width(GTK_CONTAINER(window), 8); gtk_window_set_destroy_with_parent(GTK_WINDOW(window), TRUE); --- 1430,1434 ---- window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(window), _("bmp :: Add Files...")); gtk_container_set_border_width(GTK_CONTAINER(window), 8); gtk_window_set_destroy_with_parent(GTK_WINDOW(window), TRUE); *************** *** 1443,1447 **** pango_attr_list_insert(attrs, attr); ! label_header = gtk_label_new("Filesystem:"); gtk_label_set_attributes(GTK_LABEL(label_header), attrs); gtk_misc_set_alignment(GTK_MISC(label_header), 0.0, 0.0); --- 1445,1449 ---- pango_attr_list_insert(attrs, attr); ! label_header = gtk_label_new(_("Filesystem:")); gtk_label_set_attributes(GTK_LABEL(label_header), attrs); gtk_misc_set_alignment(GTK_MISC(label_header), 0.0, 0.0); *************** *** 1506,1509 **** --- 1508,1512 ---- gtk_container_add(GTK_CONTAINER(sw_right), fstore); + g_list_foreach(paths, (GFunc) g_free, NULL); g_list_free(paths); *************** *** 1553,1562 **** data[1] = GDK_WINDOW_XWINDOW(mask); ! icon_atom = gdk_atom_intern((const gchar *) "KWM_WIN_ICON", FALSE); gdk_property_change(win->window, icon_atom, icon_atom, 32, GDK_PROP_MODE_REPLACE, (guchar *) data, 2); gdk_window_set_icon(win->window, NULL, icon, mask); ! gdk_window_set_icon_name(win->window, "bmp: Add Files..."); ! gdk_window_set_title(win->window, "bmp: Add Files..."); gdk_window_set_group(win->window, mainwin->window); } --- 1556,1565 ---- data[1] = GDK_WINDOW_XWINDOW(mask); ! icon_atom = gdk_atom_intern("KWM_WIN_ICON", FALSE); gdk_property_change(win->window, icon_atom, icon_atom, 32, GDK_PROP_MODE_REPLACE, (guchar *) data, 2); gdk_window_set_icon(win->window, NULL, icon, mask); ! gdk_window_set_icon_name(win->window, _("bmp :: Add Files...")); ! gdk_window_set_title(win->window, _("bmp :: Add Files...")); gdk_window_set_group(win->window, mainwin->window); } |