summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-09-06 15:32:24 -0600
committerJoe Zhao <ztuowen@gmail.com>2015-09-06 15:32:24 -0600
commit41ce2c3aca241a3866246e68fc7b91e6151e2f51 (patch)
tree699b05526b9755a9068036439af3a23d4aa26c80
parent83f3214e91932ef2bdb4c6d75dc3472938008144 (diff)
downloadpomodori-41ce2c3aca241a3866246e68fc7b91e6151e2f51.tar.gz
pomodori-41ce2c3aca241a3866246e68fc7b91e6151e2f51.tar.bz2
pomodori-41ce2c3aca241a3866246e68fc7b91e6151e2f51.zip
fixed error 139
-rw-r--r--logging.cpp3
-rw-r--r--totimer.cpp2
-rw-r--r--totimer.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/logging.cpp b/logging.cpp
index 798f00f..e91f90f 100644
--- a/logging.cpp
+++ b/logging.cpp
@@ -28,7 +28,7 @@ void log(tres* res,int code)
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
- exit(0);
+ return;
}
sprintf(sqlop,"insert into log (Cat) Values ('%s');",res->reason);
rc = sqlite3_exec(db, sqlop, NULL, 0, &zErrMsg);
@@ -38,7 +38,6 @@ void log(tres* res,int code)
}
sqlite3_close(db);
}
- delete res->reason;
delete res;
tray_deactivate();
} \ No newline at end of file
diff --git a/totimer.cpp b/totimer.cpp
index ec9b5dd..b4209dd 100644
--- a/totimer.cpp
+++ b/totimer.cpp
@@ -69,7 +69,7 @@ void timer_set(tres* lastres, guint32 wait)
{
timeout=true;
lastres->time = lastres->time + wait;
- timerid = g_timeout_add(wait*60*1000,(GSourceFunc)notify,lastres);
+ timerid = g_timeout_add(wait*1000,(GSourceFunc)notify,lastres);
}
}
diff --git a/totimer.h b/totimer.h
index 0bbd5bb..f529360 100644
--- a/totimer.h
+++ b/totimer.h
@@ -9,7 +9,7 @@
#include "logging.h"
#include "glib.h"
-#define POTIME 25
+#define POTIME 1
#define POTEXT 5
void timer_init();