<p dir="ltr">Explaining it further:<br>
- !bundleName returns true if the bundleName pointer is null, and that would attribute "Wine" then. If false, there is a string, so it would look at the next condition. <br>
- [bundleName lenght] returns an int with the length of the string, and ! turn 0 into 1 (true) and any other number into 0 (false). So ![bundleName lenght] will return true only if it's an empty string (""), and that would also attribute "Wine".</p>
<br><div class="gmail_quote">Em 8h53 Qui, 11/06/2015, Vitor Marques <<a href="mailto:vitor251093@gmail.com">vitor251093@gmail.com</a>> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Yes it is. You see, ![bundleName lenght] return true if the bundleName string has size 0. It was even in the original code if you scroll down a bit (just without the !). </p>

<br><div class="gmail_quote">Em 5h46 Qui, 11/06/2015, Huw Davies <<a href="mailto:huw@codeweavers.com" target="_blank">huw@codeweavers.com</a>> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jun 10, 2015 at 11:48:35AM -0300, Vitor Marques wrote:<br>
> Although I have not tested, the changes are simple enough<br>
> to be analyzed in sight.<br>
<br>
Indeed they are, see below.  You really do need to test your patches.<br>
And yes, gmail messed up the whitespace.<br>
<br>
> diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m<br>
> index 82925c8..a9d98c6 100644<br>
> --- a/dlls/winemac.drv/cocoa_app.m<br>
> +++ b/dlls/winemac.drv/cocoa_app.m<br>
> @@ -214,14 +214,14 @@ - (void) transformProcessToForeground<br>
><br>
>              mainMenu = [[[NSMenu alloc] init] autorelease];<br>
><br>
> -            // Application menu<br>
> -            submenu = [[[NSMenu alloc] initWithTitle:@"Wine"] autorelease];<br>
> +            // Application name<br>
>              bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey];<br>
> +            if (!bundleName || ![bundleName lenght]) bundleName = @"Wine";<br>
<br>
"lenght" is not what you want here.<br>
<br>
Huw.<br>
</blockquote></div></blockquote></div>