Closed webmastak closed 5 years ago
Why don't you let Gtk run the main loop (Gtk.main_loop
) and use a glib timeout (Glib.timeout(seconds) { callback }
) to poll your feed? As long as you return true
from the callback it'll keep being called at the given interval. See https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add and https://github.com/jhass/crystal-gobject/blob/master/src/g_lib/g_lib.cr
Hello. Please tell me how to destroy GTK events. I have an application that shows notifications, but there is one problem.
When a notification is viewed, i.e. an GTK event and no longer fall into this cycle for the next notifi:
I am poorly versed in GTK and tried different options, and the best thing I think is to restart the application from myself with this code:
But the thought do this without restarting the application does not give me rest. :)