Merge lp:~dobey/libubuntuone/faster-u1ms-pages into lp:libubuntuone

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 141
Merged at revision: 140
Proposed branch: lp:~dobey/libubuntuone/faster-u1ms-pages
Merge into: lp:libubuntuone
Diff against target: 37 lines (+8/-3)
1 file modified
libubuntuone/u1-music-store.c (+8/-3)
To merge this branch: bzr merge lp:~dobey/libubuntuone/faster-u1ms-pages
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Review via email: mp+79443@code.launchpad.net

Commit message

Stop any current loading pages when a new page is requested externally

To post a comment you must log in.
141. By dobey

Fix typo in comment

Revision history for this message
Manuel de la Peña (mandel) wrote :

Code looks good and I understand the reasoning behind it after talking on irc, will like to test when banshee fixes are done.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntuone/u1-music-store.c'
2--- libubuntuone/u1-music-store.c 2011-10-03 16:50:38 +0000
3+++ libubuntuone/u1-music-store.c 2011-10-17 14:36:23 +0000
4@@ -1223,9 +1223,6 @@
5 g_signal_connect (G_OBJECT (music_store->priv->web_viewer), "notify",
6 G_CALLBACK (viewer_property_changed_cb), music_store);
7
8- /* And load the real store in the background */
9- music_store->priv->idle_cb = g_idle_add ((GSourceFunc) load_real_store_cb, music_store);
10-
11 /* Rescan the purchased music folder */
12 _u1_music_store_rescan_purchased_folder (music_store);
13
14@@ -1353,8 +1350,13 @@
15 gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 0);
16 gtk_box_pack_end (GTK_BOX (music_store), music_store->priv->progress, FALSE, FALSE, 0);
17
18+ /* Rescan for things later */
19 g_timeout_add_seconds(10, (GSourceFunc) _u1_music_store_delayed_init,
20 music_store);
21+
22+ /* And load the real store in the background */
23+ music_store->priv->idle_cb = g_idle_add ((GSourceFunc) load_real_store_cb, music_store);
24+
25 }
26
27 /**
28@@ -1413,6 +1415,9 @@
29 g_return_if_fail (U1_IS_MUSIC_STORE (music_store));
30 g_return_if_fail (url != NULL);
31
32+ /* Stop any currently pending or active page loads first */
33+ webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (music_store->priv->web_viewer));
34+
35 /* If the load_real_store callback is set up, disable it first */
36 if (music_store->priv->idle_cb > 0) {
37 g_source_remove (music_store->priv->idle_cb);

Subscribers

People subscribed via source and target branches