diff --git a/ChangeLog b/ChangeLog index 78af4485c5..fea1a6df31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize): + Free the path fields. + + * gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free + the root_path, reported by + (gtk_file_system_model_finalize): Unref the file system. + + * gtk/gtkfilefilter.c (filter_rule_free): default: + g_assert_not_reached(). + (gtk_file_filter_finalize): Free the filter->name, reported by + + (gtk_file_filter_finalize): Free the rules list. + Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 78af4485c5..fea1a6df31 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,18 @@ +2004-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize): + Free the path fields. + + * gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free + the root_path, reported by + (gtk_file_system_model_finalize): Unref the file system. + + * gtk/gtkfilefilter.c (filter_rule_free): default: + g_assert_not_reached(). + (gtk_file_filter_finalize): Free the filter->name, reported by + + (gtk_file_filter_finalize): Free the rules list. + Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 78af4485c5..fea1a6df31 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,18 @@ +2004-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize): + Free the path fields. + + * gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free + the root_path, reported by + (gtk_file_system_model_finalize): Unref the file system. + + * gtk/gtkfilefilter.c (filter_rule_free): default: + g_assert_not_reached(). + (gtk_file_filter_finalize): Free the filter->name, reported by + + (gtk_file_filter_finalize): Free the rules list. + Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 78af4485c5..fea1a6df31 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,18 @@ +2004-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize): + Free the path fields. + + * gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free + the root_path, reported by + (gtk_file_system_model_finalize): Unref the file system. + + * gtk/gtkfilefilter.c (filter_rule_free): default: + g_assert_not_reached(). + (gtk_file_filter_finalize): Free the filter->name, reported by + + (gtk_file_filter_finalize): Free the rules list. + Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 78af4485c5..fea1a6df31 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,18 @@ +2004-01-21 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize): + Free the path fields. + + * gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free + the root_path, reported by + (gtk_file_system_model_finalize): Unref the file system. + + * gtk/gtkfilefilter.c (filter_rule_free): default: + g_assert_not_reached(). + (gtk_file_filter_finalize): Free the filter->name, reported by + + (gtk_file_filter_finalize): Free the rules list. + Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 1a8f30c94a..6af3934fa5 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -376,6 +376,17 @@ gtk_file_chooser_default_finalize (GObject *object) impl->bookmarks_changed_id = 0; g_object_unref (impl->file_system); + /* FIXME: Free impl->filters -- what's the memory management there? */ + + if (impl->current_volume_path) + gtk_file_path_free (impl->current_volume_path); + + if (impl->current_folder) + gtk_file_path_free (impl->current_folder); + + if (impl->preview_path) + gtk_file_path_free (impl->preview_path); + G_OBJECT_CLASS (parent_class)->finalize (object); } diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c index d17af98f5e..826c171937 100644 --- a/gtk/gtkfilefilter.c +++ b/gtk/gtkfilefilter.c @@ -34,7 +34,7 @@ typedef struct _FilterRule FilterRule; typedef enum { FILTER_RULE_PATTERN, FILTER_RULE_MIME_TYPE, - FILTER_RULE_CUSTOM, + FILTER_RULE_CUSTOM } FilterRuleType; struct _GtkFileFilterClass @@ -125,6 +125,8 @@ filter_rule_free (FilterRule *rule) if (rule->u.custom.notify) rule->u.custom.notify (rule->u.custom.data); break; + default: + g_assert_not_reached (); } g_free (rule); @@ -136,6 +138,10 @@ gtk_file_filter_finalize (GObject *object) GtkFileFilter *filter = GTK_FILE_FILTER (object); g_slist_foreach (filter->rules, (GFunc)filter_rule_free, NULL); + g_slist_free (filter->rules); + + if (filter->name) + g_free (filter->name); parent_class->finalize (object); } diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index e9f6282544..1d28fd7851 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -256,6 +256,12 @@ gtk_file_system_model_finalize (GObject *object) if (model->root_folder) g_object_unref (model->root_folder); + if (model->root_path) + gtk_file_path_free (model->root_path); + + if (model->file_system) + g_object_unref (model->file_system); + children = model->roots; while (children) {