Commit Graph

40 Commits

Author SHA1 Message Date
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Abdelrazak Younes
1f8fe29384 This commit transfers the singletons defined in the Application class to the private LyX::Singletons implementation. It also put the session_ member and top_level_keymap global variable into this Singleton structure.
This commit also modifies the LyXFunc class. A LyXView is not needed any more at construction. Neither is the top level keymap. The LyXFunc key sequences are initialized only if we are in GUI mode (lyx::use_gui = true).
The next step is to rename LyXFunc::owner to LyXFunc::lyx_view_ and to put some BOOST_ASSERT. A classification between Gui and Kernel oriented LFUNs would also be welcome.

*LyX/lyx_main.[Ch]:
 - LyX::Singletons: new private structure containing all the singletons (except the main LyX one of course).
 - buffer_list_, top_level_keymap, session_: transfered to the LyX::Singletons structure.

* LyXFunc:
  - LyXFunc: default constructor does not need any arguments.
  - setupLocalKeymap(): deleted (was not used anywhere).
  - initKeySequences(): new public method called from lyx_main.C, useful only in lyx::use_gui mode.
  - new private member accessor methods

* Application:
  - Application_pimpl: deleted (transfered to LyX)
  - global singleton accessors: transfered to lyx_main.C
  - start(): code transfered to LyX::priv_exec()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15367 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 07:20:32 +00:00
Georg Baum
6ada61e182 Rename namespace Alert to lyx::frontend::Alert.
This prevents a name clash with Qt 4.2.0 on OS X.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15267 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 16:47:54 +00:00
Georg Baum
2c72e0ecaa Fix bug 2868
* src/insets/insetgraphics.C
	(findTargetFormat): return pdf for vector graphics

	* src/format.h
	(Flags): new enum describing format flags
	(flags_): new member variable for format flags
	(vectorFormat): new, tell whether a format can contain vector graphics

	* src/format.C: adjust to flags changes

	* src/frontends/qt[34]/QPrefsDialog.C
	(QPrefsDialog::QPrefsDialog): handle new vector flag
	(QPrefsDialog::switch_format): ditto
	(QPrefsDialog::updateFormatsButtons): ditto
	(QPrefsDialog::new_format): ditto
	(QPrefsDialog::modify_format): ditto

	* src/frontends/qt3/ui/QPrefFileformatsModule.ui
	* src/frontends/qt4/ui/QPrefFileformatsUi.ui
	(vectorCB): new checkbox for vector flag

	* src/lyxrc.C
	(LyXRC::read): read vector flag
	(LyXRC::write): write vector flag

	* lib/doc/Customization.lyx: document format flags

	* lib/configure.py
	(checkFormatEntries): Add vector flag to some formats


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15205 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-03 08:34:59 +00:00
Abdelrazak Younes
ca5411f913 This commit introduces Application_pimpl and cleanup the header includes of the affected .C files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15182 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-29 22:06:28 +00:00
Abdelrazak Younes
6104eebe0d replace lyxserver and lyxsocket with theApp->server() and theApp->socket() equivalent methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15119 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-22 12:34:13 +00:00
Abdelrazak Younes
a6444784dc A bunch of conversion to docstring.
- bformat(): contributed by Georg Beaum
- Alert::XXX
- error(): in SpellBase, ispell, psell, aspell, buffer, etc.
- message(), message signal
- displayMessage(), setMessage,
- ErrorItems
- prettyName()
- makeDisplayPath()

and maybe some more...


- etc... 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14970 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-11 08:54:10 +00:00
Lars Gullik Bjønnes
43b77ba2d7 Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14952 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 15:27:44 +00:00
Georg Baum
3ac0c3f587 * src/format.C
(Formats::view): Call the viewer with the absolute filename instead
	of changing the working directory to avoid a race condition on
	systems with a slow fork().
	(Formats::edit): Ditto (editor instead of viewer)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14142 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-18 10:51:59 +00:00
