Compare commits
3 Commits
3dc489e7bc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
64dcdf26bb
|
|||
|
98dc75e02f
|
|||
|
67cb808401
|
@ -1,4 +1,7 @@
|
|||||||
# practice-timer
|
# practice-timer
|
||||||
|
[](https://ci.zander.im/job/practice-timer-linux/)
|
||||||
|
[](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.
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ static void timer_file_watcher_tick(TimerFileWatcher *self) {
|
|||||||
}
|
}
|
||||||
last_tick = now;
|
last_tick = now;
|
||||||
}
|
}
|
||||||
|
g_usleep(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user