small unimportant cleanups

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4723 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-07-20 15:25:41 +00:00
parent 8d31cc69bc
commit 7086f52fc8
15 changed files with 74 additions and 359 deletions

View File

@ -1,3 +1,7 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* configure.in: yet another try at the same thing
2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* configure.in: try (again) to fix EOF handling in VERSION_INFO

View File

@ -176,10 +176,8 @@ case "$lyx_use_frontend" in
FRONTEND_LIBS="@XFORMS_IMAGE_LIB@ @XFORMS_LIB@ @XPM_LIB@"
;;
esac
FRONTEND_INFO=`cat <<EOF
libXpm version: ${XPM_VERSION}\n\
libforms version: ${XFORMS_VERSION}\n\
EOF`
FRONTEND_INFO=" libXpm version: ${XPM_VERSION}\n\
libforms version: ${XFORMS_VERSION}\n"
;;
gnome)
PKG_CHECK_MODULES(GNOME_FRONTEND, gtkmm-2.0 libglademm-2.0)
@ -274,8 +272,7 @@ LYX_CHECK_DECL_HDRS(mkstemp,[unistd.h stdlib.h])
### Some information on what just happened
real_bindir=`eval "echo \`eval \"echo ${bindir}\"\`"`
real_datadir=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
VERSION_INFO=`cat <<EOF
Configuration\n\
VERSION_INFO="Configuration\n\
Host type: ${host}\n\
Special build flags: ${lyx_flags}\n\
C Compiler: ${CC}\n\
@ -286,8 +283,8 @@ Configuration\n\
Frontend: ${lyx_use_frontend}\n\
${FRONTEND_INFO}\
LyX binary dir: ${real_bindir}\n\
LyX files dir: ${real_datadir}\n\
EOF`
LyX files dir: ${real_datadir}\n"
AC_SUBST(VERSION_INFO)

View File

@ -1,5 +1,8 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* bind/sv_menus.bind:
* bind/sciword.bind: remove some cruft
* tex/iletter.cls:
* layout/iletter.layout:
* templates/iletter.lyx: removed all traces of the iletter bundle

View File

