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 408408 - Fix the relationship overview dialog code to work with goocanvas HEAD
Fix the relationship overview dialog code to work with goocanvas HEAD
Status: RESOLVED FIXED
Product: glom
Classification: Other
Component: design
git master
Other Linux
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2007-02-15 22:08 UTC by Rasmus Toftdahl Olesen
Modified: 2007-03-16 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix relationship overview code to work with new goocanvas API. (13.03 KB, patch)
2007-02-15 22:09 UTC, Rasmus Toftdahl Olesen
committed Details | Review
glom_relationships_overview_enable.patch (3.32 KB, patch)
2007-02-16 12:34 UTC, Murray Cumming
none Details | Review
glom_relationships_overview.png (36.53 KB, image/png)
2007-02-16 12:50 UTC, Murray Cumming
  Details
Glomify the relationship overview code. (31.77 KB, patch)
2007-02-16 19:16 UTC, Rasmus Toftdahl Olesen
none Details | Review
Remember the window size between instantiations. (32.09 KB, patch)
2007-02-16 19:36 UTC, Rasmus Toftdahl Olesen
none Details | Review

Description Rasmus Toftdahl Olesen 2007-02-15 22:08:53 UTC
This fixes the dialog relationship overview dialog code to work with the new goocanvas API, a much simpler API i might add, great work by Damon and friends.

Someone still needs to call updateModel() on the dialog after it has been added as a view (so it can get the Document_Glom object), i'm not sure it can be placed anywhere other than in the void Frame_Glom::on_menu_developer_relationships_overview() method after the add_view call.
Comment 1 Rasmus Toftdahl Olesen 2007-02-15 22:09:49 UTC
Created attachment 82636 [details] [review]
Fix relationship overview code to work with new goocanvas API.
Comment 2 Murray Cumming 2007-02-16 12:22:16 UTC
Committed. Thanks.
Comment 3 Murray Cumming 2007-02-16 12:34:26 UTC
Created attachment 82677 [details] [review]
glom_relationships_overview_enable.patch

By the way, this is the patch to enable that feature.
Comment 4 Murray Cumming 2007-02-16 12:49:26 UTC
> Someone still needs to call updateModel() on the dialog after it has been added
> as a view (so it can get the Document_Glom object), i'm not sure it can be
> placed anywhere other than in the void
> Frame_Glom::on_menu_developer_relationships_overview() method after the
> add_view call.

I added an override of the virtual View::load_from_document() method to do that, so now I see the tables and lines.

I also fixed the music collection example's relationships in the Publishers table. That was the cause of the unexpected lines in the relationships overview for that example. There was nothing wrong with your code.
Comment 5 Murray Cumming 2007-02-16 12:50:34 UTC
Created attachment 82678 [details]
glom_relationships_overview.png

Added screenshot.
Comment 6 Murray Cumming 2007-02-16 12:52:36 UTC
I notice that we will want to save the window size for the duration of the file being open, though probably not in the document. Otherwise it's annoying to resize  it every time you open it.

Also, the code needs to be formatted like the rest of the code. I can tolerate strangeness in the C code, but the C++ code needs to match the other source code, which is consistent.

You should email me your bank details so I can send you my part of the bounty money.
Comment 7 Rasmus Toftdahl Olesen 2007-02-16 19:16:42 UTC
Created attachment 82695 [details] [review]
Glomify the relationship overview code.

Good to know that the code was working properly, it is so simple that it was hard for me understand that there could be a bug somewhere.

This patch fixes the code to follow the Glom standard (as i see it): gbooleans are now bool, indentation size is two spaces, braces on separate line.

Patch is for SVN trunk, revision 1029
Comment 8 Murray Cumming 2007-02-16 19:29:03 UTC
Thanks. Committed. 

I'll do a more detailed review of the code later, though if you plan to port it to C++, I might wait until then.
Comment 9 Rasmus Toftdahl Olesen 2007-02-16 19:36:02 UTC
Created attachment 82696 [details] [review]
Remember the window size between instantiations.

Patch also includes the previous code "beautification".

I haven't got any plans for porting to libgoocanvasmm yet, although, i think it should be quite simple.
Comment 10 Murray Cumming 2007-02-16 19:52:20 UTC
Also applied.

Please:
- Remember to patch the ChangeLog
- Put new patches in new bugzilla reports, or at least reopen them, so I don't lose them. 
Comment 11 Murray Cumming 2007-03-16 14:15:24 UTC
I have enabled this code in trunk, after branching for glom 1.4.