# HG changeset patch # User chainsaw # Date 1164833102 28800 # Node ID d3a62e1075e27c741a59bdefacc223242eb214c8 # Parent 58ea18909fe77de3aaac35a181cfec4785301e6e [svn] Allow \ to / conversion to be switched on & off, by external contributor Chris Kehler . diff -r 58ea18909fe7 -r d3a62e1075e2 ChangeLog --- a/ChangeLog Tue Nov 28 12:06:18 2006 -0800 +++ b/ChangeLog Wed Nov 29 12:45:02 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-28 20:06:18 +0000 William Pitcock + revision [3031] + - MirBSD support from + + trunk/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + 2006-11-28 02:12:56 +0000 William Pitcock revision [3029] - avoid a race condition in produce_audio() where we have closed output, diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/glade/prefswin.glade --- a/audacious/glade/prefswin.glade Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/glade/prefswin.glade Wed Nov 29 12:45:02 2006 -0800 @@ -1790,6 +1790,41 @@ + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + True + Convert forward slash '\' to backslash '/' + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + 0 + False + False + + + + True 0.5 diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/main.c --- a/audacious/main.c Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/main.c Wed Nov 29 12:45:02 2006 -0800 @@ -127,7 +127,7 @@ FALSE, /* equalizer shaded */ FALSE, /* allow multiple instances */ TRUE, /* always show cb */ - TRUE, TRUE, /* convert '_' and %20 */ + TRUE, TRUE, TRUE, /* convert '_', %20 and '\' */ TRUE, /* show numbers in playlist */ TRUE, /* snap windows */ TRUE, /* save window positions */ @@ -257,6 +257,7 @@ {"always_show_cb", &cfg.always_show_cb, TRUE}, {"convert_underscore", &cfg.convert_underscore, TRUE}, {"convert_twenty", &cfg.convert_twenty, TRUE}, + {"convert_slash", &cfg.convert_slash, TRUE }, {"show_numbers_in_pl", &cfg.show_numbers_in_pl, TRUE}, {"show_separator_in_pl", &cfg.show_separator_in_pl, TRUE}, {"snap_windows", &cfg.snap_windows, TRUE}, diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/main.h --- a/audacious/main.h Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/main.h Wed Nov 29 12:45:02 2006 -0800 @@ -62,7 +62,7 @@ gboolean playlist_visible, equalizer_visible, player_visible; gboolean player_shaded, playlist_shaded, equalizer_shaded; gboolean allow_multiple_instances, always_show_cb; - gboolean convert_underscore, convert_twenty; + gboolean convert_underscore, convert_twenty, convert_slash; gboolean show_numbers_in_pl; gboolean snap_windows, save_window_position; gboolean dim_titlebar; diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/playlist.c --- a/audacious/playlist.c Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/playlist.c Wed Nov 29 12:45:02 2006 -0800 @@ -1354,6 +1354,7 @@ filename = g_strchug(g_strdup(filename_p)); + if(cfg.convert_slash) while ((tmp = strchr(filename, '\\')) != NULL) *tmp = '/'; diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/prefswin.c --- a/audacious/prefswin.c Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/prefswin.c Wed Nov 29 12:45:02 2006 -0800 @@ -1588,6 +1588,18 @@ cfg.convert_twenty = gtk_toggle_button_get_active(button); } +static void +on_playlist_convert_slash_realize(GtkToggleButton * button, gpointer data) +{ + gtk_toggle_button_set_active(button, cfg.convert_slash); +} + +static void +on_playlist_convert_slash_toggled(GtkToggleButton * button, gpointer data) +{ + cfg.convert_slash = gtk_toggle_button_get_active(button); +} + #if 0 static void on_playlist_update_clicked(GtkButton * button, @@ -2169,6 +2181,8 @@ FUNC_MAP_ENTRY(on_playlist_convert_twenty_toggled) FUNC_MAP_ENTRY(on_playlist_convert_underscore_realize) FUNC_MAP_ENTRY(on_playlist_convert_underscore_toggled) + FUNC_MAP_ENTRY(on_playlist_convert_slash_realize) + FUNC_MAP_ENTRY(on_playlist_convert_slash_toggled) FUNC_MAP_ENTRY(on_playlist_font_button_realize) FUNC_MAP_ENTRY(on_playlist_font_button_font_set) FUNC_MAP_ENTRY(on_playlist_no_advance_realize) diff -r 58ea18909fe7 -r d3a62e1075e2 audacious/util.c --- a/audacious/util.c Tue Nov 28 12:06:18 2006 -0800 +++ b/audacious/util.c Wed Nov 29 12:45:02 2006 -0800 @@ -1573,6 +1573,9 @@ { g_return_val_if_fail(title != NULL, NULL); + if (cfg.convert_slash) + str_replace_char(title, '\\', '/'); + if (cfg.convert_underscore) str_replace_char(title, '_', ' ');