Commit Graph

6144 Commits

Author SHA1 Message Date
Pavel Sanda
c95d295fe1 This part of QTreeView is newer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31087 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-17 08:38:02 +00:00
Jürgen Spitzmüller
313f7a2842 * GuiIndices.cpp: cosmetics (corretly resize TW column).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31083 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-17 07:49:28 +00:00
Uwe Stöhr
5eeeea31e2 FindAndReplaceUi.ui: Use groupboxes to tell the user where to insert what, patch from Tommaso
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31076 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-16 00:51:02 +00:00
Vincent van Ravesteijn
372e539c6a Mark a buffer as clean when the user chose to discard the changes. This is a patch from Richard to make his emergency cleanup procedure in Buffer::~Buffer work.
Besides that, this can also been seen in 1.6.3. If you have a master and a dirty child, and the dirty child is the second tab, you'll see that when closing LyX, LyX will ask twice whether you want to save the file. Once if the file itself is closed, a second time if the master is closing all his children.

See also the previous commit that treats the case in which the tabs were switched around.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31074 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-16 00:26:14 +00:00
Vincent van Ravesteijn
263c012d4b Fix a crash when closing LyX while a master and a dirty child were open, and if the dirty child is the first tab.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31073 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-16 00:21:02 +00:00
Vincent van Ravesteijn
1520629d7c If we are hiding a buffer _and_ the buffer is visible in another view/tabgroup, then we don't need to ensure that the buffer is clean.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31065 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 21:46:39 +00:00
Vincent van Ravesteijn
845baf5016 Let's get rid of this strange Buffer * construction. After that I introduced the inMultiViews() function, it wasn't necessary anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31064 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 21:33:37 +00:00
Vincent van Ravesteijn
5679ae92f2 Rename closeBuffer to closeWorkArea, because we'll have to await whether we'll actually close the buffer or not.
Now we can also pass the WorkArea we would like to close. This fixes also the problem that hideWorkArea still wasn't correct. That's a consequence of the fact that we relied on currentMainWorkArea(). I wanted to get rid of that anyway.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31063 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 21:29:14 +00:00
Vincent van Ravesteijn
67c59b8f49 Fix a bunch of assertions.
The first thing that bformat does is to check whether the string contains "%1$s". Otherwise it asserts.

Why didn't we see this happen before ? This was revealed by the emergency saves that Richard introduced in the Buffer dtor.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31062 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 20:47:46 +00:00
Vincent van Ravesteijn
7372c173a6 Make a new function to check whether a workArea is also shown in another view.
Use this function in closeBufferAll, and use closeBuffer to hide the buffer. Now, closeBuffer will decide whether we need to save the buffer or not. Previously, the buffer got hidden even if it was dirty.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31059 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 18:13:21 +00:00
Richard Heck
c5487a3682 Move emergencyWrite() from BufferList to Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31056 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 16:34:54 +00:00
Richard Heck
45600e36eb Typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31055 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 16:03:11 +00:00
Vincent van Ravesteijn
7044b156f0 Fix crash when closing a TabGroup. Probably introduced in r27525 and revealed in r30933.
In setCurrentWorkArea d.current_work_area_ is used which is invalidated by deleting the TabWorkArea.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31054 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 15:47:12 +00:00
Pavel Sanda
ab36804b6c Fix searching bug #6139.
Patch by Tommaso.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31053 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 15:35:14 +00:00
Vincent van Ravesteijn
ffea0ce1e9 Fix a crash when applying the preferences.
The problem is that all toolbars are deleted and thus also the LayoutBox, which I made a member of GuiView. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31051 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 14:34:00 +00:00
Vincent van Ravesteijn
3c91fecb61 Among other problems still left. At least close the right tab if you use the context menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31050 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 14:07:05 +00:00
Vincent van Ravesteijn
bbafbc884c Extend saveBufferIsNeeded with a parameter indicating whether the buffer is going into a hidden state. If so, and the user discards his changes, the buffer will be reloaded to discard the changes.
Now, the option "Hide Tab" uses closeBuffer and asks for saving intead of instantly removing the workArea.

