Ticket #15 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

update gtk to 2.12

Reported by: Mike Wey Assigned to: Mike Wey
Priority: minor Milestone: Release 1.0
Component: gtkd - classes Version: TRUNK
Keywords: Cc:

Description

I'm looking in to adding the classes missing from gtk 2.12, I'll use this ticked to keep track of the changes.

Currently the following classes/interfaces are missing:

Change History

12/30/07 13:33:51 changed by Mike Wey

12/30/07 16:48:03 changed by Mike Wey

  • type changed from defect to enhancement.

(follow-up: ↓ 5 ) 12/30/07 23:58:44 changed by Pse

Great job, Mike. Do you have any idea whether support for symbols from previous versions is complete? If so, I'm positively amazed.

(follow-up: ↓ 6 ) 12/31/07 01:31:23 changed by JJR

Is gtk+ 2.12 working on windows yet? If not, we should probably keep to the version that's on par.

(in reply to: ↑ 3 ) 12/31/07 07:47:07 changed by Mike Wey

Replying to Pse:

Great job, Mike. Do you have any idea whether support for symbols from previous versions is complete? If so, I'm positively amazed.

Only the printing classes are missing for 2.10, 2.8 should be complete.

(in reply to: ↑ 4 ; follow-up: ↓ 7 ) 12/31/07 07:53:51 changed by Mike Wey

Replying to JJR:

Is gtk+ 2.12 working on windows yet? If not, we should probably keep to the version that's on par.

2.12 is available on windows.
I've also tested these changes on a system with 2.10 installed and other than the larger output from Linker.dumpFailedLoads() i didn't notice any bad effects.

(in reply to: ↑ 6 ) 12/31/07 11:46:37 changed by JJR

Replying to Mike Wey:

2.12 is available on windows.
I've also tested these changes on a system with 2.10 installed and other than the larger output from Linker.dumpFailedLoads() i didn't notice any bad effects.

Okay, sounds good.

(follow-up: ↓ 9 ) 12/31/07 16:34:43 changed by Pse

In r366, in APILookupGtk.txt, line 5322 is inconsistent with the changes introduced in r360 (ticket #3). All methods now check for null pointers before passing them to class constructors. This is probably not needed for getPrintSettings(), but it'd be wise to keep this in mind for future additions to the ApiLookup?* files.

(in reply to: ↑ 8 ) 01/01/08 08:00:46 changed by Mike Wey

Replying to Pse:

In r366, in APILookupGtk.txt, line 5322 is inconsistent with the changes introduced in r360 (ticket #3). All methods now check for null pointers before passing them to class constructors. This is probably not needed for getPrintSettings(), but it'd be wise to keep this in mind for future additions to the ApiLookup?* files.

Changed in r368 along with a few others in APILookupGtk.txt

01/02/08 14:58:21 changed by Mike Wey

with r376 only Builder and Buildable are missing.

01/02/08 20:56:08 changed by Pse

This is excellent, Mike. Tremendous job.

01/03/08 14:10:58 changed by Mike Wey

r382 adds the last two, Only the Buildable interface in not jet added to the classes that implement it.
See: http://library.gnome.org/devel/gtk/stable/gtk-gtkbuildable.html#gtk-gtkbuildable.implementations

01/03/08 14:12:17 changed by Mike Wey

  • status changed from new to assigned.

01/03/08 14:12:40 changed by Mike Wey

found that accept button ;)

01/04/08 20:43:16 changed by Mike Wey

The Buildable interface as Currently added would hijack other functions when the template gets mixed in, for example: now MenuItem?.this(char[], bool) calls Widget.setName(char[]). But when the Buildable interface is mixed in the constructor calls Buildable.setName(char[]). this works if you are working with 2.12 but segfaults with anything lower than 2.12

I see a few options around this.
1: prefix the Buildable functions with 'buildable'
2: There are as far is i've seen two ways that interfaces are implemented in gtkD.

  • like the FileChooser? interface. where every object thet implements that interface has a property that return the object as an interface (the interface here is actually implemented as an object)
  • like the CellLayout? and RecentChooser? interfaces, where the interface gets mixed in. (the interface here is implemented as an interface/template combo).

Buildable can be implemented like the FileChooser? interface.or like The CellLayout? interface, that would mean using option 1 or an other way to stop the function hijacking.

That leaves: only support 2.12 and higher, but i don't think that would be a good option.

01/04/08 20:47:25 changed by Mike Wey

Just Before i posted this okibi changed the Start page, to say that you need the latest gtk libraries installed. which would be option 3

01/05/08 08:40:43 changed by Mike Wey

Did some more searching and it turns out that only getName and setName have this problem. prefixing those with buildable looks like the best option to me, it's also consistent with functions like gtk_menu_item_activate witch is prefixed with item in gtkD.

01/06/08 12:33:17 changed by Mike Wey

r388 adds the buildable interface to the classes that implement it. setName and getName are prefixed with 'buildable'.

01/14/08 14:16:40 changed by Mike Wey

  • status changed from assigned to closed.
  • resolution set to fixed.

with the split of IconSet? in r396 and r397 The classes should be complete.