Merge lp://staging/~lottanzb/lottanzb/download-properties into lp://staging/lottanzb

Proposed by Marcel de Vries
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~lottanzb/lottanzb/download-properties
Merge into: lp://staging/lottanzb
Diff against target: 1011 lines (+837/-20)
8 files modified
data/ui/main_window.ui (+25/-2)
data/ui/properties_dialog.ui (+500/-0)
lottanzb/backend/hubs/general.py (+33/-2)
lottanzb/backend/interface/queries.py (+1/-0)
lottanzb/core/constants.py (+20/-1)
lottanzb/gui/download_properties.py (+213/-0)
lottanzb/gui/main.py (+26/-15)
lottanzb/util/misc.py (+19/-0)
To merge this branch: bzr merge lp://staging/~lottanzb/lottanzb/download-properties
Reviewer Review Type Date Requested Status
LottaNZB Development Team Pending
Review via email: mp+19126@code.staging.launchpad.net
To post a comment you must log in.
973. By Marcel de Vries

Synced with lp:lottanzb

Revision history for this message
Severin H (severinh) wrote :

Gave it a try and it works without a hitch. Great work! It looks like you've also added some useful methods to the backend.hubs.general module.

Some random comments:

- GtkAction "show_properties_dialog" should be translatable (it's probably Glade's fault).
- Priority strings should also be translatable ("Force", etc.).
- Priority strings could be moved to lottanzb.constants, similar to DownloadStatus.to_pretty_string. We'll probably need them elsewhere too.
- gobject.TYPE_STRING can be replaced by a simple str.
- Many if blocks in the update method are nearly identical. It might be possible to use some fancy for loop there.
- What about displaying "unknown" if ETA is None (None won't be translated anyway)?
- TimeDelta objects (duration) have a property "short" that produces a (more or less) pretty string representation.
- "Downloaded:" field could be streamlined a bit when the download is complete. Currently, it's set to something like "1.19 GiB / 1.19 GiB (100%)". Call it "Size:" instead for completed downloads? Not sure about that.
- "Storage path:" field can be quite long and bloat the window. Not sure how to tackle that. When connected to a local instance of SABnzbd, it would be desirable to provide a button that directly opens the storage path.

974. By Marcel de Vries

Renamed function hide_labels to hide_widget. Replaced
label 'Storage Path:' with 'Open folder' button and
added label 'Size:'.

975. By Marcel de Vries

Moved priority strings to lottanzb.core.constats. Also made them
translatable and modified DownloadStatus.to_pretty_string into
Priority.to_pretty_string.

Replaced the priority strings in lottanzb/gui/download_properties.py
with Priority.to_pretty_string.

976. By Marcel de Vries

Added wlist to __init__ which needs to contain all widgets that need to
be updated via the update function.

Narrowed all the if statements in update down to 3 lines.

977. By Marcel de Vries

Removed the need for self.wlist thanks to getattr. Also made sure that
the 'Open folder' button is only shown when the connection with
SABnzbd is local.

978. By Marcel de Vries

Small code clean up.

979. By Marcel de Vries

Fix some 'bugs'.

980. By Severin H

Sync with trunk.

981. By Severin H

Move the "Properties" context menu item to the top and use the underline feature for all menu items.

Put a separator between "Properties" and the action items.

@Marcel: I hope you're fine with these changes.

Revision history for this message
Marcel de Vries (carresmd-deactivatedaccount) wrote :

> Gave it a try and it works without a hitch. Great work! It looks like you've
> also added some useful methods to the backend.hubs.general module.
>
> Some random comments:
>
> - GtkAction "show_properties_dialog" should be translatable (it's probably
> Glade's fault).
> - Priority strings should also be translatable ("Force", etc.).
> - Priority strings could be moved to lottanzb.constants, similar to
> DownloadStatus.to_pretty_string. We'll probably need them elsewhere too.
> - gobject.TYPE_STRING can be replaced by a simple str.
> - Many if blocks in the update method are nearly identical. It might be
> possible to use some fancy for loop there.
> - What about displaying "unknown" if ETA is None (None won't be translated
> anyway)?
> - TimeDelta objects (duration) have a property "short" that produces a (more
> or less) pretty string representation.
> - "Downloaded:" field could be streamlined a bit when the download is
> complete. Currently, it's set to something like "1.19 GiB / 1.19 GiB (100%)".
> Call it "Size:" instead for completed downloads? Not sure about that.
> - "Storage path:" field can be quite long and bloat the window. Not sure how
> to tackle that. When connected to a local instance of SABnzbd, it would be
> desirable to provide a button that directly opens the storage path.

Severin,

Regarding the "Properties" menu item:
I'm not sure if the "Properties" item should be on top? I.e; nautilus, empathy's edit tab and rhythmbox (and probably more) have it on the bottom. Only Transmission has it on the top.

Also take a look at the GNOME HIG regarding this; http://library.gnome.org/devel/hig-book/stable/menus-types.html.en#menu-type-popup

Regarding this branch:
Is there anything else keeping it from merging? I fixed/implemented all your comments except "GtkAction "show_properties_dialog" should be translatable (it's probably Glade's fault)." which I don't quite understand?

982. By Marcel de Vries

Modify the context menu to follow GNOME HIG.

983. By Marcel de Vries

Remove duplicate show_context_menu function. Moved code to
open the download_properties dialog to a function in order to avoid
redundancy. Made a 'double-click' on a download item open
the download_properties dialog.

984. By Marcel de Vries

Sync with trunk

985. By Marcel de Vries

Moved show_context_menu & show_properties where show_context_menu used to be.

986. By Marcel de Vries

Sync with trunk

987. By Marcel de Vries

Moved code to open a directory into lottanzb.util.misc.py (open_directory)
in order to avoid redundancy.

Fixed a bug in the open_directory code which opened file-roller when an
.iso file (and probably others) was downloaded it now only opens the
directory. (SABnzbd seems to output /home/user/Downloads/Ubuntu/desktop.iso
instead of /home/user/Download/Ubuntu/, I'm not sure what is desired?)

Made a double click on a finished download open the directory instead of
the download properties dialog.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: