diff options
-rw-r--r-- | widgets/menus/gal-define-views-dialog.c | 10 | ||||
-rw-r--r-- | widgets/menus/gal-view-etable.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c index db912f3129..4337901e48 100644 --- a/widgets/menus/gal-define-views-dialog.c +++ b/widgets/menus/gal-define-views-dialog.c @@ -112,16 +112,16 @@ gdvd_button_new_dialog_callback(GtkWidget *widget, int id, GalDefineViewsDialog "factory", &factory, NULL); if (name && factory) { - gchar *dup_of_name = g_strdup(name); - g_strchomp(dup_of_name); - if (*dup_of_name != '\0') { - view = gal_view_factory_new_view(factory, dup_of_name); + g_strchomp(name); + if (*name != '\0') { + view = gal_view_factory_new_view(factory, name); gal_define_views_model_append(GAL_DEFINE_VIEWS_MODEL(dialog->model), view); gal_view_edit(view, GTK_WINDOW (dialog)); g_object_unref(view); } - g_free(dup_of_name); } + g_object_unref(factory); + g_free(name); break; } gtk_widget_destroy (widget); diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c index a881b52bab..a46368559e 100644 --- a/widgets/menus/gal-view-etable.c +++ b/widgets/menus/gal-view-etable.c @@ -67,6 +67,8 @@ config_changed (ETableConfig *config, GalViewEtable *view) "state", &state, NULL); view->state = e_table_state_duplicate(state); + g_object_unref (state); + gal_view_changed(GAL_VIEW(view)); } |