Merge lp:~ivaldi/midori/manydowns into lp:~kalikiana/midori/manydowns

Proposed by André Stösel
Status: Merged
Merged at revision: 6183
Proposed branch: lp:~ivaldi/midori/manydowns
Merge into: lp:~kalikiana/midori/manydowns
Diff against target: 40 lines (+14/-9)
1 file modified
extensions/transfers.vala (+14/-9)
To merge this branch: bzr merge lp:~ivaldi/midori/manydowns
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+166567@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

That's a nice tweak to avoid delaying a single download.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'extensions/transfers.vala'
--- extensions/transfers.vala 2013-05-30 11:12:51 +0000
+++ extensions/transfers.vala 2013-05-30 18:17:26 +0000
@@ -423,14 +423,17 @@
423 }423 }
424424
425 bool notification_timeout_triggered () {425 bool notification_timeout_triggered () {
426 string filename = notifications.nth_data(0);426 notification_timeout = 0;
427 string msg;427 if (notifications.length () > 0) {
428 if (notifications.length () == 1)428 string filename = notifications.nth_data(0);
429 msg = _("The file '<b>%s</b>' has been downloaded.").printf (filename);429 string msg;
430 else430 if (notifications.length () == 1)
431 msg = _("'<b>%s</b>' and %d other files have been downloaded.").printf (filename, notifications.length ());431 msg = _("The file '<b>%s</b>' has been downloaded.").printf (filename);
432 get_app ().send_notification (_("Transfer completed"), msg);432 else
433 notifications = new GLib.List<string> ();433 msg = _("'<b>%s</b>' and %d other files have been downloaded.").printf (filename, notifications.length ());
434 get_app ().send_notification (_("Transfer completed"), msg);
435 notifications = new GLib.List<string> ();
436 }
434 return false;437 return false;
435 }438 }
436439
@@ -452,8 +455,10 @@
452 Gtk.RecentManager.get_default ().add_item (uri);455 Gtk.RecentManager.get_default ().add_item (uri);
453456
454 notifications.append (filename);457 notifications.append (filename);
455 if (notification_timeout == 0)458 if (notification_timeout == 0) {
459 notification_timeout_triggered ();
456 notification_timeout = Midori.Timeout.add_seconds (60, notification_timeout_triggered);460 notification_timeout = Midori.Timeout.add_seconds (60, notification_timeout_triggered);
461 }
457 }462 }
458 }463 }
459464

Subscribers

People subscribed via source and target branches

to all changes: