From e9863f0cbd94f18f9361194ce488655df3b4cdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 20 Nov 2012 17:12:34 +0000 Subject: xFire: Removed extra icon slots from options and some fix. git-svn-id: http://svn.miranda-ng.org/main/trunk@2397 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/main.cpp | 40 +++++++++++++--------------------------- protocols/Xfire/src/options.cpp | 16 ---------------- protocols/Xfire/src/resource.h | 2 -- 3 files changed, 13 insertions(+), 45 deletions(-) (limited to 'protocols/Xfire/src') diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index abebbf6341..679b671fab 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -2837,31 +2837,17 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) if(IsContactMySelf(entry->username)) return; - - if(strlen(entry->statusmsg.c_str())>5) - { - char* away=(char*)entry->statusmsg.c_str(); - if( - (*(away)=='(' - && *(away+1)=='A' - && *(away+2)=='F' - && *(away+3)=='K' - && *(away+4)==')') - || - (*(away)=='(' - &&*(away+1)=='A' - && *(away+2)=='B' - && *(away+3)=='S' - && *(away+4)==')') - ) - { + + if (entry->statusmsg.length() > 5) { + string afk = entry->statusmsg.substr(0,5); + if (afk == "(AFK)" || afk == "(ABS)") mystatus=ID_STATUS_AWAY; - } } - + //statusmsg umwandeln - char * temp = mir_utf8decode((char*)entry->statusmsg.c_str(),NULL); - if(temp==NULL) temp=(char*)entry->statusmsg.c_str(); + char *temp = mir_utf8decode((char*)entry->statusmsg.c_str(),NULL); + if (temp==NULL) + temp=(char*)entry->statusmsg.c_str(); //DBDeleteContactSetting(hContact, "CList", "StatusMsg"); DBWriteContactSettingWord(entry->hcontact, protocolname, "Status", mystatus); @@ -2901,18 +2887,18 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) strncpy(status,temp2,97); - if(strlen(entry->statusmsg.c_str())>0) + if(!entry->statusmsg.empty()) { strcat(status," - "); strcat(status,temp); } - DBWriteContactSettingString(entry->hcontact, "CList", "StatusMsg", status ); - DBWriteContactSettingString(entry->hcontact, protocolname, "XStatusMsg", status ); + DBWriteContactSettingString(entry->hcontact, "CList", "StatusMsg", status); + DBWriteContactSettingString(entry->hcontact, protocolname, "XStatusMsg", status); } else { - DBWriteContactSettingString(entry->hcontact, "CList", "StatusMsg", temp ); - DBWriteContactSettingString(entry->hcontact, protocolname, "XStatusMsg", temp ); + DBWriteContactSettingString(entry->hcontact, "CList", "StatusMsg", temp); + DBWriteContactSettingString(entry->hcontact, protocolname, "XStatusMsg", temp); DBWriteContactSettingByte(entry->hcontact, protocolname, "XStatusId", 1); DBWriteContactSettingString(entry->hcontact, protocolname, "XStatusName", ""); } diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp index 2cb78c3318..123efeea32 100644 --- a/protocols/Xfire/src/options.cpp +++ b/protocols/Xfire/src/options.cpp @@ -371,23 +371,11 @@ static BOOL CALLBACK DlgProcOpts3(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_ADDSTRING, 0, (LPARAM)TranslateT("Messagebox" )); SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_ADDSTRING, 0, (LPARAM)TranslateT("Popup" )); - //iconslots auswahl einfügen - SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #1 (ICQ X-Status)" )); - SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #2" )); - SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #3" )); - SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #4" )); - SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #1 (ICQ X-Status)" )); - SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #2" )); - SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #3" )); - SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_ADDSTRING, 0, (LPARAM)TranslateT("Advanced #4" )); - //scanalways SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("No" )); SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("On every start" )); SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_ADDSTRING, 0, (LPARAM)TranslateT("Daily" )); - SendDlgItemMessage( hwndDlg, IDC_CBVICO, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"voiceico",-1), 0); - SendDlgItemMessage( hwndDlg, IDC_CBGICO, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"gameico",-1), 0); SendDlgItemMessage( hwndDlg, IDC_SCANUPDATECB, CB_SETCURSEL, DBGetContactSettingByte(NULL,protocolname,"scanalways",0), 0); SendDlgItemMessage( hwndDlg, IDC_NOMSG, CB_SETCURSEL, nomsgboxsel[DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0)], 0); @@ -563,10 +551,6 @@ static BOOL CALLBACK DlgProcOpts3(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM DBWriteContactSettingByte(NULL,protocolname,"nomsgbox",(BYTE)nomsgboxsel[SendDlgItemMessage(hwndDlg, IDC_NOMSG, CB_GETCURSEL, 0, 0)]); - ccc=SendDlgItemMessage(hwndDlg, IDC_CBVICO, CB_GETCURSEL, 0, 0); - DBWriteContactSettingByte(NULL,protocolname,"voiceico",(BYTE)ccc); - ccc=SendDlgItemMessage(hwndDlg, IDC_CBGICO, CB_GETCURSEL, 0, 0); - DBWriteContactSettingByte(NULL,protocolname,"gameico",(BYTE)ccc); ccc=SendDlgItemMessage(hwndDlg, IDC_CLANGROUP, CB_GETCURSEL, 0, 0); DBWriteContactSettingByte(NULL,protocolname,"mainclangroup",(BYTE)ccc); ccc=SendDlgItemMessage(hwndDlg, IDC_FOFGROUP, CB_GETCURSEL, 0, 0); diff --git a/protocols/Xfire/src/resource.h b/protocols/Xfire/src/resource.h index 5d2cbd8a4e..bf720a50d6 100644 --- a/protocols/Xfire/src/resource.h +++ b/protocols/Xfire/src/resource.h @@ -44,8 +44,6 @@ #define IDD_OPT 102 #define IDD_UD 1000 #define IDD_UD2 1001 -#define IDC_CBGICO 1013 -#define IDC_CBVICO 1015 #define IDC_GROUPCONFIG 1000 #define IDC_GROUPMAIN 1002 #define IDC_KEEPALIVE 1011 -- cgit v1.2.3