GNOME Bugzilla – Bug 752432
goa: respect the "Files" switch in the online accounts panel
Last modified: 2015-08-05 14:49:31 UTC
I noticed that my goa volunme does not disappear in either nautilus or the file chooser, when I toggle the 'Files' switch in the online accounts panel. It should. Here is a patch that makes it so.
Created attachment 307499 [details] [review] patch
Review of attachment 307499 [details] [review]: I can't reproduce this with: gnome-online-accounts-3.16.3-1.fc22.x86_64 gvfs-1.24.1-2.fc22.x86_64 This change is OK as a workaround, but I wonder if there is a hidden bug somewhere. ::: gvfs-1.25.3/monitor/goa/goavolumemonitor.c.goa @@ +194,3 @@ + account = goa_object_get_account (object); + if (goa_account_get_files_disabled (account)) + continue; The "goa_object_peek_files (object) != NULL" should have been enough. If FilesDisabled is true then the peek_files call should return NULL.
(In reply to Debarshi Ray from comment #2) > Review of attachment 307499 [details] [review] [review]: > > I can't reproduce this with: > gnome-online-accounts-3.16.3-1.fc22.x86_64 > gvfs-1.24.1-2.fc22.x86_64 > > This change is OK as a workaround, but I wonder if there is a hidden bug > somewhere. > > ::: gvfs-1.25.3/monitor/goa/goavolumemonitor.c.goa > @@ +194,3 @@ > + account = goa_object_get_account (object); > + if (goa_account_get_files_disabled (account)) > + continue; > > The "goa_object_peek_files (object) != NULL" should have been enough. If > FilesDisabled is true then the peek_files call should return NULL. Huh, not that I remember. The .Files interface is still there, so _peek_files() will return an object if the interface is present, and not change if files is enabled or disabled.
So... ok to push ?
(In reply to Bastien Nocera from comment #3) > The .Files interface is still there, so > _peek_files() will return an object if the interface is present, and not > change if files is enabled or disabled. If you are using d-feet (like me), then you will need to re-select the org.gnome.OnlineAccounts service from the sidebar and then the account. Otherwise, d-feet is not updating its view of the account. The properties for disabling specific services were added later (bug 657905) for the switches in empathy-accounts to disable a chat account (which are similar to the Settings -> Online Accounts switches). The DBus properties, the entries in ~/.config/goa-1.0/accounts.conf, and the presence of the DBus interfaces should always reflect the same reality. The relevant code for this is: https://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/goaowncloudprovider.c#n250 ... and this: https://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/goaprovider.c#n1292 Are you sure that you don't have a jhbuilt g-o-a or gvfs conflicting with the system installed version, or something strange like that? Although, I can't think of a reason why that could be an issue since the client/server APIs haven't been broken in a long while.
curious, now that I am trying this again with the system-installed gtk3-demo 3.17.5, it reacts just fine to the switch. So, I guess you are right and this patch is not necessary.
Yes, I tried it on another system of mine and it works as expected. Probably something strange between the way gvfs and goa were setup on the system. I don't know. :/ Closing as INVALID for the time being.
I hit this while trying to test something else. (In reply to Debarshi Ray from comment #5) > The relevant code for this is: > https://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/ > goaowncloudprovider.c#n250 > ... and this: > https://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/ > goaprovider.c#n1292 This is how the above code works: (i) Flipping the button causes the D-Bus property (eg., FilesDisabled) to be set, and FilesEnabled in ~/.config/goa-1.0/accounts.conf is updated. (ii) The change in the config file triggers a GFileMonitor and the interfaces (eg., GoaFiles) are added or removed. For some reason, the GFileMonitor is not emitting the "changed" signal. I don't know why, but removing glib, gvfs, etc. from my development prefix (ie. reverting to the system versions) fixed it for me. If this keeps happening then I would blame GFileMonitor or a broken setup.
probably bug 751358
(In reply to Ray Strode [halfline] from comment #9) > probably bug 751358 Yes, very likely. *** This bug has been marked as a duplicate of bug 751358 ***