Re: GNUStep Themeing - Menu Groove

2013-06-22 Thread Germán Arias
On 2013-06-22 06:41:42 -0600 aaroncarr  wrote:

> Hi - Im making a gnustep theme and having difficulty styling menu's. I can
> re-color the menu but i cant get rid of the groove that goes around the
> edge, more specifically i can get rid of the dark part of the groove on the
> bottom and right but not the light part at the top and left - can someone
> give me a pointer to what i would need to override in GSTheme code to remove
> the groove !!
> Thanks!!
> 
> Screenshot : http://goo.gl/ZFhkT
> 

In Thematic, the color "Control light highlight" changes the color of the lines
at left and top. The color "Control dark shadow" changes the lines at right and
bottom. But you only can change these color, you can't remove this lines.

Germán.


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: NSClassSwapper leaving dangling pointers?

2013-06-22 Thread Luboš Doležel

Hi,

I'm actually not porting the code - I'm writing a Wine-like emulation layer 
called Darling to run OS X apps directly. This fact makes debugging 
slightly more difficult, but you're welcome to take a look at 
http://github.com/LubosD/darling.


I find the bug straightforward, class swapping should happen before 
action/target binding,  but I may be wrong indeed.


Germán, I'll mail a longer backtrace as soon as possible.

Luboš



Dne 22. června 2013 16:38:26 Eric Wasylishen  napsal:

Hi Luboš,

I'm not too familiar with nib loading internals, but I will try to take a
look. Could you  upload your work in progress code somewhere? (Or do you
have any changes to the original Mac source?)

Cool idea to port the unarchiver. :-)

Cheers,
Eric
 On Jun 21, 2013 11:30 AM, "Luboš Doležel"  wrote:

> Hi,
>
> I'm still working on getting the latest The Unarchiver for OS X <
> 
http://wakaba.c3.cx/s/apps/**unarchiver.html>

> working under GNUstep/Darling/Linux and I'm seeing crashes after the
> application's NIB file is loaded.
>
> Now I'm sort of helpless. The crash happens when using the target of a
> certain NSMenuItem.
>
> You can see an excerpt of the relevant NIB's source here; the NSMenuItem
> clearly refers to the NSPopUpButtonCell that it is part of:
>
> 
>   -2076180416
>   2048
>   
>   
>   109199360<**/int>
>   1
>   
>   
>   
> 
>   
>   400
>   75
>
>   
>
>dummy
>
>**1048576
>2147483647
>1
>
>
>_**popUpItemAction:
>
>   
>
> (Full code can be found in The Unarchiver's source tarball in
> MainMenu.nib/designable.nib)
>
> I can see the target being set correctly via -setTarget upon loading:
>
> Breakpoint 3, -[NSMenuItem setTarget:] (self=0x1845808,
> _cmd=0x77a51eb0 <.objc_selector_list+176>, anObject=0x1843d58) at
> NSMenuItem.m:465
> 465   if (_target == anObject)
> (gdb) p anObject
> $15 = (id) 0x1843d58
> (gdb) p anObject->isa
> $16 = (struct objc_class *) 0x77a6bcc0 <_OBJC_CLASS_**
> NSPopUpButtonCell>
>
> Backtrace:
>
> #0  -[NSMenuItem setTarget:] (self=0x189de68, _cmd=0x779f7ce0
> <.objc_selector_list+640>, anObject=0x1429f18) at NSMenuItem.m:465
> #1  0x7745354e in -[NSNibControlConnector establishConnection]
> (self=0x189de38, _cmd=0x77afe330 <.objc_selector_list+1232>) at
> NSBundleAdditions.m:177
> #2  0x776cfb91 in -[NSIBObjectData 
nibInstantiateWithOwner:**topLevelObjects:]

