Commit 891fefb9 authored by Morten Welinder's avatar Morten Welinder

Cleanup.

parent 22147517
...@@ -435,19 +435,15 @@ cb_dialog_destroy (SortFlowState *state) ...@@ -435,19 +435,15 @@ cb_dialog_destroy (SortFlowState *state)
value_release (state->sel); value_release (state->sel);
state->sel = NULL; state->sel = NULL;
if (state->model != NULL) g_clear_object (&state->model);
g_object_unref (state->model); g_clear_object (&state->gui);
if (state->gui != NULL)
g_object_unref (state->gui);
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL); wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
state->dialog = NULL; state->dialog = NULL;
g_object_unref (state->image_ascending); g_clear_object (&state->image_ascending);
state->image_ascending = NULL; g_clear_object (&state->image_descending);
g_object_unref (state->image_descending);
state->image_descending = NULL;
g_free (state); g_free (state);
} }
...@@ -1008,14 +1004,16 @@ dialog_init (SortFlowState *state) ...@@ -1008,14 +1004,16 @@ dialog_init (SortFlowState *state)
"changed", "changed",
G_CALLBACK (cb_sort_selection_changed), state); G_CALLBACK (cb_sort_selection_changed), state);
state->header_column = gtk_tree_view_column_new_with_attributes (_("Header"), state->header_column = gtk_tree_view_column_new_with_attributes
gtk_cell_renderer_text_new (), (_("Header"),
"text", ITEM_HEADER, NULL); gtk_cell_renderer_text_new (),
"text", ITEM_HEADER, NULL);
gtk_tree_view_append_column (state->treeview, state->header_column); gtk_tree_view_append_column (state->treeview, state->header_column);
column = gtk_tree_view_column_new_with_attributes (_("Row/Column"), column = gtk_tree_view_column_new_with_attributes
gtk_cell_renderer_text_new (), (_("Row/Column"),
"text", ITEM_NAME, NULL); gtk_cell_renderer_text_new (),
"text", ITEM_NAME, NULL);
gtk_tree_view_append_column (state->treeview, column); gtk_tree_view_append_column (state->treeview, column);
renderer = gnumeric_cell_renderer_toggle_new (); renderer = gnumeric_cell_renderer_toggle_new ();
...@@ -1157,7 +1155,7 @@ dialog_cell_sort (WBCGtk *wbcg) ...@@ -1157,7 +1155,7 @@ dialog_cell_sort (WBCGtk *wbcg)
return; return;
gui = gnm_gtk_builder_load ("cell-sort.ui", NULL, GO_CMD_CONTEXT (wbcg)); gui = gnm_gtk_builder_load ("cell-sort.ui", NULL, GO_CMD_CONTEXT (wbcg));
if (gui == NULL) if (gui == NULL)
return; return;
state = g_new (SortFlowState, 1); state = g_new (SortFlowState, 1);
......
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