]> Pileus Git - aweather/blobdiff - src/aweather-gui.c
Various threading fixes
[aweather] / src / aweather-gui.c
index fcaf87c71ab2857d845990d00c677a780aabf357..6d5c96e3a1c67df2361dcfe6d29e3c78e963c767 100644 (file)
@@ -560,7 +560,7 @@ void aweather_gui_attach_plugin(AWeatherGui *self, const gchar *name)
                gtk_notebook_append_page(GTK_NOTEBOOK(config), body, tab);
                gtk_widget_show_all(config);
        }
-       gtk_widget_queue_draw(GTK_WIDGET(self->viewer));
+       grits_viewer_queue_draw(self->viewer);
 }
 void aweather_gui_deattach_plugin(AWeatherGui *self, const gchar *name)
 {
@@ -577,7 +577,7 @@ void aweather_gui_deattach_plugin(AWeatherGui *self, const gchar *name)
                        gtk_notebook_remove_page(GTK_NOTEBOOK(config), i);
        }
        grits_plugins_disable(self->plugins, name);
-       gtk_widget_queue_draw(GTK_WIDGET(self->viewer));
+       grits_viewer_queue_draw(self->viewer);
 }
 void aweather_gui_load_plugins(AWeatherGui *self)
 {
@@ -667,16 +667,19 @@ static void aweather_gui_dispose(GObject *_self)
        g_debug("AWeatherGui: dispose");
        AWeatherGui *self = AWEATHER_GUI(_self);
        if (self->plugins) {
-               grits_plugins_free(self->plugins);
+               GritsPlugins *plugins = self->plugins;
                self->plugins = NULL;
+               grits_plugins_free(plugins);
        }
        if (self->builder) {
-               g_object_unref(self->builder);
+               GtkBuilder *builder = self->builder;
                self->builder = NULL;
+               g_object_unref(builder);
        }
        if (self->prefs) {
-               g_object_unref(self->prefs);
+               GritsPrefs *prefs = self->prefs;
                self->prefs = NULL;
+               g_object_unref(prefs);
        }
        G_OBJECT_CLASS(aweather_gui_parent_class)->dispose(_self);
 }