I have an important question. I am writing a medium scale program part of which displays current weather conditions in various areas of Turkey. Weather data is renewed with basically the following snippet of code which exist in a function of it's own
g_object_set(wsrc[num]->statusImage, "file", wsrc[num]->image_path);
set_text(wsrc[num]->text2, deg_temp);
This function is called with:
g_main_context_invoke()
from a separate thread that the one "gtk_main()" is called in. wsrc is the struct array in which weather data and the corresponding widgets displaying it are kept. Triggering the first snippet from a separate thread than the one gtk_main() runs in results in the following errors and no change
(dashboard:16664): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed
(dashboard:16664): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed
while I am able to access other elements in wsrc via printf but not the widgets. Does gtk unreference or destroy all references to all widgets when run? How do I keep the existing code rather than using signals to do these changes? Help is much appreciated.