mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Work-around xforms' bug, enabling tooltips for browser widgets.
I've told the xforms list of the bug and proposed some solns. We'll see if anything is done... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c40e74cdef
commit
892e858adf
@ -1,3 +1,15 @@
|
||||
2002-10-28 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FeedbackController.C (PrehandlerCB): show tooltips for browser
|
||||
widgets, working-around an xforms bug.
|
||||
|
||||
* FormBibtex.C (build):
|
||||
* FormCitation.C (build):
|
||||
* FormForks.C (build):
|
||||
* FormSpellchecker.C (build):
|
||||
* FormTexinfo.C (build):
|
||||
set the prehandler for the browser widgets so that we can have tooltips.
|
||||
|
||||
2002-10-28 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* xfont_loader.C (getFontinfo): Cleanup.
|
||||
|
@ -70,6 +70,15 @@ void FeedbackController::MessageCB(FL_OBJECT * ob, int event)
|
||||
}
|
||||
}
|
||||
|
||||
#if FL_VERSION > 0 || FL_REVISION >= 89
|
||||
extern "C" {
|
||||
|
||||
void fl_show_tooltip(const char *, int, int);
|
||||
|
||||
void fl_hide_tooltip();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void FeedbackController::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
||||
{
|
||||
@ -79,9 +88,14 @@ void FeedbackController::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
||||
// Trigger an input event when pasting in an xforms input object
|
||||
// using the middle mouse button.
|
||||
InputCB(ob, 0);
|
||||
|
||||
} else if (ob->objclass == FL_TABFOLDER &&
|
||||
(event == FL_ENTER || event == FL_LEAVE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (event != FL_ENTER && event != FL_LEAVE)
|
||||
return;
|
||||
|
||||
if (ob->objclass == FL_TABFOLDER) {
|
||||
// This prehandler is used to work-around an xforms bug and
|
||||
// ensures that the form->x, form->y coords of the active
|
||||
// tabfolder are up to date.
|
||||
@ -96,13 +110,27 @@ void FeedbackController::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
||||
fl_get_winorigin(folder->window,
|
||||
&(folder->x), &(folder->y));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (message_widget_ &&
|
||||
(event == FL_ENTER || event == FL_LEAVE)) {
|
||||
if (message_widget_) {
|
||||
// Post feedback as the mouse enters the object,
|
||||
// remove it as the mouse leaves.
|
||||
MessageCB(ob, event);
|
||||
}
|
||||
|
||||
#if FL_VERSION > 0 || FL_REVISION >= 89
|
||||
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
||||
// This is a work-around:
|
||||
if (ob->objclass == FL_BROWSER) {
|
||||
if (event == FL_ENTER && ob->tooltip && *(ob->tooltip)) {
|
||||
fl_show_tooltip(ob->tooltip, ob->form->x + ob->x,
|
||||
ob->form->y + ob->y + ob->h + 1);
|
||||
} else if (event == FL_LEAVE) {
|
||||
fl_hide_tooltip();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,6 +86,8 @@ void FormBibtex::build()
|
||||
|
||||
str = _("Choose a BibTeX style from the list.");
|
||||
tooltips().init(dialog_->browser_styles, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_styles);
|
||||
|
||||
str = _("Updates your TeX system for a new bibstyle list. Only "
|
||||
"the styles which are in directories where TeX finds them "
|
||||
|
@ -177,12 +177,18 @@ void FormCitation::build()
|
||||
|
||||
str = _("The entries which will be cited. Select them with the arrow buttons from the right browser window.");
|
||||
tooltips().init(dialog_->browser_cite, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_cite);
|
||||
|
||||
str = _("All entries in the database you have loaded (via \"Insert->Lists&TOC->BibTex Reference\"). Move the ones you want to cite with the arrow buttons into the left browser window.");
|
||||
tooltips().init(dialog_->browser_bib, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_bib);
|
||||
|
||||
str = _("Information about the selected entry");
|
||||
tooltips().init(dialog_->browser_info, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_info);
|
||||
|
||||
str = _("Here you may select how the citation label should look inside the text (Natbib).");
|
||||
tooltips().init(dialog_->choice_style, str);
|
||||
|
@ -56,9 +56,13 @@ void FormForks::build() {
|
||||
// Set up the tooltip mechanism
|
||||
string str = _("All currently running child processes forked by LyX.");
|
||||
tooltips().init(dialog_->browser_children, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_children);
|
||||
|
||||
str = _("A list of all child processes to kill.");
|
||||
tooltips().init(dialog_->browser_kill, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_kill);
|
||||
|
||||
str = _("Add all processes to the list of processes to kill.");
|
||||
tooltips().init(dialog_->button_all, str);
|
||||
|
@ -60,6 +60,8 @@ void FormSpellchecker::build()
|
||||
tooltips().init(dialog_->input_replacement, str);
|
||||
str = _("List of replacement suggestions from dictionary.");
|
||||
tooltips().init(dialog_->browser_suggestions, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser_suggestions);
|
||||
str = _("Start the spellingchecker.");
|
||||
tooltips().init(dialog_->button_start, str);
|
||||
str = _("Replace unknown word.");
|
||||
|
@ -60,6 +60,8 @@ void FormTexinfo::build() {
|
||||
|
||||
str = _("Double click to view contents of file.");
|
||||
tooltips().init(dialog_->browser, str);
|
||||
// Work-around xforms' bug; enable tooltips for browser widgets.
|
||||
setPrehandler(dialog_->browser);
|
||||
|
||||
str = _("Runs the script \"texhash\" which builds a new LaTeX tree. "
|
||||
"Needed if you install a new TeX class or style. You need write "
|
||||
|
Loading…
Reference in New Issue
Block a user