Merge lp://qastaging/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support into lp://qastaging/ubuntu/oneiric/nautilus

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merge reported by: Ken VanDine
Merged at revision: not available
Proposed branch: lp://qastaging/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support
Merge into: lp://qastaging/ubuntu/oneiric/nautilus
Prerequisite: lp://qastaging/~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support
Diff against target: 1438 lines (+989/-7)
26 files modified
.pc/applied-patches (+1/-0)
Makefile.in (+2/-0)
config.h.in (+3/-0)
configure (+158/-1)
configure.in (+26/-1)
cut-n-paste-code/Makefile.in (+2/-0)
cut-n-paste-code/libegg/Makefile.in (+2/-0)
data/Makefile.in (+2/-0)
data/icons/Makefile.in (+2/-0)
debian/changelog (+6/-1)
debian/patches/12_unity_launcher_support.patch (+455/-0)
debian/patches/series (+1/-0)
docs/Makefile.in (+2/-0)
docs/reference/Makefile.in (+2/-0)
docs/reference/libnautilus-extension/Makefile.in (+2/-0)
eel/Makefile.in (+2/-0)
icons/Makefile.in (+2/-0)
libnautilus-extension/Makefile.in (+2/-0)
libnautilus-private/Makefile.in (+2/-0)
libnautilus-private/nautilus-progress-info.c (+40/-0)
libnautilus-private/nautilus-progress-info.h (+2/-0)
nautilus-sendto-extension/Makefile.in (+2/-0)
src/Makefile.am (+2/-0)
src/Makefile.in (+8/-4)
src/nautilus-progress-ui-handler.c (+259/-0)
test/Makefile.in (+2/-0)
To merge this branch: bzr merge lp://qastaging/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Ubuntu branches Pending
Review via email: mp+70685@code.qastaging.launchpad.net

Description of the change

As discussed in the merge request of lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support the nautilus file operation progress could be shown also using its unity launcher icon.

So, I've added some kind of Nautilus / Unity integration trough libunity facilities. Basically a progress bar is shown to indicate the effective progress of all the pending operations (to get this I had to edit also libnautilus-private), and a counter indicates the number of the pending operations (maybe it should be shown only if there are more than one operations).
Plus I've added two quicklist items that are enabled only during the transfer time which allows to show the progress window and to cancel all the pending operations (as requested by bug #784804).

You can see a screencast to show how it works here: http://go.3v1n0.net/px4pzv (also if it misses the "Cancel" quicklist).

The quicklist and progress bar are applied both to "nautilus.desktop" and "nautilus-home.desktop" launchers because currently libunity doesn't allow us to know if a given launcher is actually shown in the unity left-bar (I guess this is something that we should do). Also it could happen that someone will remove the nautilus-home and will use just the standard nautilus desktop file.

I've not reverted or disabled the patch at lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support however I guess that if you prefer not to have both the indicator and the unity launcher progress bar, the faster way is to just compile the deb package with the --disable-appindicator option.

To post a comment you must log in.
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

The use of a progress bar on the Unity launcher item looks good to me.

For the badge, I suggest showing it only if there are any tasks queued after the current one. (That is, the badge should never say "1".) That way you can tell at a glance whether the progress bar represents everything that you need to wait for before logging out etc, or whether there's more after that.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Actually, your changelog suggests that the launcher progress bar covers all tasks. I don't understand how this can work -- how do you know how big a task will be when Nautilus hasn't pre-flighted it yet? But if it does work, the badge isn't useful at all -- four tasks copying 250 files each aren't "more" than one task copying 1000 files.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Based on feedback from @mpt, I removed the counts and merges the rest. Thanks for the patch!

review: Approve
Revision history for this message
Ken VanDine (ken-vandine) wrote :
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

@mpt the progress doesn't count the number of files to copy/move/any-other-action but the size of them.

About the unity icon count, shouldn't it be included when more than one transfer is in progress (and so shown only when transfers > 1)?

Revision history for this message
Noitidart (noitidart) wrote :

This is super nice. I would like to place a badge on my application using this method. I'm doing this with ctypes. I'm not so good at reading C code yet but if you can simplify it that would be very nice!

Can you please show me a simplest example so I can emulate this.
I really appreciate this I have been trying for a couple months on this.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Noitidart, does this help you https://wiki.ubuntu.com/Unity/LauncherAPI ?

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