Sign in to follow this  
Followers 0
Sergeo7

External URL-search commands from settings

1 post in this topic

Hi. In current version of apexdc all external search commands performed throught hardcoded blocks like this:

if(Util::stricmp(cmd.c_str(), _T("g")) == 0 || Util::stricmp(cmd.c_str(), _T("google")) == 0) {

	if(param.empty()) {

		status = TSTRING(SPECIFY_SEARCH_STRING);

	} else {

		WinUtil::openLink(_T("http://www.google.com/search?q=") + Text::toT(Util::encodeURI(Text::fromT(param))));

	}

}

Maybe it will be a good idea to make all such commands loaded from external Commands.xml settings file?

(for example with tags of command - hyperlink - help string, where hyperlink contains search string substitution, like http://www.site.com/?q=%s)

PS:

And also same idea may be applied to file type - extensions correspondence list for search window.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0