Merge lp:~dobey/ubuntuone-client/list-public-files into lp:ubuntuone-client

Proposed by dobey on 2010-04-09
Status: Merged
Approved by: dobey on 2010-04-12
Approved revision: 482
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/list-public-files
Merge into: lp:ubuntuone-client
Diff against target: 40 lines (+9/-0)
1 file modified
nautilus/ubuntuone-nautilus.c (+9/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/list-public-files
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve on 2010-04-12
John Lenton 2010-04-09 Approve on 2010-04-11
Review via email: mp+23136@code.launchpad.net

Commit message

Call the new get_public_files dbus method at initial status change

To post a comment you must log in.
John Lenton (chipaca) wrote :

The error I got in syncdaemon when testing this is hilarious.
Oh, it worked! The client side did. The server side isn't deployed yet.

We probably need to not render the pretty error page for urls under /api/ ...

2010-04-10 23:33:16,088 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: AQ_PUBLIC_FILES_LIST_ERROR, args:(), kw:{'error': '<!DOCTYPE HTML>\n<html lang="en" id="ubuntuone">\n\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n<meta name="viewport" content="width=960, initial-scale=0.55, minimum-scale=0.65">\n<title>Ubuntu One : Page Not Found (404)</title>\n<link rel="stylesheet" href="https://media.one.ubuntu.com/media/2566/css/reset.css" type="text/css"

et cetera.

review: Approve
Martin Albisetti (beuno) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/ubuntuone-nautilus.c'
2--- nautilus/ubuntuone-nautilus.c 2010-03-28 23:10:12 +0000
3+++ nautilus/ubuntuone-nautilus.c 2010-04-09 19:15:23 +0000
4@@ -74,6 +74,7 @@
5 /* Avoid calling get_rootdir and get_folders lots of times */
6 gboolean gotroot;
7 gboolean gotudfs;
8+ gboolean gotpubs;
9
10 /* Lists of ul/dl/shares for setting emblems */
11 GHashTable * uploads;
12@@ -858,6 +859,7 @@
13 uon->managed = g_build_filename (g_get_home_dir (), "Ubuntu One", NULL);
14 uon->gotroot = FALSE;
15 uon->gotudfs = FALSE;
16+ uon->gotpubs = FALSE;
17
18 #if 0
19 /*
20@@ -1272,6 +1274,12 @@
21 dbus_g_proxy_begin_call (uon->u1_folders, "get_folders",
22 ubuntuone_nautilus_got_udfs, uon,
23 NULL, G_TYPE_INVALID);
24+
25+ /* Get the list of public files if we haven't already */
26+ if (!uon->gotpubs)
27+ dbus_g_proxy_begin_call (uon->u1_public, "get_public_files",
28+ ubuntuone_nautilus_end_dbus_call, uon,
29+ NULL, G_TYPE_INVALID);
30 }
31
32 static void ubuntuone_nautilus_upload_started (DBusGProxy * proxy,
33@@ -1378,6 +1386,7 @@
34 g_hash_table_replace (uon->public, g_strdup (path), g_strdup (url));
35
36 ubuntuone_nautilus_reset_emblem (uon, path);
37+ uon->gotpubs = TRUE;
38 }
39
40 static void ubuntuone_nautilus_publish_error (DBusGProxy * proxy,

Subscribers

People subscribed via source and target branches