[Java-gnome-developer] [ java-gnome-Bugs-830409 ] UIInfo functionatility
Brought to you by:
afcowie
From: SourceForge.net <no...@so...> - 2003-10-26 10:15:24
|
Bugs item #830409, was opened at 2003-10-26 10:15 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101522&aid=830409&group_id=1522 Category: gnome Group: defect Status: Open Resolution: None Priority: 5 Submitted By: Mark Howard (howama) Assigned to: Nobody/Anonymous (nobody) Summary: UIInfo functionatility Initial Comment: I posted the following message to java-gnome-developer a while back - there were no replies. A solution hasn't been found yet and I'm not likely to have time in the near future to do anything about it, so I'm creating this report to make sure this issue doesn't get lost. Hi, We need to work on gnome.UIInfo. The current class is quite ugly and fails to satisfy many needs. e.g. it doesn't allow accelerator keys to be set; doesn't allow pixmaps to be used from files (will anyone use xpm byte arrays? I think they should be removed); doesn't allow pixmaps to be used from stock items (with different text); and probably a few other combinations I've not checked. My first proposal was going to be: I'd like to make the UIInfo constructors public (and possibly remove some of the static 'constructor' methods). This number of static constructors makes the class overly difficult to use, IMHO. Also, it fails to provide the full functionality. But then I looked at it and this seemed a little too difficult. A second alternative would be to continue with the current system, but add the additional functionality: Optional accel key setting - doubles the current number of methods Optional pixmaps file - double again Optional pixmaps from stock - double again (doubles do not include stock item methods) This seems very ugly and will just make the class even harder to use, IMHO. Third alternative: Have a simple set of constructors + methods for setting the other things e.g. UIInfo myitem = UIInfo.item("test", "This tests Stuff"); myitem.setListener( (MenuItemListener) this ); myitem.setIconFile("/usr/share/pixmaps/myitem.png"); myitem.setAccelerator( ???.CONTROL, "z" ); The first diffuculty is deciding how much to put in the 'constructor' methods (and hence how many of these you have to read through in the docs to get the right one). The main problem with the scheme however is that you can no longer have a simple array: createToolbar( new UIInfo[] { UIInfo.blah(a,b,c,d), ... }); instead, it requires: UIInfo myuiinfoblah = UIInfo.blah(a,b); myuiinfoblah.foo(c, d); ... createToolbar( new UIInfo[] { myuiinfoblah, ... }); I don't like any of these solutions. Please can somebody suggest something better, or give preference for one of the above (and suggest cut off points for what to include where). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101522&aid=830409&group_id=1522 |