summaryrefslogtreecommitdiff
path: root/logging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logging.cpp')
-rw-r--r--logging.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/logging.cpp b/logging.cpp
index f9b3100..798f00f 100644
--- a/logging.cpp
+++ b/logging.cpp
@@ -10,6 +10,8 @@
#include <sqlite3.h>
#include <unistd.h>
#include <pwd.h>
+#include "pomodori.h"
+#include "trayicon.h"
struct passwd *pw = getpwuid(getuid());
@@ -21,7 +23,7 @@ void log(tres* res,int code)
sqlite3 *db;
char *zErrMsg = 0;
char sqlop[50];
- sprintf(sqlop,"%s/.pomodori",pw->pw_dir);
+ sprintf(sqlop,"%s/." APPNAME,pw->pw_dir);
int rc = sqlite3_open(sqlop,&db);
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
@@ -36,5 +38,7 @@ void log(tres* res,int code)
}
sqlite3_close(db);
}
- exit(0);
+ delete res->reason;
+ delete res;
+ tray_deactivate();
} \ No newline at end of file