Mercurial > audlegacy
changeset 893:6afdd0d7e1e1 trunk
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
author | nemo |
---|---|
date | Wed, 29 Mar 2006 07:35:54 -0800 |
parents | 5e30566ad776 |
children | 12feaeb5ad5b |
files | audacious/glade/prefswin.glade audacious/main.c audacious/main.h audacious/prefswin.c audacious/util.c |
diffstat | 5 files changed, 102 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ </child> <child> + <widget class="GtkAlignment" id="alignment19"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">12</property> + <property name="bottom_padding">12</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkLabel" id="label40"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>File Dialog</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkAlignment" id="alignment20"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkCheckButton" id="refresh_file_list"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Always refresh the file dialog (this will slow opening the dialog on large directories, and Gnome VFS should handle automatically).</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Always refresh directory when opening file dialog, should be unneeded with Gnome VFS.</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="realize" handler="on_refresh_file_list_realize" after="yes" last_modification_time="Tue, 28 Mar 2006 14:55:55 GMT"/> + <signal name="toggled" handler="on_refresh_file_list_toggled" last_modification_time="Tue, 28 Mar 2006 14:55:55 GMT"/> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> <widget class="GtkAlignment" id="alignment55"> <property name="visible">True</property> <property name="xalign">0.5</property>
--- 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},
--- 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;
--- 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)
--- 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) {