linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04275
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2567: add a menu command to open the crash log
------------------------------------------------------------
revno: 2567
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2011-06-25 19:05:55 +0200
message:
add a menu command to open the crash log
modified:
win32/CrashLogger.cpp
win32/CrashLogger.h
win32/MainWindow.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'win32/CrashLogger.cpp'
--- win32/CrashLogger.cpp 2011-06-24 16:08:35 +0000
+++ win32/CrashLogger.cpp 2011-06-25 17:05:55 +0000
@@ -406,7 +406,7 @@
LONG WINAPI exception_filter(LPEXCEPTION_POINTERS info)
{
- f = fopen((Util::getPath(Util::PATH_USER_LOCAL) + "CrashLog.txt").c_str(), "w");
+ f = fopen(CrashLogger::getPath().c_str(), "w");
if(f) {
writeAppInfo();
@@ -438,3 +438,7 @@
CrashLogger::~CrashLogger() {
SetUnhandledExceptionFilter(prevFilter);
}
+
+string CrashLogger::getPath() {
+ return Util::getPath(Util::PATH_USER_LOCAL) + "CrashLog.txt";
+}
=== modified file 'win32/CrashLogger.h'
--- win32/CrashLogger.h 2011-06-12 22:41:02 +0000
+++ win32/CrashLogger.h 2011-06-25 17:05:55 +0000
@@ -22,6 +22,8 @@
struct CrashLogger {
CrashLogger();
~CrashLogger();
+
+ static string getPath();
};
#endif // DCPLUSPLUS_WIN32_CRASH_LOGGER_H
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2011-06-07 17:44:52 +0000
+++ win32/MainWindow.cpp 2011-06-25 17:05:55 +0000
@@ -50,6 +50,7 @@
#include "resource.h"
+#include "CrashLogger.h"
#include "ParamDlg.h"
#include "HashProgressDlg.h"
#include "SettingsDialog.h"
@@ -273,6 +274,7 @@
file->appendItem(T_("Match downloaded lists"), [this] { handleMatchAll(); });
file->appendItem(T_("Refresh file list\tF5"), [this] { handleRefreshFileList(); }, WinUtil::menuIcon(IDI_REFRESH));
file->appendItem(T_("Open downloads directory"), [this] { handleOpenDownloadsDir(); }, WinUtil::menuIcon(IDI_OPEN_DL_DIR));
+ file->appendItem(T_("Open crash log"), [this] { TextFrame::openWindow(getTabView(), CrashLogger::getPath()); });
file->appendSeparator();
file->appendItem(T_("Settings\tCtrl+F3"), [this] { handleSettings(); }, WinUtil::menuIcon(IDI_SETTINGS));