This is part of bug #5893: we try to make sure that there are no dirty hidden buffers.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31043 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 23:12:21 +00:00
Vincent van Ravesteijn
81554c90f1 Move layout from GuiToolbar to GuiView. Now, it is possible to use the popup also when the Toolbar has not been visible before.
see: 
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg75503.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31042 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 22:58:57 +00:00
Vincent van Ravesteijn
7215b099d3 Remove GuiToolbar * member from the LayoutBox ctor: Why should we limit a LayoutBox to the Toolbar and it doesn't even have to know where it is.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31041 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 22:47:57 +00:00
Pavel Sanda
7031c2bc5b Move to QTreeView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31040 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 20:37:22 +00:00
Pavel Sanda
1f8c4c3f26 Move to QAbstractItemView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31039 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 20:37:12 +00:00
Richard Heck
56146a9346 Constify a bunch of stuff that can be const.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31037 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 15:46:10 +00:00
Richard Heck
ea0501025e s/moduleList/theModuleList/ for style purposes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31036 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 15:37:34 +00:00
Vincent van Ravesteijn
d92ff67005 Adjust the work-around for bug #5957.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31031 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 14:58:52 +00:00
Uwe Stöhr
33eec90086 new document option to suppress the default date, fileformat change, fixes #5823
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31028 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-14 00:52:33 +00:00
Vincent van Ravesteijn
072237ab4b Fix assertion that was revealed in my tree.
This really has to be QComboBox::showPopup(). Otherwise, we'll hit the LASSERT(!d->inShowPopup_, /**/); in either LayoutBox::showPopup() or LayoutBox::Private::showPopup().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31020 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-13 21:32:55 +00:00
Pavel Sanda
3fbe484391 Plenty unneeded headers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31000 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 22:47:01 +00:00
Pavel Sanda
70fdfa86df Fix order
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30999 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 22:37:22 +00:00
Pavel Sanda
dc18e925a8 Compil fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30998 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 22:22:26 +00:00
Abdelrazak Younes
5f2429b4e2 This move out the GuiLayoutBox class out of GuiToolbar where it was a mess. The new LayoutBox is less of a mess now but still a mess.
We need a proper LayoutModel class.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30995 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 21:51:10 +00:00
Vincent van Ravesteijn
797f13806d Whitespace and correct naming.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30994 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 20:06:29 +00:00
Vincent van Ravesteijn
5ba1f471c7 Explicitly pass to closeBuffer whether the tab should only be hidden or that the buffer should be released.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30993 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 20:03:34 +00:00
Vincent van Ravesteijn
3ac3ab1a78 Dissect closeBuffer() and saveBufferIfNeeded().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30992 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 18:50:09 +00:00
Jürgen Spitzmüller
9b8549f5da * GuiView.cpp: disable character and symbols dialog in read-only mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30986 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 11:02:02 +00:00
Pavel Sanda
29df304528 Get rid off unneeded horiz scrollbar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30985 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 09:46:26 +00:00
Jürgen Spitzmüller
86426344f4 Fix bug 5946: Infinite loop when opening file with two files opened with the same name
This simply changes the appearance of the display path (in the tab header) in one detail: if the file suffix is not "lyx" (but "lyx15" etc.), the file is displayed with the extension. This fixes the problem (which is due to identical display paths), and it adds, IMHO, useful information to the GUI.

Patch reviewed by vfr.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30977 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-11 12:34:06 +00:00
Abdelrazak Younes
730a67e0d1 Text::Inset(): now returns a reference in order to make clear that the owner is mandatory.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30947 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:19:43 +00:00
Pavel Sanda
8d7b7175a4 Fix #6120. Selection not set when switching to a different tab.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153514.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30933 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 14:27:50 +00:00
Abdelrazak Younes
21daab357b Minimal support for hunspell. Spellchecking works but not suggestion, at least on Win/MSVC.
There are two new rc preference:

* spellchecker: can now be "aspell" or "hunspell", this is selectable in the SpellChecker preference dialog
* hunspelldir_path: needed for hunspell dictionaries which are defined to be in a fixed location. This can be modified in the path preference dialog.

The SpellChecker classes could be instanciated on the fly whenerver they are needed if we want that.

Please test and help me finish this hunspell integration...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30927 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-08 17:05:31 +00:00
Jürgen Spitzmüller
ad0f2a7dff * qt_helpers.cpp:
- omit group separators for numbers.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30922 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-08 11:48:04 +00:00
Vincent van Ravesteijn
5a5db4e5de A slightly different work-around which also captures the 25% scaling that was reported.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30919 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-08 01:25:17 +00:00
Vincent van Ravesteijn
a43e6129eb Work-around for bug #6034: Applying preferences confuses window about its size.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30897 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-07 12:49:03 +00:00
Vincent van Ravesteijn
31afc053ea Fix bug #740 (part 2): Wish for added menu item: File->Close all.
Now disable the menuitem when there is only 1 visible buffer.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30890 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-07 00:41:39 +00:00
Vincent van Ravesteijn
97efae2561 Fix bug #740: Wish for added menu item: File->Close all.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30882 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-06 23:17:16 +00:00
Richard Heck
a2891daae3 Better name for variable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30874 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-06 12:44:06 +00:00
Vincent van Ravesteijn
8e3f8fccfa * PageLayoutUi: Squeeze warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30828 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-02 13:08:47 +00:00
Vincent van Ravesteijn
ca66ebb1b0 Squeeze warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30820 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 21:49:26 +00:00
Vincent van Ravesteijn
95fb3513ca Remove useless tooltip.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30818 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 21:34:24 +00:00
Abdelrazak Younes
28c22d4305 Compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30815 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 17:34:44 +00:00
Abdelrazak Younes
6b6cb3fe18 Factorize some code in getStatus() for LFUN_DIALOG_SHOW.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30812 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 16:55:15 +00:00