diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
commit | 92beff959051eec8d60e4e146aa3d8a13bee9fea (patch) | |
tree | b06ceb3079028d38f6d0f2481a5ab62b05e83e80 /protocols/Xfire/src/iniupdater.cpp | |
parent | 8ef64da1b7cc3ef5026ab2dc80e7e0fd88971d59 (diff) |
XFire: Reformat sources
git-svn-id: http://svn.miranda-ng.org/main/trunk@11134 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/iniupdater.cpp')
-rw-r--r-- | protocols/Xfire/src/iniupdater.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/protocols/Xfire/src/iniupdater.cpp b/protocols/Xfire/src/iniupdater.cpp index 8a91df0ccc..2f8ebe6ea9 100644 --- a/protocols/Xfire/src/iniupdater.cpp +++ b/protocols/Xfire/src/iniupdater.cpp @@ -13,35 +13,35 @@ INT_PTR CALLBACK DlgUpdateDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR {
switch (msg)
{
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwndDlg);
- char*buf=NULL; //leeren zeiger für den empfangen buffer
- GetWWWContent2(INI_WHATSNEW,NULL,FALSE,&buf);
+ char*buf = NULL; //leeren zeiger für den empfangen buffer
+ GetWWWContent2(INI_WHATSNEW, NULL, FALSE, &buf);
- if (buf!=NULL)
- {
- SetDlgItemTextA(hwndDlg,IDC_UPDATEGAMES,buf);
- delete[] buf;
- }
+ if (buf != NULL)
+ {
+ SetDlgItemTextA(hwndDlg, IDC_UPDATEGAMES, buf);
+ delete[] buf;
+ }
- SetFocus(GetDlgItem(hwndDlg,IDOK));
+ SetFocus(GetDlgItem(hwndDlg, IDOK));
+ return TRUE;
+ }
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDOK:
+ EndDialog(hwndDlg, IDOK);
+ return TRUE;
+
+ case IDCANCEL:
+ EndDialog(hwndDlg, IDCANCEL);
return TRUE;
}
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDOK:
- EndDialog(hwndDlg,IDOK);
- return TRUE;
-
- case IDCANCEL:
- EndDialog(hwndDlg,IDCANCEL);
- return TRUE;
- }
- break;
+ break;
}
return FALSE;
@@ -54,32 +54,32 @@ void UpdateMyXFireIni(LPVOID dummy) { char file3[1024];
//ini pfad rausbekommen
- strcpy(file, XFireGetFoldersPath ("IniFile"));
- strcpy(file2,file);
- strcpy(file3,file);
- strcat(file,"xfire_games.new");
- strcat(file2,"xfire_games.ini");
- strcat(file3,"xfire_games.old");
+ strcpy(file, XFireGetFoldersPath("IniFile"));
+ strcpy(file2, file);
+ strcpy(file3, file);
+ strcat(file, "xfire_games.new");
+ strcat(file2, "xfire_games.ini");
+ strcat(file3, "xfire_games.old");
- mir_snprintf(request,1024,"%s%d",INI_URLREQUEST,getfilesize(file2));
+ mir_snprintf(request, 1024, "%s%d", INI_URLREQUEST, getfilesize(file2));
if (CheckWWWContent(request))
{
- if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==1||DialogBox(hinstance,MAKEINTRESOURCE(IDD_UPDATE),NULL,DlgUpdateDialogProc)==IDOK)
+ if (db_get_b(NULL, protocolname, "dontaskforupdate", 0) == 1 || DialogBox(hinstance, MAKEINTRESOURCE(IDD_UPDATE), NULL, DlgUpdateDialogProc) == IDOK)
{
- if (GetWWWContent2(request,file,FALSE))
+ if (GetWWWContent2(request, file, FALSE))
{
//altes backup löschen
remove(file3);
//derzeitige ini und sichern
- rename(file2,file3);
+ rename(file2, file3);
//lösche .old, wenn aktiv
- if (db_get_b(NULL,protocolname,"nobackupini",0))
+ if (db_get_b(NULL, protocolname, "nobackupini", 0))
remove(file3);
//neue aktiv schalten
- rename(file,file2);
-
- if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==0) MSGBOX(Translate("The xfire_games.ini was updated."));
+ rename(file, file2);
+
+ if (db_get_b(NULL, protocolname, "dontaskforupdate", 0) == 0) MSGBOX(Translate("The xfire_games.ini was updated."));
}
else
MSGBOX(Translate("Error during xfire_games.ini update."));
@@ -94,31 +94,31 @@ void UpdateMyIcons(LPVOID dummy) { char file3[1024];
//ini pfad rausbekommen
- strcpy(file,XFireGetFoldersPath ("IconsFile"));
- strcpy(file2,file);
- strcpy(file3,file);
- strcat(file,"icons.new");
- strcat(file2,"icons.dll");
- strcat(file3,"icons.old");
+ strcpy(file, XFireGetFoldersPath("IconsFile"));
+ strcpy(file2, file);
+ strcpy(file3, file);
+ strcat(file, "icons.new");
+ strcat(file2, "icons.dll");
+ strcat(file3, "icons.old");
- mir_snprintf(request,1024,"%s%d",ICO_URLREQUEST,getfilesize(file2));
+ mir_snprintf(request, 1024, "%s%d", ICO_URLREQUEST, getfilesize(file2));
if (CheckWWWContent(request))
{
- if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==1||MessageBox(NULL,TranslateT("There is a new Icons.dll online, do you want to update now?"),TranslateT(PLUGIN_TITLE),MB_YESNO|MB_ICONQUESTION)==IDYES)
+ if (db_get_b(NULL, protocolname, "dontaskforupdate", 0) == 1 || MessageBox(NULL, TranslateT("There is a new Icons.dll online, do you want to update now?"), TranslateT(PLUGIN_TITLE), MB_YESNO | MB_ICONQUESTION) == IDYES)
{
- if (GetWWWContent2(request,file,FALSE)) {
+ if (GetWWWContent2(request, file, FALSE)) {
//altes backup löschen
remove(file3);
//derzeitige ini und sichern
- rename(file2,file3);
+ rename(file2, file3);
//lösche .old, wenn aktiv
- if (db_get_b(NULL,protocolname,"nobackupini",0))
+ if (db_get_b(NULL, protocolname, "nobackupini", 0))
remove(file3);
//neue aktiv schalten
- rename(file,file2);
-
- if (db_get_b(NULL,protocolname,"dontaskforupdate",0)==0) MSGBOX(Translate("The Icons.dll was updated."));
+ rename(file, file2);
+
+ if (db_get_b(NULL, protocolname, "dontaskforupdate", 0) == 0) MSGBOX(Translate("The Icons.dll was updated."));
}
else
MSGBOX(Translate("Error during Icons.dll Update."));
|