[gnumeric] GUI: Plug more leaks.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Plug more leaks.
- Date: Wed, 23 Feb 2011 17:46:57 +0000 (UTC)
commit a6adde91e36a5b42d0c7700297ae0755c9582c65
Author: Morten Welinder <terra gnome org>
Date: Wed Feb 23 12:46:41 2011 -0500
GUI: Plug more leaks.
src/dialogs/ChangeLog | 12 ++++++++++++
src/dialogs/dialog-consolidate.c | 1 +
src/dialogs/dialog-define-names.c | 1 +
src/dialogs/dialog-doc-metadata.c | 3 +++
src/dialogs/dialog-function-select.c | 3 +++
src/dialogs/dialog-random-generator.c | 2 +-
src/dialogs/dialog-scenarios.c | 1 +
src/dialogs/dialog-simulation.c | 1 +
src/dialogs/dialog-workbook-attr.c | 1 +
9 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index af71f8b..f023d4a 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,5 +1,17 @@
2011-02-23 Morten Welinder <terra gnome org>
+ * dialog-scenarios.c (update_scenarios_treeview): Plug leak.
+
+ * dialog-workbook-attr.c (attr_dialog_impl): Plug leak.
+
+ * dialog-function-select.c (dialog_function_select_init): Plug
+ leaks.
+
+ * dialog-doc-metadata.c (dialog_doc_metadata_init_properties_page):
+ Plug leaks.
+
+ * dialog-consolidate.c (setup_widgets): Plug leak.
+
* dialog-zoom.c (cb_zoom_destroy): Plug leak.
2011-02-22 Morten Welinder <terra gnome org>
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index b6d7801..8fa9e88 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -420,6 +420,7 @@ setup_widgets (ConsolidateState *state, GtkBuilder *gui)
G_TYPE_INT));
gtk_tree_view_set_model (state->source_view,
state->source_areas);
+ g_object_unref (state->source_areas);
selection = gtk_tree_view_get_selection
(state->source_view );
diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c
index c4695f4..9bead16 100644
--- a/src/dialogs/dialog-define-names.c
+++ b/src/dialogs/dialog-define-names.c
@@ -1095,6 +1095,7 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
gtk_tree_view_set_model (GTK_TREE_VIEW (state->treeview),
state->model_f);
+ g_object_unref (state->model_f);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (state->treeview),
FALSE);
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (state->treeview),
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index 9d382ec..fc8f228 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -1271,6 +1271,7 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
gtk_combo_box_set_model (GTK_COMBO_BOX (state->ppt_name),
GTK_TREE_MODEL (state->ppt_name_store));
+ g_object_unref (state->ppt_name_store);
gtk_combo_box_entry_set_text_column (state->ppt_name, 0);
@@ -1282,6 +1283,7 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
gtk_tree_view_set_model (state->properties,
GTK_TREE_MODEL (state->properties_store));
+ g_object_unref (state->properties_store);
/* Append Columns */
gtk_tree_view_insert_column_with_attributes (state->properties,
@@ -1688,6 +1690,7 @@ dialog_doc_metadata_init (DialogDocMetaData *state,
G_TYPE_STRING,
G_TYPE_INT);
gtk_tree_view_set_model (state->view, GTK_TREE_MODEL(state->store));
+ g_object_unref (state->store);
selection = gtk_tree_view_get_selection (state->view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
column = gtk_tree_view_column_new_with_attributes ("",
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index 8930f1c..18d06b9 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -1156,6 +1156,7 @@ dialog_function_select_init (FunctionSelectState *state)
(NUM_COLMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
gtk_combo_box_set_model (state->cb, GTK_TREE_MODEL (state->model));
+ g_object_unref (state->model);
cell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (state->cb), cell, TRUE);
gtk_cell_layout_add_attribute
@@ -1188,6 +1189,7 @@ dialog_function_select_init (FunctionSelectState *state)
state->model_filter = gtk_tree_model_filter_new
(GTK_TREE_MODEL (state->model_functions), NULL);
+ g_object_unref (state->model_functions);
gtk_tree_model_filter_set_visible_column
(GTK_TREE_MODEL_FILTER (state->model_filter), FUNCTION_VISIBLE);
@@ -1195,6 +1197,7 @@ dialog_function_select_init (FunctionSelectState *state)
(go_gtk_builder_get_widget (state->gui, "function-list"));
gtk_tree_view_set_model (state->treeview,
state->model_filter);
+ g_object_unref (state->model_filter);
selection = gtk_tree_view_get_selection (state->treeview);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
diff --git a/src/dialogs/dialog-random-generator.c b/src/dialogs/dialog-random-generator.c
index 65aeb91..e41b233 100644
--- a/src/dialogs/dialog-random-generator.c
+++ b/src/dialogs/dialog-random-generator.c
@@ -743,7 +743,7 @@ dialog_random_tool_init (RandomToolState *state)
NULL);
store = gtk_list_store_new (1, G_TYPE_STRING);
gtk_combo_box_set_model (GTK_COMBO_BOX (state->distribution_combo),
- GTK_TREE_MODEL (store));
+ GTK_TREE_MODEL (store));
for (i = 0, dist_str_no = 0; distribution_strs[i].name != NULL; i++) {
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
diff --git a/src/dialogs/dialog-scenarios.c b/src/dialogs/dialog-scenarios.c
index ea5b118..074e10b 100644
--- a/src/dialogs/dialog-scenarios.c
+++ b/src/dialogs/dialog-scenarios.c
@@ -510,6 +510,7 @@ update_scenarios_treeview (GtkWidget *view, GList *scenarios)
gtk_tree_view_set_model (GTK_TREE_VIEW (view),
GTK_TREE_MODEL (store));
+ g_object_unref (store);
gtk_tree_view_append_column
(GTK_TREE_VIEW (view),
gtk_tree_view_column_new_with_attributes
diff --git a/src/dialogs/dialog-simulation.c b/src/dialogs/dialog-simulation.c
index 68b6434..57508fd 100644
--- a/src/dialogs/dialog-simulation.c
+++ b/src/dialogs/dialog-simulation.c
@@ -221,6 +221,7 @@ update_log (SimulationState *state, simulation_t *sim)
(_("Value"),
gtk_cell_renderer_text_new (), "text", 1, NULL));
gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (store));
+ g_object_unref (store);
}
static void
diff --git a/src/dialogs/dialog-workbook-attr.c b/src/dialogs/dialog-workbook-attr.c
index 61698ce..a90d9d0 100644
--- a/src/dialogs/dialog-workbook-attr.c
+++ b/src/dialogs/dialog-workbook-attr.c
@@ -276,6 +276,7 @@ attr_dialog_impl (AttrState *state)
G_TYPE_STRING,
G_TYPE_INT);
gtk_tree_view_set_model (state->tview, GTK_TREE_MODEL(state->store));
+ g_object_unref (state->store);
selection = gtk_tree_view_get_selection (state->tview);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
column = gtk_tree_view_column_new_with_attributes ("",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]