Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Unwanted search Ctrl in Help menu item
Unwanted search Ctrl in Help menu item [message #51439] Mon, 25 March 2019 21:48 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I am experiencing a weird behavior (under X11 mode). The menu has an additional Search ctrl that I haven't coded.
See picture:
index.php?t=getfile&id=5792&private=0

This is the code

void VegaMain::VegaMainMenu(Bar& menu)
{
	menu.Add(t_("File"), THISBACK(File) ).Key(K_CTRL_F);
	menu.Add(t_("Standing"), THISBACK(Standing) ).Key(K_CTRL_X);  
	menu.Add(t_("Extras"), THISBACK(Extras) ).Key(K_CTRL_X);  
	menu.Add(t_("Rating Report"), THISBACK(ReportCB) ).Key(K_CTRL_R);  
	menu.Add(t_("Help"), THISBACK(Help) ).Key(K_CTRL_H);  
}

//....
// and then
//....
void VegaMain::Help(Bar& bar)
{
	bar.Add(t_("Content"), THISBACK(HelpContent));
	bar.Separator();
#ifndef PLATFORM_LINUX 
 	bar.Add(t_("Register ..."), THISBACK(HelpRegister));
 	bar.Add(t_("Registered to ..."), THISBACK(HelpRegistered));
	bar.Separator();
#endif
	bar.Add(t_("Check Update"), THISBACK(CheckUpdate));
	bar.Separator();
	bar.Add(t_("About"), THISBACK(HelpAbout));
}


Moreover all the items do not work, i.e. they do not perform any action.

The same code works OK under Windows and Linux.
Thanks,
Luigi
  • Attachment: pic1.png
    (Size: 322.21KB, Downloaded 385 times)
Re: Unwanted search Ctrl in Help menu item [message #51440 is a reply to message #51439] Tue, 26 March 2019 08:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Why do you think this is X11 mode?

Anyway, that search field is added by macos. We are not yet sure what are exact circumstances.

Mirek
Re: Unwanted search Ctrl in Help menu item [message #51441 is a reply to message #51440] Tue, 26 March 2019 08:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, I think I know how to disable this:

https://stackoverflow.com/questions/22075413/remove-or-custo mize-search-from-help-menu
https://developer.apple.com/documentation/appkit/nsapplicati on/1428644-helpmenu?language=objc

I will try this fix soon...

Mirek

[Updated on: Tue, 26 March 2019 08:18]

Report message to a moderator

Re: Unwanted search Ctrl in Help menu item [message #51454 is a reply to message #51441] Tue, 26 March 2019 23:00 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
mirek wrote on Tue, 26 March 2019 08:18
OK, I think I know how to disable this:

https://stackoverflow.com/questions/22075413/remove-or-custo mize-search-from-help-menu
https://developer.apple.com/documentation/appkit/nsapplicati on/1428644-helpmenu?language=objc

I will try this fix soon...

Mirek


If I use

menu.Add(t_("Help "), THISBACK(Help) ).Key(K_CTRL_H);

and then not use the "Help" word then the search ctrl disappear and the whole dropline works as expected. There is some collision with cocoa.

Luigi
Re: Unwanted search Ctrl in Help menu item [message #51455 is a reply to message #51454] Tue, 26 March 2019 23:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Tue, 26 March 2019 23:00
mirek wrote on Tue, 26 March 2019 08:18
OK, I think I know how to disable this:

https://stackoverflow.com/questions/22075413/remove-or-custo mize-search-from-help-menu
https://developer.apple.com/documentation/appkit/nsapplicati on/1428644-helpmenu?language=objc

I will try this fix soon...

Mirek


If I use

menu.Add(t_("Help "), THISBACK(Help) ).Key(K_CTRL_H);

and then not use the "Help" word then the search ctrl disappear and the whole dropline works as expected. There is some collision with cocoa.

Luigi


I have commited possible fix of the whole to the trunk.

Mirek
Re: Unwanted search Ctrl in Help menu item [message #51457 is a reply to message #51455] Wed, 27 March 2019 03:51 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Tue, 26 March 2019 18:15

I have commited possible fix of the whole to the trunk.

It doesn't work in my case. I'm still getting the search bar.
My code (it looks fine to me):
void wnb3::SetMenuBar()
{
#ifdef PLATFORM_COCOA
 SetMainMenu(THISBACK(main_menu));
 menubar.Hide();
#else
 menubar.Set(THISBACK(main_menu));
#endif
}

Full recompilation. TheIDE itself was compiled a moth ago.


Regards,
Novo

[Updated on: Wed, 27 March 2019 03:52]

Report message to a moderator

Re: Unwanted search Ctrl in Help menu item [message #51471 is a reply to message #51439] Thu, 28 March 2019 23:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
What about now (trunk)?
Re: Unwanted search Ctrl in Help menu item [message #51473 is a reply to message #51471] Thu, 28 March 2019 23:58 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I couldn't compile because of GUI:
dword SystemDraw::GetInfo() const
{
	return DRAWTEXTLINES|GUI;
}


Regards,
Novo
Re: Unwanted search Ctrl in Help menu item [message #51474 is a reply to message #51473] Fri, 29 March 2019 09:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Thu, 28 March 2019 23:58
I couldn't compile because of GUI:
dword SystemDraw::GetInfo() const
{
	return DRAWTEXTLINES|GUI;
}


For now, please just delete "|GUI".

Mirek
Re: Unwanted search Ctrl in Help menu item [message #51477 is a reply to message #51474] Fri, 29 March 2019 15:47 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Fri, 29 March 2019 04:06

For now, please just delete "|GUI".

The search bar has disappeared.
Thanks a lot!


Regards,
Novo
Previous Topic: Can I compile without X11? (Mojave)
Next Topic: How to set the icon App
Goto Forum:
  


Current Time: Thu Mar 28 10:59:17 CET 2024

Total time taken to generate the page: 0.01257 seconds