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>
|
||||
|
||||
* 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
|
||||
account period total for the top level account.
|
||||
|
||||
|
@ -397,6 +397,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
|
||||
|
||||
lc = gnc_localeconv();
|
||||
|
||||
g_object_ref(summary->datamodel);
|
||||
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo), NULL);
|
||||
gtk_list_store_clear(summary->datamodel);
|
||||
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_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
|
||||
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_unregister_gui_component(summary->component_id);
|
||||
g_free(summary);
|
||||
@ -483,8 +484,10 @@ gnc_main_window_summary_new (void)
|
||||
G_TYPE_STRING );
|
||||
|
||||
retval->hbox = gtk_hbox_new (FALSE, 5);
|
||||
retval->totals_combo = gtk_combo_box_new_with_model( GTK_TREE_MODEL(retval->datamodel) );
|
||||
retval->component_id = gnc_register_gui_component(WINDOW_SUMMARYBAR_CM_CLASS,
|
||||
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,
|
||||
summarybar_refresh_handler,
|
||||
NULL, retval);
|
||||
gnc_gui_component_watch_entity_type (retval->component_id,
|
||||
@ -503,8 +506,9 @@ gnc_main_window_summary_new (void)
|
||||
gtk_widget_show (retval->totals_combo);
|
||||
gtk_widget_show (retval->hbox);
|
||||
|
||||
g_signal_connect(G_OBJECT(retval->hbox), "destroy",
|
||||
G_CALLBACK(gnc_main_window_summary_destroy_cb), retval);
|
||||
g_signal_connect_swapped (G_OBJECT (retval->hbox), "destroy",
|
||||
G_CALLBACK (gnc_main_window_summary_destroy_cb),
|
||||
retval);
|
||||
|
||||
gnc_main_window_summary_refresh(retval);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user