Georg Baum
d544373734 Change the semantics of 'none' and 'auto' viewers/editors: 'none' means now
"Don't view/edit this format", and 'auto' means "Use the default viewer/editor".
	* src/format.C
	(fixCommand): Change semantics: "none" is equal to "", and "auto"
	is removed if canAutoOpenFile returns false.

	* src/frontends/xforms/FormPreferences.C
	(FormPreferences::SpellOptions::apply): "none" -> ""

	* src/lyxrc.C
	(LyXRC::read): "none" -> ""

	* lib/doc/Customization.lyx: Document the autoopen feature

	* lib/configure.py
	(checkProg): add optional not_found argument, defaulting to 'none'
	(checkViewer): new, equivalent to checkProg with not_found = 'auto'
	(checkFormatEntries): call checkViewer instead of checkProg for
	viewers and editors


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13929 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-25 11:57:22 +00:00
Georg Baum
5b83287abe * src/format.[Ch]
(document_): new flag, telling whether this is a document format and
	we want to show this format in the export and view menus
	(documentFormat): accessor for document_

	* src/format.h: Add some documentation

	* src/frontends/qt3/QPrefsDialog.C
	(QPrefsDialog::QPrefsDialog): handle new documentCB checkbox
	(QPrefsDialog::switch_format): ditto
	(QPrefsDialog::updateFormatsButtons): ditto
	(QPrefsDialog::new_format): ditto
	(QPrefsDialog::modify_format): ditto

	* src/frontends/qt3/ui/QPrefFileformatsModule.ui: Add documentCB checkbox

	* src/frontends/qt4/QPrefsDialog.C
	(QPrefsDialog::QPrefsDialog): handle new documentCB checkbox
	(QPrefsDialog::switch_format): ditto
	(QPrefsDialog::updateFormatsButtons): ditto
	(QPrefsDialog::new_format): ditto
	(QPrefsDialog::modify_format): ditto

	* src/frontends/qt4/ui/QPrefFileformatsUi.ui: Add documentCB checkbox

	* src/frontends/xforms/FormPreferences.C
	(FormPreferences::Formats::build): handle new check_document checkbox
	(FormPreferences::Formats::input): ditto
	(FormPreferences::Formats::Add): ditto
	(FormPreferences::Formats::Browser): ditto

	* src/frontends/xforms/forms/form_preferences.fd: Add check_document
	checkbox

	* src/lyxrc.C
	(LyXRC::read): Remove compatibility code for 1.3 \format entries.
	Read the new format flags (but don't require them for 1.4
	compatibility)
	(LyXRC::write): Write the new format flags

	* src/MenuBackend.C
	(expandFormats): Remove the hardcoded exception for image formats
	and use Format::isDocument() instead

	* lib/doc/Customization.lyx: Document auto viever/editor and the
	"document format" flag


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13887 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-20 12:03:40 +00:00
Jean-Marc Lasgouttes
b6e30400f5 New auto-open feature from Bo Peng (with help from Jean-Marc and Enrico)
* src/lyx_main.C (init): call Formats::setAutoOpen.
	
	* src/lyxrc.C (read): do not reset editor/viewer values of "none".

	* src/format.C (fixCommand): helper function: tweak command depending
	of the availability of OS viewer/editor.
	(setAutoOpen): run fixCommand over all the formats.

	* src/support/Makefile.am: under win32, link against shlwapi.dll.
	
	* src/support/os_*.C (canAutoOpenFile, autoOpenFile): new
	functions, used	to let the OS handle viewers and editors it knows about.

	* configure.ac: improve check for shlwapi.

	* lib/configure.py: remove check for native windows viewers.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13855 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-17 22:13:33 +00:00
Lars Gullik Bjønnes
8c93f63b48 * filetools.[Ch]: Make functions that start with a capital
letter start with a lower letter.
	* All other .C and .h in the cs: adjust for above change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-08 22:31:11 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Angus Leeming
029c5c4732 'Forward port' various path fixes from the 1.3.x branch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10084 a592a061-630c-0410-9148-cb99ea01b6c8
2005-06-18 00:18:29 +00:00
Georg Baum
dacd4cea26 make gettting the file format from file contents work in the correct way ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9218 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-09 19:08:34 +00:00
Angus Leeming
e978fa42e3 Whitespace, only whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9044 a592a061-630c-0410-9148-cb99ea01b6c8
2004-10-05 10:11:42 +00:00
Angus Leeming
da61af2b8e Georg's add an editor to Formats / safe external_templates patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8645 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-13 10:36:09 +00:00
Martin Vermeer
51cd5a7a70 Needed for 2.95 / stlport compilation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8405 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-06 08:23:39 +00:00
Lars Gullik Bjønnes
3420904448 The func.diff patch. Functors work and some tiny cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8377 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-31 15:30:24 +00:00
Angus Leeming
4e136e6f41 (Jo�o Assirati): add the ability to inverse-search a dvi file.
To use, you'll need either to run 'latex --src-specials' or, if your version
of latex isn't up to the task, to use the srcltx package. Further, your
vi viewer must be up to the task. xdvi 22.38 or the kde 3 version of kdvi.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7917 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-14 11:35:50 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Angus Leeming
57a24ea912 Replace 'using namespace abc;' with 'using abc::xyz;'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7725 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 22:13:45 +00:00
Angus Leeming
e835c9477b Pimpl Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7719 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 11:24:33 +00:00
Angus Leeming
fd36f5ad76 Make buffer's member variables private; use accessor functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7717 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 09:47:59 +00:00
Angus Leeming
91de22ef34 Strip 320 #includes from the files in src.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7684 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 16:31:30 +00:00
Lars Gullik Bjønnes
b881ed2d5a Use Buffer const reference in most placees possible.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7623 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-28 07:41:31 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
Jean-Marc Lasgouttes
80d7f70dc3 move reading of bind files from lyxrc.C to kbmap.C; do not read bindings or menus when not using gui; move paper related enums to a new paper.h; remove dependency on bufferparams.h from lyxrc.h; small bugfix to tex2lyx; fix bad menu shortcut
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7372 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-26 23:04:39 +00:00
Alfredo Braunstein
dfbd44997a moved some converter/format functions to more appropriate places
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7300 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-17 08:23:33 +00:00
Alfredo Braunstein
e3fc822783 Added new signals to Buffer, connect/disconnect to them in BufferView, added BufferView::newFile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7242 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-07 08:37:02 +00:00
Lars Gullik Bjønnes
92d522b7f1 introduce namespace lyx::support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7224 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-30 23:56:22 +00:00
Alfredo Braunstein
468df2b583 some header insanity fixed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7028 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-23 13:54:09 +00:00
André Pönitz
0e9bd2e87d STRCONV() all over the place
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6956 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-13 16:24:49 +00:00
André Pönitz
d31244b5e2 The 'bformat' introduction
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6953 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-13 09:48:57 +00:00
John Levon
315e07fabc kill Alert::alert()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6653 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-31 01:15:44 +00:00
John Levon
17c8764e0a move BoostFormat and boost-inst
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6651 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-30 20:25:44 +00:00
Lars Gullik Bjønnes
2f71b9d235 ws changes only
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6333 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-04 09:27:27 +00:00
Dekel Tsur
dd5454171d Compilation fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6312 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-28 19:57:04 +00:00
André Pönitz
f566e7c604 Alfredo's patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6305 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-28 09:49:49 +00:00