diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-09-06 15:10:51 -0600 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-09-06 15:10:51 -0600 |
commit | 2f63794da7acbfcf61558428cd84f590a73fc13f (patch) | |
tree | bda4bc9682ee5704ad752d601b9ede81de198bbe /logging.cpp | |
parent | 3507dcb7a51249962e40847626f72f5207e8c0af (diff) | |
download | pomodori-2f63794da7acbfcf61558428cd84f590a73fc13f.tar.gz pomodori-2f63794da7acbfcf61558428cd84f590a73fc13f.tar.bz2 pomodori-2f63794da7acbfcf61558428cd84f590a73fc13f.zip |
revert to original time
Diffstat (limited to 'logging.cpp')
-rw-r--r-- | logging.cpp | 8 |
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 |