linuxmint / cinnamon-control-center

A collection of configuration plugins used in cinnamon-settings
GNU General Public License v2.0
62 stars 67 forks source link

Online Accounts feature does not work with gnome-online-accounts 3.49.2 #326

Closed jbicha closed 8 months ago

jbicha commented 8 months ago

Issue Once distros package gnome-online-accounts 3.49.2, the Online Accounts feature in cinnamon-control-center will stop working to add new online accounts or edit existing ones.

It doesn't appear to crash the app. Just the features don't work.

gnome-online-accounts 3.50 is part of GNOME 46 and will be included in Ubuntu 24.04 LTS, Fedora 40, etc.

Other information cinnamon-control-center already provides a meson option onlineaccounts which can be set to false by default. That way it's still available for people using the latest cinnamon-control-center on older distros.

Alternatively, it may be possible to keep using GOA 3.50+ via a separate process that would have to be built. There are a few other options mentioned at https://discourse.ubuntu.com/t/gnome-online-accounts-no-longer-compatible-with-budgie-cinnamon-unity-control-center/42898

Fantu commented 8 months ago

@mtwebster @clefebvre What would you like to do about it?

mtwebster commented 8 months ago

Not sure yet, we're discussing.

leigh123linux commented 8 months ago

It also FTBFS with new goa

In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from ../panels/online-accounts/cc-online-accounts-panel.c:23:
../panels/online-accounts/cc-online-accounts-panel.c: In function ‘add_account’:
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 3 of ‘goa_provider_add_account’ from incompatible pointer type [-Wincompatible-pointer-types]
 2656 | #  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
  528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
      |                                                                  ^~~~~~~~~~~
/usr/include/gtk-3.0/gtk/gtkdialog.h:90:43: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
   90 | #define GTK_DIALOG(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DIALOG, GtkDialog))
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:264:38: note: in expansion of macro ‘GTK_DIALOG’
  264 |                                      GTK_DIALOG (self->edit_account_dialog),
      |                                      ^~~~~~~~~~
In file included from /usr/include/goa-1.0/goabackend/goabackend.h:29,
                 from ../panels/online-accounts/cc-online-accounts-panel.c:30:
/usr/include/goa-1.0/goabackend/goaprovider.h:59:91: note: expected ‘GtkWindow *’ {aka ‘struct _GtkWindow *’} but argument is of type ‘GtkDialog *’ {aka ‘struct _GtkDialog *’}
   59 |                                                                   GtkWindow              *parent,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 4 of ‘goa_provider_add_account’ from incompatible pointer type [-Wincompatible-pointer-types]
 2656 | #  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
  528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
      |                                                                  ^~~~~~~~~~~
/usr/include/gtk-3.0/gtk/gtkbox.h:40:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
   40 | #define GTK_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX, GtkBox))
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:265:38: note: in expansion of macro ‘GTK_BOX’
  265 |                                      GTK_BOX (self->new_account_vbox),
      |                                      ^~~~~~~
/usr/include/goa-1.0/goabackend/goaprovider.h:60:91: note: expected ‘GCancellable *’ {aka ‘struct _GCancellable *’} but argument is of type ‘GtkBox *’ {aka ‘struct _GtkBox *’}
   60 |                                                                   GCancellable           *cancellable,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:266:38: error: passing argument 5 of ‘goa_provider_add_account’ from incompatible pointer type [-Wincompatible-pointer-types]
  266 |                                      &error);
      |                                      ^~~~~~
      |                                      |
      |                                      GError ** {aka struct _GError **}
/usr/include/goa-1.0/goabackend/goaprovider.h:61:91: note: expected ‘GAsyncReadyCallback’ {aka ‘void (*)(struct _GObject *, struct _GAsyncResult *, void *)’} but argument is of type ‘GError **’ {aka ‘struct _GError **’}
   61 |                                                                   GAsyncReadyCallback     callback,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:262:12: error: too few arguments to function ‘goa_provider_add_account’
  262 |   object = goa_provider_add_account (provider,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/goa-1.0/goabackend/goaprovider.h:57:24: note: declared here
   57 | void                   goa_provider_add_account                  (GoaProvider            *self,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c: In function ‘show_page_account’:
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 4 of ‘goa_provider_show_account’ from incompatible pointer type [-Wincompatible-pointer-types]
 2656 | #  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
  528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
      |                                                                  ^~~~~~~~~~~
/usr/include/gtk-3.0/gtk/gtkbox.h:40:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
   40 | #define GTK_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX, GtkBox))
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:585:34: note: in expansion of macro ‘GTK_BOX’
  585 |                                  GTK_BOX (panel->accounts_vbox),
      |                                  ^~~~~~~
/usr/include/goa-1.0/goabackend/goaprovider.h:81:91: note: expected ‘GtkWindow *’ {aka ‘struct _GtkWindow *’} but argument is of type ‘GtkBox *’ {aka ‘struct _GtkBox *’}
   81 |                                                                   GtkWindow              *parent,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../panels/online-accounts/cc-online-accounts-panel.c:582:7: error: too few arguments to function ‘goa_provider_show_account’
  582 |       goa_provider_show_account (provider,
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/goa-1.0/goabackend/goaprovider.h:78:24: note: declared here
   78 | void                   goa_provider_show_account                 (GoaProvider            *self,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
[29/164] gcc -Ipanels/color/libcolor.so.p -Ipanels/color -I../panels/color -I. -I.. -I/usr/includ
clefebvre commented 8 months ago

Hi @jbicha, what do you mean by subprocess call? Looking at gnome-control-center 46 I see API calls to libgoa.

clefebvre commented 8 months ago

I'll start messing with this in a Sid VM.

jbicha commented 8 months ago

gnome-control-center 45 used panels/online-accounts/gnome-control-center-goa-helper.c as a separate process so that the GTK4 gnome-control-center could use the GTK3 gnome-online-accounts. Now gnome-online-accounts is GTK4 so you might need something similar to be able to use it from GTK3 cinnamon-control-center. I believe there are other API changes in gnome-online-accounts 46 besides the GTK4 switch.

clefebvre commented 8 months ago

Fixed. The cinnamon-control-center panel for GOA was deleted. GOA features were delegated to a new XAPP which can support either GTK3/goa3.49 or GTK4/goa3.50.

https://github.com/linuxmint/cinnamon-control-center/commit/3006535033c43807f5349c0d5797f5d1b0145ac4. https://github.com/linuxmint/cinnamon/commit/d22f889c376734f0ca5d904885c2772e790fbadc https://github.com/linuxmint/gnome-online-accounts-gtk

This allows Cinnamon not to care about the version of GOA on the system. It also allows GOA to be used in other DEs, not just Cinnamon.