@ -137,7 +137,6 @@
\bind "M-m l" "math-limits"
\bind "M-m n" "math-number"
\bind "M-m v" "accent-vector"
\bind "M-m space" "menu-open Math"
# Sciword mnemonics for math editing:
@ -249,131 +248,6 @@
\bind "Escape" "cancel"
\bind "F9" "meta-prefix"
#
# Visible Menu access menu
#
#\bind "F10 d" "menu-open Documents"
#\bind "F10 e" "menu-open Edit"
#\bind "F10 f" "menu-open File"
#\bind "F10 h" "menu-open Help"
#\bind "F10 i" "menu-open Insert"
#\bind "F10 l" "menu-open Layout"
#\bind "F10 m" "menu-open Math"
#\bind "F10 o" "menu-open Options"
#
# File menu
#
#\bind "M-f a" "buffer-write-as"
#\bind "M-f c" "buffer-close"
#\bind "M-f n" "buffer-new"
#\bind "M-f l" "file-last" # Not yet implemented.
#\bind "M-f o" "file-open"
#\bind "M-f p" "buffer-print"
#\bind "M-f q" "lyx-quit"
#\bind "M-f r" "buffer-update dvi"
# Obsolete
#\bind "M-f s" "buffer-write"
#\bind "M-f t" "buffer-update dvi"
#\bind "M-f x" "buffer-view dvi"
#\bind "M-f g" "buffer-view ps"
#\bind "M-f space" "menu-open File"
#
# Edit menu
#
##\bind "M-e b" "table" # Not yet implemented!
#\bind "M-e c" "cut"
#\bind "M-e e" "error-next"
#\bind "M-e f" "find-replace"
#\bind "M-e k" "line-delete-forward"
#\bind "M-e m" "mark-on"
#\bind "M-e S-M" "mark-off"
#\bind "M-e n" "note-next"
#\bind "M-e o" "copy"
#\bind "M-e p" "paste"
#\bind "M-e r" "redo"
#\bind "M-e s" "spellchecker"
#\bind "M-e t" "toc-update"
#\bind "M-e u" "undo"
#\bind "M-e space" "menu-open Edit"
#
# Layout menu
#
#\bind "M-l c" "layout-character"
#\bind "M-l p" "layout-paragraph"
#\bind "M-l d" "layout-document"
#\bind "M-l q" "layout-quotes"
#\bind "M-l l" "layout-preamble"
#\bind "M-l e" "font-emph"
#\bind "M-l n" "font-smallcaps"
#\bind "M-l b" "font-bold"
#\bind "M-l t" "ert-insert"
#\bind "M-l v" "depth-increment"
#\bind "M-l space" "menu-open Layout"
#
# Insert menu
#
#\bind "M-i c" "citation-insert"
#\bind "M-i f" "footnote-insert"
#\bind "M-i h" "hfill-insert"
#\bind "M-i m" "marginpar-insert"
#\bind "M-i n" "note-insert"
#\bind "M-i l" "label-insert"
#\bind "M-i r" "reference-insert"
#\bind "M-i minus" "hyphenation-point-insert"
#\bind "M-i apostrophe" "quote-insert"
#\bind "M-i S-quotedbl" "quote-insert"
#\bind "M-i space" "menu-open Insert"
#
# Options menu
#
#\bind "M-o f" "screen-font-options" # Not yet implemented!
#\bind "M-o s" "spellcheck-options" # Not yet implemented!
#\bind "M-o k" "keyboard-options" # Not yet implemented!
#\bind "M-o l" "latex-options" # Not yet implemented!
#\bind "M-o space" "menu-open Options"
#
# Documents menu
#
#\bind "M-d p" "buffer-previous"
#\bind "M-d space" "menu-open Documents"
#
# Help menu
#
#\bind "M-h d" "help-documentation" # Not yet implemented!
#\bind "M-h o" "help-copyright" # Not yet implemented!
#\bind "M-h w" "help-warranty" # Not yet implemented!
#\bind "M-h c" "help-credits" # Not yet implemented!
#\bind "M-h v" "help-version" # Not yet implemented!
#\bind "M-h space" "menu-open Help"
#

View File

