mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
John's recent build.diff patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2582 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a85d0b3fef
commit
8ae23e7526
@ -10,13 +10,14 @@ src/CutAndPaste.C
|
||||
src/debug.C
|
||||
src/exporter.C
|
||||
src/ext_l10n.h
|
||||
src/figure_form.C
|
||||
src/figureForm.C
|
||||
src/figure_form.C
|
||||
src/FontLoader.C
|
||||
src/frontends/controllers/biblio.C
|
||||
src/frontends/controllers/ButtonController.h
|
||||
src/frontends/controllers/character.C
|
||||
src/frontends/controllers/ControlAboutlyx.C
|
||||
src/frontends/controllers/ControlBibtex.C
|
||||
src/frontends/controllers/ControlCharacter.C
|
||||
src/frontends/controllers/ControlExternal.C
|
||||
src/frontends/controllers/ControlGraphics.C
|
||||
@ -34,89 +35,89 @@ src/frontends/gnome/FormRef.C
|
||||
src/frontends/gnome/FormToc.C
|
||||
src/frontends/gnome/Menubar_pimpl.C
|
||||
src/frontends/qt2/FileDialog.C
|
||||
src/frontends/qt2/FormCharacter.C
|
||||
src/frontends/qt2/FormCitation.C
|
||||
src/frontends/qt2/FormCredits.C
|
||||
src/frontends/qt2/FormDocument.C
|
||||
src/frontends/qt2/FormIndex.C
|
||||
src/frontends/qt2/FormParagraph.C
|
||||
src/frontends/qt2/FormPrint.C
|
||||
src/frontends/qt2/FormRef.C
|
||||
src/frontends/qt2/FormSearch.C
|
||||
src/frontends/qt2/FormTabularCreate.C
|
||||
src/frontends/qt2/FormToc.C
|
||||
src/frontends/qt2/FormUrl.C
|
||||
src/frontends/qt2/paragraphdlgimpl.C
|
||||
src/frontends/qt2/tabularcreatedlgimpl.C
|
||||
src/frontends/qt2/QAbout.C
|
||||
src/frontends/qt2/QCharacter.C
|
||||
src/frontends/qt2/QCitation.C
|
||||
src/frontends/qt2/QDocument.C
|
||||
src/frontends/qt2/QIndex.C
|
||||
src/frontends/qt2/QParagraph.C
|
||||
src/frontends/qt2/QParagraphDialog.C
|
||||
src/frontends/qt2/QPrint.C
|
||||
src/frontends/qt2/QRef.C
|
||||
src/frontends/qt2/QSearch.C
|
||||
src/frontends/qt2/QTabularCreate.C
|
||||
src/frontends/qt2/QTabularCreateDialog.C
|
||||
src/frontends/qt2/QToc.C
|
||||
src/frontends/qt2/QURL.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/FileDialog.C
|
||||
src/frontends/xforms/form_aboutlyx.C
|
||||
src/frontends/xforms/FormAboutlyx.C
|
||||
src/frontends/xforms/form_bibitem.C
|
||||
src/frontends/xforms/form_aboutlyx.C
|
||||
src/frontends/xforms/FormBibitem.C
|
||||
src/frontends/xforms/form_bibtex.C
|
||||
src/frontends/xforms/form_bibitem.C
|
||||
src/frontends/xforms/FormBibtex.C
|
||||
src/frontends/xforms/form_bibtex.C
|
||||
src/frontends/xforms/form_browser.C
|
||||
src/frontends/xforms/form_character.C
|
||||
src/frontends/xforms/FormCharacter.C
|
||||
src/frontends/xforms/form_citation.C
|
||||
src/frontends/xforms/form_character.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/form_document.C
|
||||
src/frontends/xforms/form_citation.C
|
||||
src/frontends/xforms/FormDocument.C
|
||||
src/frontends/xforms/form_error.C
|
||||
src/frontends/xforms/form_document.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/form_ert.C
|
||||
src/frontends/xforms/form_error.C
|
||||
src/frontends/xforms/FormERT.C
|
||||
src/frontends/xforms/form_external.C
|
||||
src/frontends/xforms/form_ert.C
|
||||
src/frontends/xforms/FormExternal.C
|
||||
src/frontends/xforms/form_filedialog.C
|
||||
src/frontends/xforms/form_external.C
|
||||
src/frontends/xforms/FormFiledialog.C
|
||||
src/frontends/xforms/form_float.C
|
||||
src/frontends/xforms/form_filedialog.C
|
||||
src/frontends/xforms/FormFloat.C
|
||||
src/frontends/xforms/form_graphics.C
|
||||
src/frontends/xforms/form_float.C
|
||||
src/frontends/xforms/FormGraphics.C
|
||||
src/frontends/xforms/form_include.C
|
||||
src/frontends/xforms/form_graphics.C
|
||||
src/frontends/xforms/FormInclude.C
|
||||
src/frontends/xforms/form_index.C
|
||||
src/frontends/xforms/form_include.C
|
||||
src/frontends/xforms/FormIndex.C
|
||||
src/frontends/xforms/form_index.C
|
||||
src/frontends/xforms/FormLog.C
|
||||
src/frontends/xforms/FormMathsBitmap.C
|
||||
src/frontends/xforms/form_maths_deco.C
|
||||
src/frontends/xforms/FormMathsDeco.C
|
||||
src/frontends/xforms/form_maths_delim.C
|
||||
src/frontends/xforms/form_maths_deco.C
|
||||
src/frontends/xforms/FormMathsDelim.C
|
||||
src/frontends/xforms/form_maths_matrix.C
|
||||
src/frontends/xforms/form_maths_delim.C
|
||||
src/frontends/xforms/FormMathsMatrix.C
|
||||
src/frontends/xforms/form_maths_panel.C
|
||||
src/frontends/xforms/form_maths_matrix.C
|
||||
src/frontends/xforms/FormMathsPanel.C
|
||||
src/frontends/xforms/form_maths_space.C
|
||||
src/frontends/xforms/form_maths_panel.C
|
||||
src/frontends/xforms/FormMathsSpace.C
|
||||
src/frontends/xforms/form_minipage.C
|
||||
src/frontends/xforms/form_maths_space.C
|
||||
src/frontends/xforms/FormMinipage.C
|
||||
src/frontends/xforms/form_paragraph.C
|
||||
src/frontends/xforms/form_minipage.C
|
||||
src/frontends/xforms/FormParagraph.C
|
||||
src/frontends/xforms/form_preamble.C
|
||||
src/frontends/xforms/form_paragraph.C
|
||||
src/frontends/xforms/FormPreamble.C
|
||||
src/frontends/xforms/form_preferences.C
|
||||
src/frontends/xforms/form_preamble.C
|
||||
src/frontends/xforms/FormPreferences.C
|
||||
src/frontends/xforms/form_print.C
|
||||
src/frontends/xforms/form_preferences.C
|
||||
src/frontends/xforms/FormPrint.C
|
||||
src/frontends/xforms/form_ref.C
|
||||
src/frontends/xforms/form_print.C
|
||||
src/frontends/xforms/FormRef.C
|
||||
src/frontends/xforms/form_search.C
|
||||
src/frontends/xforms/form_ref.C
|
||||
src/frontends/xforms/FormSearch.C
|
||||
src/frontends/xforms/form_spellchecker.C
|
||||
src/frontends/xforms/form_search.C
|
||||
src/frontends/xforms/FormSpellchecker.C
|
||||
src/frontends/xforms/form_tabular.C
|
||||
src/frontends/xforms/form_spellchecker.C
|
||||
src/frontends/xforms/FormTabular.C
|
||||
src/frontends/xforms/form_tabular_create.C
|
||||
src/frontends/xforms/form_tabular.C
|
||||
src/frontends/xforms/FormTabularCreate.C
|
||||
src/frontends/xforms/form_thesaurus.C
|
||||
src/frontends/xforms/form_tabular_create.C
|
||||
src/frontends/xforms/FormThesaurus.C
|
||||
src/frontends/xforms/form_toc.C
|
||||
src/frontends/xforms/form_thesaurus.C
|
||||
src/frontends/xforms/FormToc.C
|
||||
src/frontends/xforms/form_url.C
|
||||
src/frontends/xforms/form_toc.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
src/frontends/xforms/form_url.C
|
||||
src/frontends/xforms/FormVCLog.C
|
||||
src/frontends/xforms/input_validators.C
|
||||
src/frontends/xforms/Menubar_pimpl.C
|
||||
@ -136,7 +137,6 @@ src/insets/insetfoot.C
|
||||
src/insets/insetgraphics.C
|
||||
src/insets/insetinclude.C
|
||||
src/insets/insetindex.C
|
||||
src/insets/insetinfo.C
|
||||
src/insets/insetlabel.C
|
||||
src/insets/insetlist.C
|
||||
src/insets/insetmarginal.C
|
||||
|
@ -1,3 +1,12 @@
|
||||
2001-08-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* ControlCharacter.C: fix typo
|
||||
|
||||
* ViewBase.h:
|
||||
* ControlDialogs.C:
|
||||
* ControlInsets.C: make sure dialog is built before it is shown, so
|
||||
it works properly the very first time it is shown
|
||||
|
||||
2001-08-20 Herbert Voss <voss@perce.de>
|
||||
|
||||
* ControlBibtex.[Ch]: enhanced bibtex-data gui to browse for databases
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright 2001 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming, a.leeming@.ac.uk
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
|
@ -64,6 +64,12 @@ void ControlDialog<Base>::show()
|
||||
|
||||
setParams();
|
||||
|
||||
static bool isBuilt = false;
|
||||
if (!isBuilt) {
|
||||
isBuilt = true;
|
||||
view().build();
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
@ -75,8 +81,12 @@ void ControlDialog<Base>::update()
|
||||
return;
|
||||
|
||||
setParams();
|
||||
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
// Reset the Button Controller to it's initial state
|
||||
bc().invalid();
|
||||
bc().restore();
|
||||
|
||||
view().update();
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define CONTROLINSET_H
|
||||
|
||||
#include "support/LAssert.h"
|
||||
#include "debug.h"
|
||||
#include "ControlConnections.h"
|
||||
|
||||
class Inset;
|
||||
@ -135,6 +136,12 @@ void ControlInset<Inset, Params>::show(Params const & params)
|
||||
|
||||
setDaughterParams();
|
||||
|
||||
static bool isBuilt = false;
|
||||
if (!isBuilt) {
|
||||
isBuilt = true;
|
||||
view().build();
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
@ -168,6 +175,10 @@ void ControlInset<Inset, Params>::update()
|
||||
params_ = new Params();
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
// Reset the Button Controller to it's initial state
|
||||
bc().invalid();
|
||||
bc().restore();
|
||||
|
||||
view().update();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
virtual void show() = 0;
|
||||
/// Update dialog before/whilst showing it.
|
||||
virtual void update() = 0;
|
||||
/// build the dialog
|
||||
virtual void build() = 0;
|
||||
|
||||
/** These shortcuts allow (e.g. xform's) global callback functions
|
||||
access to the buttons without making the whole controller_ public.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-08-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* FormCitation.h:
|
||||
* FormCitation.C: tidy code a little
|
||||
|
||||
* GUIRunTime.C: more informative error
|
||||
|
||||
2001-08-23 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* forms/form_preferences.fd: order the items "logically" so that
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "form_citation.h"
|
||||
#include "gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "biblio.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "xforms_helpers.h"
|
||||
|
||||
@ -136,6 +135,7 @@ void FormCitation::build()
|
||||
|
||||
fl_set_input_return(dialog_->input_after, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_before, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_search, FL_RETURN_END);
|
||||
|
||||
fl_set_button(dialog_->button_search_case, 0);
|
||||
fl_set_button(dialog_->button_search_type, 0);
|
||||
@ -158,6 +158,44 @@ void FormCitation::build()
|
||||
}
|
||||
|
||||
|
||||
void FormCitation::findBiblio(biblio::Direction const dir)
|
||||
{
|
||||
string const str = fl_get_input(dialog_->input_search);
|
||||
biblio::InfoMap const & theMap = controller().bibkeysInfo();
|
||||
bool const caseSensitive =
|
||||
fl_get_button(dialog_->button_search_case);
|
||||
biblio::Search const type =
|
||||
fl_get_button(dialog_->button_search_type) ?
|
||||
biblio::REGEX : biblio::SIMPLE;
|
||||
|
||||
vector<string>::const_iterator start = bibkeys.begin();
|
||||
int const sel = fl_get_browser(dialog_->browser_bib);
|
||||
if (sel >= 1 && sel <= int(bibkeys.size()))
|
||||
start += sel - 1;
|
||||
|
||||
// Find the NEXT instance...
|
||||
(dir == biblio::FORWARD) ? ++start : --start;
|
||||
|
||||
|
||||
vector<string>::const_iterator const cit =
|
||||
biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, caseSensitive);
|
||||
|
||||
if (cit == bibkeys.end())
|
||||
return;
|
||||
|
||||
int const found = int(cit - bibkeys.begin()) + 1;
|
||||
if (found == sel)
|
||||
return;
|
||||
|
||||
// Update the display
|
||||
int const top = max(found - 5, 1);
|
||||
fl_set_browser_topline(dialog_->browser_bib, top);
|
||||
fl_select_browser_line(dialog_->browser_bib, found);
|
||||
input(dialog_->browser_bib, 0);
|
||||
}
|
||||
|
||||
|
||||
ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
{
|
||||
ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
|
||||
@ -299,50 +337,12 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
setCiteButtons(ON);
|
||||
activate = ButtonPolicy::SMI_VALID;
|
||||
|
||||
} else if (ob == dialog_->button_previous ||
|
||||
ob == dialog_->button_next) {
|
||||
|
||||
string const str = fl_get_input(dialog_->input_search);
|
||||
|
||||
biblio::Direction const dir =
|
||||
(ob == dialog_->button_previous) ?
|
||||
biblio::BACKWARD : biblio::FORWARD;
|
||||
|
||||
biblio::Search const type =
|
||||
fl_get_button(dialog_->button_search_type) ?
|
||||
biblio::REGEX : biblio::SIMPLE;
|
||||
|
||||
vector<string>::const_iterator start = bibkeys.begin();
|
||||
int const sel = fl_get_browser(dialog_->browser_bib);
|
||||
if (sel >= 1 && sel <= int(bibkeys.size()))
|
||||
start += sel-1;
|
||||
|
||||
// Find the NEXT instance...
|
||||
if (dir == biblio::FORWARD)
|
||||
start += 1;
|
||||
else
|
||||
start -= 1;
|
||||
|
||||
bool const caseSensitive =
|
||||
fl_get_button(dialog_->button_search_case);
|
||||
|
||||
vector<string>::const_iterator const cit =
|
||||
biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, caseSensitive);
|
||||
|
||||
if (cit == bibkeys.end())
|
||||
return ButtonPolicy::SMI_NOOP;
|
||||
|
||||
int const found = int(cit - bibkeys.begin()) + 1;
|
||||
if (found == sel)
|
||||
return ButtonPolicy::SMI_NOOP;
|
||||
|
||||
// Update the display
|
||||
int const top = max(found-5, 1);
|
||||
fl_set_browser_topline(dialog_->browser_bib, top);
|
||||
fl_select_browser_line(dialog_->browser_bib, found);
|
||||
input(dialog_->browser_bib, 0);
|
||||
|
||||
} else if (ob == dialog_->button_previous) {
|
||||
findBiblio(biblio::BACKWARD);
|
||||
} else if (ob == dialog_->button_next) {
|
||||
findBiblio(biblio::FORWARD);
|
||||
} else if (ob == dialog_->input_search) {
|
||||
findBiblio(biblio::FORWARD);
|
||||
} else if (ob == dialog_->choice_style ||
|
||||
ob == dialog_->button_full_author_list ||
|
||||
ob == dialog_->button_force_uppercase ||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#endif
|
||||
|
||||
#include "FormBase.h"
|
||||
#include "biblio.h"
|
||||
|
||||
/** This class provides an XForms implementation of the Citation Dialog.
|
||||
*/
|
||||
@ -54,6 +55,9 @@ private:
|
||||
/// Fdesign generated method
|
||||
FD_form_citation * build_citation();
|
||||
|
||||
/// search for a citation
|
||||
void FormCitation::findBiblio(biblio::Direction const dir);
|
||||
|
||||
///
|
||||
void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
|
||||
///
|
||||
|
@ -71,9 +71,11 @@ int GUIRunTime::initApplication(int , char **)
|
||||
void GUIRunTime::processEvents()
|
||||
{
|
||||
if (fl_do_forms() == FL_EVENT) {
|
||||
lyxerr << "LyX: This shouldn't happen..." << endl;
|
||||
XEvent ev;
|
||||
fl_XNextEvent(&ev);
|
||||
lyxerr << "Received unhandled X11 event" << endl;
|
||||
lyxerr << "Type: 0x" << std::hex << ev.xany.type <<
|
||||
"Target: 0x" << std::hex << ev.xany.window << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,9 +84,11 @@ void GUIRunTime::runTime()
|
||||
{
|
||||
while (!finished) {
|
||||
if (fl_check_forms() == FL_EVENT) {
|
||||
lyxerr << "LyX: This shouldn't happen..." << endl;
|
||||
XEvent ev;
|
||||
fl_XNextEvent(&ev);
|
||||
lyxerr << "Received unhandled X11 event" << endl;
|
||||
lyxerr << "Type: 0x" << std::hex << ev.xany.type <<
|
||||
"Target: 0x" << std::hex << ev.xany.window << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user