Your message dated Fri, 18 Oct 2019 04:23:38 +0000
with message-id <e1iljne-000co3...@fasolo.debian.org>
and subject line Bug#936210: Removed package(s) from unstable
has caused the Debian Bug report #252773,
regarding btdownloadgui: does not remember previous download location
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
252773: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252773
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: bittorrent
Version: 3.4.2-1
Severity: wishlist

*** Please type your report below this line ***
When btdownloadgui starts, the first thing it does is bring up a file
selection dialog and ask the user to choose where to put the downloaded
file.  It always opens in the user's home directory.  This gets annoying
during frequent use, if your target download directory is somewhere
else.

It would make more sense for btdownloadgui to remember the previous
download directory, and default to open there next time.

Attached is a patch to implement this.  It creates a file called
.btdownloadgui in the current working directory (usually the user's home
directory) and stores chosen directory in that file, to be re-read next
time.  It has been tested on Sarge only.


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.4-ck1
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C)
12a13,14
> import os
> 
30a33,84
> config_filename=".btdownloadgui"
> config_defaults = { "default_dir" : getcwd() }
> config = config_defaults.copy();
> 
> def read_config_file():
> 
>     # Check if the config file exists
>     filename = getcwd() + os.sep + config_filename
>     if not os.access(filename, os.R_OK):
>         return
>         
>     # Parse the config file
>     input = open(filename)
>     lines = input.readlines()
>     line_number=0
>     for line in lines:
>         line_number+=1
>         line = line.strip() 
> 
>         # check for bad line
>         if "=" not in line:
>             raise "Error: Config file line %s: no =" % (line_number)
> 
>         # set variable to config file's value
>         name, val = line.split("=",2)
>         if name in config:
>             config[name] = val
> 
> def write_config_file():
>     filename = getcwd() + os.sep + config_filename
> 
>     # Create the config file text
>     lines = []
>     for varname in config.iterkeys():
>         if config[varname] != config_defaults[varname]:
>             lines.append( "%s=%s\n" % (varname, config[varname] ) ) 
> 
>     # Write to the config file, if necessary
>     if os.access(filename, os.W_OK):
>         os.unlink(filename)
>     if len(lines) == 0:
>         return
>     output = open(filename,"w")
>     for line in lines:
>         output.write(line) 
>     output.close()
> 
> 
235c289
<                     join(getcwd(), default), style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
---
>                     join(config["default_dir"], default), style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
237c291,297
<                 dl = wxFileDialog(self.frame, 'Choose file to save as, pick a partial download to resume', '', default, '*', wxSAVE)
---
>                 dl = wxFileDialog(
>                     self.frame, 
>                     'Choose file to save as, pick a partial download to resume', 
>                     config["default_dir"], 
>                     default, 
>                     '*', 
>                     wxSAVE)
242a303
>             config["default_dir"] = os.path.dirname( dl.GetPath() )
275,278c336,343
<         app = btWxApp(0, params)
<         app.MainLoop()
<     except:
<         print_exc()
---
>         try:
>             read_config_file()
>             app = btWxApp(0, params)
>             app.MainLoop()
>         except:
>             print_exc()
>     finally:
>         write_config_file()

--- End Message ---
--- Begin Message ---
Version: 3.4.2-12+rm

Dear submitter,

as the package bittorrent has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/936210

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmas...@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to