]> git.lyx.org Git - features.git/commitdiff
Fix crash in FormPreferences.
authorAngus Leeming <leeming@lyx.org>
Fri, 14 Jun 2002 09:17:11 +0000 (09:17 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 14 Jun 2002 09:17:11 +0000 (09:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4397 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormPreferences.C

index 38b169557935d097a3d850cd084f5448025eea32..aab729f7afcc655e38f56edd5146db7e0f3f2aae 100644 (file)
@@ -1,3 +1,13 @@
+2002-06-14  Angus Leeming  <leeming@lyx.org>
+
+       * FormPreferences (XYZ::build): pass "&parent_" to build_xyz, not
+       "this", ro we'll get a crash following FormBaseDeprecated's
+       C_PrehandlerCB cast of ob->form->u_vdata to FormBaseDeprecated *.
+
+       This is the only form in which all the folders are not built in the
+       parent class direct, so this is the only one that should suffer from
+       this bug.
+
 2002-06-12  Angus Leeming  <leeming@lyx.org>
 
        * form_*.[Ch]: removed from the repository.
index 5b3ca6cad7a48533ad07e275f2714a2be072c4c5..0a5fa59d02d8b063f67df8712db0c48254013d85 100644 (file)
@@ -459,7 +459,7 @@ void FormPreferences::Colors::apply()
 
 void FormPreferences::Colors::build()
 {
-       dialog_.reset(build_preferences_colors(this));
+       dialog_.reset(build_preferences_colors(&parent_));
 
        fl_set_object_color(dialog_->button_color,
                            GUI_COLOR_CHOICE, GUI_COLOR_CHOICE);
@@ -942,7 +942,7 @@ void FormPreferences::Converters::apply() const
 
 void FormPreferences::Converters::build()
 {
-       dialog_.reset(build_preferences_converters(this));
+       dialog_.reset(build_preferences_converters(&parent_));
 
        fl_set_input_return(dialog_->input_converter, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_flags, FL_RETURN_CHANGED);
@@ -1199,7 +1199,7 @@ void FormPreferences::Formats::apply() const
 
 void FormPreferences::Formats::build()
 {
-       dialog_.reset(build_preferences_formats(this));
+       dialog_.reset(build_preferences_formats(&parent_));
 
        fl_set_input_return(dialog_->input_format, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_viewer, FL_RETURN_CHANGED);
@@ -1425,7 +1425,7 @@ void FormPreferences::InputsMisc::apply() const
 
 void FormPreferences::InputsMisc::build()
 {
-       dialog_.reset(build_preferences_inputs_misc(this));
+       dialog_.reset(build_preferences_inputs_misc(&parent_));
 
        fl_set_input_return(dialog_->input_date_format, FL_RETURN_CHANGED);
 
@@ -1480,7 +1480,7 @@ void FormPreferences::Interface::apply() const
 
 void FormPreferences::Interface::build()
 {
-       dialog_.reset(build_preferences_interface(this));
+       dialog_.reset(build_preferences_interface(&parent_));
 
        fl_set_input_return(dialog_->input_popup_normal_font, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_popup_bold_font, FL_RETURN_CHANGED);
@@ -1627,7 +1627,7 @@ void FormPreferences::Language::apply()
 
 void FormPreferences::Language::build()
 {
-       dialog_.reset(build_preferences_language(this));
+       dialog_.reset(build_preferences_language(&parent_));
 
        fl_set_input_return(dialog_->input_package, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_command_begin, FL_RETURN_CHANGED);
@@ -1856,7 +1856,7 @@ void FormPreferences::LnFmisc::apply() const
 
 void FormPreferences::LnFmisc::build()
 {
-       dialog_.reset(build_preferences_lnf_misc(this));
+       dialog_.reset(build_preferences_lnf_misc(&parent_));
 
        fl_set_counter_step(dialog_->counter_autosave, 1, 10);
        fl_set_counter_step(dialog_->counter_wm_jump, 1, 10);
@@ -1971,7 +1971,7 @@ void FormPreferences::OutputsMisc::apply() const
 
 void FormPreferences::OutputsMisc::build()
 {
-       dialog_.reset(build_preferences_outputs_misc(this));
+       dialog_.reset(build_preferences_outputs_misc(&parent_));
 
        fl_set_counter_step(dialog_->counter_line_len, 1, 10);
 
@@ -2087,7 +2087,7 @@ void FormPreferences::Paths::apply()
 
 void FormPreferences::Paths::build()
 {
-       dialog_.reset(build_preferences_paths(this));
+       dialog_.reset(build_preferences_paths(&parent_));
 
        fl_set_input_return(dialog_->input_default_path, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_template_path, FL_RETURN_CHANGED);
@@ -2377,7 +2377,7 @@ FormPreferences::Printer::feedback(FL_OBJECT const * const ob) const
 
 void FormPreferences::Printer::build()
 {
-       dialog_.reset(build_preferences_printer(this));
+       dialog_.reset(build_preferences_printer(&parent_));
 
        fl_set_input_return(dialog_->input_command, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_page_range, FL_RETURN_CHANGED);
@@ -2589,7 +2589,7 @@ void FormPreferences::ScreenFonts::apply() const
 
 void FormPreferences::ScreenFonts::build()
 {
-       dialog_.reset(build_preferences_screen_fonts(this));
+       dialog_.reset(build_preferences_screen_fonts(&parent_));
 
        fl_set_counter_step(dialog_->counter_zoom, 1, 10);
        fl_set_counter_step(dialog_->counter_dpi,  1, 10);
@@ -2844,7 +2844,7 @@ void FormPreferences::SpellOptions::apply()
 
 void FormPreferences::SpellOptions::build()
 {
-       dialog_.reset(build_preferences_spelloptions(this));
+       dialog_.reset(build_preferences_spelloptions(&parent_));
 
        fl_addto_choice(dialog_->choice_spell_command,
                        _(" ispell | aspell "));