+2001-09-07 Rob Lahaye <lahaye@users.sourceforge.net>
+
+ * lyxrc.[Ch]: added dialogs_iconify_with_main variable and associated
+ code.
+
2001-09-04 José Matos <jamatos@fep.up.pt>
* buffer.C
* buffer.h
+2001-09-07 Rob Lahaye <lahaye@users.sourceforge.net>
+
+ * ControlButtons.[Ch]: added publicly accessible IconifyWithMain method.
+
2001-09-04 Angus Leeming <a.leeming@ic.ac.uk>
* ControlCharacter.C: fix Michael's bug: In the "Character layout"
#include "ControlButtons.h"
#include "ButtonControllerBase.h"
#include "ViewBase.h"
+#include "lyxrc.h"
ControlButtons::ControlButtons()
: is_closing_(false)
update();
bc().restore();
}
+
+
+bool ControlButtons::IconifyWithMain() const
+{
+ return lyxrc.dialogs_iconify_with_main;
+}
void CancelButton();
///
void RestoreButton();
+ ///
+ bool IconifyWithMain() const;
/** Allow the view to access the ButtonController. This method must be
instantiated in a daughter class that creates the actual instance
+2001-09-07 Rob Lahaye <lahaye@users.sourceforge.net>
+
+ * FormBase.C (show): use controller_.IconifyWithMain() to control
+ the dialog's show policy
+
+ * FormBaseDeprecated.C (show): ditto, but use lyxrc variable directly.
+
+ * FormPreferences.C:
+ * forms/form_preferences.fd: add a check_dialogs_iconify_with_main
+ check button to the Look & Feel->Misc tab and code to modify the lyxrc
+ variable dialogs_iconify_with_main appropriately.
+
+2001-09-07 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * FormBase.h: clean-up comments. Remove mutable status of minw_, minh_.
+
2001-09-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* Toolbar_pimpl.C (updateLayoutList): do not display obsolete
fl_set_form_maxsize(form(), minw_, minh_);
fl_show_form(form(),
- FL_PLACE_MOUSE | FL_FREE_SIZE, 0,
- title_.c_str());
+ FL_PLACE_MOUSE | FL_FREE_SIZE,
+ (controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
+ title_.c_str());
}
}
private:
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const = 0;
- /** Filter the inputs on callback from xforms
- Return true if inputs are valid. */
+ /// Filter the inputs on callback from xforms
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
/** Redraw the form (on receipt of a Signal indicating, for example,
that the xform colors have been re-mapped). */
virtual void redraw();
- /// Overcome a dumb xforms sizing bug
- mutable int minw_;
+ /// The dialog's minimum allowable dimensions.
+ int minw_;
///
- mutable int minh_;
+ int minh_;
/// Can the dialog be resized after it has been created?
bool allow_resize_;
-
/// dialog title, displayed by WM.
string title_;
};
#include "LyXView.h"
#include "support/LAssert.h"
#include "xformsBC.h"
+#include "lyxrc.h"
//#include "debug.h"
using SigC::slot;
// calls to fl_set_form_minsize/maxsize apply only to the next
// fl_show_form(), so connect() comes first.
connect();
+
fl_show_form(form(),
- FL_PLACE_MOUSE | FL_FREE_SIZE, 0,
- title_.c_str());
+ FL_PLACE_MOUSE | FL_FREE_SIZE,
+ (lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
+ title_.c_str());
}
}
lyxrc.new_ask_filename = fl_get_button(dialog_->check_ask_new_file);
lyxrc.cursor_follows_scrollbar =
fl_get_button(dialog_->check_cursor_follows_scrollbar);
+ lyxrc.dialogs_iconify_with_main =
+ fl_get_button(dialog_->check_dialogs_iconify_with_main);
lyxrc.autosave = static_cast<unsigned int>
(fl_get_counter_value(dialog_->counter_autosave));
lyxrc.wheel_jump = static_cast<unsigned int>
setPreHandler(dialog_->counter_autosave);
setPreHandler(dialog_->check_ask_new_file);
setPreHandler(dialog_->check_cursor_follows_scrollbar);
+ setPreHandler(dialog_->check_dialogs_iconify_with_main);
setPreHandler(dialog_->counter_wm_jump);
}
str = lyxrc.getDescription(LyXRC::RC_NEW_ASK_FILENAME);
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)
+ str = lyxrc.getDescription(LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN);
else if (ob == dialog_->counter_autosave)
str = lyxrc.getDescription(LyXRC::RC_AUTOSAVE);
else if (ob == dialog_->counter_wm_jump)
fl_set_button(dialog_->check_ask_new_file, lyxrc.new_ask_filename);
fl_set_button(dialog_->check_cursor_follows_scrollbar,
lyxrc.cursor_follows_scrollbar);
+ fl_set_button(dialog_->check_dialogs_iconify_with_main,
+ lyxrc.dialogs_iconify_with_main);
fl_set_counter_value(dialog_->counter_autosave, lyxrc.autosave);
fl_set_counter_value(dialog_->counter_wm_jump, lyxrc.wheel_jump);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fl_set_button(obj, 1);
+ {
+ char const * const dummy = N_("Dialogs iconify with main window|#D");
+ fdui->check_dialogs_iconify_with_main = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 15, 195, 30, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+ fl_set_button(obj, 1);
fdui->counter_wm_jump = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 225, 115, 30, _("Wheel mouse jump"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
FL_OBJECT *check_display_shrtcuts;
FL_OBJECT *check_ask_new_file;
FL_OBJECT *check_cursor_follows_scrollbar;
+ FL_OBJECT *check_dialogs_iconify_with_main;
FL_OBJECT *counter_wm_jump;
FL_OBJECT *counter_autosave;
};
Name: form_lnf_misc
Width: 450
Height: 350
-Number of Objects: 9
+Number of Objects: 10
--------------------
class: FL_BOX
argument: 0
value: 1
+--------------------
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 15 195 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: Dialogs iconify with main window|#D
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: check_dialogs_iconify_with_main
+callback: C_FormBaseDeprecatedInputCB
+argument: 0
+ value: 1
+
--------------------
class: FL_COUNTER
type: NORMAL_COUNTER
{ "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
{ "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
{ "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
+ { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
{ "\\display_shortcuts", LyXRC::RC_DISPLAY_SHORTCUTS },
{ "\\document_path", LyXRC::RC_DOCUMENTPATH },
{ "\\escape_chars", LyXRC::RC_ESC_CHARS },
date_insert_format = "%A, %e %B %Y";
show_banner = true;
cursor_follows_scrollbar = false;
+ dialogs_iconify_with_main = false;
label_init_length = 3;
/// These variables are not stored on disk (perhaps they
cursor_follows_scrollbar = lexrc.getBool();
break;
+ case RC_DIALOGS_ICONIFY_WITH_MAIN:
+ if (lexrc.next())
+ dialogs_iconify_with_main = lexrc.getBool();
+ break;
+
case RC_ASCIIROFF_COMMAND:
if (lexrc.next())
ascii_roff_command = lexrc.getString();
os << "\\cursor_follows_scrollbar "
<< tostr(cursor_follows_scrollbar) << "\n";
}
+ case RC_DIALOGS_ICONIFY_WITH_MAIN:
+ if (dialogs_iconify_with_main
+ != system_lyxrc.dialogs_iconify_with_main) {
+ os << "\\dialogs_iconify_with_main "
+ << tostr(dialogs_iconify_with_main) << "\n";
+ }
case RC_SCREEN_FONT_ROMAN:
if (roman_font_name != system_lyxrc.roman_font_name) {
os << "\\screen_font_roman \"" << roman_font_name
str = N_("LyX normally doesn't update the cursor position if you move the scrollbar. Set to true if you'd prefer to always have the cursor on screen.");
break;
+ case RC_DIALOGS_ICONIFY_WITH_MAIN:
+ str = N_("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 = N_("Sets whether LyX asks for a second confirmation to exit when you have changed documents. (LyX will still ask to save changed documents.)");
break;
RC_ESC_CHARS,
RC_CHKTEX_COMMAND,
RC_CURSOR_FOLLOWS_SCROLLBAR,
+ RC_DIALOGS_ICONIFY_WITH_MAIN,
RC_EXIT_CONFIRMATION,
RC_DISPLAY_SHORTCUTS,
RC_MAKE_BACKUP,
///
bool cursor_follows_scrollbar;
///
+ bool dialogs_iconify_with_main;
+ ///
int label_init_length;
private:
/// Is a bind file already (or currently) read?