Compare commits

..

3 Commits

5 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,7 @@
# practice-timer # practice-timer
[![Build Status - Linux](https://ci.zander.im/job/practice-timer-linux/badge/icon?style=flat&subject=Build%20-%20Linux)](https://ci.zander.im/job/practice-timer-linux/)
[![Build Status - FreeBSD](https://ci.zander.im/job/practice-timer-freebsd/badge/icon?style=flat&subject=Build%20-%20FreeBSD)](https://ci.zander.im/job/practice-timer-freebsd/)
A simple program for tracking time spent doing activities. Originally created for my dad to track his music practice. A simple program for tracking time spent doing activities. Originally created for my dad to track his music practice.
Build with CMake. Requires GTK+ 3, json-glib, and PkgConfig for CMake. The graphs on the stats page are optional, but they require Plotutils. Build with CMake. Requires GTK+ 3, json-glib, and PkgConfig for CMake. The graphs on the stats page are optional, but they require Plotutils.

View File

@ -57,7 +57,10 @@ static void timer_application_activate(GApplication *app) {
} }
TimerApplication *timer_application_new() { TimerApplication *timer_application_new() {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
return g_object_new(TIMER_TYPE_APPLICATION, "application-id", "org.zander.practicetiemr", "flags", G_APPLICATION_FLAGS_NONE, NULL); return g_object_new(TIMER_TYPE_APPLICATION, "application-id", "org.zander.practicetiemr", "flags", G_APPLICATION_FLAGS_NONE, NULL);
#pragma GCC diagnostic pop
} }
const char *timer_application_get_config_file(TimerApplication *self) { const char *timer_application_get_config_file(TimerApplication *self) {

View File

@ -25,7 +25,7 @@ static void timer_clock_thread_callback(TimerClock *self) {
self->lastTick = now; self->lastTick = now;
self->currentTime = 0; self->currentTime = 0;
} }
g_usleep(50); g_usleep(500);
} }
} }

View File

@ -31,6 +31,7 @@ static void timer_file_watcher_tick(TimerFileWatcher *self) {
} }
last_tick = now; last_tick = now;
} }
g_usleep(500);
} }
} }

View File

@ -396,6 +396,7 @@ void timer_task_tree_set_data_path(TimerTaskTree *self, const char *path) {
if (self->fileWatcher) { if (self->fileWatcher) {
g_object_unref(self->fileWatcher); g_object_unref(self->fileWatcher);
} }
self->fileWatcher = NULL;
self->fileWatcher = timer_file_watcher_new(path); self->fileWatcher = timer_file_watcher_new(path);
g_signal_connect(self->fileWatcher, "file-changed", G_CALLBACK(data_file_updated), self); g_signal_connect(self->fileWatcher, "file-changed", G_CALLBACK(data_file_updated), self);
} }