mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Work around xforms "tooltips and tabfolders" bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5357 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
990007a012
commit
cf27d6019a
@ -1,3 +1,20 @@
|
||||
2002-10-03 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FeedbackController.C (PrehandlerCB): re-compute the folder->x,
|
||||
folder->y coords of a tabfolder when the mouse enters the folder.
|
||||
This works around an xforms bug that manifests itslf as tooltips
|
||||
appearing in their original position after the dialog has been
|
||||
moved aside.
|
||||
|
||||
* FormAboutlyx.C (build):
|
||||
* FormDocument.C (build):
|
||||
* FormGraphics.C (build):
|
||||
* FormPreferences.C (build):
|
||||
* FormTabular.C (build): set the prehandler for tabfolders.
|
||||
|
||||
* form_graphics.fd: move the edge of the tabfolder in by 5 pixels
|
||||
to ensure that the tabfolder prehandler is called.
|
||||
|
||||
2002-10-03 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lyx_gui.C (start): ev.xany.type is of type 'int' so print it as a
|
||||
|
@ -73,10 +73,26 @@ void FeedbackController::MessageCB(FL_OBJECT * ob, int event)
|
||||
|
||||
void FeedbackController::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
||||
{
|
||||
if (event == FL_PUSH && key == 2 && ob->objclass == FL_INPUT) {
|
||||
lyx::Assert(ob);
|
||||
|
||||
if (ob->objclass == FL_INPUT && event == FL_PUSH && key == 2) {
|
||||
// Trigger an input event when pasting in an xforms input object
|
||||
// using the middle mouse button.
|
||||
InputCB(ob, 0);
|
||||
|
||||
// This is very odd:
|
||||
// event == FL_LEAVE when the mouse enters the folder and
|
||||
// event == FL_ENTER are it leaves!
|
||||
} else if (ob->objclass == FL_TABFOLDER && event == FL_LEAVE) {
|
||||
// This prehandler is used to work-around an xforms bug.
|
||||
// It updates the form->x, form->y coords of the active
|
||||
// tabfolder when the mouse enters.
|
||||
FL_FORM * const form = fl_get_active_folder(ob);
|
||||
Window win = fl_prepare_form_window(form, 0, 0, "Folder");
|
||||
if (win) {
|
||||
FL_Coord w, h;
|
||||
fl_get_wingeometry(win, &(form->x), &(form->y), &w, &h);
|
||||
}
|
||||
|
||||
} else if (message_widget_ &&
|
||||
(event == FL_ENTER || event == FL_LEAVE)) {
|
||||
|
@ -68,6 +68,9 @@ void FormAboutlyx::build()
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
|
||||
credits_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// Manage the cancel/close button
|
||||
bc().setCancel(dialog_->button_close);
|
||||
}
|
||||
|
@ -331,6 +331,10 @@ void FormDocument::build()
|
||||
options_->form);
|
||||
fbullet = fl_addto_tabfolder(dialog_->tabfolder,_("Bullets"),
|
||||
bullets_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
if ((XpmVersion < 4) || (XpmVersion == 4 && XpmRevision < 7)) {
|
||||
lyxerr << _("Your version of libXpm is older than 4.7.\n"
|
||||
"The `bullet' tab of the document dialog "
|
||||
|
@ -233,6 +233,9 @@ void FormGraphics::build()
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Bounding Box"), bbox_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Extra"), extra_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// set the right default unit
|
||||
switch (lyxrc.default_papersize) {
|
||||
case BufferParams::PAPER_DEFAULT: break;
|
||||
|
@ -249,6 +249,13 @@ void FormPreferences::build()
|
||||
fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
|
||||
_("Language"),
|
||||
language_.dialog()->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(look_n_feel_tab_->tabfolder_inner);
|
||||
setPrehandler(converters_tab_->tabfolder_inner);
|
||||
setPrehandler(inputs_tab_->tabfolder_inner);
|
||||
setPrehandler(outputs_tab_->tabfolder_inner);
|
||||
setPrehandler(lang_opts_tab_->tabfolder_inner);
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,6 +145,9 @@ void FormTabular::build()
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("LongTable"),
|
||||
longtable_options_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// Create the contents of the unit choices
|
||||
// Don't include the "%" terms...
|
||||
vector<string> units_vec = getLatexUnits();
|
||||
|
@ -34,7 +34,7 @@ argument:
|
||||
--------------------
|
||||
class: FL_TABFOLDER
|
||||
type: TOP_TABFOLDER
|
||||
box: 0 5 400 260
|
||||
box: 0 10 400 255
|
||||
boxtype: FL_FRAME_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_TOP_LEFT
|
||||
|
Loading…
Reference in New Issue
Block a user