diff options
-rw-r--r-- | main.cpp | 2 | ||||
-rw-r--r-- | messages.cpp | 10 | ||||
-rw-r--r-- | new_gpg.icproj | 6 | ||||
-rw-r--r-- | new_gpg.vcproj | 4 |
4 files changed, 17 insertions, 5 deletions
@@ -155,6 +155,7 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM pxExecute(&cmd, "", &out, &code);
DBWriteContactSettingString(NULL, szModuleName, "GPGPubKey", out.c_str());
}
+ DBWriteContactSettingByte(NULL, szModuleName, "FirstRun", 0);
DestroyWindow(hwndDlg);
break;
}
@@ -209,5 +210,4 @@ void FirstRun() if(!DBGetContactSettingByte(NULL, szModuleName, "FirstRun", 1))
return;
ShowFirstRunDialog();
- DBWriteContactSettingByte(NULL, szModuleName, "FirstRun", 0);
}
diff --git a/messages.cpp b/messages.cpp index 8bc2914..792e3fa 100644 --- a/messages.cpp +++ b/messages.cpp @@ -121,6 +121,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) }
f.close();
DeleteFile(path.c_str());
+ if(!str.length())
+ {
+ pre->szMessage = "Failed to decrypt GPG encrypted message";
+ return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
+ }
}
{
if(str.length() > 0)
@@ -200,6 +205,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) }
f.close();
DeleteFile(path.c_str());
+ if(!str.length())
+ {
+ ccs->lParam = (LPARAM)"Failed to encrypt message with GPG";
+ return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
+ }
mir_free((void**)ccs->lParam);
char *utf = mir_utf8encodeW(str.c_str());
ccs->lParam = (LPARAM)utf;
diff --git a/new_gpg.icproj b/new_gpg.icproj index 1af9561..a120b49 100644 --- a/new_gpg.icproj +++ b/new_gpg.icproj @@ -17,10 +17,12 @@ Name="Release Unicode (static)|Win32">
<Tool
Name="CppCmplrTool"
+ Optimization="1000"
GlobalOptimizations="true"
OptimizeForWindowsApplication="true"
- EnableEnhancedInstructionSet="1001"
- FloatingPointModel="1000"/>
+ EnableEnhancedInstructionSet="1000"
+ FloatingPointModel="1000"
+ UseProcessorExtensions="4"/>
</Configuration>
</Configurations>
<Files/>
diff --git a/new_gpg.vcproj b/new_gpg.vcproj index 5964dba..3a1459a 100644 --- a/new_gpg.vcproj +++ b/new_gpg.vcproj @@ -245,9 +245,9 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="1"
+ Optimization="2"
InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
+ FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories=""X:\install\git\miranda\miranda-im\miranda\include";X:\install\git\miranda\mim_plugs;../../include"
|