# HG changeset patch # User masneyb # Date 1059526652 0 # Node ID 25b063db93e19f9ffa3415ce35fa218cc31d7d8a # Parent 5915bb2d2c83788ef8ba24bd226c6aacc35fc8c0 2003-7-29 Brian Masney * src/gtk/options_dialog.c - fix crash that would occur when hitting apply, then ok diff -r 5915bb2d2c83 -r 25b063db93e1 ChangeLog --- a/ChangeLog Sun Jul 27 21:09:22 2003 +0000 +++ b/ChangeLog Wed Jul 30 00:57:32 2003 +0000 @@ -1,3 +1,7 @@ +2003-7-29 Brian Masney + * src/gtk/options_dialog.c - fix crash that would occur when hitting + apply, then ok + 2003-7-25 Brian Masney * configure.in - define HAVE_OPENPTY if openpty() is found in libutil @@ -1379,7 +1383,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.121 2003/07/25 20:56:26 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.122 2003/07/30 00:57:32 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 5915bb2d2c83 -r 25b063db93e1 src/gtk/options_dialog.c --- a/src/gtk/options_dialog.c Sun Jul 27 21:09:22 2003 +0000 +++ b/src/gtk/options_dialog.c Wed Jul 30 00:57:32 2003 +0000 @@ -427,21 +427,6 @@ static void -_cancel_option_type_textcomboedt (gftp_config_vars * cv, void *user_data) -{ - gftp_textcomboedt_widget_data * widdata; - - widdata = cv->user_data; - if (widdata != NULL) - { - if (widdata->custom_edit_value != NULL) - g_free (widdata->custom_edit_value); - g_free (widdata); - } -} - - -static void _save_option_type_textcomboedt (gftp_config_vars * cv, void *user_data) { gftp_textcomboedt_widget_data * widdata; @@ -492,8 +477,6 @@ if (freeit) g_free (newstr); - - _cancel_option_type_textcomboedt (cv, user_data); } @@ -669,6 +652,30 @@ static void clean_old_changes (GtkWidget * widget, gpointer data) { + gftp_textcomboedt_widget_data * widdata; + gftp_config_vars * cv; + GList * templist; + int i; + + for (templist = gftp_options_list; + templist != NULL; + templist = templist->next) + { + cv = templist->data; + + for (i=0; cv[i].key != NULL; i++) + { + widdata = cv->user_data; + if (widdata != NULL) + { + if (widdata->custom_edit_value != NULL) + g_free (widdata->custom_edit_value); + g_free (widdata); + cv->user_data = NULL; + } + } + } + if (new_proxy_hosts != NULL) { gftp_free_proxy_hosts (new_proxy_hosts); @@ -1205,7 +1212,7 @@ _setup_option (gftp_option_type_textcomboedt, option_data, _print_option_type_textcomboedt, _save_option_type_textcomboedt, - _cancel_option_type_textcomboedt); + NULL); _setup_option (gftp_option_type_hidetext, option_data, _print_option_type_hidetext, _save_option_type_text, NULL); _setup_option (gftp_option_type_int, option_data,