After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752432 - goa: respect the "Files" switch in the online accounts panel
goa: respect the "Files" switch in the online accounts panel
Status: RESOLVED DUPLICATE of bug 751358
Product: gvfs
Classification: Core
Component: goa volume monitor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-15 18:18 UTC by Matthias Clasen
Modified: 2015-08-05 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (717 bytes, patch)
2015-07-15 18:19 UTC, Matthias Clasen
reviewed Details | Review

Description Matthias Clasen 2015-07-15 18:18:59 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.
Comment 1 Matthias Clasen 2015-07-15 18:19:31 UTC
Created attachment 307499 [details] [review]
patch
Comment 2 Debarshi Ray 2015-07-17 03:43:17 UTC
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.
Comment 3 Bastien Nocera 2015-07-17 10:44:30 UTC
(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.
Comment 4 Matthias Clasen 2015-07-17 15:04:52 UTC
So... ok to push ?
Comment 5 Debarshi Ray 2015-07-20 19:22:26 UTC
(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.
Comment 6 Matthias Clasen 2015-07-22 16:07:27 UTC
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.
Comment 7 Debarshi Ray 2015-07-31 16:50:58 UTC
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.
Comment 8 Debarshi Ray 2015-08-05 13:53:14 UTC
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.
Comment 9 Ray Strode [halfline] 2015-08-05 14:12:31 UTC
probably bug 751358
Comment 10 Debarshi Ray 2015-08-05 14:49:31 UTC
(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 ***