mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
Fix unintentional change in the add dialog default directory.
This commit is contained in:
parent
67826df085
commit
930fa86d0e
1 changed files with 6 additions and 2 deletions
|
@ -121,6 +121,7 @@ makeaddwind(GtkWindow *parent, add_torrents_func_t addfunc, void *cbdata) {
|
||||||
GtkFileFilter *unfilter = gtk_file_filter_new();
|
GtkFileFilter *unfilter = gtk_file_filter_new();
|
||||||
GtkWidget *getdir = gtk_file_chooser_button_new(
|
GtkWidget *getdir = gtk_file_chooser_button_new(
|
||||||
_("Choose a download directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
_("Choose a download directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||||
|
const char * pref;
|
||||||
|
|
||||||
data->addfunc = addfunc;
|
data->addfunc = addfunc;
|
||||||
data->data = cbdata;
|
data->data = cbdata;
|
||||||
|
@ -137,8 +138,11 @@ makeaddwind(GtkWindow *parent, add_torrents_func_t addfunc, void *cbdata) {
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(vbox), bbox);
|
gtk_box_pack_start_defaults(GTK_BOX(vbox), bbox);
|
||||||
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(autocheck), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(autocheck), TRUE);
|
||||||
gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER( getdir ),
|
pref = tr_prefs_get( PREF_ID_DIR );
|
||||||
getdownloaddir() );
|
if( NULL != pref )
|
||||||
|
{
|
||||||
|
gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER( getdir ), pref );
|
||||||
|
}
|
||||||
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dircheck), FALSE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dircheck), FALSE);
|
||||||
gtk_widget_set_sensitive(getdir, FALSE);
|
gtk_widget_set_sensitive(getdir, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue