Commit a5be2a5d authored by Morten Welinder's avatar Morten Welinder

GUI: Fix potential crash.

parent eb5869c9
2011-02-21 Morten Welinder <terra@gnome.org>
* src/wbc-gtk.c (wbc_gtk_finalize): Cancel template loader handler
if necessary.
2011-02-17 Morten Welinder <terra@gnome.org>
* src/wbc-gtk.c (wbc_gtk_finalize): Remove custum UIs.
......
......@@ -13,6 +13,7 @@ Morten:
* Import wide sc files. [#641581]
* Fix problem with single-cell names and 'r'-type arguments. [#613273]
* Plug a few leaks.
* Fix potential crash on quick exit.
--------------------------------------------------------------------------
Gnumeric 1.10.13
......
......@@ -114,6 +114,8 @@ struct _WBCGtk {
guint merge_id;
} file_history, toolbar, windows, templates;
guint template_loader_handler;
GOActionComboStack *undo_haction, *redo_haction;
GtkAction *undo_vaction, *redo_vaction;
GOActionComboColor *fore_color, *back_color;
......
......@@ -5148,6 +5148,7 @@ wbc_gtk_load_templates (WBCGtk *wbcg)
wbc_gtk_reload_templates (wbcg);
}
wbcg->template_loader_handler = 0;
return FALSE;
}
......@@ -5247,6 +5248,11 @@ wbc_gtk_finalize (GObject *obj)
if (wbcg->idle_update_style_feedback != 0)
g_source_remove (wbcg->idle_update_style_feedback);
if (wbcg->template_loader_handler != 0) {
g_source_remove (wbcg->template_loader_handler);
wbcg->template_loader_handler = 0;
}
if (wbcg->file_history.merge_id != 0)
gtk_ui_manager_remove_ui (wbcg->ui, wbcg->file_history.merge_id);
UNREF_OBJ (file_history.actions);
......@@ -5990,7 +5996,8 @@ wbc_gtk_new (WorkbookView *optional_view,
updated right then -- and that looks sub-optimal because the
"Templates" menu is empty (and thus not shown) until the
update is done. */
g_timeout_add (1000, (GSourceFunc)wbc_gtk_load_templates, wbcg);
wbcg->template_loader_handler =
g_timeout_add (1000, (GSourceFunc)wbc_gtk_load_templates, wbcg);
wb_control_init_state (wbc);
return wbcg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment