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 669625 - Support GtkGrid
Support GtkGrid
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Online Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
Control-Center Maintainers
: 674387 (view as bug list)
Depends on:
Blocks: 669626
 
 
Reported: 2012-02-08 02:36 UTC by Robert Ancell
Modified: 2013-05-18 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace GtkTable with GtkGrid (35.30 KB, patch)
2012-04-14 21:11 UTC, Debarshi Ray
committed Details | Review
online-accounts: goa_provider_show_account now expects GtkGrids, not GtkTable (2.74 KB, patch)
2012-04-14 21:15 UTC, Debarshi Ray
committed Details | Review

Description Robert Ancell 2012-02-08 02:36:03 UTC
GtkTable has been deprecated the GOA API needs to support the replacement, GtkGrid.
Comment 1 Robert Ancell 2012-02-08 02:39:00 UTC
I had a quick look at what needs to be done for this, I guess there needs to be new API to make it work?

void     (*show_account_in_grid)            (GoaProvider         *provider,
                                             GoaClient           *client,
                                             GoaObject           *object,
                                             GtkBox              *vbox,
                                             GtkGrid             *grid);

goa_provider_show_account_in_grid           (GoaProvider         *provider,
                                             GoaClient           *client,
                                             GoaObject           *object,
                                             GtkBox              *vbox,
                                             GtkGrid             *grid);

GtkWidget *goa_util_add_heading_in_grid (GtkGrid      *grid,
                                         const gchar  *heading_text);

etc.

The other option is to change the GtkTable parameters to GtkWidget and handle internally if they are Tables or Grids.

What method do you recommend?
Comment 2 Debarshi Ray 2012-03-14 14:10:07 UTC
I am quite happy with the first approach. ie. changing the GtkTable* parameters to GtkGrid*.

The problem that I ran into was the way the providers actually add widgets to the tables. They use these goa_util_* methods to append new rows to the table, which is a bit hard to do with GtkGrid because it does not tell you the number of rows currently in the grid.
Comment 3 Debarshi Ray 2012-04-06 14:30:37 UTC
(In reply to comment #2)
 
> The problem that I ran into was the way the providers actually add widgets to
> the tables. They use these goa_util_* methods to append new rows to the table,
> which is a bit hard to do with GtkGrid because it does not tell you the number
> of rows currently in the grid.

I learnt that with GtkGrid, one can just do gtk_container_add to append widgets, so this is not a problem at all. :-)

If you haven't started working on this, then let me know. I plan to fix this next week (ie. after the Easter holidays).
Comment 4 Robert Ancell 2012-04-07 02:53:57 UTC
Hi Debarshi,

I haven't done any work on this so please do :)
Comment 5 Debarshi Ray 2012-04-14 21:11:52 UTC
Created attachment 212062 [details] [review]
Replace GtkTable with GtkGrid
Comment 6 Debarshi Ray 2012-04-14 21:15:00 UTC
Reassigning to gnome-control-center since the panel needs to work with new API.
Comment 7 Debarshi Ray 2012-04-14 21:15:58 UTC
Created attachment 212063 [details] [review]
online-accounts: goa_provider_show_account now expects GtkGrids, not GtkTable
Comment 8 Stef Walter 2012-04-19 13:16:24 UTC
*** Bug 674387 has been marked as a duplicate of this bug. ***
Comment 9 Bastien Nocera 2012-04-19 13:20:19 UTC
Review of attachment 212063 [details] [review]:

Looks fine.
Comment 10 Debarshi Ray 2012-04-19 16:07:20 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 11 Jost.Baron 2013-05-18 09:27:21 UTC
*** Bug 697443 has been marked as a duplicate of this bug. ***