@ -24,171 +24,6 @@
#
#
#\bind "F10 f" "menu-open Fil"
#\bind "F10 r" "menu-open Redigera"
#\bind "F10 s" "menu-open Stil"
#\bind "F10 l" "menu-open Lägg in"
#\bind "F10 m" "menu-open Matematik"
#\bind "F10 i" "menu-open Inställningar"
#\bind "F10 d" "menu-open Dokument"
#\bind "F10 h" "menu-open Hjälp"
#
# Fil
#
#\bind "M-f n" "buffer-new"
#\bind "M-f m" "buffer-new-template"
#\bind "M-f p" "file-open"
#\bind "M-f g" "buffer-close"
#\bind "M-f s" "buffer-write"
#\bind "M-f o" "buffer-write-as"
#\bind "M-f t" "buffer-reload"
#\bind "M-f v" "buffer-view dvi"
#\bind "M-f i" "buffer-view ps"
#\bind "M-f u" "buffer-update dvi"
#\bind "M-f d" "buffer-update ps"
#\bind "M-f k" "buffer-print"
#\bind "M-f f" "buffer-fax"
#\bind "M-f l" "buffer-export latex"
#\bind "M-f x" "buffer-export linuxdoc"
#\bind "M-f S-T" "buffer-export ascii"
#\bind "M-f h" "buffer-export html"
#\bind "M-f S-A" "buffer-export custom"
#\bind "M-f a" "lyx-quit"
#\bind "M-f space" "menu-open Fil"
#bind "M-f l" "file-last" # Not yet implemented.
#
# Edit menu
#
#\bind "M-r a" "table"
#\bind "M-r k" "cut"
#\bind "M-r f" "error-next"
#\bind "M-r s" "find-replace"
#\bind "M-r k" "line-delete-forward"
#\bind "M-r m" "mark-on"
#\bind "M-r S-M" "mark-off"
#\bind "M-r t" "note-next"
#\bind "M-r o" "copy"
#\bind "M-r i" "paste"
#\bind "M-r g" "redo"
#\bind "M-r r" "spellchecker"
#\bind "M-r e" "buffer-chktex"
#\bind "M-r h" "toc-view"
#\bind "M-r n" "undo"
#\bind "M-r x" "latex-view-log"
#\bind "M-r space" "menu-open Redigera"
#
# Layout menu
#
#\bind "M-s c" "layout-character"
#\bind "M-s p" "layout-paragraph"
#\bind "M-s d" "layout-document"
#\bind "M-s a" "layout-paper"
#\bind "M-s q" "layout-quotes"
#\bind "M-s l" "layout-preamble"
#\bind "M-s e" "font-emph"
#\bind "M-s n" "font-noun"
#\bind "M-s b" "font-bold"
#\bind "M-s t" "ert-insert"
#\bind "M-s v" "depth-increment"
#\bind "M-s space" "menu-open Stil"
#\bind "M-s i" "buffer-itemize-bullets-select"
#
# Insert menu
#
#\bind "M-i g" "graphics-insert"
#\bind "M-i b" "table-insert"
#\bind "M-i c" "buffer-child-insert"
#\bind "M-i f" "footnote-insert"
#\bind "M-i m" "marginpar-insert"
#\bind "M-i minus" "hyphenation-point-insert"
#\bind "M-i p" "dots-insert"
#\bind "M-i e" "end-of-sentence-period-insert"
#\bind "M-i q" "quote-insert"
#\bind "M-i apostrophe" "quote-insert"
#\bind "M-i S-quotedbl" "quote-insert"
#\bind "M-i s h" "hfill-insert"
#\bind "M-i s minus" "hyphenation-point-insert"
#\bind "M-i s b" "protected-space-insert"
#\bind "M-i s l" "break-line"
#\bind "M-i s p" "dots-insert"
#\bind "M-i s e" "end-of-sentence-period-insert"
#\bind "M-i s q" "quote-insert"
#\bind "M-i a" "loa-insert"
#\bind "M-i t c" "toc-insert"
#\bind "M-i t f" "lof-insert"
#\bind "M-i t t" "lot-insert"
#\bind "M-i t i" "index-print"
#\bind "M-i t b" "bibtex-insert"
#\bind "M-i t a" "loa-insert"
#\bind "M-i n" "note-insert"
#\bind "M-i l" "label-insert"
#\bind "M-i r" "reference-insert"
#\bind "M-i i" "citation-insert"
#\bind "M-i d" "index-insert"
#\bind "M-l space" "menu-open Lägg in"
#
# Math menu
#
#\bind "M-m space" "menu-open Matematik"
#
# Options menu
#
#bind "M-o s" "screen-font-options" # Not yet implemented!
#bind "M-o r" "spellcheck-options" # Not yet implemented!
#bind "M-o t" "keyboard-options" # Not yet implemented!
#bind "M-o l" "latex-options" # Not yet implemented!
#\bind "M-i space" "menu-open Inställningar"
#
# Documents menu
#
# These are now defined in cua or emacs bind files so their "standard"
# bindings are available. (eg M-d "word-delete-forward" in emacs) ARRae
#\bind "M-d p" "buffer-previous"
#\bind "M-d space" "menu-open Dokument"
#
# Help menu
#
#bind "M-h i" "help-introduction" # Not yet implemented!
#bind "M-h t" "help-tutorial" # Not yet implemented!
#bind "M-h u" "help-user-guide" # Not yet implemented!
#bind "M-h r" "help-reference-guide" # Not yet implemented!
#bind "M-h h" "help-how-do-i-" # Not yet implemented!
#bind "M-h c" "help-customization" # Not yet implemented!
#bind "M-h s" "help-special-tools" # Not yet implemented!
#bind "M-h k" "help-known-bugs" # Not yet implemented!
#bind "M-h a" "help-latex-config" # Not yet implemented!
#bind "M-h o" "help-copyright" # Not yet implemented!
#bind "M-h e" "help-credits" # Not yet implemented!
#bind "M-h v" "help-version" # Not yet implemented!
#\bind "M-h space" "menu-open Hjälp"
#
# Font size menu
#

