Patch from Kjartan Maraas to fix a bunch of leaks.

Thu Feb 13 18:51:37 2003  Jonathan Blandford  <jrb@redhat.com>

        * capplets/common/gconf-property-editor.c: (gconf_peditor_new):
        * capplets/common/gnome-theme-info.c: (read_meta_theme),
        (update_theme_index), (update_common_theme_dir_index),
        (top_theme_dir_changed), (top_icon_theme_dir_changed),
        (add_common_theme_dir_monitor), (real_add_top_theme_dir_monitor):
        * capplets/default-applications/gnome-default-applications-properti
        es.c: (initialize_default_applications), (read_editor),
        (read_terminal):
        * capplets/file-types/mime-edit-dialog.c: (fill_dialog):
        * capplets/file-types/mime-type-info.c: (load_all_mime_types):
        * capplets/file-types/mime-types-model.c:
        (mime_types_model_get_value):
        * capplets/font/main.c: (font_render_get_gconf), (enum_group_load):
        * capplets/mouse/gnome-mouse-properties.c: (read_cursor_font),
        (cursor_changed):
        * capplets/theme-switcher/gnome-theme-details.c:
        (window_theme_selection_changed):
        * capplets/theme-switcher/gnome-theme-manager.c:
        (meta_theme_selection_changed):
        * capplets/theme-switcher/theme-thumbnail.c:
        (generate_theme_thumbnail):
        * libsounds/sound-properties.c: (sound_properties_add_directory),
        (sound_properties_add_file):
        * libsounds/sound-view.c: (compare_func):
        * libwindow-settings/gnome-window-manager.c:
        (gnome_window_manager_new): Patch from Kjartan Maraas to fix a
        bunch of leaks.
This commit is contained in:
Jonathan Blandford 2003-02-14 00:02:50 +00:00 committed by Jonathan Blandford
parent 81e38ad5b2
commit bd160edddf
13 changed files with 138 additions and 46 deletions

View file

@ -185,16 +185,25 @@ initialize_default_applications (void)
text_editors = gnome_vfs_mime_get_all_applications ("text/plain");
for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ ) {
if (g_find_program_in_path (possible_browsers[i].executable_name))
gchar *browsers = g_find_program_in_path (possible_browsers[i].executable_name);
if (browsers) {
possible_browsers[i].in_path = TRUE;
g_free(browsers);
}
}
for (i = 0; i < G_N_ELEMENTS (possible_help_viewers); i++ ) {
if (g_find_program_in_path (possible_help_viewers[i].executable_name))
gchar *help_viewers = g_find_program_in_path (possible_help_viewers[i].executable_name);
if (help_viewers) {
possible_help_viewers[i].in_path = TRUE;
g_free (help_viewers);
}
}
for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ ) {
if (g_find_program_in_path (possible_terminals[i].exec))
gchar *terminals = g_find_program_in_path (possible_terminals[i].exec);
if (terminals) {
possible_terminals[i].in_path = TRUE;
g_free (terminals);
}
}
}
@ -230,6 +239,7 @@ read_editor (GConfClient *client,
gtk_entry_set_text (GTK_ENTRY (WID ("text_select_combo_entry")), mime_app->name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_radio")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_select_radio")), TRUE);
gnome_vfs_mime_application_free (mime_app);
return;
}
}
@ -252,6 +262,8 @@ read_editor (GConfClient *client,
read_editor_custom:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_select_radio")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_radio")), TRUE);
if (mime_app)
gnome_vfs_mime_application_free (mime_app);
}
static void
@ -495,6 +507,8 @@ read_terminal (GConfClient *client,
_(possible_terminals[i].name));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_custom_radio")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_select_radio")), TRUE);
g_free (exec);
g_free (exec_arg);
return;
}
}