mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Unref the summary bar list store so that it gets deleted together with the combobox.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13597 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
b39a0305fc
commit
2a3b4aa51f
@ -1,5 +1,8 @@
|
|||||||
2006-03-11 Andreas Köhler <andi5.py@gmx.net>
|
2006-03-11 Andreas Köhler <andi5.py@gmx.net>
|
||||||
|
|
||||||
|
* src/gnome-utils/window-main-summarybar.c: Unref the summary bar
|
||||||
|
list store so that it gets deleted together with the combobox.
|
||||||
|
|
||||||
* src/gnome-utils/gnc-tree-view-account.c: Avoid calculation of
|
* src/gnome-utils/gnc-tree-view-account.c: Avoid calculation of
|
||||||
account period total for the top level account.
|
account period total for the top level account.
|
||||||
|
|
||||||
|
@ -397,6 +397,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
|
|||||||
|
|
||||||
lc = gnc_localeconv();
|
lc = gnc_localeconv();
|
||||||
|
|
||||||
|
g_object_ref(summary->datamodel);
|
||||||
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo), NULL);
|
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo), NULL);
|
||||||
gtk_list_store_clear(summary->datamodel);
|
gtk_list_store_clear(summary->datamodel);
|
||||||
for (current = g_list_first(currency_list); current; current = g_list_next(current)) {
|
for (current = g_list_first(currency_list); current; current = g_list_next(current)) {
|
||||||
@ -433,15 +434,15 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
|
|||||||
}
|
}
|
||||||
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo),
|
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo),
|
||||||
GTK_TREE_MODEL(summary->datamodel));
|
GTK_TREE_MODEL(summary->datamodel));
|
||||||
|
g_object_unref(summary->datamodel);
|
||||||
|
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(summary->totals_combo), 0);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(summary->totals_combo), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_main_window_summary_destroy_cb(GtkObject * obj, gpointer data)
|
gnc_main_window_summary_destroy_cb(GNCMainSummary *summary, gpointer data)
|
||||||
{
|
{
|
||||||
GNCMainSummary * summary = data;
|
|
||||||
gnc_gconf_remove_anon_notification(GCONF_SECTION, summary->cnxn_id);
|
gnc_gconf_remove_anon_notification(GCONF_SECTION, summary->cnxn_id);
|
||||||
gnc_unregister_gui_component(summary->component_id);
|
gnc_unregister_gui_component(summary->component_id);
|
||||||
g_free(summary);
|
g_free(summary);
|
||||||
@ -484,6 +485,8 @@ gnc_main_window_summary_new (void)
|
|||||||
|
|
||||||
retval->hbox = gtk_hbox_new (FALSE, 5);
|
retval->hbox = gtk_hbox_new (FALSE, 5);
|
||||||
retval->totals_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (retval->datamodel));
|
retval->totals_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (retval->datamodel));
|
||||||
|
g_object_unref (retval->datamodel);
|
||||||
|
|
||||||
retval->component_id = gnc_register_gui_component (WINDOW_SUMMARYBAR_CM_CLASS,
|
retval->component_id = gnc_register_gui_component (WINDOW_SUMMARYBAR_CM_CLASS,
|
||||||
summarybar_refresh_handler,
|
summarybar_refresh_handler,
|
||||||
NULL, retval);
|
NULL, retval);
|
||||||
@ -503,8 +506,9 @@ gnc_main_window_summary_new (void)
|
|||||||
gtk_widget_show (retval->totals_combo);
|
gtk_widget_show (retval->totals_combo);
|
||||||
gtk_widget_show (retval->hbox);
|
gtk_widget_show (retval->hbox);
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(retval->hbox), "destroy",
|
g_signal_connect_swapped (G_OBJECT (retval->hbox), "destroy",
|
||||||
G_CALLBACK(gnc_main_window_summary_destroy_cb), retval);
|
G_CALLBACK (gnc_main_window_summary_destroy_cb),
|
||||||
|
retval);
|
||||||
|
|
||||||
gnc_main_window_summary_refresh(retval);
|
gnc_main_window_summary_refresh(retval);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user