> (self=0x14be778, _cmd=0x77afdf70 <.objc_selector_list+272>,
> owner=0xe67488,
> topLevelObjects=0x0) at GSNibLoading.m:1926
> #3  0x776cff26 in -[NSIBObjectData awakeWithContext:]
> (self=0x14be778, _cmd=0x77b1a170 <.objc_selector_list+176>,
> context=0xcb09f8) at GSNibLoading.m:1982
> #4  0x7771028e in -[GSNibLoader 
loadModelData:**externalNameTable:withZone:]

> (self=0xde8158, _cmd=0x77a56260 <.objc_selector_list+224>,
> data=0xeffb58, context=0xcb09f8,
> zone=0x329060bb38 ) at GSNibLoader.m:87
> #5  0x7753f57d in -[NSNib 
instantiateNibWithExternalName**Table:withZone:]

> (self=0xecf938, _cmd=0x779f7b00 <.objc_selector_list+160>,
> externalNameTable=0xcb09f8,
> zone=0x329060bb38 ) at NSNib.m:153
> #6  0x77453949 in +[NSBundle(NSBundleAdditions)
> loadNibFile:externalNameTable:**withZone:] (self=0x329057f000
> <_OBJC_CLASS_NSBundle>,
> _cmd=0x779f7b20 <.objc_selector_list+192>, fileName=0xf03638,
> context=0xcb09f8, zone=0x329060bb38 ) at
> NSBundleAdditions.m:236
> #7  0x77454076 in -[NSBundle(NSBundleAdditions)
> loadNibFile:externalNameTable:**withZone:] (self=0xd406e8,
> _cmd=0x779f7b20 <.objc_selector_list+192>, fileName=0xeb5498,
> context=0xcb09f8, zone=0x329060bb38 ) at
> NSBundleAdditions.m:342
> #8  0x77453b5e in +[NSBundle(NSBundleAdditions)
> loadNibNamed:owner:] (self=0x329057f000 <_OBJC_CLASS_NSBundle>,
> _cmd=0x779db520 <.objc_selector_list+688>,
> aNibName=0xeb5498, owner=0xe67488) at NSBundleAdditions.m:277
> #9  0x773e2a83 in NSApplicationMain (argc=1, argv=0x7fffd330)
> at Functions.m:83
>
> So I set up a memory watch for anObject and then I get this:
>
> Hardware watchpoint 4: *0x1843d58
>
> Old value = -140067648
> New value = -559023410
> 0x75b81060 in object_setClass () from /usr/lib64/libobjc.so.4.6
> (gdb) bt
> #0  0x75b81060 in object_setClass () from /usr/lib64/libobjc.so.4.6
> #1  0x76171b45 in NSDeallocateObject (anObject=0x1843d58) at
> NSObject.m:855
> #2  0x761723fc in -[NSObject dealloc] (self=0x1843d58,
> _cmd=0x77a00880 <.objc_selector_list+2464>) at NSObject.m:1385
> #3  0x7745ffc1 in -[NSCell dealloc] (self=0x1843d58,
> _cmd=0x779fc290 <.objc_selector_list+1648>) at NSCell.m:234
> #4  0x77455537 in -[NSButtonCell dealloc] (self=0x1843d58,
> _cmd=0x77a53ec0 <.objc_selector_list+832>) at NSButtonCell.m:185
> #5  0x775390b0 in -[NSMenuItemCell dealloc] (self=0x1843d58,
> _

Re: NSClassSwapper leaving dangling pointers?

2013-06-22 Thread Eric Wasylishen
Hi Luboš,

I'm not too familiar with nib loading internals, but I will try to take a
look. Could you  upload your work in progress code somewhere? (Or do you
have any changes to the original Mac source?)

Cool idea to port the unarchiver. :-)

Cheers,
Eric
 On Jun 21, 2013 11:30 AM, "Luboš Doležel"  wrote:

> Hi,
>
> I'm still working on getting the latest The Unarchiver for OS X <
> http://wakaba.c3.cx/s/apps/**unarchiver.html>
> working under GNUstep/Darling/Linux and I'm seeing crashes after the
> application's NIB file is loaded.
>
> Now I'm sort of helpless. The crash happens when using the target of a
> certain NSMenuItem.
>
> You can see an excerpt of the relevant NIB's source here; the NSMenuItem
> clearly refers to the NSPopUpButtonCell that it is part of:
>
> 
>   -2076180416
>   2048
>   
>   
>   109199360<**/int>
>   1
>   
>   
>   
> 
>   
>   400
>   75
>
>   
>
>dummy
>
>**1048576
>2147483647
>1
>
>
>_**popUpItemAction:
>
>   
>
> (Full code can be found in The Unarchiver's source tarball in
> MainMenu.nib/designable.nib)
>
> I can see the target being set correctly via -setTarget upon loading:
>
> Breakpoint 3, -[NSMenuItem setTarget:] (self=0x1845808,
> _cmd=0x77a51eb0 <.objc_selector_list+176>, anObject=0x1843d58) at
> NSMenuItem.m:465
> 465   if (_target == anObject)
> (gdb) p anObject
> $15 = (id) 0x1843d58
> (gdb) p anObject->isa
> $16 = (struct objc_class *) 0x77a6bcc0 <_OBJC_CLASS_**
> NSPopUpButtonCell>
>
> Backtrace:
>
> #0  -[NSMenuItem setTarget:] (self=0x189de68, _cmd=0x779f7ce0
> <.objc_selector_list+640>, anObject=0x1429f18) at NSMenuItem.m:465
> #1  0x7745354e in -[NSNibControlConnector establishConnection]
> (self=0x189de38, _cmd=0x77afe330 <.objc_selector_list+1232>) at
> NSBundleAdditions.m:177
> #2  0x776cfb91 in -[NSIBObjectData 
> nibInstantiateWithOwner:**topLevelObjects:]
> (self=0x14be778, _cmd=0x77afdf70 <.objc_selector_list+272>,
> owner=0xe67488,
> topLevelObjects=0x0) at GSNibLoading.m:1926
> #3  0x776cff26 in -[NSIBObjectData awakeWithContext:]
> (self=0x14be778, _cmd=0x77b1a170 <.objc_selector_list+176>,
> context=0xcb09f8) at GSNibLoading.m:1982
> #4  0x7771028e in -[GSNibLoader 
> loadModelData:**externalNameTable:withZone:]
> (self=0xde8158, _cmd=0x77a56260 <.objc_selector_list+224>,
> data=0xeffb58, context=0xcb09f8,
> zone=0x329060bb38 ) at GSNibLoader.m:87
> #5  0x7753f57d in -[NSNib 
> instantiateNibWithExternalName**Table:withZone:]
> (self=0xecf938, _cmd=0x779f7b00 <.objc_selector_list+160>,
> externalNameTable=0xcb09f8,
> zone=0x329060bb38 ) at NSNib.m:153
> #6  0x77453949 in +[NSBundle(NSBundleAdditions)
> loadNibFile:externalNameTable:**withZone:] (self=0x329057f000
> <_OBJC_CLASS_NSBundle>,
> _cmd=0x779f7b20 <.objc_selector_list+192>, fileName=0xf03638,
> context=0xcb09f8, zone=0x329060bb38 ) at
> NSBundleAdditions.m:236
> #7  0x77454076 in -[NSBundle(NSBundleAdditions)
> loadNibFile:externalNameTable:**withZone:] (self=0xd406e8,
> _cmd=0x779f7b20 <.objc_selector_list+192>, fileName=0xeb5498,
> context=0xcb09f8, zone=0x329060bb38 ) at
> NSBundleAdditions.m:342
> #8  0x77453b5e in +[NSBundle(NSBundleAdditions)
> loadNibNamed:owner:] (self=0x329057f000 <_OBJC_CLASS_NSBundle>,
> _cmd=0x779db520 <.objc_selector_list+688>,
> aNibName=0xeb5498, owner=0xe67488) at NSBundleAdditions.m:277
> #9  0x773e2a83 in NSApplicationMain (argc=1, argv=0x7fffd330)
> at Functions.m:83
>
> So I set up a memory watch for anObject and then I get this:
>
> Hardware watchpoint 4: *0x1843d58
>
> Old value = -140067648
> New value = -559023410
> 0x75b81060 in object_setClass () from /usr/lib64/libobjc.so.4.6
> (gdb) bt
> #0  0x75b81060 in object_setClass () from /usr/lib64/libobjc.so.4.6
> #1  0x76171b45 in NSDeallocateObject (anObject=0x1843d58) at
> NSObject.m:855
> #2  0x761723fc in -[NSObject dealloc] (self=0x1843d58,
> _cmd=0x77a00880 <.objc_selector_list+2464>) at NSObject.m:1385
> #3  0x7745ffc1 in -[NSCell dealloc] (self=0x1843d58,
> _cmd=0x779fc290 <.objc_selector_list+1648>) at NSCell.m:234
> #4  0x77455537 in -[NSButtonCell dealloc] (self=0x1843d58,
> _cmd=0x77a53ec0 <.objc_selector_list+832>) at NSButtonCell.m:185
> #5  0x775390b0 in -[NSMenuItemCell dealloc] (self=0x1843d58,
> _cmd=0x77a6c490 <.objc_selector_list+1856>) at NSMenuItemCell.m:112
> #6  0x7755cd05 in -[NSPopUpButtonCell dealloc] (self=0x1843d58,
> _cmd=0x76678370 <.objc_selector_list+560>) at NSPopUpButtonCell.m:158
> #7  0x76173739 in -[NSObject release] (self=0x1843d58,
> _cmd=0x76662ff0 <.objc_selector_list+784>) at NSObject.m:2070
> #8  0x761391b4 in GSIArraySetItemAtIndex (array=0x13b6770,
> item=..., index=66) at ../Headers/GNUstepBase/**GSIArray.h:531
> #9  0

GNUStep Themeing - Menu Groove

2013-06-22 Thread aaroncarr
Hi - Im making a gnustep theme and having difficulty styling menu's. I can
re-color the menu but i cant get rid of the groove that goes around the
edge, more specifically i can get rid of the dark part of the groove on the
bottom and right but not the light part at the top and left - can someone
give me a pointer to what i would need to override in GSTheme code to remove
the groove !! 

Thanks!!

Screenshot : http://goo.gl/ZFhkT



--
View this message in context: 
http://gnustep.8.n7.nabble.com/GNUStep-Themeing-Menu-Groove-tp34073.html
Sent from the GNUstep - Dev mailing list archive at Nabble.com.

___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: NSClassSwapper leaving dangling pointers?

2013-06-22 Thread Germán Arias
Maybe this is related with a problem I'm having to compile
Cenon 4.0.2. I get the error:

 Compiling file TileScrollView.m ...
TileScrollView.m: In function '-[TileScrollView zoomIn:]':
TileScrollView.m:95:9: warning: 'NSCollectionViewItem' may not respond to 
'-tag' [enabled by default]
TileScrollView.m:95:9: warning: (Messages without a matching method signature 
[enabled by default]
TileScrollView.m:95:9: warning: will be assumed to return 'id' and accept 
[enabled by default]
TileScrollView.m:95:9: warning: '...' as arguments.) [enabled by default]
TileScrollView.m:95:9: error: pointer value used where a floating point value 
was expected

The code is:

  for (row=0; row<[resPopupListButton numberOfItems]; row++)
  if (Diff((VFloat)[[resPopupListButton itemAtIndex:row] tag] / 100.0, 
oldScaleFactor) < 0.001)
  break;
  row++;

resPopupListButton is a PopUp button. This is at Document.nib file,
is the PopUp to select the zoom.

Germán.


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev