# HG changeset patch # User nemo # Date 1143646554 28800 # Node ID 6afdd0d7e1e13991738a7ddf6825be80ae5674de # Parent 5e30566ad776e02582e4fc78df6a26d337553197 [svn] Make refreshing optional, default to disabled if Gnome VFS available. diff -r 5e30566ad776 -r 6afdd0d7e1e1 audacious/glade/prefswin.glade --- a/audacious/glade/prefswin.glade Tue Mar 28 20:11:34 2006 -0800 +++ b/audacious/glade/prefswin.glade Wed Mar 29 07:35:54 2006 -0800 @@ -2365,6 +2365,81 @@ + + True + 0.5 + 0.5 + 1 + 1 + 12 + 12 + 0 + 0 + + + + True + <b>File Dialog</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + Always refresh the file dialog (this will slow opening the dialog on large directories, and Gnome VFS should handle automatically). + True + Always refresh directory when opening file dialog, should be unneeded with Gnome VFS. + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + 0 + False + False + + + + True 0.5 diff -r 5e30566ad776 -r 6afdd0d7e1e1 audacious/main.c --- a/audacious/main.c Tue Mar 28 20:11:34 2006 -0800 +++ b/audacious/main.c Wed Mar 29 07:35:54 2006 -0800 @@ -141,6 +141,11 @@ FALSE, /* always on top */ FALSE, /* sticky */ FALSE, /* no playlist advance */ +#ifdef HAVE_GNOME_VFS + FALSE, /* refresh file list - should be unneeded with VFS */ +#else + TRUE, /* refresh file list */ +#endif TRUE, /* UNUSED (smooth title scrolling) */ TRUE, /* use playlist metadata */ TRUE, /* warn about unplayables */ @@ -230,6 +235,7 @@ {"get_info_on_load", &cfg.get_info_on_load, TRUE}, {"get_info_on_demand", &cfg.get_info_on_demand, TRUE}, {"no_playlist_advance", &cfg.no_playlist_advance, TRUE}, + {"refresh_file_list", &cfg.refresh_file_list, TRUE}, {"sort_jump_to_file", &cfg.sort_jump_to_file, TRUE}, {"use_pl_metadata", &cfg.use_pl_metadata, TRUE}, {"warn_about_unplayables", &cfg.warn_about_unplayables, TRUE}, diff -r 5e30566ad776 -r 6afdd0d7e1e1 audacious/main.h --- a/audacious/main.h Tue Mar 28 20:11:34 2006 -0800 +++ b/audacious/main.h Wed Mar 29 07:35:54 2006 -0800 @@ -64,6 +64,7 @@ gboolean use_eplugins; gboolean always_on_top, sticky; gboolean no_playlist_advance; + gboolean refresh_file_list; gboolean smooth_title_scroll; gboolean use_pl_metadata; gboolean warn_about_unplayables; diff -r 5e30566ad776 -r 6afdd0d7e1e1 audacious/prefswin.c --- a/audacious/prefswin.c Tue Mar 28 20:11:34 2006 -0800 +++ b/audacious/prefswin.c Wed Mar 29 07:35:54 2006 -0800 @@ -1287,6 +1287,18 @@ } static void +on_refresh_file_list_realize(GtkToggleButton * button, gpointer data) +{ + gtk_toggle_button_set_active(button, cfg.refresh_file_list); +} + +static void +on_refresh_file_list_toggled(GtkToggleButton * button, gpointer data) +{ + cfg.refresh_file_list = gtk_toggle_button_get_active(button); +} + +static void on_playlist_convert_twenty_realize(GtkToggleButton * button, gpointer data) { gtk_toggle_button_set_active(button, cfg.convert_twenty); @@ -1650,6 +1662,8 @@ FUNC_MAP_ENTRY(on_playlist_font_button_font_set) FUNC_MAP_ENTRY(on_playlist_no_advance_realize) FUNC_MAP_ENTRY(on_playlist_no_advance_toggled) + FUNC_MAP_ENTRY(on_refresh_file_list_realize) + FUNC_MAP_ENTRY(on_refresh_file_list_toggled) FUNC_MAP_ENTRY(on_skin_view_visibility_notify) FUNC_MAP_ENTRY(on_titlestring_entry_realize) FUNC_MAP_ENTRY(on_titlestring_entry_changed) diff -r 5e30566ad776 -r 6afdd0d7e1e1 audacious/util.c --- a/audacious/util.c Tue Mar 28 20:11:34 2006 -0800 +++ b/audacious/util.c Wed Mar 29 07:35:54 2006 -0800 @@ -972,8 +972,12 @@ g_signal_handler_disconnect(chooser, handlerid_activate); g_signal_handler_disconnect(button_add, handlerid_do); g_signal_handler_disconnect(chooser, handlerid_do_activate); - // *sigh* force a refresh - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser),gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser))); +#ifndef HAVE_GNOME_VFS + if (cfg.refresh_file_list) { + // *sigh* force a refresh + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser),gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser))); + } +#endif } if (play_button) {