Merge lp:~rye/ubuntuone-client/bring-emblems-back into lp:ubuntuone-client

Proposed by Roman Yepishev
Status: Merged
Approved by: John O'Brien
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~rye/ubuntuone-client/bring-emblems-back
Merge into: lp:ubuntuone-client
Prerequisite: lp:~rye/ubuntuone-client/add-marshallers
Diff against target: 33 lines (+8/-1)
1 file modified
nautilus/ubuntuone-nautilus.c (+8/-1)
To merge this branch: bzr merge lp:~rye/ubuntuone-client/bring-emblems-back
Reviewer Review Type Date Requested Status
John O'Brien (community) Approve
dobey (community) Approve
Review via email: mp+16314@code.launchpad.net

Commit message

Create the missing u1_fs dbus proxy, and unref it when done

To post a comment you must log in.
Revision history for this message
Roman Yepishev (rye) wrote :

Depends on add-marshallers branch for proper callbacks support.

Revision history for this message
Vincenzo Di Somma (vds) wrote :

Could you please describe what this branch does?

Revision history for this message
Roman Yepishev (rye) wrote :

> Could you please describe what this branch does?

This branch adds missing dbus proxy that was preventing calls to syncdaemon for file info. Additionally, it fixes the path for updated & needsupdating hash tables and file emblem updates (utime call is then replaced by stop-killing-thumbnails branch)

Revision history for this message
dobey (dobey) wrote :

+ new_path = g_strdup_printf ("%s/%s", uon->managed, path);

This should be g_build_filename (uon->managed, path, NULL); instead. Although, we'll need to get the full path in some other way, since this won't work once user defined folders are working in syncdaemon. The path and uon->managed might not match up, and we don't want to have to iterate through a potentially large list, checking that the file exists for each one (ignore the fact that the same filename might exist in multiple folders as well).

review: Needs Fixing
Revision history for this message
dobey (dobey) wrote :

Also, as discussed in IRC, we will need to have the syncdaemon give us the full path. Filing a bug right now, and making a branch to fix it. :)

297. By Roman Yepishev

Changed printf path construct to g_build_filename

Revision history for this message
Roman Yepishev (rye) wrote :

- new_path = g_strdup_printf ("%s/%s", uon->managed, path);
+ new_path = g_build_filename (uon->managed, path, NULL);

Done.

Revision history for this message
dobey (dobey) wrote :

29 - new_path = g_strdup (path);
30 + new_path = g_build_filename (uon->managed, path, NULL);

Can you please revert this change so that it is just "new_path = g_strdup (path);" again? The changes in https://edge.launchpad.net/~dobey/ubuntuone-client/getmetadata-fullpath/+merge/16340 fix syncdaemon to just return the full path instead, which will give us the desired results, and is a better fix. :)

review: Needs Fixing
298. By Roman Yepishev

Since syncdaemon now returns full path (#498224), no g_build_filename is necessary

Revision history for this message
Roman Yepishev (rye) wrote :

> Can you please revert this change so that it is just "new_path = g_strdup
> (path);" again?

Done :)

Revision history for this message
dobey (dobey) wrote :

My branch has landed, and this looks good to me. Thanks!

review: Approve
Revision history for this message
John O'Brien (jdobrien) :
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 2009-12-18 22:26:17 +0000
3+++ nautilus/ubuntuone-nautilus.c 2009-12-18 22:26:17 +0000
4@@ -593,6 +593,10 @@
5 "com.ubuntuone.SyncDaemon",
6 "/shares",
7 "com.ubuntuone.SyncDaemon.Shares");
8+ uon->u1_fs = dbus_g_proxy_new_for_name (uon->bus,
9+ "com.ubuntuone.SyncDaemon",
10+ "/filesystem",
11+ "com.ubuntuone.SyncDaemon.FileSystem");
12
13 /* Default to ~/Ubuntu One for now, as it's all we really support */
14 uon->managed = g_build_filename (g_get_home_dir (), "Ubuntu One", NULL);
15@@ -708,6 +712,9 @@
16 if (uon->u1_shares)
17 g_object_unref (uon->u1_shares);
18
19+ if (uon->u1_fs)
20+ g_object_unref (uon->u1_fs);
21+
22 if (uon->bus)
23 g_object_unref (uon->bus);
24
25@@ -826,7 +833,7 @@
26 g_hash_table_replace (uon->updated, new_path, new_path);
27 else
28 g_hash_table_replace (uon->needsupdating, new_path, new_path);
29- utime (path, NULL);
30+ utime (new_path, NULL);
31 }
32
33 static void ubuntuone_nautilus_state_toggled (DBusGProxy * proxy,

Subscribers

People subscribed via source and target branches