Commit 82d7404e authored by Morten Welinder's avatar Morten Welinder

GUI: plug leaks.

parent d1eab4ba
2011-02-18 Morten Welinder <terra@gnome.org>
* dialog-cell-format.c (build_validation_error_combo): Don't leak
a ref to "store".
(fmt_dialog_init_conditions_page): Plug leak.
* dialog-solver.c (fill_algorithm_combo): Don't leak a ref to
"store".
(dialog_init): Ditto.
......
......@@ -1772,48 +1772,52 @@ build_validation_error_combo (GtkComboBox *box)
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
1, _("None (silently accept invalid input)"),
-1);
1, _("None (silently accept invalid input)"),
-1);
pixbuf = gtk_widget_render_icon (GTK_WIDGET (box), GTK_STOCK_STOP,
GTK_ICON_SIZE_BUTTON, NULL);
GTK_ICON_SIZE_BUTTON, NULL);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, pixbuf,
1, _("Stop (never allow invalid input)"),
-1);
0, pixbuf,
1, _("Stop (never allow invalid input)"),
-1);
pixbuf = gtk_widget_render_icon (GTK_WIDGET (box), GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_BUTTON, NULL);
pixbuf = gtk_widget_render_icon (GTK_WIDGET (box),
GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_BUTTON, NULL);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, pixbuf,
1, _("Warning (accept/discard invalid input)"),
-1);
0, pixbuf,
1, _("Warning (accept/discard invalid input)"),
-1);
pixbuf = gtk_widget_render_icon (GTK_WIDGET (box), GTK_STOCK_DIALOG_INFO,
GTK_ICON_SIZE_BUTTON, NULL);
pixbuf = gtk_widget_render_icon (GTK_WIDGET (box),
GTK_STOCK_DIALOG_INFO,
GTK_ICON_SIZE_BUTTON, NULL);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, pixbuf,
1, _("Information (allow invalid input)"),
-1);
0, pixbuf,
1, _("Information (allow invalid input)"),
-1);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (box),
renderer,
FALSE);
renderer,
FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (box), renderer,
"pixbuf", 0,
NULL);
"pixbuf", 0,
NULL);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (box),
renderer,
TRUE);
renderer,
TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (box), renderer,
"text", 1,
NULL);
"text", 1,
NULL);
g_object_unref (store);
}
static void
......@@ -2212,6 +2216,8 @@ fmt_dialog_init_conditions_page (FormatState *state)
treeview = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "conditions_treeview"));
gtk_tree_view_set_fixed_height_mode (treeview, FALSE);
gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (state->conditions.model));
g_object_unref (state->conditions.model);
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes
("Range", renderer, "text", CONDITIONS_RANGE, NULL);
......
2011-02-18 Morten Welinder <terra@gnome.org>
* widget-font-selector.c (list_init): Plug leak.
2011-02-13 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gee_set_tooltip): add Ctrl-F4 info
......
......@@ -141,6 +141,7 @@ list_init (GtkTreeView* view)
gtk_tree_view_set_headers_visible (view, FALSE);
store = gtk_list_store_new (1, G_TYPE_STRING);
gtk_tree_view_set_model (view, GTK_TREE_MODEL (store));
g_object_unref (store);
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes
(NULL, renderer, "text", 0, NULL);
......
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