* ControlDocument::params(): replace BufferParams local copy with Buffer::params() direct access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18186 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlCommandBuffer.{cpp,h}:
- new member hide()
* src/frontends/qt4QCommandEdit.{cpp,h}:
- new signal hidePressed(), emit it on M-x/Alt-x
* src/frontends/qt4/QCommandBuffer.{cpp,h}:
- new slot hideParent(), connected to QCommandEdit::hidePressed()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18081 a592a061-630c-0410-9148-cb99ea01b6c8
somewhat better layout; ideally, the whole dialog should be laid out in a grid,
but then qt insists on drawing the listwidgets much wider than the need to be.
The drawback of this approach is that the dialog cannot really be resized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17949 a592a061-630c-0410-9148-cb99ea01b6c8
some code is moved from QMath
to QDelimiterDialog and QMathMatrixDialog
for the rest pretty mechanical
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17872 a592a061-630c-0410-9148-cb99ea01b6c8
add signal that provides action when triggered
* ToolbarBackend.[Ch]
add popupmenu and iconpallete item types
* QLToolbar.[Ch]
take care of popupmenu and iconpallete
* stdtoolbars.inc
add panels and menus (and move spellchecker to main ;-)
* functions.xpm
icon for function list
* iconpalette.[Ch]
new iconpanel that will replace old iconpalette,
als subclass of qmenu that updates parent toolbutton
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17868 a592a061-630c-0410-9148-cb99ea01b6c8
toolbaritems, toolbar(info) and backend
stdtoolbars.inc now defines the toolbars inbetween
a ToolbarSet/End tag just as the menus
* the other files contain straightforward changes
because of the toolbarbackend refactoring
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17867 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3460
The problem was that the list_items map is ordered by key.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17858 a592a061-630c-0410-9148-cb99ea01b6c8
* bigleft, bigright: move empty item from last to first to synchronize it with GUI representation
* fix_name(): add FIXME for Enrico
* updateTeXCode():
- move C-style string declaration.
- simplify empty string logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17848 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/TocWidget.[Ch]:
- rename enableButtons to enableControls and include slider enabling/disabling
- only set slider if there is some content
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17835 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3450
* ControlMath
- new MathSymbol struct that summarize the symbol attributes (including font and fontcode)
* QDelimiterDialog:
- make use of the new MathSymbol for the ListWidget.
- store the latex name in the tooltip instead of lookup for it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17786 a592a061-630c-0410-9148-cb99ea01b6c8
options accepted by the current paragraph.
ui/QParagraphUi.ui
Changed combo box for alignment to radio buttons. Added
checkbox for default alignment.
QParagraphDialog.[Ch]
public:
void checkAlignmentRadioButtons();
void alignmentToRadioButtons(LyXAlignment);
LyXAlignment getAlignmentFromDialog();
private:
typedef std::map<LyXAlignment, QRadioButton *> QPRadioMap;
QPRadioMap radioMap;
protected Q_SLOTS:
void change_adaptor();
void enableLinespacingValue(int);
void on_alignDefaultCB_toggled(bool);
QParagraph.C
Rework apply() and update_contents() using new functions just
mentioned.
Thanks to Abdel for his help.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17776 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/MathSupport.C:
add "slash" to the decoration table.
* src/mathed/InsetMathBig.C
(InsetMathBig::draw): don't remove backslash delimiter.
(InsetMathBig::isBigInsetDelim): add "\\" and "\slash" to
the delimiters table.
* src/frontends/qt4/QDelimiterDialog.C
(fix_name): return "\\" instead of "\backslash" as that now
works after the fixes above.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17771 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QDelimiterDialog.C
(fix_name): Return "|" instead of "\|" as this is equivalent to \Vert.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17752 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3413
* ui/QNomenclUi.ui
- description field: replace LineEdit with TexEdit
* QNomencl.C: take care of the \n <-> \\ conversion in the description field.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17748 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlMath.[Ch]
- mathSymbol(), texName(): new method for easy access of math symbols and associated TeX names
- latex_delimiters: allowed delimiters transferred from QDelimiterDialog.C
* QDelimiterDialog.C:
- makes use of the above.
- display the TeX code in a label instead of beside the symbol.
* QDelimiterUi.ui
- shrink it so that it could nicely fit in a DockWidget but this doesn't work, the dialog is too large!
- texCodeL: new label.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17747 a592a061-630c-0410-9148-cb99ea01b6c8
This fixes some encoding problems, and hopefully also bug 3410.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17746 a592a061-630c-0410-9148-cb99ea01b6c8
Changed dialog and added routines to deal with an "auto" label
in cases where defaults are used.
ui/MarginsUi.ui: Changed labels for width and height to checkboxes. Removed connections.
checkwidgets.[Ch]: Extended checkedLineEdit routines to take a QWidget.
qt_helpers.[Ch]:
Added void lengthToWidgets(QLineEdit *, LengthCombo *, LyXLength const &, LyXLength::UNIT)
Added void lengthAutoToWidgets(QLineEdit *, LengthCombo *, LyXLength const &, LyXLength::UNIT)
Added void setAutoTextCB(QCheckBox *, QLineEdit *, LengthCombo *)
validators.[Ch]:
Added class LengthAutoValidator : public LengthValidator
Added class DoubleAutoValidator : public QDoubleValidator
QGraphicsDialog.[Ch]
Added virtual void setAutoText()
Added virtual void on_WidthCB_toggled(bool)
Added virtual void on_HeightCB_toggled(bool)
Used the new functions to set "auto" in default cases and toggle checkboxes as needed.
Set validator for scale.
Re-organized connect routines.
QGraphics.C:
Completely re-worked update_contents().
Significant changes to apply().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17735 a592a061-630c-0410-9148-cb99ea01b6c8
1) launch the dialog
2) select a delimiter in the left pane
3) Tab
4) select a delimiter in the right pane
5) Enter
So:
- Also enable the quick insertion while in the right pane
- Do not limit the quick insertion to matched key
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17732 a592a061-630c-0410-9148-cb99ea01b6c8
- ListWidget instead of combo,
- matched delimiters on the same row,
- immediate insertion on "enter" or "double-click" if the 'match' option is checked.
- simplification of the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17731 a592a061-630c-0410-9148-cb99ea01b6c8
Most of the change is about using the new private member delimiters_ instead of the "delim" table. Also, we don't display an icon when the delimiter is one character.
I did not manage to let the combos expand to the maximum.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17727 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3412
* QNomenclDialog::QNomenclDialog(): setting the focus proxy in the Description edit box.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17719 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlToc::update(): get rid of the pure virutal method.
* QToc::initialiseParams(): overload ControlToc method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17708 a592a061-630c-0410-9148-cb99ea01b6c8
keyboard input via kmap, clipboard and selection) to normalized form KC
(precomposed characters) since we don't support the decomposed form very
well.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17702 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QTabular.C: change "Block" to "Justified"
to avoid translation clash and to align with paragraph settings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17694 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3288
This is recommended by Qt:
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
* GuiApplication::notify(): reimplemented from QApplication::notify().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17688 a592a061-630c-0410-9148-cb99ea01b6c8
* Painter:
- preeditText(), dashedUnderline(): new methods for CJK support.
* GuiWorkArea:
- inputMethodQuery(): new Qt inherited method for proper CJK support.
- inputMethodEvent(): now properly take care of input methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17671 a592a061-630c-0410-9148-cb99ea01b6c8
Problem was that SIGNAL itemSelectionChanged was not connected to anything.
* QRefDialog::selectionChanged(): new slot for itemSelectionChanged signal.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17615 a592a061-630c-0410-9148-cb99ea01b6c8
"View" button in TeX information dialog not enabled when file is selected with the keyboard. Problem was that SIGNAL itemSelectionChanged was not connected to anything. Also made some minor stylistic changes to the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17614 a592a061-630c-0410-9148-cb99ea01b6c8
- whitespace. I forgot to save the changes before committing :-(
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17595 a592a061-630c-0410-9148-cb99ea01b6c8
- some further refinement (and cleanup) of the triple click behaviour,
from Richard G. Heck.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17594 a592a061-630c-0410-9148-cb99ea01b6c8
- reimplement doubleClickTimeout() from the qt3 frontend
in order to get triple clicking working (bug 3272).
This is just an emultation of triple clicking, since qt does not have
a mouseTripleClickEvent()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17588 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/ui/BulletsUi.ui:
- assure that six columns of bullets are displayed in the widget
(fix bug 3147).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17584 a592a061-630c-0410-9148-cb99ea01b6c8
This changes the semantics of isOK() and operator(), comments from Bernhard below:
With the old version of lyxlex it was _impossible_ to check whether reading an integer, float, ... succeeded or not. The current solution to check for is.bad() in some cases and in other cases use is.good() does not give the desired information. Moreover the result of is.bad() depends on the stl implementation and behaves different for linux and windows.
the bug was introduced by the patch that fixed the bug that crashed lyx when "inset-insert ert" was executed from the command buffer.
The lexer has the method isOK() which reflects the status of the stream is.
The operators void* and ! are not really well defined (they depend on the value of is.bad()). What is missing is a test if the last reading operation was successful and thus the returned value is valid.
That's what i implemented in this patch.
The new rule for using the lexer:
if you want to know if the lexer still has data to read (either from the stream or from the pushed token) then use "lex.isOK()".
If you want to test if the last reading operation was successful then use eg. "if (lex) {...}" or unsuccessful then use eg. "if (!lex) {...}"
an example:
int readParam(LyxLex &lex) {
int param = 1; // default value
if (lex.isOK()) { // the lexer has data to read
int p; // temporary variable
lex >> p;
if (lex) param = p; // only use the input if the reading operation was successful
}
return param;
}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17569 a592a061-630c-0410-9148-cb99ea01b6c8
- add flags for debug/release/profile
- also build qt4 as one file with gcc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17558 a592a061-630c-0410-9148-cb99ea01b6c8
TODO: extract the latexHighlighter class into its own .[Ch] files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17553 a592a061-630c-0410-9148-cb99ea01b6c8
Those arguments are not needed because update() will always look at what is currently selected and the info is there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17546 a592a061-630c-0410-9148-cb99ea01b6c8
- now simple citation insertion can be done with the keyboard only (enter key will close the dialog and insert the chosen key).
- now search also within bib entry information (very fast)
- new case sensitive option
- new regex option.
- QCitation: code simplified, some code went to ControlCitation.
- QCitationDialog: code simplified
- lots of polish in the dialogs...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17539 a592a061-630c-0410-9148-cb99ea01b6c8
* DockView.h: add the orientation option.
* QViewSource: now a model and a controller
* QViewSourceDialog: now only a simple QWidget.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17538 a592a061-630c-0410-9148-cb99ea01b6c8
* transfer CiteEngine enum declaration to biblio.h
* delete unneeded CiteEngine_enum
* cite_engine is now cite_engine_ and is private.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17537 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlCharacter.[Ch]
(reset_lang_) New flag (needed because the language is never
inherited)
* src/frontends/controllers/ControlCharacter.C
(ControlCharacter::getLanguage): Use reset_lang_
(ControlCharacter::setLanguage): Set reset_lang_ if needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17526 a592a061-630c-0410-9148-cb99ea01b6c8
* insetcite: call getEngine()
* bufferparams: move getEngine() here, and let it sense the
provides(natbib)
flag
* ControlBibtex, ControlCitation: correct getEngine() call
* biblio: remove old getEngine()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17505 a592a061-630c-0410-9148-cb99ea01b6c8
"Include" was for good reason the default method but not the first item in the dropdown list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17467 a592a061-630c-0410-9148-cb99ea01b6c8
* TocBackend
- addType(), types_, types(): deleted.
* ControlToc
- tocs(): new
- selectedType(): access to selected_type_
- initialiseParams(): transfer code from QToc::update() and look for selected type.
- getTypes(), getContents(): deleted
* QToc: do not maintain current type. Get the info from the View.
- setTocModel(): deleted
* TocWidget: always pass the currently selected type to the model/controller.
- setTocModel(): new slot.
- updateGui(): transfer code to setTocModel().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17455 a592a061-630c-0410-9148-cb99ea01b6c8
- initialiseParams(): overload ControlCommand::initialiseParams() so that we can update the model at this point (QToc is the controller _and_ the model).
- update(): new
- updateBackend(): new protected method to update the TocBackend (called for the "Update" button).
* QToc:
- is now a QObject
- modelReset: new Qt signal to indicate a model reset to associated dialog(s).
- QToc(): avoid the duplicate update() call that will be done in the show command anyway.
* Dialogs.C
- use new TocWidget in a DockView.
* TocWidget.[Ch]: renamed from QTocDialog. This striped down widget is only a widget that connects to the 'QToc' model/controller.
* DockView.h: new template class that encapsulates a given Widget inside a DockWidget and presents a Dialog::View interface.
* QTocUi.ui:
- now is a simple Widget.
- rearrange the buttons a bit
- get rid of the unneeded close button.
- modify the shortcut to "Promote" to 'r' because of a clash with "Alt-p" number (we really need real, always valid, shortcuts for all outline action!)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17416 a592a061-630c-0410-9148-cb99ea01b6c8
- update dialogs instead of hiding for dialogs that support that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17414 a592a061-630c-0410-9148-cb99ea01b6c8
* buffer.h:
- structureChanged(): new boost signal. I intend to use that also when a text is changed in a section or caption item.
* buffer_funcs.C:
- updateLabels(): emit Buffer::structureChanged() after TocBackend is updated.
- checkBufferStructure(): new method for updating the TocBackend if needed.
* LyXView:
- updateToc(): new slot for Buffer::structureChanged() signal.
* text.C:
- call checkBufferStructure() whenever text is added or erased.
* TocBackend.[Ch]:
- updateItem(): new method to update a specific item (called from checkBufferStructure()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17413 a592a061-630c-0410-9148-cb99ea01b6c8
support directory, return as a relative path (enclosed in brackets)
* frontends/qt4/GuiView.C (updateTabs): use makeDisplayPath instead
of onlyFileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17384 a592a061-630c-0410-9148-cb99ea01b6c8
Qt 4.2 for Mac menus (no merging is done for qt < 4.2 now).
* src/frontends/qt4/Action.C (Action): initialize menu role to NoRole
for qt >= 4.2.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17373 a592a061-630c-0410-9148-cb99ea01b6c8
* src/output_plaintext.C
(writePlaintextParagraph): Use compare_ascii_no_case instead of
compare_no_case, since the strings to compare are pure ASCII anyway.
* src/frontends/qt4/QPrefsDialog.C
(setComboxFont): ditto
* src/MenuBackend.C
(Menu::checkShortcuts): ditto
* src/frontends/qt4/QLImage.C
(QLImage::loadableFormats): Use ascii_lowercase instead of lowercase
since the input is pure ASCII anyway.
* src/tex2lyx/text.C
(splitLatexLength): ditto
* src/support/lstrings.[Ch]
(compare_no_case): Get rid of both std::string variants
(lowercase): Get rid of std::string variant
(uppercase): Change std::string variant to docstring
* src/support/tests/regfiles/lstrings: Add new expected output
* src/support/tests/lstrings.C: Add tests for docstring functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17371 a592a061-630c-0410-9148-cb99ea01b6c8
* FontMetrics.h: only one string width() method.
* Painter.h: only one text() method.
* all other files: adapt to above API change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17362 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/Clipboard.h
(empty): Clarify documentation
* src/frontends/qt4/GuiClipboard.C
(GuiClipboard::empty): Consider also the LyX version, since the text
version is empty if there is only one inset in the clipboard.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17297 a592a061-630c-0410-9148-cb99ea01b6c8
* QDialogView.h:
- QDialogView::forms() now requires a QWidget instead of a QDialog. This will allow us to use DockWidget in the future.
- QView class code simplification: implement inline instead of repeating in the same file.
- QView::forms() now returns the real object.
- QController class code simplification: implement inline instead of repeating in the same file.
* QDocumentDialog::update(): renamed to updateParams() to avoid clash with QWidget::update()
* QPrefsDialog::update(): renamed to updateRc() to avoid clash with QWidget::update()
* QTexinfoDialog::update(): now public so that it can be used in QDialogView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17195 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3225
* QIndexDialog:
- QIndexDialog(): setFocusProxy() to the QLineEdit
- show(): deleted.
* QDialogView::show(): also setFocus() when raising or showing a window.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17166 a592a061-630c-0410-9148-cb99ea01b6c8
- fix bug 3147: Incorrect input field order in glossary dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17136 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiWorkArea::inputMethodEvent(): process a keyPressEvent() for each character of the commitString().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17134 a592a061-630c-0410-9148-cb99ea01b6c8
* frontends/controllers/ControlChanges.C:
* frontends/controllers/ControlChanges.h: fix merge-changes dialog;
remove old cruft; strip interface down to what is really needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17019 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QLPainter.C
(QLPainter::text): Render the symbol whose codepoint is 0x00ad
through a one-column QTextLine in order to fool Qt, which displays
what it thinks is a soft-hyphen only when occurring at a line-break.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16997 a592a061-630c-0410-9148-cb99ea01b6c8
* src/buffer.C
(Buffer::readString): Tell readFile that we do not have a file
(Buffer::readString): readFile(name) returns a bool, not an enum
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16931 a592a061-630c-0410-9148-cb99ea01b6c8
- fix false toolbar positioning for qt < 4.2.2
- only add ToolBarBreak if the toolbar exceeds the line
(not perfect yet)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16927 a592a061-630c-0410-9148-cb99ea01b6c8
After saving a new file or "save as.." the filename is not updated in the tab. This patch fixes this.
Credits goes to Bernhard Roider.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16921 a592a061-630c-0410-9148-cb99ea01b6c8
* QErrorListDialog::showEvent(): new method. Set the error on the first item.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16848 a592a061-630c-0410-9148-cb99ea01b6c8
This may make a difference when char_type is signed.
* src/frontends/LyXKeySym.h
(getUCSEncoded): change return type from size_t to char_type
* src/frontends/qt4/QLyXKeySym.[Ch]
(getUCSEncoded): ditto
* src/lyxfunc.C
(LyXFunc::processKeySym): adjust to the above and add a FIXME since
this is strange code that looks like it was not intended to do what
it does.
* src/lyxfunc.h
(encoded_last_key): Correct documentation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16833 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LaTeX.C
(LaTeX::deplog): Assume that filenames in log files are stored in
the file system encoding
* src/frontends/qt4/qt_helpers.[Ch]
(internal_path): delete
* src/frontends/qt4/QGraphics.C: Adjust to change above
* src/frontends/qt4/QPrefsDialog.C: ditto
* src/frontends/qt4/QExternal.C: ditto
* src/frontends/qt4/QInclude.C: ditto
* src/support/os.h: Document the encoding of filename arguments
* src/support/os_win32.h: ditto
* src/support/filetools.C
(findtexfile): Convert filename from file system encoding
* src/support/os_win32.C: Convert filenames from utf8 to file system
encoding and vice versa where needed
* src/support/os_cygwin.C: ditto
* src/support/getcwd.C
(getcwd): Use internal_path() with correct encoding
* src/support/docstring.[Ch]
(from_filesystem8bit): new conversion function
* src/support/environment.C
(getEnv): convert environment variable from local 8bit encoding to utf8
(setEnv): convert environment variable from utf8 to local 8bit encoding
* src/support/environment.h: document encoding of function arguments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16753 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3114
* os.h
- new docstring adapted internal_path()
* qt_helpers.[Ch]:
- new QString adapted internal_path()
All other files: use that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16744 a592a061-630c-0410-9148-cb99ea01b6c8
the former is also trigged when updating dialogs. we should use toggled(bool) to en/disable widgets and in situations when we are sure that we always want to act on a toggle
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16724 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea::sheduleRedraw(): new pure virtual method.
* GuiWorkArea::showCursor(): handle the scheduled redraw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16708 a592a061-630c-0410-9148-cb99ea01b6c8
LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).
* src/insets/insettabular.C
(InsetTabular::doDispatch): adjust to clipboard interface change
(InsetTabular::copySelection): ditto
* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): ditto
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): ditto
* src/buffer.[Ch]
(Buffer::readString): New method: Read document from a string
(Buffer::readFile): Change return value from bool to enum (needed
for readString). Return wrongversion if we are reading from a string
and the version does not match.
(Buffer::do_writeFile): make public and rename to write
* src/CutAndPaste.C
(putClipboard): New helper, put stuff to the system clipboard
(void copySelectionHelper): Use putClipboard instead of
theClipboard().put()
(void copySelection): ditto
(void pasteClipboard): new method for pasting in text
(void pasteParagraphList):
* src/frontends/Clipboard.h
(Clipboard::get): Rename to getAsText
(Clipboard::getAsLyX): New method for getting the system clipboard
in LyX format
(Clipboard::hasLyXContents): New method telling whether there is LyX
contents in the clipboard
* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods
* src/text3.C
(LyXText::dispatch): Use pasteClipboard for pasting the system
clipboard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
a bug on Windows due to an unnecessary conversion to external style.
* src/insets/ExternalSupport.C
(subst_path): avoid a bug in the external material inset on Windows
by don't using external_path. The filename will be quoted and thus
there will be no problems with forward slashes.
* src/frontends/qt4/QGraphics.C
* src/frontends/qt4/QExternal.C
* src/frontends/qt4/QInclude.C:
(Qxxx::apply): On Windows, the user could input an absolute path in
native style by hand (without using the file dialog), so make sure
that no backslashes can slip in by this way.
* src/frontends/qt4/QPrefsDialog.C
(internal_path_list, external_path_list): new wrappers for the
corresponding functions in the os namespace.
(PrefPaths::apply): make sure that path_prefix is stored in the
internal style, i.e., without backslashes.
(PrefPaths::update): make sure that path_prefix is displayed to
the user in the native style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16659 a592a061-630c-0410-9148-cb99ea01b6c8
we don't set the selection with qApp->clipboard()->put().
Therefore we get the status of the internal selection from the cursor, and
the empty flag for fake selections is not needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16610 a592a061-630c-0410-9148-cb99ea01b6c8
- do not focus filename widget for already existing insets (bug 1663).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16604 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXKeySym.h: replace global operator==() with pure virtual method.
* QLyXKeySym: new operator==() method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16598 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QCitationDialog.[Ch]:
- implement KeyPressEvent, catch ESC key and clear params there as well
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16594 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QDocumentDialog.C:
* src/frontends/qt4/QPrefsDialog.C:
- include some information on the resizing bug,
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16565 a592a061-630c-0410-9148-cb99ea01b6c8
(GuiSelection::haveSelection): Add a big comment what we actually do
here, and why. It took me quite some time to figure that out.
* src/frontends/Selection.h
(haveSelection): Add more detailed documentation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16527 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiApplication.C
(GuiApplication::x11EventFilter): Only send or clear the selection
if the X event specified the primary selection. Previously this was
also done if the event specified the clipboard. We must ignore that,
because the clipboard is completele handled by qt.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16526 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/LyXKeySym.h:
* src/frontends/qt4/QLyXKeySym.h:
* src/frontends/qt4/QLyXKeySym.C (print): add a forgui boolean that
tells whether the string should used localized names and special
characters.
* src/MenuBackend.C (binding):
* src/kbmap.C (print):
* src/kbsequence.C (print, printOptions): add forgui parameter.
* src/frontends/qt4/QLPopupMenu.C (addBinding): use a non-localaized
binding for Qt/Mac (because it needs to be parsed back) and a
localized one for the others (so that it looks good).
* src/kbmap.C (defkey,printbindings):
* src/lyxfunc.C (processKeySym,dispatch,viewStatusMessage): adapt to
above changes.
* src/kbmap.C (printKey): remove.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16510 a592a061-630c-0410-9148-cb99ea01b6c8
(GuiApplication::x11EventFilter): Small optimization: Do not request
the current BufferView if it is not used
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16506 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea::resizeBufferView(): delete redraw() call.
* GuiWorkArea:
- need_resize_: new private member.
- expose(): move pixmap painting code to new private updateScreen() method.
- paintEvent(): resize the backing pixmap if need be.
- resizeEvent(): move the resizing code to paintEvent().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16499 a592a061-630c-0410-9148-cb99ea01b6c8
holding the Qt translations is not deleted. Now keyboard shortcuts and
Qt stock dialogs are properly translated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16496 a592a061-630c-0410-9148-cb99ea01b6c8
menu name.
* src/frontends/qt4/QLMenubar.C (macxMenuBarInit): hardcode the
special menu instead of reading it from ui files. Use labels that will
trigger Qt menu merging functionality onthe mac. This fixes menu
merging on LyX/Mac (but the menu names are still in english for now).
* lib/ui/stdmenus.ui: delete special menu definition "LyX".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16479 a592a061-630c-0410-9148-cb99ea01b6c8
* Clipboard.h: new isInternal() pure virtual method
* Selection.h: new isInternal() pure virtual method
* GuiClipboard, GuiSelection: implement new method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16476 a592a061-630c-0410-9148-cb99ea01b6c8
encodings in the preferences dialog
* src/LaTeXFeatures.C: special treatment for tis620-0 encoding
* src/bufferparams.C: ditto
* src/output_latex.C: ditto
* src/encoding.[Ch]: Add the possibility to iterate over all encodings
* src/paragraph_pimpl.C: Add latin10 and cp858 to Euro treatment
* src/buffer.C: Update format number
* src/frontends/qt4/QDocumentDialog.C: Don't hardcode available
encodings
* lib/lyx2lyx/LyX.py,
lib/lyx2lyx/lyx_1_5.py: implement conversion from 256 to 255
* lib/encodings: Add some encodings, fix all "unknown" entries
* development/FORMAT: Document file format change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16418 a592a061-630c-0410-9148-cb99ea01b6c8
instead of std::string
* src/support/lyxlib.h
* src/support/getcwd.C
(getcwd): return a FileName, not a std::string in filesystem encoding
* src/support/filetools.[Ch]
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* src/support/lyxlib.h
* src/support/tempName.C
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* many other files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16399 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlBibtex.C
(ControlBibtex::getStylefile): get the correct parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16374 a592a061-630c-0410-9148-cb99ea01b6c8
* focusInEvent(): start the blinking cursor after the resize.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16366 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiWorkArea.C
(GuiWorkArea::doGreyOut): don't use LyXFont::SIZE_XXXX directly as
a font size as these are enum values and not the actual sizes.
Move the version number slightly to the right to make it more
readable against the splash screen.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16353 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea.h: processKeySym() is now public
* GuiView:
* event(): new method to intercept Tab key press.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16352 a592a061-630c-0410-9148-cb99ea01b6c8
with Qt/Mac. Still does not work in non-default locale.
* QLPopupMenu.C (specialMacXmenuHack): remove, not needed anymore.
* GuiView.C (init): remove Mac hack, not needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16349 a592a061-630c-0410-9148-cb99ea01b6c8
ControlMath.C: cleanup order of symbols in math panel
iconpalette.C: 6 cols since many symbols come in pairs
Rrightarrow.xpm: was missing
searrow.xpm: was north east
swarrow.xpm: was north west
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16316 a592a061-630c-0410-9148-cb99ea01b6c8
with the correct Qt4 signal QComboBox::editTextChanged.
* src/frontends/qt4/QSearchDialog.C
(QSearchDialog::QSearchDialog): use QComboBox::editTextChanged instead
of QComboBox::textChanged.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16270 a592a061-630c-0410-9148-cb99ea01b6c8
from/to the local 8bit encoding with it.
Only the autotools build system is updated, scons and cmake users need to
add qt4 cpp flags when compiling libsupport, and link libsupport against
libQtCore.
* src/frontends/qt4/qt_helpers.[Ch]
(toqstr, qchar_to_ucs4, ucs4_to_qchar, ucs4_to_qstring,
qstring_to_ucs4, fromqstr): Move these qstring conversion functions
from here ...
* src/support/qstring_helpers.[Ch] ... to these new files
* src/support/docstring.[Ch]
(from_local8bit): new conversion function from local 8bit encoding
to ucs4
(to_local8bit): new conversion function from ucs4 to local 8bit
encoding to ucs4
(to_local8bit_failure): exception that is thrown by to_local8bit if
the argument cannot be converted to the local encoding
* src/support/filename.C
(FileName::toFilesystemEncoding): implement with the help of QFile
* src/support/Makefile.am: Add new files, qt4 cpp flags and link
against libQtCore
* src/client/client.C: Convert commandline input from local encoding
to ucs4. Convert stuff that is sent to to the server to utf8,
because LyX interprets it as utf8 on the other end of the pipe.
* src/lyx_main.C
(LyX::exec): convert commandline input from local encoding to utf8
(LyX::init): ditto
(LyX::easyParse): ditto
* development/scons/scons_manifest.py: Add new files
* config/qt4.m4: Define new variables QT4_CORE_INCLUDES,
QT4_CORE_LDFLAGS and QT4_CORE_LIB
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16257 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyxfunc.C
(LyXFunc::dispatch): Move to GuiView::closeEvent the session code
for lastpos in LFUN_LYX_QUIT. Check for unsaved changes before
initiating the quit procedure in LFUN_LYX_QUIT and LFUN_WINDOW_CLOSE.
* src/frontends/qt4/GuiView.h
(class GuiView): New boolean member quitting_by_menu_.
* src/frontends/qt4/GuiView.C
(GuiView::GuiView): Initialize quitting_by_menu_.
(GuiView::close): Set to true quitting_by_menu_ before calling
the quit procedure and reset it afterwards.
(GuiView::closeEvent): Account for the close window button.
Save last positions to the session file. Remove wrongly placed
call to quitWriteAll.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16248 a592a061-630c-0410-9148-cb99ea01b6c8
src/frontends/qt4/QDelimiterDialog.C: cosmetics: change text "Variable size" to just "Variable", because "size" is already given by the label
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16227 a592a061-630c-0410-9148-cb99ea01b6c8
Fix a conversion char -> char_type without encoding conversion in
cap::replaceSelectionWithString().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16212 a592a061-630c-0410-9148-cb99ea01b6c8
- update(): return bool only, and cleanup of the DOX comments.
- workAreaDispatch(): return bool only, cleanup of the DOX comments, change update() call to updateMetrics() and add some FIXMEs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16197 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiFontLoader.C
(QLFontInfo): use font.family() instead of font.rawName()
as the latter always returns "Multi" on *nix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16195 a592a061-630c-0410-9148-cb99ea01b6c8
font is available. This is now possible because the old bug needing a
workaround has been solved in Qt4. This also solves the problem of missing
integral symbols in mathed on Windows when the esint10 font is not available.
* src/frontends/qt4/GuiFontLoader.C
(isSymbolFamily): directly check the family name in QFontInfo.
(getSymbolFont): add some debugging info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16191 a592a061-630c-0410-9148-cb99ea01b6c8
needsUpdate() in src/lyx_main.C).
toFilesystemEncoding() is now used in all places where it is needed if I did
not forget anything.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16184 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/qt_helpers.[Ch]
(toqstr): Use QString::fromUcs4 if the qt version is at
least 4.2.
(qstring_to_ucs4): Use QString::toUcs4 if the qt version is at
least 4.2
(ucs4_to_qstring): Delete to avoid confusion, since it was only
used in one place
* src/frontends/qt4/panelstack.C
(PanelStack::addCategory): Use toqstr instead of ucs4_to_qstring
* src/support/unicode.[Ch]
(ucs2_to_ucs4): Replace with utf16_to_ucs4
(ucs4_to_ucs2): Replace with ucs4_to_utf16
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16169 a592a061-630c-0410-9148-cb99ea01b6c8
* other files: use FontMetrics::dimension() method instead of old Dimension interface.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16167 a592a061-630c-0410-9148-cb99ea01b6c8
* introduce defaultDimension() and dimension() in preparation of Dimension class cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16165 a592a061-630c-0410-9148-cb99ea01b6c8
- ucs4_to_qchar(): add a FIXME and an assertion
* GuiFontMetrics: replace the table based cache with two QHash based cache. With this change, the speed overhead is not negligible (exact same score with the UserGuide test) and the required additional memory is minimal (maybe one or two megabytes).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16132 a592a061-630c-0410-9148-cb99ea01b6c8
- add constants instead of hard-coded values.
- add assertions and comments for out of range values.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16126 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=2900
The only drawback is that it requires about 20Mo extra-memory when loading the UserGuide. If it turns out to be too much, we can switch to a QHash based solution instead of a table.
* dimension.[Ch]:
- Dimension(LyXFont const, char_typec): new ctor
- set(LyXFont const & font, char_type c): new method.
* frontends/FontMetrics.h:
- width(char_type): is now a pure virtual method.
* GuiFontMetrics:
- CharMetrics: new structure;
- the metrics cache now also cache ascent and descent. This is especially useful for mathed.
* MathSupport.[Ch]:
- mathed_char_dim(): deleted. We now use Dimension::set() directly instead.
* rowpainter.C: fixe empty space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16124 a592a061-630c-0410-9148-cb99ea01b6c8
This pointer was one reason for the Mac crashes because it not always had
the same value as the application_ smart pointer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16119 a592a061-630c-0410-9148-cb99ea01b6c8
../../../../src/frontends/qt4/GuiView.C:142: warning: comparison between signed and unsigned integer expressions
../../../../src/frontends/qt4/GuiView.C:144: warning: comparison between signed and unsigned integer expressions
../../../../src/frontends/qt4/GuiView.C:146: warning: comparison between signed and unsigned integer expressions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16113 a592a061-630c-0410-9148-cb99ea01b6c8
Part 2: avoid pure virtual function,
if (theApp)
theApp->unregisterSocketCallback(fd_);
does not help, we've tested it!
Without a Mac it is hard to find a better solution
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16110 a592a061-630c-0410-9148-cb99ea01b6c8
kAEOpenDocuments ApleEvent.
(event): new method to do the same thing using qt4 built-in support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16099 a592a061-630c-0410-9148-cb99ea01b6c8
- execBatchCommands(): split in loadFiles() and execBatchCommands().
- exec(): enable batch command to be processed from GUI.
* Application:
- start(): deleted.
* GuiApplication:
- execBatchCommands(): new method
* GuiWorkArea::update(): call viewport()->repaint() instead of viewport()->update(), this enable to update the screen immediately when asked by a batch command.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16051 a592a061-630c-0410-9148-cb99ea01b6c8
* buffer.h: changed() signal do not have an argument now.
* BufferView.C:
- setBuffer(): changed update() call to updateMetrics().
- update(): sanitize how the flags are used.
- scrollDocView(): add a call to updateMetrics() at the end.
* LyXFunc::dispatch(): adjust changed() signal emission.
* LyXText/text3.C:
- cursorPrevious(): delete BufferView::update call; adjust cursor flag.
- cursorNext(): ditto.
* frontends/LyXView.C: adjust Buffer::changed() signal connection.
* frontends/WorkArea.[Ch]:
- redraw(): no need to re-update the metrics if we don't change views.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15997 a592a061-630c-0410-9148-cb99ea01b6c8