Commit Graph

3365 Commits

Author SHA1 Message Date
Bo Peng
16072b8e09 Button face-lift: stop shifting text under mouse
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16203 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-07 16:26:17 +00:00
Abdelrazak Younes
d2574b7d8e unneeded header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16198 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-07 12:03:58 +00:00
Abdelrazak Younes
5ce7ae1883 * BufferView:
- 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
2006-12-07 11:46:27 +00:00
Enrico Forestieri
053c14d17b On *nix, report the font family name instead of "Multi"
* 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
2006-12-07 00:49:56 +00:00
Enrico Forestieri
30ba00a0c3 Directly use the family name in QFontInfo to ascertain whether the requested
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
2006-12-06 13:38:07 +00:00
Michael Schmitt
ca55737398 * FileDialog.C: always return POSIX-like path names ('/' instead of '\' on Windows)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16186 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-05 19:51:50 +00:00
Georg Baum
95579c2a71 more unicode filenames (+ fix one possible initialization order bug in
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
2006-12-05 12:57:01 +00:00
Georg Baum
534095ce9e more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16172 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 15:07:05 +00:00
Abdelrazak Younes
c6e4985a07 * GuiApplication::x11EventFilter(): check for currentView() before using it.
* Application::currentView(): now returns a pointer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16170 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 13:52:02 +00:00
Georg Baum
c4320d24cd Make string conversion work with non-ucs2-characters if using qt 4.2
* 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
2006-12-04 13:50:46 +00:00
Abdelrazak Younes
493ec52c3f * Dimension is a simple wrapper class again.
* 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
2006-12-04 10:45:43 +00:00
Abdelrazak Younes
b056d35db4 Forgot this!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16166 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 10:33:47 +00:00
Abdelrazak Younes
e318e0e4ef * enable font metrics cache for all platforms.
* 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
2006-12-04 10:09:22 +00:00
Bo Peng
7c184e5426 Button face-lift: use mouse hover-buttons.
* src/insets/insetbase.h: add setMouseHover function
	* src/insets/insetcommand.h/C: handle setMouseHover
	* src/insets/insetcollapsable.h/C: handle setMouseHover
	* src/LColor.h/C: redefine some colors
	* src/insets/render_base.h: add state_
	* src/insets/render_button.C: draw differently according to state_
	* src/frontends/Painter.h/C: hover-stype button
	* src/frontends/qt4/GuiWorkArea.C: enable mouse tracking
	* src/BufferView.C: track mouse_motion without button events


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16162 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 04:31:18 +00:00
Abdelrazak Younes
99cae6c723 two lines between function.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16158 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 13:17:35 +00:00
Abdelrazak Younes
7df55755ac Fix memory leaks with multiple windows and crash when deleteOnClose is set.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16157 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 13:09:57 +00:00
Abdelrazak Younes
6a96321573 * WorkArea::dispatch(): avoid GUI tweaks if cmd is a mouse motion with no button pressed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16156 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 10:43:55 +00:00
Peter Kümmel
a5b66d297f prepare fixing some memory leaks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16155 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 10:30:18 +00:00
Peter Kümmel
2d0e33fc3f remove unused signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16154 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 10:14:35 +00:00
Peter Kümmel
f6cf871deb fix quit problems on Mac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16153 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 10:05:41 +00:00
Michael Schmitt
103c37af4e * src/frontends/qt4/ui/QPrefUi.ui: clarify message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16150 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 01:16:03 +00:00
Michael Schmitt
99d4acd183 * qt4/QExternal.C:
* qt4/lengthcombo.C:
	* qt4/QBox.C: make length units translateable


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16149 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 01:11:37 +00:00
Michael Schmitt
a85cc03780 * qt_helpers.h: qt_() - set parameter 'comment' to default 0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16148 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 01:09:09 +00:00
Michael Schmitt
b5331d6261 * src/frontends/qt4/qt_helpers.h: fix comment on the use of qt_()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16147 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 00:28:14 +00:00
Abdelrazak Younes
88d16356f2 update comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16142 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 21:55:28 +00:00
Michael Schmitt
75d0226ce8 * src/lyxfunc.C:
* src/frontends/qt4/GuiView.C:
	* src/lyx_main.C: fix various typos in comments


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16141 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 21:27:31 +00:00
Michael Schmitt
f099bf461e * src/frontends/qt4/qt_helpers.h: add #include <boost/assert.hpp>
because gcc 3.3.5pre (SUSE Linux 9.3) fails otherwise


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16140 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 21:25:24 +00:00
Georg Baum
9d1f78acb5 remove unused function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16138 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 20:37:11 +00:00
Georg Baum
c5629aab95 remove duplicate of toqstr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16137 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 19:53:21 +00:00
Peter Kümmel
7b2cce9d5d Clean up quit code.
We still need a solution for the Mac.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16135 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 17:39:31 +00:00
Peter Kümmel
19df31aa0a --style=Andre
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16134 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 17:32:15 +00:00
Georg Baum
ed99f752f9 more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16133 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 16:07:15 +00:00
Abdelrazak Younes
591d47a64b * qt_helpers.h:
- 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
2006-12-02 15:54:49 +00:00
Abdelrazak Younes
52dc269fae CharMetrics: use short int instead of int. This halves the memory required for the font metrics cache.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16129 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-01 23:45:06 +00:00
Abdelrazak Younes
5f4e6d9a7c * GuiFontMetrics
- 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
2006-12-01 17:23:58 +00:00
Abdelrazak Younes
8f98ec35e4 This commit fixes the following bug:
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
2006-12-01 16:12:24 +00:00
Peter Kümmel
67f2a91dcc FIXME: remove global variable theApp
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
2006-11-30 00:04:51 +00:00
Peter Kümmel
f4c32de361 remove size_t/int warning: QString doesn't use size_t so we must cast it to avoid the warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16117 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 22:57:34 +00:00
Georg Baum
868dd237d1 fix compiler warning:
../../../../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
2006-11-29 21:52:56 +00:00
Peter Kümmel
1000b8d218 Fix crash on Mac, now the strange part
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
2006-11-29 21:36:39 +00:00
Peter Kümmel
9dfe4a10d3 also support the geometry option on Windows + Qt/Windows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16105 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 16:45:38 +00:00
Peter Kümmel
c3459952a6 don't forget to translate
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16102 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 10:25:46 +00:00
Peter Kümmel
dfb079e778 add tool bar popup with three icon sizes: small, normal, big
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16100 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 10:04:35 +00:00
Jean-Marc Lasgouttes
e1771f375b * qt4/GuiApplication.C: remove ad-hoc Mac OSX Carbon code to handle
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
2006-11-29 09:06:37 +00:00
Abdelrazak Younes
0748904328 Fix graphics rendering preview.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16090 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 12:51:50 +00:00
Peter Kümmel
c7a3620eeb fix wrong toolbar icon size, default value is
in lyx_main.C. Size will be stored in the session
file.

*      src/lyx_main.C              : default value
*      src/frontends/Application.h : restore also icon size
*      src/frontends/LyXView.h     :        "
*      src/frontends/qt4/GuiView.h :        "
*      src/frontends/qt4/GuiView.C :        "
*      src/frontends/Application.C :        "



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16085 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-27 23:35:43 +00:00
Georg Baum
8e6e970d7b Next step of true unicode filenames: Use support::FileName instead of
std::string at many places (not all yet).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16069 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 21:30:39 +00:00
Michael Schmitt
968879e629 * ui/BulletsUi.ui: add missing shortcut
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16063 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 14:44:38 +00:00
Michael Schmitt
d51c2e24ed * src/GuiApplication.C: add missing include
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16054 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 10:32:42 +00:00
Abdelrazak Younes
e6a6548712 * lyx_main.[Ch]
- 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
2006-11-26 02:18:32 +00:00