From fe9d927e392a8424d32428d6f828086e70a24ac9 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 17 Jul 2002 04:53:05 +0000 Subject: [PATCH] remove 2nd exit confirmation. I think this mutated over time, because the descriptions of what the option did disagree git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4672 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 6 +++++ src/bufferlist.C | 5 ---- src/frontends/xforms/ChangeLog | 5 ++++ src/frontends/xforms/FormPreferences.C | 5 ---- src/frontends/xforms/XFormsView.C | 1 + .../xforms/forms/form_preferences.fd | 25 +++---------------- src/lyxrc.C | 18 ------------- src/lyxrc.h | 3 --- 8 files changed, 15 insertions(+), 53 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 19391d755c..452dfa8cf5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-07-17 John Levon + + * bufferlist.C: + * lyxrc.h: + * lyxrc.C: remove second exit confirmation + 2002-07-17 John Levon * BufferView.h: diff --git a/src/bufferlist.C b/src/bufferlist.C index f185e71346..d3e14cb2a2 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -152,11 +152,6 @@ bool BufferList::qwriteAll() } } - if (!unsaved.empty() && lyxrc.exit_confirmation) { - return Alert::askQuestion(_("Some documents were not saved:"), - unsaved, _("Exit anyway?")); - } - return true; } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index d5fe41eace..d1e11dcead 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-07-17 John Levon + + * FormPreferences.C: + * forms/form_preferences.fd: remove 2nd exit confirmation + 2002-07-17 John Levon * XFormsView.h: diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index e0d6bb1838..df38ede03c 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -1821,7 +1821,6 @@ void FormPreferences::LnFmisc::apply() const { lyxrc.auto_region_delete = fl_get_button(dialog_->check_auto_region_delete); - lyxrc.exit_confirmation = fl_get_button(dialog_->check_exit_confirm); lyxrc.cursor_follows_scrollbar = fl_get_button(dialog_->check_cursor_follows_scrollbar); lyxrc.dialogs_iconify_with_main = @@ -1867,7 +1866,6 @@ void FormPreferences::LnFmisc::build() // set up the feedback mechanism setPrehandler(dialog_->check_auto_region_delete); - setPrehandler(dialog_->check_exit_confirm); setPrehandler(dialog_->counter_autosave); setPrehandler(dialog_->check_cursor_follows_scrollbar); setPrehandler(dialog_->check_dialogs_iconify_with_main); @@ -1887,8 +1885,6 @@ FormPreferences::LnFmisc::feedback(FL_OBJECT const * const ob) const if (ob == dialog_->check_auto_region_delete) str = lyxrc.getDescription(LyXRC::RC_AUTOREGIONDELETE); - else if (ob == dialog_->check_exit_confirm) - str = lyxrc.getDescription(LyXRC::RC_EXIT_CONFIRMATION); else if (ob == dialog_->check_cursor_follows_scrollbar) str = lyxrc.getDescription(LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR); else if (ob == dialog_->check_dialogs_iconify_with_main) @@ -1913,7 +1909,6 @@ void FormPreferences::LnFmisc::update() { fl_set_button(dialog_->check_auto_region_delete, lyxrc.auto_region_delete); - fl_set_button(dialog_->check_exit_confirm, lyxrc.exit_confirmation); fl_set_button(dialog_->check_cursor_follows_scrollbar, lyxrc.cursor_follows_scrollbar); fl_set_button(dialog_->check_dialogs_iconify_with_main, diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C index 5e90fe3a2a..ba903d2f70 100644 --- a/src/frontends/xforms/XFormsView.C +++ b/src/frontends/xforms/XFormsView.C @@ -32,6 +32,7 @@ #include "MenuBackend.h" #include "ToolbarDefaults.h" #include "lyxfunc.h" +#include "bufferview_funcs.h" #include "BufferView.h" #include diff --git a/src/frontends/xforms/forms/form_preferences.fd b/src/frontends/xforms/forms/form_preferences.fd index 0bfbe193ba..1a5b8c3233 100644 --- a/src/frontends/xforms/forms/form_preferences.fd +++ b/src/frontends/xforms/forms/form_preferences.fd @@ -1101,7 +1101,7 @@ argument: 0 Name: form_preferences_lnf_misc Width: 450 Height: 350 -Number of Objects: 17 +Number of Objects: 16 -------------------- class: FL_BOX @@ -1161,26 +1161,7 @@ argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 15 65 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Exit confirmation|#E -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: check_exit_confirm -callback: C_FormBaseDeprecatedInputCB -argument: 0 - value: 1 - --------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON -box: 15 105 30 30 +box: 15 75 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -1199,7 +1180,7 @@ argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 15 145 30 30 +box: 15 130 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER diff --git a/src/lyxrc.C b/src/lyxrc.C index f782571ee1..aa4c6cc358 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -69,7 +69,6 @@ keyword_item lyxrcTags[] = { { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS }, { "\\document_path", LyXRC::RC_DOCUMENTPATH }, { "\\escape_chars", LyXRC::RC_ESC_CHARS }, - { "\\exit_confirmation", LyXRC::RC_EXIT_CONFIRMATION }, { "\\font_encoding", LyXRC::RC_FONT_ENCODING }, { "\\format", LyXRC::RC_FORMAT }, { "\\input", LyXRC::RC_INPUT }, @@ -225,7 +224,6 @@ void LyXRC::setDefaults() { check_lastfiles = true; make_backup = true; backupdir_path.erase(); - exit_confirmation = true; display_graphics = "color"; // Spellchecker settings: #ifdef USE_PSPELL @@ -347,11 +345,6 @@ int LyXRC::read(string const & filename) } break; - case RC_EXIT_CONFIRMATION: - if (lexrc.next()) - exit_confirmation = lexrc.getBool(); - break; - case RC_AUTORESET_OPTIONS: if (lexrc.next()) auto_reset_options = lexrc.getBool(); @@ -1047,13 +1040,6 @@ void LyXRC::output(ostream & os) const os << "# The time interval between auto-saves in seconds.\n" << "\\autosave " << autosave << "\n"; } - case RC_EXIT_CONFIRMATION: - if (exit_confirmation != system_lyxrc.exit_confirmation) { - os << "# Ask for confirmation before exit if there are\n" - << "# unsaved changed documents.\n" - << "\\exit_confirmation " << tostr(exit_confirmation) - << "\n"; - } case RC_DISPLAY_GRAPHICS: if (display_graphics != system_lyxrc.display_graphics) { os << "# Display graphics within LyX\n" @@ -1925,10 +1911,6 @@ string const LyXRC::getDescription(LyXRCTags tag) str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)"); break; - case RC_EXIT_CONFIRMATION: - str = _("Sets whether LyX asks for a second confirmation to exit when you have changed documents. (LyX will still ask to save changed documents.)"); - break; - case RC_DISPLAY_GRAPHICS: str = _("Select how LyX will display any graphics."); break; diff --git a/src/lyxrc.h b/src/lyxrc.h index 2c206d2ff6..33312a8f1b 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -96,7 +96,6 @@ enum LyXRCTags { RC_CHKTEX_COMMAND, RC_CURSOR_FOLLOWS_SCROLLBAR, RC_DIALOGS_ICONIFY_WITH_MAIN, - RC_EXIT_CONFIRMATION, RC_MAKE_BACKUP, RC_BACKUPDIR_PATH, RC_RTL_SUPPORT, @@ -301,8 +300,6 @@ enum LyXRCTags { string isp_esc_chars; /// bool use_kbmap; - /// Ask for confirmation of exit when there are unsaved documents? - bool exit_confirmation; /// string primary_kbmap; ///