mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 11:52:45 +00:00
ws cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3806 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
76d81111af
commit
f7ba7c8e9f
@ -11,12 +11,12 @@
|
||||
#include "Alert.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "Alert_pimpl.h"
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
|
||||
using std::endl;
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
@ -28,7 +28,7 @@ void Alert::alert(string const & s1, string const & s2, string const & s3)
|
||||
lyxerr << "------------------------------" << endl
|
||||
<< s1 << endl << s2 << endl << s3 << endl
|
||||
<< "------------------------------" << endl;
|
||||
} else {
|
||||
} else {
|
||||
alert_pimpl(s1, s2, s3);
|
||||
}
|
||||
}
|
||||
|
@ -17,23 +17,23 @@
|
||||
namespace Alert {
|
||||
|
||||
/// show an alert message
|
||||
void alert(string const & s1, string const & s2 = string(),
|
||||
void alert(string const & s1, string const & s2 = string(),
|
||||
string const & s3 = string());
|
||||
|
||||
/// show an alert message and strerror(errno)
|
||||
void err_alert(string const & s1, string const & s2 = string());
|
||||
|
||||
/// ask a question
|
||||
/// ask a question
|
||||
bool askQuestion(string const & s1, string const & s2 = string(),
|
||||
string const & s3 = string(), bool default_value = true);
|
||||
|
||||
/// Returns 1 for yes, 2 for no, 3 for cancel.
|
||||
int askConfirmation(string const & s1, string const & s2 = string(),
|
||||
int askConfirmation(string const & s1, string const & s2 = string(),
|
||||
string const & s3 = string(), int default_value = 1);
|
||||
|
||||
/// Asks for a text
|
||||
std::pair<bool, string> const
|
||||
askForText(string const & msg,
|
||||
askForText(string const & msg,
|
||||
string const & dflt = string());
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
// GUI-specific implementations
|
||||
void alert_pimpl(string const & s1, string const & s2, string const & s3);
|
||||
bool askQuestion_pimpl(string const & s1, string const & s2, string const & s3);
|
||||
|
@ -1,5 +1,7 @@
|
||||
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* most files: ws cleanup
|
||||
|
||||
* Makefile.am: remove ld -r stuff
|
||||
|
||||
2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
@ -61,17 +63,17 @@
|
||||
|
||||
2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* Timeout.h:
|
||||
* Timeout.h:
|
||||
* FileDialog.h: do not include <config.h> in header files.
|
||||
|
||||
2001-12-12 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* Alert.h: remove spurious semi-colon at the end of the namespace
|
||||
scope.
|
||||
scope.
|
||||
|
||||
2001-11-22 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am:
|
||||
* Makefile.am:
|
||||
* Alert.h:
|
||||
* Alert.C:
|
||||
* Alert_pimpl.h: alerts etc.
|
||||
@ -88,12 +90,12 @@
|
||||
|
||||
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* GUIRunTime.h: initApplication() should take a & to argc
|
||||
|
||||
* GUIRunTime.h: initApplication() should take a & to argc
|
||||
|
||||
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Liason.C: IsDirWriteable changed
|
||||
|
||||
|
||||
2001-07-30 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* Liason.C: #include LAssert.h
|
||||
@ -101,20 +103,20 @@
|
||||
2001-07-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Dialogs.h: add showThesaurus
|
||||
|
||||
|
||||
2001-07-13 Edwin Leuven <leuven@fee.uva.nl>
|
||||
|
||||
|
||||
* Dialogs.h: add showAboutlyx and remove showCredits and Copyright
|
||||
|
||||
2001-07-13 Edwin Leuven <leuven@fee.uva.nl>
|
||||
|
||||
* Dialogs.h: added showSpellchecker
|
||||
|
||||
|
||||
2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* GUIRunTime.h: (x11Display):
|
||||
(x11Screen):
|
||||
(x11Colormap):
|
||||
* GUIRunTime.h: (x11Display):
|
||||
(x11Screen):
|
||||
(x11Colormap):
|
||||
(x11VisualDepth): new methods
|
||||
|
||||
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
@ -128,7 +130,7 @@
|
||||
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am: remove kde frontend
|
||||
|
||||
|
||||
2001-06-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* Dialogs.h: removed unused signal showCharacter.
|
||||
@ -201,7 +203,7 @@
|
||||
|
||||
* DialogBase.h: commented out abstract method show().
|
||||
|
||||
* Dialogs.h: The dialogs are now stored as a
|
||||
* Dialogs.h: The dialogs are now stored as a
|
||||
std::vector<boost::shared_ptr<DialogBase> >.
|
||||
Removed using directives.
|
||||
(d-tor) removed.
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Abstract base class of all dialogs.
|
||||
* Author: Allan Rae <rae@lyx.org>
|
||||
* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
|
@ -77,10 +77,10 @@ public:
|
||||
//@{
|
||||
/// Hide all visible dialogs
|
||||
SigC::Signal0<void> hideAll;
|
||||
|
||||
|
||||
/// Hide any dialogs that require a buffer for them to operate
|
||||
SigC::Signal0<void> hideBufferDependent;
|
||||
|
||||
|
||||
/** Update visible, buffer-dependent dialogs
|
||||
If the bool is true then a buffer change has occurred
|
||||
else its still the same buffer.
|
||||
@ -112,7 +112,7 @@ public:
|
||||
///
|
||||
SigC::Signal1<void, InsetError *> showError;
|
||||
/// show the external inset dialog
|
||||
SigC::Signal1<void, InsetExternal *> showExternal;
|
||||
SigC::Signal1<void, InsetExternal *> showExternal;
|
||||
/// show the contents of a file.
|
||||
SigC::Signal1<void, string const &> showFile;
|
||||
/// show all forked child processes
|
||||
@ -129,8 +129,8 @@ public:
|
||||
SigC::Signal1<void, InsetInfo *> showInfo;
|
||||
/// show the LaTeX log or build file
|
||||
SigC::Signal0<void> showLogFile;
|
||||
/// display the top-level maths panel
|
||||
SigC::Signal0<void> showMathPanel;
|
||||
/// display the top-level maths panel
|
||||
SigC::Signal0<void> showMathPanel;
|
||||
///
|
||||
SigC::Signal1<void, InsetMinipage *> showMinipage;
|
||||
///
|
||||
@ -172,7 +172,7 @@ public:
|
||||
/// show the TexInfo
|
||||
SigC::Signal0<void> showTexinfo;
|
||||
/// show the thesaurus dialog
|
||||
SigC::Signal1<void, string const &> showThesaurus;
|
||||
SigC::Signal1<void, string const &> showThesaurus;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showTOC;
|
||||
///
|
||||
|
@ -57,14 +57,14 @@ public:
|
||||
kb_action a = LFUN_SELECT_FILE_SYNC,
|
||||
Button b1 = Button(string(), string()),
|
||||
Button b2 = Button(string(), string()));
|
||||
|
||||
|
||||
|
||||
~FileDialog();
|
||||
|
||||
/**
|
||||
* Choose a file for selection, starting in directory \param
|
||||
* path, with the file selection \param mask. The \param mask
|
||||
* string is of the form :
|
||||
* string is of the form :
|
||||
*
|
||||
* <regular expression to match> | <description>
|
||||
*
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 2000-2001 The LyX Team.
|
||||
@ -24,7 +24,7 @@ class LyXView;
|
||||
*/
|
||||
class GUIRunTime {
|
||||
public:
|
||||
/// initialise the toolkit
|
||||
/// initialise the toolkit
|
||||
static
|
||||
int initApplication(int & argc, char * argv[]);
|
||||
/// process pending events
|
||||
@ -59,6 +59,6 @@ public:
|
||||
int x11VisualDepth();
|
||||
/// the server's DPI estimate
|
||||
static
|
||||
float getScreenDPI();
|
||||
float getScreenDPI();
|
||||
};
|
||||
#endif
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
@ -45,10 +45,10 @@ PrinterParams getPrinterParams(Buffer * buffer)
|
||||
}
|
||||
|
||||
|
||||
bool printBuffer(Buffer * buffer, PrinterParams const & pp)
|
||||
bool printBuffer(Buffer * buffer, PrinterParams const & pp)
|
||||
{
|
||||
string command(lyxrc.print_command + ' ');
|
||||
|
||||
|
||||
if (pp.target == PrinterParams::PRINTER
|
||||
&& lyxrc.print_adapt_output // dvips wants a printer name
|
||||
&& !pp.printer_name.empty()) {// printer name given
|
||||
@ -65,7 +65,7 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
|
||||
case PrinterParams::ODD:
|
||||
command += lyxrc.print_oddpage_flag + ' ';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
// only option left is print all of them
|
||||
break;
|
||||
|
@ -41,7 +41,7 @@ class BufferParams;
|
||||
until XTL and the compilers of the world are ready for something more
|
||||
elaborate. This is basically the Communicator class from the lyx cvs module
|
||||
all over again.
|
||||
|
||||
|
||||
Eventually, we will switch back to the XTL+LyXFunc combination that
|
||||
worked so nicely on a very small number of compilers and systems.
|
||||
See the "dialogbase" branch of lyx-devel cvs module for xtl implementation.
|
||||
@ -59,7 +59,3 @@ namespace Liason {
|
||||
|
||||
} // namespace Liason
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
@ -24,7 +24,7 @@ class LyXView;
|
||||
class MenuBackend;
|
||||
|
||||
/** The LyX GUI independent menubar class
|
||||
The GUI interface is implemented in the corresponding Menubar_pimpl class.
|
||||
The GUI interface is implemented in the corresponding Menubar_pimpl class.
|
||||
*/
|
||||
class Menubar {
|
||||
public:
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
@ -87,7 +87,7 @@ void Toolbar::updateLayoutList(bool force)
|
||||
pimpl_->updateLayoutList(force);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Toolbar::openLayoutList()
|
||||
{
|
||||
pimpl_->openLayoutList();
|
||||
@ -112,7 +112,7 @@ void Toolbar::add(string const & func, bool doclean)
|
||||
|
||||
if (tf == -1) {
|
||||
lyxerr << "Toolbar::add: no LyX command called`"
|
||||
<< func << "'exists!" << endl;
|
||||
<< func << "'exists!" << endl;
|
||||
} else {
|
||||
pimpl_->add(tf, doclean);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
@ -24,7 +24,7 @@ class LyXView;
|
||||
class ToolbarDefaults;
|
||||
|
||||
/** The LyX GUI independent toolbar class
|
||||
The GUI interface is implemented in the corresponding Toolbar_pimpl class.
|
||||
The GUI interface is implemented in the corresponding Toolbar_pimpl class.
|
||||
*/
|
||||
class Toolbar {
|
||||
public:
|
||||
@ -33,7 +33,7 @@ public:
|
||||
|
||||
///
|
||||
~Toolbar();
|
||||
|
||||
|
||||
/// (re)sets the toolbar
|
||||
void set(bool doingmain = false);
|
||||
|
||||
@ -41,15 +41,15 @@ public:
|
||||
frame, where you can change the toolbar realtime. */
|
||||
void edit();
|
||||
/// add a new button to the toolbar.
|
||||
void add(int , bool doclean = true);
|
||||
void add(int , bool doclean = true);
|
||||
/// name of func instead of kb_action
|
||||
void add(string const & , bool doclean = true);
|
||||
/// invokes the n'th icon in the toolbar
|
||||
void push(int);
|
||||
/// activates the toolbar
|
||||
void activate();
|
||||
void activate();
|
||||
/// deactivates the toolbar
|
||||
void deactivate();
|
||||
void deactivate();
|
||||
/// update the state of the icons
|
||||
void update();
|
||||
|
||||
|
@ -29,11 +29,11 @@ public:
|
||||
///
|
||||
GuiBC(string const & cancel, string const & close);
|
||||
|
||||
///
|
||||
///
|
||||
void setOK(Button * obj) { okay_ = obj; }
|
||||
///
|
||||
///
|
||||
void setApply(Button * obj) { apply_ = obj; }
|
||||
///
|
||||
///
|
||||
void setCancel(Button * obj) { cancel_ = obj; }
|
||||
///
|
||||
void setRestore(Button * obj) { restore_ = obj; }
|
||||
@ -59,7 +59,7 @@ private:
|
||||
Button * apply_;
|
||||
Button * cancel_;
|
||||
Button * restore_;
|
||||
|
||||
|
||||
typedef std::list<Widget *> Widgets;
|
||||
Widgets read_only_;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -18,7 +18,7 @@
|
||||
#include <config.h>
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "support/LAssert.h"
|
||||
#include "debug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
ButtonControllerBase::ButtonControllerBase(string const & cancel,
|
||||
@ -84,7 +84,7 @@ void ButtonControllerBase::invalid()
|
||||
bool ButtonControllerBase::readOnly(bool ro)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Setting controller ro: " << ro << std::endl;
|
||||
|
||||
|
||||
if (ro) {
|
||||
bp().input(ButtonPolicy::SMI_READ_ONLY);
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -78,7 +78,7 @@ protected:
|
||||
///
|
||||
string cancel_label_;
|
||||
///
|
||||
string close_label_;
|
||||
string close_label_;
|
||||
};
|
||||
|
||||
#endif // BUTTONCONTROLLERBASE_H
|
||||
|
@ -38,7 +38,7 @@ void nextState(ButtonPolicy::State & state,
|
||||
lyxerr[Debug::GUI] << "Transition from state "
|
||||
<< state << " to state " << tmp << " after input "
|
||||
<< in << std::endl;
|
||||
|
||||
|
||||
if (ButtonPolicy::BOGUS != tmp) {
|
||||
state = tmp;
|
||||
} else {
|
||||
@ -112,7 +112,7 @@ void PreferencesPolicy::input(SMInput input)
|
||||
//lyxerr << "PreferencesPolicy::input" << endl;
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases.
|
||||
// Note that I didn't put that special case in the helper function
|
||||
// because it doesn't belong there. Some other
|
||||
// because it doesn't belong there. Some other
|
||||
// This is probably optimising for the wrong case since it occurs as the
|
||||
// dialog will be hidden. It would have saved a little memory in the
|
||||
// state machine if I could have gotten map working. ARRae 20000813
|
||||
@ -172,7 +172,7 @@ OkCancelPolicy::OkCancelPolicy()
|
||||
void OkCancelPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "OkCancelPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
@ -246,7 +246,7 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy()
|
||||
void OkCancelReadOnlyPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "OkCancelReadOnlyPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
@ -324,7 +324,7 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy()
|
||||
void NoRepeatedApplyReadOnlyPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "NoReapeatedApplyReadOnlyPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
@ -416,7 +416,7 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy()
|
||||
void OkApplyCancelReadOnlyPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "OkApplyCancelReadOnlyPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
@ -482,7 +482,7 @@ OkApplyCancelPolicy::OkApplyCancelPolicy()
|
||||
void OkApplyCancelPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "OkApplyCancelPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
@ -540,7 +540,7 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy()
|
||||
void NoRepeatedApplyPolicy::input(SMInput input)
|
||||
{
|
||||
//lyxerr << "NoRepeatedApplyPolicy::input" << endl;
|
||||
|
||||
|
||||
// CANCEL and HIDE always take us to INITIAL for all cases
|
||||
if (SMI_CANCEL == input
|
||||
|| SMI_HIDE == input) {
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
///
|
||||
BOGUS = 55
|
||||
};
|
||||
|
||||
|
||||
/// The various button types.
|
||||
enum Button {
|
||||
///
|
||||
@ -115,7 +115,7 @@ public:
|
||||
///
|
||||
static const Button ALL_BUTTONS =
|
||||
Button(OKAY | APPLY | CANCEL | RESTORE);
|
||||
|
||||
|
||||
/** State machine inputs.
|
||||
All the policies so far have both CANCEL and HIDE always going to
|
||||
INITIAL. This won't necessarily be true for all [future] policies
|
||||
@ -131,7 +131,7 @@ public:
|
||||
SMI_INVALID,
|
||||
/// an apply-and-hide action has happened
|
||||
SMI_OKAY,
|
||||
/// an apply action has happened
|
||||
/// an apply action has happened
|
||||
SMI_APPLY,
|
||||
/// a cancel action has happened
|
||||
SMI_CANCEL,
|
||||
@ -143,7 +143,7 @@ public:
|
||||
SMI_READ_ONLY,
|
||||
/// the dialog contents can be modified
|
||||
SMI_READ_WRITE,
|
||||
/// the state of the dialog contents has not changed
|
||||
/// the state of the dialog contents has not changed
|
||||
SMI_NOOP,
|
||||
/// for internal use
|
||||
SMI_TOTAL
|
||||
@ -195,7 +195,7 @@ public:
|
||||
OkCancelPolicy();
|
||||
///
|
||||
//virtual ~OkCancelPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/** Activation status of a button.
|
||||
@ -238,7 +238,7 @@ public:
|
||||
OkCancelReadOnlyPolicy();
|
||||
///
|
||||
//virtual ~OkCancelReadOnlyPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -284,7 +284,7 @@ public:
|
||||
NoRepeatedApplyReadOnlyPolicy();
|
||||
///
|
||||
//virtual ~NoRepeatedApplyReadOnlyPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -327,7 +327,7 @@ public:
|
||||
OkApplyCancelReadOnlyPolicy();
|
||||
///
|
||||
//virtual ~OkApplyCancelReadOnlyPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -363,7 +363,7 @@ public:
|
||||
OkApplyCancelPolicy();
|
||||
///
|
||||
//virtual ~OkApplyCancelPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -396,7 +396,7 @@ public:
|
||||
NoRepeatedApplyPolicy();
|
||||
///
|
||||
//virtual ~NoRepeatedApplyPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -430,7 +430,7 @@ public:
|
||||
PreferencesPolicy();
|
||||
///
|
||||
//virtual ~PreferencesPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput);
|
||||
/// Activation status of a button.
|
||||
@ -460,7 +460,7 @@ private:
|
||||
class IgnorantPolicy : public ButtonPolicy {
|
||||
public:
|
||||
//virtual ~IgnorantPolicy() {}
|
||||
|
||||
|
||||
/// Trigger a transition with this input.
|
||||
virtual void input(SMInput) {}
|
||||
/// Activation status of a button.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* most files: ws cleanup
|
||||
|
||||
2002-03-18 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* biblio.C (getInfo): string::c_str() never returns NULL. Don't test
|
||||
@ -7,7 +11,7 @@
|
||||
|
||||
* ControlGraphics.C:
|
||||
* ControlInclude.C: better error messages
|
||||
|
||||
|
||||
2002-03-11 Herbert Voss <voss@lyx.org>
|
||||
|
||||
* biblio.C (parseBibTeX): fix another minibug with an
|
||||
@ -20,7 +24,7 @@
|
||||
|
||||
2002-03-09 Herbert Voss <voss@lyx.org>
|
||||
|
||||
* ControlGraphics.[Ch]: adding checkFilename() for testing
|
||||
* ControlGraphics.[Ch]: adding checkFilename() for testing
|
||||
of non-existing files
|
||||
|
||||
2002-03-07 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
@ -35,7 +39,7 @@
|
||||
2002-03-05 Herbert Voss <voss@lyx.org>
|
||||
|
||||
* biblio.C (getInfo): simplify if using paragraph layout
|
||||
"bibliography".
|
||||
"bibliography".
|
||||
|
||||
2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
@ -80,7 +84,7 @@
|
||||
|
||||
* ControlGraphics.C: remove #include "support/syscall.h" as it's not
|
||||
used.
|
||||
* ControlTexinfo.C:
|
||||
* ControlTexinfo.C:
|
||||
change Systemcalls::System to Systemcalls::Wait and
|
||||
No change of functionality, just reflects the stripped down Systemcalls
|
||||
class.
|
||||
@ -105,7 +109,7 @@
|
||||
|
||||
* ControlSpellchecker.C: clear any selection left
|
||||
(bug #211)
|
||||
|
||||
|
||||
2002-02-01 Herbert Voss <voss@lyx.org>
|
||||
|
||||
* ControlGraphics.[C] (readBB): search only, if it is a
|
||||
@ -153,7 +157,7 @@
|
||||
|
||||
* biblio.C (getInfo): fix bug when no author is given
|
||||
|
||||
* biblio.C (parseBibTeX): change the parsing, so that
|
||||
* biblio.C (parseBibTeX): change the parsing, so that
|
||||
'#'-characters in a bibtex entry are no more a problem.
|
||||
|
||||
2002-01-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
@ -233,7 +237,7 @@
|
||||
Rename ControlDialogs.h as ControlDialog.h.
|
||||
Add ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl to
|
||||
EXTRA_DIST.
|
||||
|
||||
|
||||
2002-01-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlInset.h (apply): fix bug unearthed by Michael Koziarski.
|
||||
@ -259,15 +263,15 @@
|
||||
|
||||
* helper_funcs.h (browseFile): add default empty button descriptions.
|
||||
|
||||
* ControlGraphics.C (Browse):
|
||||
* ControlBibtex.C (Browse):
|
||||
* ControlGraphics.C (Browse):
|
||||
* ControlBibtex.C (Browse):
|
||||
* ControlInclude.C (Browse): add shortcuts to directory buttons
|
||||
|
||||
2002-01-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* ControlThesaurus.h:
|
||||
* ControlThesaurus.C: update to Aiksaurus 0.14
|
||||
|
||||
|
||||
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlSpellchecker.C (clearParams): show the closing message
|
||||
@ -286,11 +290,11 @@
|
||||
2001-11-04 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* ControlToc.C: changes for floatlist
|
||||
|
||||
|
||||
2001-11-04 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* ControlVCLog.C: use _()
|
||||
|
||||
|
||||
2001-10-23 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* ControlSpellchecker.C: include <sys/types.h> since FreeBSD needs
|
||||
@ -316,7 +320,7 @@
|
||||
|
||||
* ControlTexinfo.C: new path for the shellscript TeXFiles.sh
|
||||
and some more stuff from FormTexinfo.C
|
||||
|
||||
|
||||
* ControlShowFile.C: hiding the update-button
|
||||
|
||||
2001-10-09 Herbert Voss <voss@perce.de>
|
||||
@ -428,16 +432,16 @@
|
||||
* ControlDialogs.h: remove bc() hack, now fixed in
|
||||
Qt2 frontend. use member dialog_built_ instead of shared
|
||||
static.
|
||||
|
||||
* ButtonController.h:
|
||||
|
||||
* ButtonController.h:
|
||||
* ButtonPolicies.C: more debug info
|
||||
|
||||
|
||||
* ButtonControllerBase.C: call refresh() when setting readOnly !
|
||||
|
||||
|
||||
* GUI.h: External form has apply, use the right policy
|
||||
|
||||
* character.C: fix two off-by-one errors when latex font was removed
|
||||
|
||||
|
||||
2001-08-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlInset.h (apply): tentative fix for the press Apply multiple
|
||||
@ -447,11 +451,11 @@
|
||||
|
||||
* ControlCharacter.C: fix typo
|
||||
|
||||
* ViewBase.h:
|
||||
* 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
|
||||
@ -472,7 +476,7 @@
|
||||
|
||||
2001-08-09 Allan Rae <rae@lyx.org>
|
||||
|
||||
* Makefile.am (SUBDIRS, dist-hook): remove bogus entries.
|
||||
* Makefile.am (SUBDIRS, dist-hook): remove bogus entries.
|
||||
|
||||
2001-08-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
@ -532,7 +536,7 @@
|
||||
|
||||
* ControlInclude.h:
|
||||
* ControlInclude.C: implement ability to load file
|
||||
|
||||
|
||||
2001-07-18 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* ControlSearch.C (replace): changes to lyxfind.h function calls.
|
||||
@ -568,7 +572,7 @@
|
||||
2001-07-17 Edwin Leuven <leuven@fee.uva.nl>
|
||||
|
||||
* ControlSpellchecker.[Ch]: remove member quit() and some cleaning
|
||||
|
||||
|
||||
2001-07-16 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* ControlSpellchecker.C (show): use the lyxrc.use_pspell flag (if
|
||||
@ -590,7 +594,7 @@
|
||||
|
||||
2001-07-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* ControlSpellchecker.C (getSuggestion):
|
||||
* ControlSpellchecker.C (getSuggestion):
|
||||
(getWord): add std:: qualifier
|
||||
|
||||
2001-07-13 Edwin Leuven <leuven@fee.uva.nl>
|
||||
@ -598,7 +602,7 @@
|
||||
* ControlSpellchecker.[Ch]: added
|
||||
* ViewBase.h: added partialUpdate(int) member
|
||||
* GUI.h: added spell stuff
|
||||
|
||||
|
||||
2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* ControlExternal.C: (*it). -> it->
|
||||
@ -698,11 +702,11 @@
|
||||
2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* ButtonControllerBase.h: C++ mode, inherit privately from
|
||||
noncopyable
|
||||
noncopyable
|
||||
* ButtonPolicies.h: ditto
|
||||
|
||||
* ButtonController.h: C++ mode, swap init order of restore_ and
|
||||
cancel_
|
||||
cancel_
|
||||
|
||||
2001-04-06 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
@ -724,16 +728,16 @@
|
||||
|
||||
2001-04-05 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* ControlToc.C:
|
||||
* ControlSearch.C:
|
||||
* ControlPrint.C:
|
||||
* ControlPreamble.C:
|
||||
* ControlInclude.C:
|
||||
* ControlGraphics.C:
|
||||
* ControlExternal.C:
|
||||
* ControlToc.C:
|
||||
* ControlSearch.C:
|
||||
* ControlPrint.C:
|
||||
* ControlPreamble.C:
|
||||
* ControlInclude.C:
|
||||
* ControlGraphics.C:
|
||||
* ControlExternal.C:
|
||||
* ControlCopyright.C: include gettext.h
|
||||
|
||||
* ControlCharacter.C:
|
||||
* ControlCharacter.C:
|
||||
* character.C: include gettext.h and language.h
|
||||
|
||||
2001-04-03 John Levon <moz@compsoc.man.ac.uk>
|
||||
@ -779,7 +783,7 @@
|
||||
|
||||
* ViewBase.h:
|
||||
* ControlConnections.h: associated change in #include and class names.
|
||||
|
||||
|
||||
* ControlExternal.[Ch]: new files; a controller for the External
|
||||
Material popup.
|
||||
|
||||
@ -931,7 +935,7 @@
|
||||
2001-03-23 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* ControlCredits.C (getCredits): remove std:: qualifier for
|
||||
getline().
|
||||
getline().
|
||||
|
||||
2001-03-23 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
|
||||
|
||||
@ -1052,9 +1056,9 @@
|
||||
|
||||
* ControlCommand.h (c-tor): give kb_action a default value of
|
||||
LFUN_NOACTION.
|
||||
|
||||
|
||||
* ControlCommand.C (apply): do nothing if kb_action is LFUN_NOACTION.
|
||||
|
||||
|
||||
* ControlCitation.[Ch]: moved search functions out of class.
|
||||
(bibkeysInfo): new method. Returns const reference to private data.
|
||||
(searchKeys): added case-sensitive switch. Used only by simpleSearch
|
||||
@ -1115,7 +1119,7 @@
|
||||
* ControlCitation.h: the templatised class GUICitation instantiates
|
||||
the methods view() and bc(). It also stores the instances of the
|
||||
View and ButtonController.
|
||||
|
||||
|
||||
2001-02-23 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ButtonControllerBase.[Ch]: renamed as ButtonController.[Ch]. Class
|
||||
|
@ -92,6 +92,6 @@ string const ControlAboutlyx::getVersion() const
|
||||
<< "\n"
|
||||
<< _("User directory: ")
|
||||
<< MakeDisplayPath(user_lyxdir);
|
||||
|
||||
|
||||
return ss.str().c_str();
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
|
||||
///
|
||||
stringstream & getCredits(stringstream &) const;
|
||||
|
||||
|
||||
///
|
||||
string const getCopyright() const;
|
||||
|
||||
@ -40,7 +40,7 @@ public:
|
||||
|
||||
///
|
||||
string const getVersion() const;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/// not needed.
|
||||
@ -48,4 +48,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // CONTROLABOUTLYX_H
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -61,8 +61,8 @@ void ControlBibtex::applyParamsNoInset()
|
||||
{}
|
||||
|
||||
|
||||
string const ControlBibtex::Browse(string const & in_name,
|
||||
string const & title,
|
||||
string const ControlBibtex::Browse(string const & in_name,
|
||||
string const & title,
|
||||
string const & pattern)
|
||||
{
|
||||
pair<string, string> dir1(N_("Documents|#o#O"), string(lyxrc.document_path));
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -31,11 +31,11 @@ public:
|
||||
ControlBibtex(LyXView &, Dialogs &);
|
||||
/// Browse for a file
|
||||
string const Browse(string const &, string const &, string const &);
|
||||
|
||||
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -60,5 +60,5 @@ void ControlButtons::RestoreButton()
|
||||
|
||||
bool ControlButtons::IconifyWithMain() const
|
||||
{
|
||||
return lyxrc.dialogs_iconify_with_main;
|
||||
return lyxrc.dialogs_iconify_with_main;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -89,7 +89,7 @@ protected:
|
||||
private:
|
||||
///
|
||||
bool is_closing_;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // CONTROLBUTTONS_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -45,7 +45,7 @@ public:
|
||||
private:
|
||||
/// create the InfoMap of keys and data
|
||||
virtual void setDaughterParams();
|
||||
///
|
||||
///
|
||||
virtual void clearDaughterParams();
|
||||
|
||||
/** disconnect from the inset when the Apply button is pressed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -59,4 +59,3 @@ void ControlCommand::applyParamsNoInset()
|
||||
if (action_ == LFUN_NOACTION) return;
|
||||
lv_.getLyXFunc()->dispatch(action_, params().getAsString());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -17,7 +17,7 @@
|
||||
* The class is likely to be changed as other Inset controllers are created
|
||||
* and it becomes clear just what functionality can be moved back into
|
||||
* ControlInset.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONTROLCOMMAND_H
|
||||
@ -31,7 +31,7 @@
|
||||
#include "insets/insetcommand.h"
|
||||
#include "commandtags.h" // kb_action
|
||||
|
||||
/** The Inset dialog controller. Connects/disconnects signals, launches
|
||||
/** The Inset dialog controller. Connects/disconnects signals, launches
|
||||
GUI-dependent View and returns the output from this View to the kernel.
|
||||
*/
|
||||
class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
|
||||
@ -43,7 +43,7 @@ public:
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual InsetCommandParams const getParams(string const &);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -75,7 +75,7 @@ ControlConnectBase::DocTypes ControlConnectBase::docType() const
|
||||
|
||||
|
||||
ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d)
|
||||
: ControlConnectBase(lv, d)
|
||||
: ControlConnectBase(lv, d)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -62,7 +62,7 @@ public:
|
||||
ControlConnectBase(LyXView &, Dialogs &);
|
||||
/// The View may need to know if the buffer is read-only.
|
||||
bool isReadonly() const;
|
||||
///
|
||||
///
|
||||
DocTypes docType() const;
|
||||
|
||||
protected:
|
||||
@ -99,8 +99,8 @@ protected:
|
||||
class ControlConnectBI : public ControlConnectBase
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlConnectBI(LyXView &, Dialogs &);
|
||||
///
|
||||
ControlConnectBI(LyXView &, Dialogs &);
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -7,8 +7,8 @@
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* ControlDialog is to be used as a parent class for dialogs that are not
|
||||
* views onto parameters of insets. (An ugly description I know, but I hope
|
||||
* the meaning is clear! Can anyone do any better?) Examples would be the
|
||||
* views onto parameters of insets. (An ugly description I know, but I hope
|
||||
* the meaning is clear! Can anyone do any better?) Examples would be the
|
||||
* Document and Paragraph dialogs.
|
||||
*/
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Dialogs;
|
||||
class LyXView;
|
||||
|
||||
|
||||
class ControlDialogBD : public ControlDialog<ControlConnectBD>
|
||||
class ControlDialogBD : public ControlDialog<ControlConnectBD>
|
||||
{
|
||||
public:
|
||||
///
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -54,7 +54,7 @@ public:
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual ERTParams const getParams(string const &)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -38,4 +38,3 @@ string const ControlError::getParams(InsetError const & inset)
|
||||
{
|
||||
return inset.getContents();
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* \file ControlError.h
|
||||
* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -35,7 +35,7 @@ public:
|
||||
private:
|
||||
/// not needed.
|
||||
virtual void applyParamsToInset() {}
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset() {}
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual string const getParams(string const &) { return string(); }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -53,7 +53,7 @@ InsetExternal::Params const ControlExternal::getParams(string const &)
|
||||
return InsetExternal::Params();
|
||||
}
|
||||
|
||||
InsetExternal::Params const
|
||||
InsetExternal::Params const
|
||||
ControlExternal::getParams(InsetExternal const & inset)
|
||||
{
|
||||
return inset.params();
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
#include "insets/insetexternal.h"
|
||||
|
||||
/** A controller for External dialogs.
|
||||
*/
|
||||
*/
|
||||
class ControlExternal
|
||||
: public ControlInset<InsetExternal, InsetExternal::Params>
|
||||
{
|
||||
@ -49,7 +49,7 @@ public:
|
||||
string const Browse(string const &) const;
|
||||
|
||||
private:
|
||||
///
|
||||
///
|
||||
virtual void applyParamsToInset();
|
||||
/// not needed.
|
||||
virtual void applyParamsNoInset() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -64,6 +64,6 @@ FloatParams::FloatParams()
|
||||
|
||||
|
||||
FloatParams::FloatParams(InsetFloat const & inset)
|
||||
: placement(inset.placement()),
|
||||
: placement(inset.placement()),
|
||||
allow_here_definitely(!inset.wide())
|
||||
{}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -38,14 +38,14 @@ struct FloatParams {
|
||||
|
||||
|
||||
inline
|
||||
bool operator==(FloatParams const & p1, FloatParams const & p2)
|
||||
bool operator==(FloatParams const & p1, FloatParams const & p2)
|
||||
{
|
||||
return p1.placement == p2.placement && p1.allow_here_definitely == p2.allow_here_definitely;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
bool operator!=(FloatParams const & p1, FloatParams const & p2)
|
||||
bool operator!=(FloatParams const & p1, FloatParams const & p2)
|
||||
{
|
||||
return !(p1 == p2);
|
||||
}
|
||||
@ -60,7 +60,7 @@ public:
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual FloatParams const getParams(string const &)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* \file ControlForks.C
|
||||
* Copyright 2001 The LyX Team
|
||||
* Read COPYING
|
||||
@ -93,4 +93,3 @@ void ControlForks::clearParams()
|
||||
pids_.clear();
|
||||
childrenChanged_.disconnect();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
/**
|
||||
* \file ControlForks.h
|
||||
* Copyright 2001 The LyX Team
|
||||
* Read COPYING
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -12,12 +12,12 @@
|
||||
* \author Herbert Voss <voss@perce.de>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
@ -81,41 +81,41 @@ void ControlGraphics::applyParamsNoInset()
|
||||
// We need these in the file browser.
|
||||
extern string system_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
|
||||
|
||||
|
||||
string const ControlGraphics::Browse(string const & in_name)
|
||||
{
|
||||
string const title = N_("Select graphics file");
|
||||
// FIXME: currently we need the second '|' to prevent mis-interpretation
|
||||
// FIXME: currently we need the second '|' to prevent mis-interpretation
|
||||
string const pattern = "*.(ps|eps|png|jpeg|jpg|gif|gz)|";
|
||||
|
||||
// Does user clipart directory exist?
|
||||
string clipdir = AddName (user_lyxdir, "clipart");
|
||||
FileInfo fileInfo(clipdir);
|
||||
if (!(fileInfo.isOK() && fileInfo.isDir()))
|
||||
// No - bail out to system clipart directory
|
||||
clipdir = AddName (system_lyxdir, "clipart");
|
||||
// Does user clipart directory exist?
|
||||
string clipdir = AddName (user_lyxdir, "clipart");
|
||||
FileInfo fileInfo(clipdir);
|
||||
if (!(fileInfo.isOK() && fileInfo.isDir()))
|
||||
// No - bail out to system clipart directory
|
||||
clipdir = AddName (system_lyxdir, "clipart");
|
||||
pair<string, string> dir1(N_("Clipart|#C#c"), clipdir);
|
||||
pair<string, string> dir2(N_("Documents|#o#O"), string(lyxrc.document_path));
|
||||
// Show the file browser dialog
|
||||
return browseFile(&lv_, in_name, title, pattern, dir1, dir2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
string const ControlGraphics::readBB(string const & file)
|
||||
{
|
||||
// in a file it's an entry like %%BoundingBox:23 45 321 345
|
||||
// the first number can following without a space, so we have
|
||||
// to check a bit more.
|
||||
// to check a bit more.
|
||||
// on the other hand some plot programs write the bb at the
|
||||
// end of the file. Than we have in the header a
|
||||
// %%BoundingBox: (atend)
|
||||
// %%BoundingBox: (atend)
|
||||
// In this case we must check until the end.
|
||||
string file_ = file;
|
||||
if (zippedFile(file_))
|
||||
file_ = unzipFile(file_);
|
||||
std::ifstream is(file_.c_str());
|
||||
if (!contains(getExtFromContents(file_),"ps")) // bb exists?
|
||||
if (!contains(getExtFromContents(file_),"ps")) // bb exists?
|
||||
return string();
|
||||
while (is) {
|
||||
string s;
|
||||
@ -124,7 +124,7 @@ string const ControlGraphics::readBB(string const & file)
|
||||
string a, b, c, d;
|
||||
is >> a >> b >> c >> d;
|
||||
if (is && !contains(a,"atend")) { // bb at the end?
|
||||
if (s != "%%BoundingBox:")
|
||||
if (s != "%%BoundingBox:")
|
||||
return (s.substr(14)+" "+a+" "+b+" "+c+" ");
|
||||
else
|
||||
return (a+" "+b+" "+c+" "+d+" ");
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ControlInset.h"
|
||||
|
||||
@ -45,7 +45,7 @@ public:
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual InsetGraphicsParams const getParams(string const &);
|
||||
@ -54,4 +54,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // CONTROLGRAPHICS_H
|
||||
|
||||
|
@ -53,7 +53,7 @@ string const ControlInclude::Browse(string const & in_name, Type in_type)
|
||||
string const title = _("Select document to include");
|
||||
|
||||
// input TeX, verbatim, or LyX file ?
|
||||
string pattern;
|
||||
string pattern;
|
||||
switch (in_type) {
|
||||
case INPUT:
|
||||
pattern = _("*.tex| LaTeX Documents (*.tex)");
|
||||
@ -67,12 +67,12 @@ string const ControlInclude::Browse(string const & in_name, Type in_type)
|
||||
pattern = _("*.lyx| LyX Documents (*.lyx)");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
pair<string, string> dir1(N_("Documents|#o#O"),
|
||||
string(lyxrc.document_path));
|
||||
|
||||
string const docpath = OnlyPath(params().masterFilename_);
|
||||
|
||||
|
||||
return browseRelFile(&lv_, in_name, docpath, title, pattern, dir1);
|
||||
}
|
||||
|
||||
@ -85,11 +85,10 @@ void ControlInclude::load(string const & file)
|
||||
|
||||
bool ControlInclude::fileExists(string const & file)
|
||||
{
|
||||
string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_));
|
||||
string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_));
|
||||
if (IsFileReadable(fileWithAbsPath))
|
||||
return true;
|
||||
else
|
||||
Alert::alert(_("Specified file doesn't exist !"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ public:
|
||||
string const Browse(string const &, Type);
|
||||
|
||||
/// load a file
|
||||
void load(string const & file);
|
||||
void load(string const & file);
|
||||
|
||||
/// test if file exist
|
||||
bool fileExists(string const & file);
|
||||
bool fileExists(string const & file);
|
||||
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -72,7 +72,7 @@ private:
|
||||
virtual bool disconnectOnApply() { return false; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// Instantiation of ControlButtons virtual methods.
|
||||
|
||||
/// Get changed parameters and Dispatch them to the kernel.
|
||||
@ -92,7 +92,7 @@ private:
|
||||
void connectInset(Inset * = 0);
|
||||
|
||||
/// pointer to the inset passed through connectInset
|
||||
Inset * inset_;
|
||||
Inset * inset_;
|
||||
/// inset::hide connection.
|
||||
SigC::Connection ih_;
|
||||
/** A local copy of the inset's params.
|
||||
@ -102,7 +102,7 @@ private:
|
||||
|
||||
/// is the dialog built ?
|
||||
bool dialog_built_;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -56,7 +56,7 @@ public:
|
||||
private:
|
||||
/// Dispatch the changed parameters to the kernel.
|
||||
virtual void applyParamsToInset();
|
||||
///
|
||||
///
|
||||
virtual void applyParamsNoInset();
|
||||
/// get the parameters from the string passed to createInset.
|
||||
virtual MinipageParams const getParams(string const &)
|
||||
|
@ -36,7 +36,7 @@ void ControlPreamble::apply()
|
||||
{
|
||||
if (!lv_.view()->available())
|
||||
return;
|
||||
|
||||
|
||||
view().apply();
|
||||
|
||||
lv_.buffer()->params.preamble = params();
|
||||
|
@ -33,7 +33,7 @@ private:
|
||||
virtual void setParams();
|
||||
/// clean-up on hide.
|
||||
virtual void clearParams();
|
||||
|
||||
|
||||
///
|
||||
string * params_;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -49,7 +49,7 @@ void ControlPrint::apply()
|
||||
{
|
||||
if (!lv_.view()->available())
|
||||
return;
|
||||
|
||||
|
||||
view().apply();
|
||||
|
||||
if (!printBuffer(lv_.buffer(), params())) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -27,7 +27,7 @@ class PrinterParams;
|
||||
*/
|
||||
class ControlPrint : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
///
|
||||
ControlPrint(LyXView &, Dialogs &);
|
||||
|
||||
/// Browse for a file
|
||||
@ -42,7 +42,7 @@ private:
|
||||
virtual void setParams();
|
||||
/// clean-up on hide.
|
||||
virtual void clearParams();
|
||||
|
||||
|
||||
///
|
||||
PrinterParams * params_;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -66,7 +66,7 @@ void ControlRef::gotoBookmark() const
|
||||
|
||||
vector<string> const ControlRef::getBufferList() const
|
||||
{
|
||||
|
||||
|
||||
vector<string> buffers = bufferlist.getFileNames();
|
||||
for (vector<string>::iterator it = buffers.begin();
|
||||
it != buffers.end(); ++it) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -48,8 +48,8 @@ void ControlSearch::find(string const & search,
|
||||
bool casesensitive, bool matchword, bool forward) const
|
||||
{
|
||||
bool const found = LyXFind(lv_.view(), search,
|
||||
forward, false, casesensitive, matchword);
|
||||
|
||||
forward, false, casesensitive, matchword);
|
||||
|
||||
if (!found)
|
||||
setMinibuffer(&lv_, _("String not found!"));
|
||||
}
|
||||
@ -63,9 +63,9 @@ void ControlSearch::replace(string const & search, string const & replace,
|
||||
// changed
|
||||
bool const once = !all;
|
||||
int const replace_count = LyXReplace(lv_.view(),
|
||||
search, replace, true, casesensitive,
|
||||
matchword, all, once);
|
||||
|
||||
search, replace, true, casesensitive,
|
||||
matchword, all, once);
|
||||
|
||||
if (replace_count == 0) {
|
||||
setMinibuffer(&lv_, _("String not found!"));
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -28,7 +28,7 @@ class ControlSearch : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlSearch(LyXView &, Dialogs &);
|
||||
|
||||
|
||||
/// Searches occurence of string
|
||||
void find(string const & search,
|
||||
bool casesensitive, bool matchword, bool forward) const;
|
||||
|
@ -106,7 +106,7 @@ void ControlSendto::apply()
|
||||
{
|
||||
if (!lv_.view()->available())
|
||||
return;
|
||||
|
||||
|
||||
view().apply();
|
||||
|
||||
if (command_.empty() || !format_)
|
||||
@ -126,7 +126,7 @@ void ControlSendto::apply()
|
||||
|
||||
} else {
|
||||
Exporter::Export(lv_.buffer(), format_->name(), true, filename);
|
||||
}
|
||||
}
|
||||
|
||||
// Substitute $$FName for filename
|
||||
string command = command_;
|
||||
@ -138,4 +138,3 @@ void ControlSendto::apply()
|
||||
Systemcall call;
|
||||
call.startscript(Systemcall::DontWait, command);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -33,7 +33,7 @@
|
||||
#include "buffer.h"
|
||||
#include "lyxrc.h"
|
||||
#include "BufferView.h"
|
||||
#include "LyXView.h"
|
||||
#include "LyXView.h"
|
||||
#include "lyxtext.h"
|
||||
#include "gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
@ -72,18 +72,18 @@ void ControlSpellchecker::setParams()
|
||||
if (lyxrc.use_pspell) {
|
||||
tmp = (lyxrc.isp_use_alt_lang) ?
|
||||
lyxrc.isp_alt_lang : lv_.buffer()->params.language->code();
|
||||
|
||||
|
||||
speller_ = new PSpell(lv_.view()->buffer()->params, tmp);
|
||||
} else {
|
||||
#endif
|
||||
tmp = (lyxrc.isp_use_alt_lang) ?
|
||||
lyxrc.isp_alt_lang : lv_.buffer()->params.language->lang();
|
||||
|
||||
|
||||
speller_ = new ISpell(lv_.view()->buffer()->params, tmp);
|
||||
#ifdef USE_PSPELL
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (lyxrc.isp_use_alt_lang) {
|
||||
Language const * lang = languages.getLanguage(tmp);
|
||||
if (lang)
|
||||
@ -91,7 +91,7 @@ void ControlSpellchecker::setParams()
|
||||
} else {
|
||||
rtl_ = lv_.buffer()->params.language->RightToLeft();
|
||||
}
|
||||
|
||||
|
||||
if (speller_->error() != 0) {
|
||||
#if 0
|
||||
message_ = speller_->error();
|
||||
@ -109,21 +109,21 @@ void ControlSpellchecker::check()
|
||||
{
|
||||
result_ = SpellBase::ISP_OK;
|
||||
stop_ = false;
|
||||
|
||||
|
||||
// clear any old selection
|
||||
LyXText * text = lv_.view()->getLyXText();
|
||||
lv_.view()->toggleSelection(true);
|
||||
lv_.view()->update(text, BufferView::SELECT);
|
||||
|
||||
|
||||
while ((result_==SpellBase::ISP_OK || result_==SpellBase::ISP_IGNORE) &&
|
||||
!stop_) {
|
||||
word_ = lv_.view()->nextWord(newval_);
|
||||
|
||||
|
||||
if (word_.empty()) {
|
||||
clearParams();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
++count_;
|
||||
|
||||
// Update slider if and only if value has changed
|
||||
@ -133,12 +133,12 @@ void ControlSpellchecker::check()
|
||||
// set progress bar
|
||||
view().partialUpdate(0);
|
||||
}
|
||||
|
||||
|
||||
if (!speller_->alive()) clearParams();
|
||||
|
||||
|
||||
result_ = speller_->check(word_);
|
||||
}
|
||||
|
||||
|
||||
if (!stop_ && !word_.empty())
|
||||
lv_.view()->selectLastWord();
|
||||
|
||||
@ -176,12 +176,12 @@ string ControlSpellchecker::getSuggestion()
|
||||
// segfaults when nextMiss is 0
|
||||
string tmp;
|
||||
char const * w = speller_->nextMiss();
|
||||
|
||||
|
||||
if (w!=0) {
|
||||
tmp = w;
|
||||
if (rtl_) std::reverse(tmp.begin(), tmp.end());
|
||||
}
|
||||
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ void ControlSpellchecker::stop()
|
||||
void ControlSpellchecker::clearParams()
|
||||
{
|
||||
if (!speller_) return;
|
||||
|
||||
|
||||
if (speller_->alive()) {
|
||||
speller_->close();
|
||||
message_ = tostr(count_);
|
||||
@ -234,9 +234,9 @@ void ControlSpellchecker::clearParams()
|
||||
// make sure that the dialog is not launched
|
||||
emergency_exit_ = true;
|
||||
}
|
||||
|
||||
|
||||
delete speller_;
|
||||
|
||||
|
||||
lv_.view()->endOfSpellCheck();
|
||||
|
||||
// show closing message if any words were checked.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -40,7 +40,7 @@ public:
|
||||
|
||||
/// ignore all occurances of word
|
||||
void ignoreAll();
|
||||
|
||||
|
||||
/// stop checking
|
||||
void stop();
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
|
||||
/// spell options
|
||||
void options();
|
||||
|
||||
|
||||
/// get suggestion
|
||||
string getSuggestion();
|
||||
|
||||
@ -58,16 +58,16 @@ public:
|
||||
|
||||
/// returns progress value
|
||||
int getProgress() {
|
||||
return oldval_;
|
||||
return oldval_;
|
||||
}
|
||||
|
||||
/// returns exit message
|
||||
string getMessage() {
|
||||
return message_;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/// set the params before show or update
|
||||
void setParams();
|
||||
/// clean-up on hide.
|
||||
@ -101,7 +101,7 @@ private:
|
||||
|
||||
/// The actual spellchecker object
|
||||
SpellBase * speller_;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // CONTROLSPELLCHECKER_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -49,10 +49,10 @@ void ControlTabularCreate::apply()
|
||||
{
|
||||
if (!lv_.view()->available())
|
||||
return;
|
||||
|
||||
|
||||
view().apply();
|
||||
|
||||
string const val(tostr(params().first) + " " + tostr(params().second));
|
||||
|
||||
string const val(tostr(params().first) + " " + tostr(params().second));
|
||||
|
||||
lv_.getLyXFunc()->dispatch(LFUN_INSET_TABULAR, val);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
*======================================================
|
||||
@ -15,7 +15,7 @@
|
||||
#define CONTROLTABULARCREATE_H
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
@ -26,9 +26,9 @@
|
||||
*/
|
||||
class ControlTabularCreate : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
///
|
||||
ControlTabularCreate(LyXView &, Dialogs &);
|
||||
|
||||
|
||||
typedef std::pair<unsigned int, unsigned int> rowsCols;
|
||||
|
||||
///
|
||||
@ -40,7 +40,7 @@ private:
|
||||
|
||||
/// set the params before show or update
|
||||
virtual void setParams();
|
||||
|
||||
|
||||
/// rows, cols params
|
||||
rowsCols params_;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -61,9 +61,9 @@ void ControlTexinfo::runTexhash() const
|
||||
//path to texhash through system
|
||||
Systemcall one;
|
||||
one.startscript(Systemcall::Wait, "texhash");
|
||||
|
||||
|
||||
p.pop();
|
||||
// Alert::alert(_("texhash run!"),
|
||||
// Alert::alert(_("texhash run!"),
|
||||
// _("rebuilding of the TeX-tree could only be successfull"),
|
||||
// _("if you have had user-write-permissions to the tex-dir."));
|
||||
}
|
||||
@ -74,10 +74,10 @@ namespace {
|
||||
string const sortEntries(string & str_in)
|
||||
{
|
||||
std::vector<string> dbase = getVectorFromString(str_in,"\n");
|
||||
std::sort(dbase.begin(), dbase.end()); // sort entries
|
||||
std::vector<string>::iterator p =
|
||||
std::unique(dbase.begin(), dbase.end()); // compact
|
||||
dbase.erase(p, dbase.end()); // shrink
|
||||
std::sort(dbase.begin(), dbase.end()); // sort entries
|
||||
std::vector<string>::iterator p =
|
||||
std::unique(dbase.begin(), dbase.end()); // compact
|
||||
dbase.erase(p, dbase.end()); // shrink
|
||||
return getStringFromVector(dbase,"\n");
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const
|
||||
|
||||
string filename;
|
||||
switch (type) {
|
||||
case bst:
|
||||
case bst:
|
||||
filename = bstFilename;
|
||||
break;
|
||||
case cls:
|
||||
@ -127,4 +127,3 @@ void ControlTexinfo::viewFile(string const filename) const
|
||||
{
|
||||
lv_.getDialogs()->showFile(filename);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ class ControlThesaurus : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlThesaurus(LyXView &, Dialogs &);
|
||||
|
||||
|
||||
/// replace the particular string
|
||||
void replace(string const & newstr);
|
||||
|
||||
@ -36,7 +36,7 @@ public:
|
||||
|
||||
/// get meanings
|
||||
Thesaurus::Meanings const & getMeanings(string const & str);
|
||||
|
||||
|
||||
/// the text
|
||||
string const & text() {
|
||||
return oldstr_;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -84,7 +84,7 @@ Buffer::SingleList const ControlToc::getContents(string const & type) const
|
||||
}
|
||||
|
||||
|
||||
namespace toc
|
||||
namespace toc
|
||||
{
|
||||
|
||||
string const getType(string const & cmdName)
|
||||
@ -97,5 +97,5 @@ string const getType(string const & cmdName)
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
} // namespace toc
|
||||
|
||||
} // namespace toc
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -40,7 +40,7 @@ public:
|
||||
Buffer::SingleList const getContents(string const & type) const;
|
||||
};
|
||||
|
||||
namespace toc
|
||||
namespace toc
|
||||
{
|
||||
/** Given the cmdName of the TOC param, returns the type used
|
||||
by ControlToc::getContents() */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/** A controller for the Url Dialog.
|
||||
*/
|
||||
class ControlUrl : public ControlCommand
|
||||
class ControlUrl : public ControlCommand
|
||||
{
|
||||
public:
|
||||
///
|
||||
|
@ -60,7 +60,7 @@ stringstream & ControlVCLog::getVCLogFile(stringstream & ss) const
|
||||
ss << in.rdbuf();
|
||||
found = ss.good();
|
||||
}
|
||||
|
||||
|
||||
if (!found)
|
||||
ss << _("No version control log file found.") << endl;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -345,7 +345,7 @@ public:
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUITabularCreate :
|
||||
public GUI<ControlTabularCreate, GUIview,
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc> {
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc> {
|
||||
public:
|
||||
///
|
||||
GUITabularCreate(LyXView & lv, Dialogs & d)
|
||||
@ -370,7 +370,7 @@ public:
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIThesaurus :
|
||||
public GUI<ControlThesaurus, GUIview,
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc> {
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc> {
|
||||
public:
|
||||
///
|
||||
GUIThesaurus(LyXView & lv, Dialogs & d)
|
||||
@ -378,7 +378,7 @@ public:
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** Specialization for Url dialog
|
||||
*/
|
||||
template <class GUIview, class GUIbc>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -19,9 +19,9 @@
|
||||
|
||||
class ViewBase {
|
||||
public:
|
||||
///
|
||||
///
|
||||
ViewBase(ControlButtons & c) : controller_(c) {}
|
||||
///
|
||||
///
|
||||
virtual ~ViewBase() {}
|
||||
|
||||
/// Apply changes to LyX data from dialog.
|
||||
@ -40,20 +40,20 @@ public:
|
||||
/** These shortcuts allow (e.g. xform's) global callback functions
|
||||
access to the buttons without making the whole controller_ public.
|
||||
*/
|
||||
///
|
||||
void ApplyButton() { controller_.ApplyButton(); }
|
||||
///
|
||||
void OKButton() { controller_.OKButton(); }
|
||||
///
|
||||
void CancelButton() { controller_.CancelButton(); }
|
||||
///
|
||||
void RestoreButton() { controller_.RestoreButton(); }
|
||||
|
||||
///
|
||||
void ApplyButton() { controller_.ApplyButton(); }
|
||||
///
|
||||
void OKButton() { controller_.OKButton(); }
|
||||
///
|
||||
void CancelButton() { controller_.CancelButton(); }
|
||||
///
|
||||
void RestoreButton() { controller_.RestoreButton(); }
|
||||
|
||||
/** Defaults to nothing. Can be used by the Controller, however, to
|
||||
indicate to the View that something has changed and that the
|
||||
dialog therefore needs updating. */
|
||||
virtual void partialUpdate(int) {}
|
||||
|
||||
|
||||
protected:
|
||||
/// The view is, after all, controlled!
|
||||
ControlButtons & controller_;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -34,15 +34,15 @@ using std::min;
|
||||
using std::vector;
|
||||
using std::sort;
|
||||
|
||||
namespace biblio
|
||||
namespace biblio
|
||||
{
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace biblio;
|
||||
|
||||
|
||||
char const * const citeCommands[] = {
|
||||
"cite", "citet", "citep", "citealt", "citealp", "citeauthor",
|
||||
"cite", "citet", "citep", "citealt", "citealp", "citeauthor",
|
||||
"citeyear", "citeyearpar" };
|
||||
|
||||
unsigned int const nCiteCommands =
|
||||
@ -66,7 +66,7 @@ CiteStyle const citeStylesUCase[] = {
|
||||
|
||||
unsigned int const nCiteStylesUCase =
|
||||
sizeof(citeStylesUCase) / sizeof(CiteStyle);
|
||||
|
||||
|
||||
|
||||
// The functions doing the dirty work for the search.
|
||||
vector<string>::const_iterator
|
||||
@ -107,14 +107,14 @@ simpleSearch(InfoMap const & theMap,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (found) return it;
|
||||
}
|
||||
|
||||
return keys.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
vector<string>::const_iterator
|
||||
regexSearch(InfoMap const & theMap,
|
||||
vector<string> const & keys,
|
||||
@ -158,7 +158,7 @@ string const familyName(string const & name)
|
||||
idx = fname.rfind(".");
|
||||
if (idx != string::npos)
|
||||
fname = frontStrip(fname.substr(idx+1));
|
||||
|
||||
|
||||
return fname;
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ string const getAbbreviatedAuthor(InfoMap const & map, string const & key)
|
||||
{
|
||||
lyx::Assert(!map.empty());
|
||||
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
|
||||
string author;
|
||||
if (it != map.end()) {
|
||||
@ -204,7 +204,7 @@ string const getYear(InfoMap const & map, string const & key)
|
||||
{
|
||||
lyx::Assert(!map.empty());
|
||||
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
|
||||
string year;
|
||||
|
||||
@ -213,16 +213,16 @@ string const getYear(InfoMap const & map, string const & key)
|
||||
|
||||
if (year.empty())
|
||||
year = "50BC";
|
||||
|
||||
|
||||
return year;
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
} // namespace anon
|
||||
|
||||
|
||||
|
||||
// A functor for use with std::sort, leading to case insensitive sorting
|
||||
struct compareNoCase: public std::binary_function<string, string, bool>
|
||||
struct compareNoCase: public std::binary_function<string, string, bool>
|
||||
{
|
||||
bool operator()(string const & s1, string const & s2) const {
|
||||
return compare_no_case(s1, s2) < 0;
|
||||
@ -246,7 +246,7 @@ string const getInfo(InfoMap const & map, string const & key)
|
||||
{
|
||||
lyx::Assert(!map.empty());
|
||||
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
if (it == map.end())
|
||||
return string();
|
||||
// is the entry a BibTeX one or one from lyx-layout "bibliography"?
|
||||
@ -301,7 +301,7 @@ string const getInfo(InfoMap const & map, string const & key)
|
||||
// This should never happen (or at least be very unusual!)
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
vector<string>::const_iterator
|
||||
searchKeys(InfoMap const & theMap,
|
||||
@ -315,7 +315,7 @@ searchKeys(InfoMap const & theMap,
|
||||
// Preliminary checks
|
||||
if (start < keys.begin() || start >= keys.end())
|
||||
return keys.end();
|
||||
|
||||
|
||||
string search_expr = frontStrip(strip(expr));
|
||||
if (search_expr.empty())
|
||||
return keys.end();
|
||||
@ -358,10 +358,10 @@ string const parseBibTeX(string data, string const & findkey)
|
||||
return string();
|
||||
|
||||
// now get only the important line of the bibtex entry.
|
||||
// all entries are devided by ',' except the last one.
|
||||
// all entries are devided by ',' except the last one.
|
||||
data += ','; // now we have same behaviour for all entries
|
||||
// because the last one is "blah ... }"
|
||||
Entries = 0;
|
||||
Entries = 0;
|
||||
dummy = token(data, ',', Entries);
|
||||
while (!contains(lowercase(dummy), findkey) && !dummy.empty())
|
||||
dummy = token(data, ',', ++Entries);
|
||||
@ -376,7 +376,7 @@ string const parseBibTeX(string data, string const & findkey)
|
||||
keyvalue += (',' + dummy);
|
||||
dummy = token(data, ',', ++Entries);
|
||||
}
|
||||
data = keyvalue; // now we have the important line
|
||||
data = keyvalue; // now we have the important line
|
||||
data = strip(data, ' '); // all spaces
|
||||
if (!contains(data, '{')) // no opening '{'
|
||||
data = strip(data, '}');// maybe there is a main closing '}'
|
||||
@ -407,18 +407,18 @@ string const parseBibTeX(string data, string const & findkey)
|
||||
} else {
|
||||
// no {} and no "", pure data but with a
|
||||
// possible ',' at the end
|
||||
return strip(data,',');
|
||||
return strip(data,',');
|
||||
}
|
||||
string tmp = data.substr(keypos);
|
||||
while (tmp.find('{') != string::npos &&
|
||||
tmp.find('}') != string::npos &&
|
||||
tmp.find('{') < tmp.find('}') &&
|
||||
tmp.find('{') < tmp.find(enclosing)) {
|
||||
|
||||
|
||||
keypos += tmp.find('{') + 1;
|
||||
tmp = data.substr(keypos);
|
||||
keypos += tmp.find('}') + 1;
|
||||
tmp = data.substr(keypos);
|
||||
tmp = data.substr(keypos);
|
||||
}
|
||||
if (tmp.find(enclosing) == string::npos)
|
||||
return data;
|
||||
@ -434,7 +434,7 @@ string const parseBibTeX(string data, string const & findkey)
|
||||
CitationStyle const getCitationStyle(string const & command)
|
||||
{
|
||||
if (command.empty()) return CitationStyle();
|
||||
|
||||
|
||||
CitationStyle cs;
|
||||
string cmd = command;
|
||||
|
||||
@ -479,7 +479,7 @@ string const getCiteCommand(CiteStyle command, bool full, bool forceUCase)
|
||||
return cite;
|
||||
}
|
||||
|
||||
|
||||
|
||||
vector<CiteStyle> const getCiteStyles(bool usingNatbib)
|
||||
{
|
||||
unsigned int nStyles = 1;
|
||||
@ -510,12 +510,12 @@ getNumericalStrings(string const & key,
|
||||
vec[0] = _("No database");
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
vector<string> vec(styles.size());
|
||||
|
||||
string const author = getAbbreviatedAuthor(map, key);
|
||||
string const year = getYear(map, key);
|
||||
|
||||
|
||||
for (vector<string>::size_type i = 0; i != vec.size(); ++i) {
|
||||
string str;
|
||||
|
||||
@ -524,27 +524,27 @@ getNumericalStrings(string const & key,
|
||||
case CITEP:
|
||||
str = "[#ID]";
|
||||
break;
|
||||
|
||||
|
||||
case CITET:
|
||||
str = author + " [#ID]";
|
||||
break;
|
||||
|
||||
|
||||
case CITEALT:
|
||||
str = author + " #ID";
|
||||
break;
|
||||
|
||||
|
||||
case CITEALP:
|
||||
str = "#ID";
|
||||
break;
|
||||
|
||||
|
||||
case CITEAUTHOR:
|
||||
str = author;
|
||||
break;
|
||||
|
||||
|
||||
case CITEYEAR:
|
||||
str = year;
|
||||
break;
|
||||
|
||||
|
||||
case CITEYEARPAR:
|
||||
str = "(" + year + ")";
|
||||
break;
|
||||
@ -552,7 +552,7 @@ getNumericalStrings(string const & key,
|
||||
|
||||
vec[i] = str;
|
||||
}
|
||||
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
@ -566,12 +566,12 @@ getAuthorYearStrings(string const & key,
|
||||
vec[0] = _("No database");
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
vector<string> vec(styles.size());
|
||||
|
||||
string const author = getAbbreviatedAuthor(map, key);
|
||||
string const year = getYear(map, key);
|
||||
|
||||
|
||||
for (vector<string>::size_type i = 0; i != vec.size(); ++i) {
|
||||
string str;
|
||||
|
||||
@ -579,28 +579,28 @@ getAuthorYearStrings(string const & key,
|
||||
case CITET:
|
||||
str = author + " (" + year + ")";
|
||||
break;
|
||||
|
||||
|
||||
case CITE:
|
||||
case CITEP:
|
||||
str = "(" + author + ", " + year + ")";
|
||||
break;
|
||||
|
||||
|
||||
case CITEALT:
|
||||
str = author + " " + year ;
|
||||
break;
|
||||
|
||||
|
||||
case CITEALP:
|
||||
str = author + ", " + year ;
|
||||
break;
|
||||
|
||||
|
||||
case CITEAUTHOR:
|
||||
str = author;
|
||||
break;
|
||||
|
||||
|
||||
case CITEYEAR:
|
||||
str = year;
|
||||
break;
|
||||
|
||||
|
||||
case CITEYEARPAR:
|
||||
str = "(" + year + ")";
|
||||
break;
|
||||
@ -608,8 +608,8 @@ getAuthorYearStrings(string const & key,
|
||||
|
||||
vec[i] = str;
|
||||
}
|
||||
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
} // namespace biblio
|
||||
} // namespace biblio
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
/** Functions of use to citation and bibtex GUI controllers and views */
|
||||
namespace biblio
|
||||
namespace biblio
|
||||
{
|
||||
///
|
||||
enum CiteStyle {
|
||||
@ -118,7 +118,7 @@ namespace biblio
|
||||
|
||||
[XX] is used in place of the actual reference
|
||||
Eg, the vector will contain: [XX], Jones et al. [XX], ...
|
||||
|
||||
|
||||
User supplies :
|
||||
the key,
|
||||
the InfoMap of bibkeys info,
|
||||
@ -132,10 +132,10 @@ namespace biblio
|
||||
/**
|
||||
"Translates" the available Citation Styles into strings for this key.
|
||||
The returned string is displayed by the GUI.
|
||||
|
||||
|
||||
Eg, the vector will contain:
|
||||
Jones et al. (1990), (Jones et al. 1990), Jones et al. 1990, ...
|
||||
|
||||
|
||||
User supplies :
|
||||
the key,
|
||||
the InfoMap of bibkeys info,
|
||||
@ -145,6 +145,6 @@ namespace biblio
|
||||
getAuthorYearStrings(string const & key,
|
||||
InfoMap const & map,
|
||||
std::vector<CiteStyle> const & styles);
|
||||
} // namespace biblio
|
||||
} // namespace biblio
|
||||
|
||||
#endif // BIBLIOHELPERS_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -59,7 +59,7 @@ vector<SeriesPair> const getSeriesData()
|
||||
series[2] = pr;
|
||||
pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SERIES;
|
||||
series[3] = pr;
|
||||
|
||||
|
||||
return series;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ vector<ShapePair> const getShapeData()
|
||||
shape[4] = pr;
|
||||
pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SHAPE;
|
||||
shape[5] = pr;
|
||||
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ vector<SizePair> const getSizeData()
|
||||
size[12] = pr;
|
||||
pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SIZE;
|
||||
size[13] = pr;
|
||||
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ vector<BarPair> const getBarData()
|
||||
bar[3] = pr;
|
||||
pr.first = _("Reset"); pr.second = INHERIT;
|
||||
bar[4] = pr;
|
||||
|
||||
|
||||
return bar;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ vector<ColorPair> const getColorData()
|
||||
color[9] = pr;
|
||||
pr.first = _("Reset"); pr.second = LColor::inherit;
|
||||
color[10] = pr;
|
||||
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
@ -184,12 +184,12 @@ vector<string> const getLanguageData()
|
||||
langs[1] = _("Reset");
|
||||
|
||||
vector<string>::size_type i = 1;
|
||||
for (Languages::const_iterator cit = languages.begin();
|
||||
for (Languages::const_iterator cit = languages.begin();
|
||||
cit != languages.end(); ++cit) {
|
||||
langs[++i] = cit->second.lang();
|
||||
}
|
||||
|
||||
return langs;
|
||||
}
|
||||
|
||||
|
||||
} // namespace character
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -77,7 +77,7 @@ vector<string> const getVectorFromString(string const & str,
|
||||
|
||||
string const browseFile(LyXView * lv, string const & filename,
|
||||
string const & title,
|
||||
string const & pattern,
|
||||
string const & pattern,
|
||||
pair<string,string> const & dir1,
|
||||
pair<string,string> const & dir2)
|
||||
{
|
||||
@ -88,18 +88,18 @@ string const browseFile(LyXView * lv, string const & filename,
|
||||
FileDialog fileDlg(lv, title, LFUN_SELECT_FILE_SYNC, dir1, dir2);
|
||||
|
||||
FileDialog::Result result;
|
||||
|
||||
|
||||
while (1) {
|
||||
result = fileDlg.Select(lastPath, pattern, OnlyFilename(filename));
|
||||
|
||||
if (result.second.empty())
|
||||
if (result.second.empty())
|
||||
return result.second;
|
||||
|
||||
lastPath = OnlyPath(result.second);
|
||||
|
||||
if (result.second.find_first_of("#~$% ") == string::npos)
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
Alert::alert(_("Filename can't contain any "
|
||||
"of these characters:"),
|
||||
_("space, '#', '~', '$' or '%'."));
|
||||
@ -112,12 +112,12 @@ string const browseFile(LyXView * lv, string const & filename,
|
||||
string const browseRelFile(LyXView * lv, string const & filename,
|
||||
string const & refpath,
|
||||
string const & title,
|
||||
string const & pattern,
|
||||
string const & pattern,
|
||||
pair<string,string> const & dir1,
|
||||
pair<string,string> const & dir2)
|
||||
{
|
||||
string const fname = MakeAbsPath(filename, refpath);
|
||||
|
||||
|
||||
string const outname = browseFile(lv, fname, title, pattern,
|
||||
dir1, dir2);
|
||||
string const reloutname = MakeRelPath(outname, refpath);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -32,7 +32,7 @@ std::vector<string> const
|
||||
getVectorFromString(string const & str, string const & delim=",");
|
||||
|
||||
class LyXView;
|
||||
|
||||
|
||||
/** Launch a file dialog and return the chosen file.
|
||||
filename: a suggested filename.
|
||||
title: the title of the dialog.
|
||||
@ -41,7 +41,7 @@ class LyXView;
|
||||
*/
|
||||
string const browseFile(LyXView *lv, string const & filename,
|
||||
string const & title,
|
||||
string const & pattern,
|
||||
string const & pattern,
|
||||
std::pair<string,string> const & dir1 = std::make_pair(string(), string()),
|
||||
std::pair<string,string> const & dir2 = std::make_pair(string(), string()));
|
||||
|
||||
@ -55,7 +55,7 @@ string const browseFile(LyXView *lv, string const & filename,
|
||||
string const browseRelFile(LyXView *lv, string const & filename,
|
||||
string const & refpath,
|
||||
string const & title,
|
||||
string const & pattern,
|
||||
string const & pattern,
|
||||
std::pair<string,string> const & dir1 = std::make_pair(string(), string()),
|
||||
std::pair<string,string> const & dir2 = std::make_pair(string(), string()));
|
||||
|
||||
@ -81,7 +81,7 @@ struct seconder {
|
||||
typedef typename Pair::second_type second_type;
|
||||
second_type const & operator()(Pair const & p) { return p.second; }
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -1,14 +1,18 @@
|
||||
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* most files: ws cleanup
|
||||
|
||||
2002-03-16 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
* Makefile.am: Cleanup and linking fix.
|
||||
* Makefile.am: Cleanup and linking fix.
|
||||
* README: Added procedure for adding a new dialog.
|
||||
* Dialogs.C (tooltipsEnable): new method.
|
||||
|
||||
2002-03-14 Michael A. Koziarski <michael@koziarski.org>
|
||||
|
||||
* Timeout_pimpl.C
|
||||
* Timeout_pimpl.h: implemented running to fix compilation, linking
|
||||
fix still to come
|
||||
* Timeout_pimpl.h: implemented running to fix compilation, linking
|
||||
fix still to come
|
||||
|
||||
2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
@ -29,7 +33,7 @@
|
||||
|
||||
2002-03-02 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* Makefile.am: get rid of LYX_LIBS
|
||||
* Makefile.am: get rid of LYX_LIBS
|
||||
|
||||
2002-02-10 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
@ -54,7 +58,7 @@
|
||||
2002-01-12 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
* various: Cleaned out the old stuff, standardised the new
|
||||
stuff.
|
||||
stuff.
|
||||
* GnomeBase.C
|
||||
* GnomeBase.h: Changed the constructor to take one argument. The
|
||||
dialog name. The path and name of the glade files can be
|
||||
@ -67,7 +71,7 @@
|
||||
* FormTabularCreate.C
|
||||
* FormTabularCreate.h: updated them to use the new system.
|
||||
Removed Local inline *Clicked functions as they're now in the base
|
||||
class.
|
||||
class.
|
||||
* README: new, brief outline of what I'm doing here.
|
||||
* accessors.py: Described in README, generates the accessor
|
||||
functions from the glade file.
|
||||
@ -83,7 +87,7 @@
|
||||
|
||||
2002-01-08 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* Menubar_pimpl.C (composeUIInfo):
|
||||
* Menubar_pimpl.C (composeUIInfo):
|
||||
(update): use FuncStatus
|
||||
|
||||
2002-01-03 Michael Koziarski <michael@koziarski.com>
|
||||
@ -115,7 +119,7 @@
|
||||
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* GUIRunTime.C: initApplication() should take a int & argc, add debug
|
||||
|
||||
|
||||
2001-07-19 Baruch Even <baruch@lyx.org>
|
||||
|
||||
* Menubar_pimpl.C: Renamed LyXFunc::Dispatch to LyXFunc::dispatch.
|
||||
@ -129,7 +133,7 @@
|
||||
* Makefile.am:
|
||||
* Dialogs.C: Removed Citation and Copyright dialogs from build. Left them
|
||||
in repository until they get redone as About Dialog.
|
||||
|
||||
|
||||
* FileDialog.C:
|
||||
* Menubar_pimpl.C:
|
||||
* Menubar_pimpl.h:
|
||||
@ -188,10 +192,10 @@
|
||||
|
||||
2001-04-16 Allan Rae <rae@lyx.org>
|
||||
|
||||
* gnomeBC.C (setButtonLabel):
|
||||
* Menubar_pimpl.C (updateAllLists):
|
||||
* gnomeBC.C (setButtonLabel):
|
||||
* Menubar_pimpl.C (updateAllLists):
|
||||
* GnomeBase.C (loadXML): #warning triggers an error on Sun CC 6.0 as
|
||||
an unrecognised preprocessor directive. So ensure they're wrapped.
|
||||
an unrecognised preprocessor directive. So ensure they're wrapped.
|
||||
|
||||
2001-04-03 Baruch Even <baruch@lyx.org>
|
||||
|
||||
@ -205,7 +209,7 @@
|
||||
* GnomeBase.C:
|
||||
* GnomeBase.h: s/ControlButton/ControlButtons/
|
||||
s/UndoAll/Restore/
|
||||
|
||||
|
||||
2001-04-02 Michael Koziarski <michael@koziarski.org>
|
||||
|
||||
* FormCopyright.[Ch]: Reimplemented as an MVC dialog.
|
||||
@ -268,7 +272,7 @@
|
||||
|
||||
2001-03-26 Baruch Even <baruch@lyx.org>
|
||||
|
||||
* Various files: Fixes to get the gnome frontend to compile again.
|
||||
* Various files: Fixes to get the gnome frontend to compile again.
|
||||
Removed most xforms dialogs in order to reduce compilation breaks caused
|
||||
by the moves to MVC in the xforms frontend.
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "FormVCLog.h"
|
||||
|
||||
#include "FormDocument.h"
|
||||
#include "FormExternal.h"
|
||||
#include "FormExternal.h"
|
||||
#include "FormGraphics.h"
|
||||
#include "FormInclude.h"
|
||||
#include "FormIndex.h"
|
||||
@ -74,7 +74,7 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));
|
||||
add(new GUIERT<FormERT, gnomeBC>(*lv, *this));
|
||||
|
||||
/*
|
||||
/*
|
||||
add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
|
||||
add(new GUIBibtex<FormBibtex, xformsBC>(*lv, *this));
|
||||
add(new GUICharacter<FormCharacter, xformsBC>(*lv, *this));
|
||||
@ -84,13 +84,13 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
|
||||
// For now we use the gnome non MVC dialogs
|
||||
add(new FormCitation(lv, this));
|
||||
|
||||
|
||||
add(new FormDocument(lv, this));
|
||||
add(new FormExternal(lv, this));
|
||||
add(new FormGraphics(lv, this));
|
||||
add(new FormInclude(lv, this));
|
||||
add(new FormIndex(lv, this));
|
||||
add(new FormMathsPanel(lv, this));
|
||||
add(new FormMathsPanel(lv, this));
|
||||
add(new FormParagraph(lv, this));
|
||||
add(new FormPreamble(lv, this));
|
||||
add(new FormPreferences(lv, this));
|
||||
@ -126,9 +126,9 @@ A. To avoid a segfault.
|
||||
the newly created Dialogs instance using `this'.
|
||||
|
||||
(*) -- I'm using signals exclusively to guarantee that the gui code
|
||||
remains hidden from the rest of the system. In fact the only
|
||||
remains hidden from the rest of the system. In fact the only
|
||||
header related to dialogs that anything in the non-gui-specific
|
||||
code gets to see is Dialogs.h! Even Dialogs.h doesn't know what a
|
||||
code gets to see is Dialogs.h! Even Dialogs.h doesn't know what a
|
||||
FormCopyright class looks like or that its even going to be used!
|
||||
|
||||
No other gui dialog headers are seen outside of the gui-specific
|
||||
@ -144,31 +144,31 @@ A. To avoid a segfault.
|
||||
by adding a specific show or update signal. For example, spellchecker
|
||||
needs to set the next suspect word and its options/replacements so we
|
||||
need a:
|
||||
Signal0<void> updateSpellChecker;
|
||||
Signal0<void> updateSpellChecker;
|
||||
|
||||
Since we would have to have a
|
||||
Signal0<void> showSpellChecker;
|
||||
Signal0<void> showSpellChecker;
|
||||
|
||||
in order to just see the spellchecker and let the user push the [Start]
|
||||
button then the updateSpellChecker signal will make the SpellChecker
|
||||
dialog get the new word and replacements list from LyX. If you really,
|
||||
really wanted to you could define a signal that would pass the new
|
||||
word and replacements:
|
||||
Signal2<void, string, vector<string> > updateSpellChecker;
|
||||
Signal2<void, string, vector<string> > updateSpellChecker;
|
||||
|
||||
(or something similar) but, why bother when the spellchecker can get
|
||||
it anyway with a LyXFunc call or two. Besides if someone extends
|
||||
what a dialog does then they also have to change code in the rest of
|
||||
LyX to pass more parameters or get the extra info via a function
|
||||
what a dialog does then they also have to change code in the rest of
|
||||
LyX to pass more parameters or get the extra info via a function
|
||||
call anyway. Thus reducing the independence of the two code bases.
|
||||
|
||||
We don't need a separate update signal for each dialog because most of
|
||||
We don't need a separate update signal for each dialog because most of
|
||||
them will be changed only when the buffer is changed (either by closing
|
||||
the current open buffer or switching to another buffer in the current
|
||||
LyXView -- different BufferView same LyXView or same BufferView same
|
||||
LyXView).
|
||||
|
||||
So we minimise signals but maximise independence and programming
|
||||
So we minimise signals but maximise independence and programming
|
||||
simplicity, understandability and maintainability. It's also
|
||||
extremely easy to add support for Qt or gtk-- because they use
|
||||
signals already. Guis that use callbacks, like xforms, must have their
|
||||
|
@ -1,12 +1,12 @@
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Baruch Even
|
||||
* \author Baruch Even
|
||||
**/
|
||||
|
||||
#ifdef __GNUG__
|
||||
@ -40,7 +40,7 @@ public:
|
||||
void button_clicked(bool canceled);
|
||||
void ok_clicked() { button_clicked(false); }
|
||||
void cancel_clicked() { button_clicked(true); }
|
||||
|
||||
|
||||
private:
|
||||
Gtk::FileSelection sel_;
|
||||
bool modal_;
|
||||
@ -48,11 +48,11 @@ private:
|
||||
};
|
||||
|
||||
FileDialog::Private::Private(string const & title)
|
||||
: sel_(title), modal_(false)
|
||||
: sel_(title), modal_(false)
|
||||
{
|
||||
sel_.get_ok_button()->clicked.connect(slot(this,
|
||||
sel_.get_ok_button()->clicked.connect(slot(this,
|
||||
&FileDialog::Private::ok_clicked));
|
||||
sel_.get_cancel_button()->clicked.connect(slot(this,
|
||||
sel_.get_cancel_button()->clicked.connect(slot(this,
|
||||
&FileDialog::Private::cancel_clicked));
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ string const FileDialog::Private::exec()
|
||||
sel_.show();
|
||||
Gnome::Main::run();
|
||||
// Find if its canceled or oked and return as needed.
|
||||
|
||||
|
||||
if (canceled_)
|
||||
return string();
|
||||
else
|
||||
@ -79,7 +79,7 @@ void FileDialog::Private::button_clicked(bool canceled)
|
||||
|
||||
// FileDialog
|
||||
|
||||
FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a,
|
||||
FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a,
|
||||
Button /*b1*/, Button /*b2*/)
|
||||
: private_(new Private(title))
|
||||
, lv_(lv), title_(title), success_(a)
|
||||
@ -94,8 +94,8 @@ FileDialog::~FileDialog()
|
||||
}
|
||||
|
||||
|
||||
FileDialog::Result const
|
||||
FileDialog::Select(string const & path, string const & mask,
|
||||
FileDialog::Result const
|
||||
FileDialog::Select(string const & path, string const & mask,
|
||||
string const & suggested)
|
||||
{
|
||||
// For some reason we need to ignore the asynchronous method...
|
||||
@ -108,14 +108,14 @@ FileDialog::Select(string const & path, string const & mask,
|
||||
}
|
||||
#endif
|
||||
lyxerr << "Synchronous file dialog." << std::endl;
|
||||
|
||||
|
||||
lyxerr << "Path: " << path << "\nMask: " << mask << "\nSuggested: " << suggested << std::endl;
|
||||
|
||||
|
||||
string filter = mask;
|
||||
rsplit(mask, filter, '|');
|
||||
private_->set_complete(mask);
|
||||
private_->set_filename(path+suggested);
|
||||
|
||||
|
||||
lv_->prohibitInput();
|
||||
string const filename = private_->exec();
|
||||
lv_->allowInput();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -88,13 +88,13 @@ FormCitation::~FormCitation()
|
||||
void FormCitation::showInset( InsetCommand * const inset )
|
||||
{
|
||||
if( dialog_!=0 || inset == 0 ) return;
|
||||
|
||||
|
||||
inset_ = inset;
|
||||
ih_ = inset_->hideDialog.connect(SigC::slot(this, &FormCitation::hide));
|
||||
|
||||
u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot));
|
||||
h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide));
|
||||
|
||||
|
||||
params = inset->params();
|
||||
|
||||
if ( params.getContents().empty() ) showStageSearch();
|
||||
@ -105,10 +105,10 @@ void FormCitation::showInset( InsetCommand * const inset )
|
||||
void FormCitation::createInset( string const & arg )
|
||||
{
|
||||
if( dialog_!=0 ) return;
|
||||
|
||||
u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot));
|
||||
|
||||
u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot));
|
||||
h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide));
|
||||
|
||||
|
||||
params.setFromString( arg );
|
||||
showStageSearch();
|
||||
}
|
||||
@ -122,13 +122,13 @@ void parseBibTeX(string const & dat,
|
||||
{
|
||||
unsigned int i;
|
||||
string data(dat);
|
||||
|
||||
|
||||
keyvalue = "";
|
||||
|
||||
|
||||
for (i=0; i<data.length(); ++i)
|
||||
if (data[i]=='\n' || data[i]=='\t')
|
||||
data[i] = ' ';
|
||||
|
||||
|
||||
data = frontStrip(data);
|
||||
while (!data.empty()
|
||||
&& data[0]!='='
|
||||
@ -140,7 +140,7 @@ void parseBibTeX(string const & dat,
|
||||
string value;
|
||||
string tmp;
|
||||
char enclosing;
|
||||
|
||||
|
||||
data = data.substr(keypos, data.length()-1);
|
||||
data = frontStrip(strip(data));
|
||||
if (data.length() > 1 && data[0]=='=')
|
||||
@ -193,13 +193,13 @@ void parseBibTeX(string const & dat,
|
||||
keypos = data.find(',');
|
||||
|
||||
value = data.substr(0, keypos);
|
||||
|
||||
|
||||
if (keypos+1<data.length()-1) data = frontStrip(data.substr(keypos+1, data.length()-1));
|
||||
else data = "";
|
||||
}
|
||||
else return;
|
||||
|
||||
if (findkey == key) { keyvalue = value; return; }
|
||||
if (findkey == key) { keyvalue = value; return; }
|
||||
|
||||
data = frontStrip(frontStrip(data,','));
|
||||
}
|
||||
@ -276,7 +276,7 @@ void FormCitation::initWidgets()
|
||||
w = path + "/" + CONF_COLUMN + "_" + tostr(i) + CONF_COLUMN_DEFAULT;
|
||||
clist_bib_->column(i).set_width( gnome_config_get_int(w.c_str()) );
|
||||
}
|
||||
|
||||
|
||||
// retrieving data
|
||||
vector<pair<string,string> > blist = lv_->buffer()->getBibkeyList();
|
||||
|
||||
@ -286,9 +286,9 @@ void FormCitation::initWidgets()
|
||||
bibkeys.push_back(blist[i].first);
|
||||
bibkeysInfo.push_back(blist[i].second);
|
||||
}
|
||||
|
||||
blist.clear();
|
||||
|
||||
|
||||
blist.clear();
|
||||
|
||||
// updating list
|
||||
search();
|
||||
|
||||
@ -312,7 +312,7 @@ void FormCitation::initWidgets()
|
||||
r.clear();
|
||||
r.push_back(tmp);
|
||||
clist_selected_->rows().push_back(r);
|
||||
|
||||
|
||||
keys = frontStrip( split(keys, tmp, ',') );
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ void FormCitation::storeWidgets()
|
||||
gnome_config_set_int(w.c_str(), button_regexp_->get_active());
|
||||
}
|
||||
|
||||
if (paned_info_ != 0)
|
||||
if (paned_info_ != 0)
|
||||
{
|
||||
string w = path + "/" + CONF_PANE_INFO;
|
||||
gnome_config_set_int(w.c_str(), paned_info_->width() - info_->width());
|
||||
@ -382,7 +382,7 @@ void FormCitation::showStageAction()
|
||||
// set up spacing
|
||||
bbox->set_spacing(4);
|
||||
bbox->set_layout(GTK_BUTTONBOX_SPREAD);
|
||||
|
||||
|
||||
bbox->children().push_back(Element(*b_add, false, false));
|
||||
bbox->children().push_back(Element(*b_edit, false, false));
|
||||
bbox->children().push_back(Element(*b_cancel, false, false));
|
||||
@ -394,13 +394,13 @@ void FormCitation::showStageAction()
|
||||
|
||||
b_add->add_accelerator("clicked", *accel, b_add->get_accelkey(), 0, GTK_ACCEL_VISIBLE);
|
||||
b_edit->add_accelerator("clicked", *accel, b_edit->get_accelkey(), 0, GTK_ACCEL_VISIBLE);
|
||||
|
||||
|
||||
// packing dialog to main window
|
||||
dialog_ = mbox;
|
||||
mainAppWin->add_action(*dialog_, _(" Citation: Select action "), false, accel);
|
||||
|
||||
initWidgets();
|
||||
|
||||
|
||||
// setting focus
|
||||
gtk_widget_grab_focus (GTK_WIDGET(b_add->gtkobj()));
|
||||
|
||||
@ -420,7 +420,7 @@ void FormCitation::moveFromActionToSearch()
|
||||
// stores configuration and cleans all widgets
|
||||
storeWidgets();
|
||||
cleanupWidgets();
|
||||
|
||||
|
||||
// moves to stage "search"
|
||||
mainAppWin->remove_action();
|
||||
showStageSearch();
|
||||
@ -432,7 +432,7 @@ void FormCitation::moveFromActionToEdit()
|
||||
// stores configuration and cleans all widgets
|
||||
storeWidgets();
|
||||
cleanupWidgets();
|
||||
|
||||
|
||||
// moves to stage "edit"
|
||||
mainAppWin->remove_action();
|
||||
showStageEdit();
|
||||
@ -448,14 +448,14 @@ void FormCitation::showStageSearch()
|
||||
Gtk::Box * mbox = manage( new Gtk::HBox() );
|
||||
Gtk::ButtonBox * bbox = manage( new Gtk::HButtonBox() );
|
||||
Gtk::Separator * sep = manage( new Gtk::VSeparator() );
|
||||
|
||||
|
||||
search_text_ = manage( new Gnome::Entry() );
|
||||
|
||||
|
||||
button_regexp_ = manage( new Gtk::CheckButton(_("Use Regular Expression")) );
|
||||
|
||||
b_ok = manage( new Gtk::Button(_("Search")) );
|
||||
b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) );
|
||||
|
||||
|
||||
// set up spacing
|
||||
mbox->set_spacing(4);
|
||||
bbox->set_spacing(4);
|
||||
@ -474,7 +474,7 @@ void FormCitation::showStageSearch()
|
||||
mainAppWin->add_action(*dialog_, _(" Insert Citation: Enter keyword(s) or regular expression "));
|
||||
|
||||
initWidgets();
|
||||
|
||||
|
||||
// setting focus
|
||||
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(search_text_->get_entry()->gtkobj()), GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_focus (GTK_WIDGET(search_text_->get_entry()->gtkobj()));
|
||||
@ -497,7 +497,7 @@ void FormCitation::moveFromSearchToSelect()
|
||||
// stores configuration and cleans all widgets
|
||||
storeWidgets();
|
||||
cleanupWidgets();
|
||||
|
||||
|
||||
// moves to stage "select"
|
||||
mainAppWin->remove_action();
|
||||
showStageSelect();
|
||||
@ -518,7 +518,7 @@ void FormCitation::showStageSelect()
|
||||
info_ = manage( new Gnome::Less() );
|
||||
paned_info_ = manage( new Gtk::HPaned() );
|
||||
text_after_ = manage( new Gnome::Entry() );
|
||||
|
||||
|
||||
b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) );
|
||||
b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) );
|
||||
|
||||
@ -535,7 +535,7 @@ void FormCitation::showStageSelect()
|
||||
clist_bib_ = manage( new Gtk::CList(colnames) );
|
||||
|
||||
bbox->set_layout(GTK_BUTTONBOX_END);
|
||||
|
||||
|
||||
// set up spacing
|
||||
mbox->set_spacing(4);
|
||||
bbox->set_spacing(4);
|
||||
@ -557,13 +557,13 @@ void FormCitation::showStageSelect()
|
||||
mbox->children().push_back(Element(*paned_info_,true,true));
|
||||
mbox->children().push_back(Element(*sep, false, false));
|
||||
mbox->children().push_back(Element(*tbox, false, false));
|
||||
|
||||
|
||||
// packing dialog to main window
|
||||
dialog_ = mbox;
|
||||
mainAppWin->add_action(*dialog_, _(" Insert Citation: Select citation "), true);
|
||||
|
||||
initWidgets();
|
||||
|
||||
|
||||
// setting focus
|
||||
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_ok->gtkobj()), GTK_CAN_DEFAULT);
|
||||
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_cancel->gtkobj()), GTK_CAN_DEFAULT);
|
||||
@ -604,9 +604,9 @@ void FormCitation::showStageEdit()
|
||||
colnames.push_back(" ");
|
||||
clist_selected_ = manage( new Gtk::CList(colnames) );
|
||||
clist_selected_->column_titles_hide();
|
||||
|
||||
|
||||
text_after_ = manage( new Gnome::Entry() );
|
||||
|
||||
|
||||
button_unselect_ = manage( new Gnome::PixButton( _("_Remove"), GNOME_STOCK_PIXMAP_TRASH ) );
|
||||
button_up_ = manage( new Gnome::PixButton( _("_Up"), GNOME_STOCK_PIXMAP_UP ) );
|
||||
button_down_ = manage( new Gnome::PixButton( _("_Down"), GNOME_STOCK_PIXMAP_DOWN ) );
|
||||
@ -618,7 +618,7 @@ void FormCitation::showStageEdit()
|
||||
|
||||
bbox->set_layout(GTK_BUTTONBOX_END);
|
||||
actbbox->set_layout(GTK_BUTTONBOX_START);
|
||||
|
||||
|
||||
// set up spacing
|
||||
mbox->set_spacing(4);
|
||||
bbox->set_spacing(4);
|
||||
@ -647,7 +647,7 @@ void FormCitation::showStageEdit()
|
||||
mbox->children().push_back(Element(*t2box,true,true));
|
||||
mbox->children().push_back(Element(*manage(new Gtk::HSeparator()), false, false));
|
||||
mbox->children().push_back(Element(*tbox, false, false));
|
||||
|
||||
|
||||
// accelerators
|
||||
Gtk::AccelGroup * accel = Gtk::AccelGroup::create();
|
||||
|
||||
@ -678,7 +678,7 @@ void FormCitation::showStageEdit()
|
||||
|
||||
button_unselect_->clicked.connect(SigC::slot(this, &FormCitation::removeCitation));
|
||||
button_up_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationUp));
|
||||
button_down_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationDown));
|
||||
button_down_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationDown));
|
||||
|
||||
clist_selected_->select_row.connect(SigC::bind(SigC::slot(this, &FormCitation::selectionToggled),
|
||||
true, true));
|
||||
@ -700,15 +700,15 @@ void FormCitation::addItemToBibList(int i)
|
||||
// don't change the order of these first two items:
|
||||
// callback functions depend on the data stored in the first column (its hided)
|
||||
// and in the second column (shown to user)
|
||||
r.push_back( tostr(i) );
|
||||
r.push_back( tostr(i) );
|
||||
r.push_back( key );
|
||||
|
||||
|
||||
// this can be changed (configured by user?)
|
||||
parseBibTeX( info, "author", val); r.push_back(val);
|
||||
parseBibTeX( info, "title", val); r.push_back(val);
|
||||
parseBibTeX( info, "year", val); r.push_back(val);
|
||||
parseBibTeX( info, "journal", val); r.push_back(val);
|
||||
|
||||
|
||||
clist_bib_->rows().push_back(r);
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ void FormCitation::selectionToggled(gint row,
|
||||
{
|
||||
bool keyfound = false;
|
||||
string info;
|
||||
|
||||
|
||||
// the first column in clist_bib_ contains the index
|
||||
keyfound = true;
|
||||
info = bibkeysInfo[ strToInt(clist_bib_->cell(row,0).get_text()) ];
|
||||
@ -813,14 +813,14 @@ void FormCitation::applySelect()
|
||||
|
||||
string contents = frontStrip( strip(params.getContents()) );
|
||||
if (!contents.empty()) contents += ", ";
|
||||
|
||||
|
||||
int sz = clist_bib_->selection().size();
|
||||
for (int i=0; i < sz; ++i)
|
||||
{
|
||||
if (i > 0) contents += ", ";
|
||||
contents += clist_bib_->selection()[i][1].get_text();
|
||||
}
|
||||
|
||||
|
||||
params.setContents( contents );
|
||||
params.setOptions( text_after_->get_entry()->get_text() );
|
||||
|
||||
@ -873,7 +873,7 @@ void FormCitation::applyEdit()
|
||||
lv_->getLyXFunc()->Dispatch( LFUN_CITATION_INSERT,
|
||||
params.getAsString() );
|
||||
}
|
||||
|
||||
|
||||
// close dialog
|
||||
storeWidgets();
|
||||
hide();
|
||||
@ -896,7 +896,7 @@ void FormCitation::searchReg()
|
||||
{
|
||||
string rexptxt(search_string_);
|
||||
rexptxt = frontStrip( strip( rexptxt ) );
|
||||
|
||||
|
||||
LRegex reg(rexptxt);
|
||||
|
||||
// populating clist_bib_
|
||||
@ -912,7 +912,7 @@ void FormCitation::searchReg()
|
||||
|
||||
if (rexptxt.empty()) additem = true;
|
||||
else additem = (reg.exec(data).size() > 0);
|
||||
|
||||
|
||||
if ( additem ) addItemToBibList(i);
|
||||
}
|
||||
|
||||
@ -933,7 +933,7 @@ void FormCitation::searchSimple()
|
||||
searchwords.push_back(tmp);
|
||||
stext = frontStrip( split(stext, tmp, ' ') );
|
||||
}
|
||||
|
||||
|
||||
// populating clist_bib_
|
||||
clist_bib_->rows().clear();
|
||||
|
||||
@ -949,7 +949,7 @@ void FormCitation::searchSimple()
|
||||
for (int j = 0; additem && j < szs; ++j)
|
||||
if (data.find(searchwords[j]) == string::npos)
|
||||
additem = false;
|
||||
|
||||
|
||||
if (additem) addItemToBibList(i);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
@ -75,7 +75,7 @@ private:
|
||||
void moveFromActionToSearch();
|
||||
/// moves from Action to Edit "stage"
|
||||
void moveFromActionToEdit();
|
||||
|
||||
|
||||
/// sort biblist
|
||||
void sortBibList(gint);
|
||||
/// update state of the buttons
|
||||
@ -110,7 +110,7 @@ private:
|
||||
void initWidgets();
|
||||
/// stores configuration of all non-0 member widgets
|
||||
void storeWidgets();
|
||||
|
||||
|
||||
/** Which LyXFunc do we use?
|
||||
We could modify Dialogs to have a visible LyXFunc* instead and
|
||||
save a couple of bytes per dialog.
|
||||
@ -147,12 +147,12 @@ private:
|
||||
Gnome::PixButton * button_up_;
|
||||
Gnome::PixButton * button_down_;
|
||||
Gtk::CheckButton * button_regexp_;
|
||||
|
||||
|
||||
Gtk::CList * clist_selected_;
|
||||
Gtk::CList * clist_bib_;
|
||||
|
||||
|
||||
Gtk::Paned * paned_info_;
|
||||
|
||||
|
||||
std::vector<string> bibkeys;
|
||||
///
|
||||
std::vector<string> bibkeysInfo;
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
*/
|
||||
|
@ -1,12 +1,12 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995 Matthias Ettrich.
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
* */
|
||||
@ -36,11 +36,11 @@ public:
|
||||
///
|
||||
~FormCopyright() {};
|
||||
|
||||
void apply() {};
|
||||
void apply() {};
|
||||
void update() {};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/// Build the dialog
|
||||
void build();
|
||||
Gtk::Button * ok();
|
||||
@ -49,7 +49,7 @@ private:
|
||||
Gtk::Label * copyright();
|
||||
Gtk::Label * license();
|
||||
/// The ok button
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
*/
|
||||
@ -39,7 +39,7 @@ void FormCredits::build()
|
||||
|
||||
// Do not update the dialog when we insert the text
|
||||
text()->freeze();
|
||||
|
||||
|
||||
// Get the credits into the string stream
|
||||
stringstream ss;
|
||||
string credits = controller().getCredits(ss).str();
|
||||
@ -64,7 +64,7 @@ void FormCredits::build()
|
||||
string const r("R-");
|
||||
index = italic.find(r);
|
||||
italic.replace(index, r.size()-1, "i");
|
||||
|
||||
|
||||
//lyxerr << "Bold: " << bold << "\nItalic: " << italic << std::endl;
|
||||
c_bold.set_font(Gdk_Font(bold));
|
||||
c_italic.set_font(Gdk_Font(italic));
|
||||
@ -75,9 +75,9 @@ void FormCredits::build()
|
||||
std::string::size_type end = credits.find('\n');
|
||||
string const line = credits.substr(0, ++end);
|
||||
credits = credits.substr(end);
|
||||
|
||||
|
||||
// lyxerr << "Line got: '" << line << "'\nend = " << end << std::endl;
|
||||
|
||||
|
||||
string const prefix = line.substr(0, 2);
|
||||
if (prefix == bold) {
|
||||
text()->insert(c_bold, line.substr(2));
|
||||
@ -87,7 +87,7 @@ void FormCredits::build()
|
||||
text()->insert(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Allow the text area to be drawn.
|
||||
text()->thaw();
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995 Matthias Ettrich.
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
* */
|
||||
@ -38,9 +38,9 @@ public:
|
||||
|
||||
void apply() {};
|
||||
void update() {};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
||||
@ -48,7 +48,7 @@ private:
|
||||
|
||||
/// The ok button
|
||||
Gtk::Button * ok();
|
||||
|
||||
|
||||
Gtk::Text * text();
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
*/
|
||||
@ -44,7 +44,7 @@ void FormERT::build()
|
||||
|
||||
// Make sure everything is in the correct state.
|
||||
bc().refresh();
|
||||
|
||||
|
||||
// Manage the read-only aware widgets.
|
||||
bc().addReadOnly(open());
|
||||
bc().addReadOnly(inlined());
|
||||
@ -76,7 +76,7 @@ void FormERT::apply()
|
||||
controller().params().status = InsetERT::Open;
|
||||
else if (collapsed()->get_active())
|
||||
controller().params().status = InsetERT::Collapsed;
|
||||
else
|
||||
else
|
||||
controller().params().status = InsetERT::Inlined;
|
||||
|
||||
}
|
||||
@ -106,27 +106,27 @@ bool FormERT::validate() const
|
||||
}
|
||||
|
||||
|
||||
Gtk::Button * FormERT::ok_btn() const
|
||||
Gtk::Button * FormERT::ok_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
}
|
||||
Gtk::Button * FormERT::apply_btn() const
|
||||
Gtk::Button * FormERT::apply_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
}
|
||||
Gtk::Button * FormERT::cancel_btn() const
|
||||
Gtk::Button * FormERT::cancel_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
}
|
||||
Gtk::RadioButton * FormERT::open() const
|
||||
Gtk::RadioButton * FormERT::open() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_open");
|
||||
return getWidget<Gtk::RadioButton>("r_open");
|
||||
}
|
||||
Gtk::RadioButton * FormERT::collapsed() const
|
||||
Gtk::RadioButton * FormERT::collapsed() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_collapsed");
|
||||
return getWidget<Gtk::RadioButton>("r_collapsed");
|
||||
}
|
||||
Gtk::RadioButton * FormERT::inlined() const
|
||||
Gtk::RadioButton * FormERT::inlined() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_inlined");
|
||||
return getWidget<Gtk::RadioButton>("r_inlined");
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995 Matthias Ettrich.
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Michael Koziarski <michael@koziarski.org>
|
||||
* */
|
||||
@ -38,7 +38,7 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
@ -63,7 +63,7 @@ private:
|
||||
Gtk::RadioButton * collapsed() const;
|
||||
/// generated by accessors.py
|
||||
Gtk::RadioButton * inlined() const;
|
||||
|
||||
|
||||
|
||||
/// do input validation
|
||||
SigC::Connection slot_open;
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* This file is part of
|
||||
* =================================================
|
||||
*
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* Copyright 1995-2000 The LyX Team.
|
||||
*
|
||||
* =================================================
|
||||
* =================================================
|
||||
*
|
||||
* \author Baruch Even
|
||||
*/
|
||||
@ -44,12 +44,12 @@ void FormError::update()
|
||||
textarea()->insert(controller().params());
|
||||
}
|
||||
|
||||
Gtk::Button * FormError::button_close() const
|
||||
Gtk::Button * FormError::button_close() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_button_close");
|
||||
return getWidget<Gtk::Button>("r_button_close");
|
||||
}
|
||||
|
||||
Gtk::Text * FormError::textarea() const
|
||||
Gtk::Text * FormError::textarea() const
|
||||
{
|
||||
return getWidget<Gtk::Text>("r_textarea");
|
||||
return getWidget<Gtk::Text>("r_textarea");
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user