View File

@ -40,6 +40,7 @@ src/frontends/qt2/QBibtexDialog.C
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QCitation.C
src/frontends/qt2/QCitationDialog.C
src/frontends/qt2/QCommandBuffer.C
src/frontends/qt2/QDocument.C
src/frontends/qt2/QError.C
src/frontends/qt2/QERT.C

View File

@ -1,3 +1,7 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* buffer.C (getLists): ws cleanup
2002-07-20 Dekel Tsur <dekelts@tau.ac.il>
* language.C (read): Use iso8859-1 encoding in latex_lang

View File

@ -3772,19 +3772,20 @@ Buffer::Lists const Buffer::getLists() const
string const layout("Caption");
while (par) {
#ifdef WITH_WARNINGS
#warning bogus type (Lgb)
#endif
char const labeltype = par->layout()->labeltype;
if (labeltype >= LABEL_COUNTER_CHAPTER
&& labeltype <= LABEL_COUNTER_CHAPTER + params.tocdepth) {
// insert this into the table of contents
SingleList & item = l["TOC"];
int depth = max(0,
labeltype -
textclass.maxcounter());
item.push_back(TocItem(par, depth, par->asString(this, true)));
int depth = max(0, labeltype - textclass.maxcounter());
item.push_back(TocItem(par, depth,
par->asString(this, true)));
}
// For each paragrph, traverse its insets and look for
// For each paragraph, traverse its insets and look for
// FLOAT_CODE
if (found) {

View File

@ -1,3 +1,10 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* Menubar_pimpl.C (add_toc): avoid crash when there is no document
open
* Menubar_pimpl.[Ch]: turn owner_ into a XFormsView, to avoid casting
2002-04-28 Herbert Voss <voss@perce.de>
* FormGraphics.C:

View File

@ -87,7 +87,8 @@ extern "C" {
Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
: owner_(view), menubackend_(&mb), current_group_(0)
: owner_(static_cast<XFormsView*>(view)), menubackend_(&mb),
current_group_(0)
{
for (MenuBackend::const_iterator menu = menubackend_->begin();
menu != menubackend_->end() ; ++menu) {
@ -108,7 +109,7 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
void Menubar::Pimpl::makeMenubar(Menu const & menu)
{
FL_FORM * form = static_cast<XFormsView *>(owner_)->getForm();
FL_FORM * form = owner_->getForm();
int moffset = 0;
// Create menu frame if there is non yet.
@ -331,6 +332,8 @@ void add_toc2(int menu, string const & extra_label,
void Menubar::Pimpl::add_toc(int menu, string const & extra_label,
vector<int> & smn, Window win)
{
if (!owner_->buffer())
return;
Buffer::Lists toc_list = owner_->buffer()->getLists();
Buffer::Lists::const_iterator cit = toc_list.begin();
Buffer::Lists::const_iterator end = toc_list.end();
@ -381,7 +384,7 @@ void Menubar::Pimpl::add_toc(int menu, string const & extra_label,
}
int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
string const & menu_name,
vector<int> & smn)
{
@ -548,7 +551,7 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
// << ", item_=" << iteminfo->item_
// << ", obj_=" << iteminfo->obj_ << ")" <<endl;
LyXView * view = iteminfo->pimpl_->owner_;
XFormsView * view = iteminfo->pimpl_->owner_;
MenuItem const * item = iteminfo->item_.get();
if (button == 1) {
@ -569,8 +572,8 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
item->submenu(), submenus);
if (menu != -1) {
// place popup
fl_setpup_position(static_cast<XFormsView *>(view)->getForm()->x + ob->x,
static_cast<XFormsView *>(view)->getForm()->y + ob->y + ob->h + 10);
fl_setpup_position(view->getForm()->x + ob->x,
view->getForm()->y + ob->y + ob->h + 10);
int choice = fl_dopup(menu);
if (button == 1) {

View File

@ -30,6 +30,7 @@
#include <map>
class LyXView;
class XFormsView;
/** The LyX GUI independent menubar class
The GUI interface is implemented in the corresponding Menubar_pimpl class.
@ -53,7 +54,7 @@ public:
void add_references(int menu, string const & extra_label,
std::vector<int> & smn, Window win);
///
int create_submenu(Window win, LyXView * view,
int create_submenu(Window win, XFormsView * view,
string const & menuname,
std::vector<int> & smn);
@ -64,7 +65,7 @@ private:
void makeMenubar(Menu const &menu);
///
LyXView * owner_;
XFormsView * owner_;
///
MenuBackend const * menubackend_;
///

View File

@ -1,3 +1,7 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* GraphicsParams.C: include <cstdlib>
2002-07-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* PreviewLoader.C (startLoading): use LibScriptSearch to find the

View File

@ -12,10 +12,13 @@
#pragma implementation
#endif
#include <cstdlib>
#include "GraphicsParams.h"
#include "Lsstream.h"
#include "lyxlength.h"
using std::abs;
namespace grfx {

View File

@ -1,3 +1,8 @@
2002-07-20 Dekel Tsur <dekelts@tau.ac.il>
* lyxstring.C (operator>>): replace code which works only with
_some_ versions of GNU STL with generic one
2002-07-18 Angus Leeming <leeming@lyx.org>
* FileMonitor.[Ch]: new files. Monitor a file for any change and emit a

View File

@ -1732,64 +1732,37 @@ void swap(lyxstring & str1, lyxstring & str2)
#include <iostream>
#if 0
istream & operator>>(istream & is, lyxstring & s)
{
#if 0
// very bad solution
char * nome = new char[1024];
is >> nome;
lyxstring tmp(nome);
delete [] nome;
if (!tmp.empty()) s = tmp;
#else
// better solution
int w = is.width(0);
s.clear();
char c = 0;
bool skipspace = true;
while (is.get(c)) {
if (isspace(c)) { is.putback(c); break; }
if (isspace(c)) {
if (!skipspace) {
is.putback(c);
break;
}
} else {
s += c;
skipspace = false;
}
if (--w == 1) break;
}
if (s.empty()) is.setstate(std::ios::failbit);
#endif
return is;
}
#else
istream & operator>>(istream & is, lyxstring & str)
{
typedef istream istream_type;
typedef int int_type;
typedef std::streambuf streambuf_type;
typedef string string_type;
typedef string::size_type size_type;
size_type extracted = 0;
#if 0
istream_type::sentry cerb(is, false);
if (cerb) {
#else
if (is.ipfx0()) {
#endif
str.erase();
std::streamsize w = is.width();
size_type n;
n = w > 0 ? static_cast<size_type>(w) : str.max_size();
int_type const eof = EOF;
streambuf_type * sb = is.rdbuf();
int_type c = sb->sgetc();
while (extracted < n
&& c != eof && !isspace(c)) {
str += c;
++extracted;
c = sb->snextc();
}
if (c == eof)
is.setstate(std::ios::eofbit);
is.width(0);
}
#if 1
is.isfx();
#endif
if (!extracted)
is.setstate(std::ios::failbit);
return is;
}
#endif
ostream & operator<<(ostream & o, lyxstring const & s)