Sergeo7

Member
  • Content count

    64
  • Joined

  • Last visited

Posts posted by Sergeo7


  1. 2 developers: Please, add some more popular temp's to predefined settings in future releases :P

    PS:

    				(Util::stricmp(fileExt.c_str(), ".jc!") == 0) ||	//FlashGet
    
    				(Util::stricmp(fileExt.c_str(), ".dmf") == 0) ||	//Download Master
    
    				(Util::stricmp(fileExt.c_str(), ".!ut") == 0) ||	//uTorrent
    
    				(Util::stricmp(fileExt.c_str(), ".bc!") == 0) ||	//BitComet
    
    				(name.find("__padding_") == 0) ||		//BitComet padding

    wdc likes this

  2. Is there any real need to revive age old topics? If they have not been implemented by now, chances are, they wont be.
    Maybe someone find this solution useful..? If you don't need it, doesn't mean that no one need it.

    Some of my friends merge folders from several harddrives with JPs and share it as one. So I think it's not so difficult.

    Still, this might lead to better idea and implementation. In this case, it is not really a solution to use the OS tools. What if user does not want any changes at system level?
    It's impossible to implement every single idea just because of limited time :P

  3. As I see an appropriate API would be needed minimum for:

    a) External control of ApexDC application (start/stop downloads/and so forth)

    B) Custom data storage (for example to replace xml containers with some sort of sql database)

    c) For a script languages (like LUA and so on; might overlap other needs)

    d) Chat/PM processing plugins (for example local abuse filter or chatbot)


  4. 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.


  5. Try to recompile ApexDC on machine with slovak locale and arrayutf copied from StrongDC source, maybe it'll help.

    PS: Personally I think this kinda way would be better when removing diacritic marks:

    WinUtil.cpp

    wchar_t arraydblutf[12] = { L'\xe4' ,L'\xf1' ,L'\xf6' ,L'\xfc' ,L'\xff' ,L'\x00df' ,L'\x00c6' ,L'\x00e6' ,L'\x0132' ,L'\x0133' ,L'\x0152' ,L'\x0153' };
    
    vector<tstring> arraydblwin(12);
    
    arraydblwin.push_back(L"ae");
    
    arraydblwin.push_back(L"ny");
    
    arraydblwin.push_back(L"oe");
    
    arraydblwin.push_back(L"ue");
    
    arraydblwin.push_back(L"yu");
    
    arraydblwin.push_back(L"ss");
    
    arraydblwin.push_back(L"AE");
    
    arraydblwin.push_back(L"ae");
    
    arraydblwin.push_back(L"IJ");
    
    arraydblwin.push_back(L"ij");
    
    arraydblwin.push_back(L"Oe");
    
    arraydblwin.push_back(L"oe");
    
    
    wchar_t arrayutf[22] =  { L'\x00d0' ,L'\x0110' ,L'\x00f0' ,L'\x0111' ,L'\x0126' ,L'\x0127' ,L'\x0131' ,L'\x0138' ,L'\x013f' ,L'\x0141' ,L'\x0140' ,L'\x0142' ,L'\x014a' ,L'\x0149' ,L'\x014b' ,L'\x00d8' ,L'\x00f8' ,L'\x017f' ,L'\x00de' ,L'\x0166' ,L'\x00fe' ,L'\x0167 };
    
    wchar_t arraywin[22] = { L'D' ,L'D' ,L'd' ,L'd' ,L'H' ,L'h' ,L'i' ,L'k' ,L'L' ,L'L' ,L'l' ,L'l' ,L'N' ,L'n' ,L'n' ,L'O' ,L'o' ,L's' ,L'T' ,L'T' ,L't' ,L't };
    
    
    const tstring& WinUtil::disableCzChars(tstring& message) {
    
    	//Here we must check if locale is really contain removed diacritic (maybe switch(locale) {... //removal... default: return message; } would suit)
    
    	//Then array of removed chars must vary for each locale.
    
    	//...
    
    	//Let's remove them
    
    	for(size_t j = 0; j < message.length(); j++) {
    
    		for(size_t l = 0; l < (sizeof(arrayutf) / sizeof(arrayutf[0])); l++) {
    
    			if (message[j] == arrayutf[l]) {
    
    				message[j] = arraywin[l];
    
    				break;
    
    			}
    
    		}
    
    		for(size_t l = 0; l < arraydblwin.size(); l++) {
    
    			if (message[j] == arraydblutf[l]) {
    
    				message.erase(j,1);
    
    				message.insert(j,arraydblwin[l]);
    
    				j++;
    
    				break;
    
    			}
    
    		}		
    
    	}
    
    
    	return message;
    
    }


  6. No, there is no such thing. All just as I said earlier.

    I think something like this could resolve problem (just disabling removal of diacritic marks in options is really lame solution):

    text.h

    	extern const string utf8;
    
    	extern string systemCharset;
    
    	extern bool isCzechLocale;
    text.cpp
    const string utf8 = "utf-8"; // optimization
    
    string systemCharset;
    
    bool isCzechLocale = false;
    
    
    void initialize() {
    
    	setlocale(LC_ALL, "");
    
    
    #ifdef _WIN32
    
    	char *ctype = setlocale(LC_CTYPE, NULL);
    
    	if(ctype) {
    
    		systemCharset = string(ctype);
    
    	} else {
    
    		dcdebug("Unable to determine the program's locale");
    
    	}
    
    #else
    
    	systemCharset = string(nl_langinfo(CODESET));
    
    #endif
    
    	if(systemCharset.find("Czech") != string::npos) //todo: all other locales with diacritic
    
    		isCzechLocale = true;
    
    }
    and WinUtil.cpp
    const tstring& WinUtil::disableCzChars(tstring& message) {
    
    	if (!Text::isCzechLocale)
    
    		return message;
    
    	for(size_t j = 0; j < message.length(); j++) {
    
    		for(size_t l = 0; l < (sizeof(arrayutf) / sizeof(arrayutf[0])); l++) {
    
    			if (message[j] == arrayutf[l]) {
    
    				message[j] = arraywin[l];
    
    				break;
    
    			}
    
    		}
    
    	}
    
    	return message;
    
    }


  7. Eh.. no one wish to answer so I had to find the bug by myself:

    Function disableCzChars really don't care about current locale so if it is not czech it'll "randomly" destroy non-english chars.

    And somehow the option to use it was enabled when I run new build with old settings.


  8. Actually, the most new builds are at other page. They don't really bother to update it in original project's (don't know why).

    PS: And there is one more problem with the MPC spam, I forget to mention before - it isn't showing local non-english codepage letters, just an english ones (the codepage has been set up properly and everywhere else they displays correctly).


  9. The ApexDC++ 1.0.0 Beta4 compilation is going well (I am using STLPort 5.2 and WTL 8 fixed used on VS2005 SP1), but after I run it and type text there is a bug when it is showing in chat window: instead of some cyrillic characters it is showing some other irrelevant chars.

    Can anyone help to solve this problem?