diff options
author | Larry Ewing <lewing@ximian.com> | 2003-06-24 03:11:46 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2003-06-24 03:11:46 +0800 |
commit | 2bebec36f0c05956ca41e4ec5889f19081b52408 (patch) | |
tree | 43f75573d9942d4889b6798371df4d542598d750 | |
parent | ec6e839442cb297aa930a3761494d1de139e44e1 (diff) | |
download | gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar.gz gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar.bz2 gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar.lz gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar.xz gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.tar.zst gsoc2013-evolution-2bebec36f0c05956ca41e4ec5889f19081b52408.zip |
fix string duplication and refcounting problems.
2003-06-23 Larry Ewing <lewing@ximian.com>
* gal-define-views-dialog.c (gdvd_button_new_dialog_callback): fix
string duplication and refcounting problems.
2003-06-20 Larry Ewing <lewing@ximian.com>
* gal-view-etable.c (config_changed): unref after g_object_get
adds a ref.
svn path=/trunk/; revision=21516
-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)); } |