patchGNUstep - Patches: patch #4575, Add +theme/+setTheme: to...

Group
 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4575: Add +theme/+setTheme: to GSDrawFunctions

Submitter:  Nicolas Roard <rio>
Submitted:  Sat 29 Oct 2005 02:23:53 PM UTC
   
 
Category:  AppKit Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Wed 02 Nov 2005 01:56:27 PM UTC, comment #3: 

Committed.

David Ayers <ayers>
Group Member
Sun 30 Oct 2005 01:44:17 PM UTC, comment #2: 

Here is new patches removing the macro and changing the variable to static (which it should have been..).

Nicolas Roard <rio>
Group Member
Sun 30 Oct 2005 09:33:25 AM UTC, comment #1: 

These are minor quibbles ...

1. You create a global variable '__gui_theme', but provide setter/getter methods +setTheme: and -getTheme:

Now ... if it's really intended to be a global variable, I think it should follow standard naming conventions and be called something like GSGUITheme (but then the set/get matchods aren't needed).

If it's not intended to be global, it should be declared static ... but it should perhaps have a more conventional name
eg 'theTheme'.

2. You define a macro in the public header ... THEME to return the object ... but again we should have a name like GSTHEME to avoid possible conflicts with user code.

Richard Frith-Macdonald <CaS>
Group Member
Sat 29 Oct 2005 02:23:53 PM UTC, original submission:  

Here is a simple patch that creates two methods for getting/setting the current theme. The idea is to have a theme as a class instance. AppKit widgets will be modified to use this instance's methods to do their drawing.
Advantages over using class methods in GSDrawFunctions for doing the drawing is that it's much simpler to change the GUI that way, possibly at runtime, and it's also easier to fall-back on the default instance if needed. By default the returned "theme instance" is an instance of GSDrawFunctions itself.
This is just a first patch for committing Camaelon modifications to Appkit; new instance methods in GSDrawFunctions and modifications to widgets to call GSDrawFunctions will follow.

Nicolas Roard <rio>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7457:  GSDrawFunctions.h.diff added by rio (732B - text/x-patch)
file #7456:  GSDrawFunctions.m.diff added by rio (703B - text/x-patch)
file #7452:  GSDrawFunctions.m.diff added by rio (711B - text/x-patch - GSDrawFunctions.m)
file #7451:  GSDrawFunctions.h.diff added by rio (773B - text/x-patch - GSDrawFunctions.h)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-11-02 ayers StatusNone Done
    Open/ClosedOpen Closed
2005-10-30 rio Attached File- Added GSDrawFunctions.h.diff, #5402
2005-10-30 rio Attached File- Added GSDrawFunctions.m.diff, #5401
2005-10-29 rio Attached File- Added GSDrawFunctions.m.diff, #5397
2005-10-29 rio Attached File- Added GSDrawFunctions.h.diff, #5396
    Carbon-Copy- Added rio

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code