From 87e0dfe89627f696471b171488233baf322536d6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 6 Dec 2000 09:49:54 +0000 Subject: [PATCH] Patches from Angus and John git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1260 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 47 +++++++++++++++++++++++++ INSTALL | 17 ++++----- src/LColor.C | 2 +- src/frontends/kde/FormTabularCreate.C | 2 -- src/frontends/kde/citationdlg.C | 1 + src/frontends/kde/copyrightdlg.C | 1 + src/frontends/kde/dlg/.cvsignore | 2 +- src/frontends/kde/dlg/Makefile.am | 23 ------------ src/frontends/kde/dlg/README | 7 ++-- src/frontends/kde/dlg/dialogs/para.dlg | 8 ++--- src/frontends/kde/dlg/emptytable.C | 2 +- src/frontends/kde/dlg/moc/.cvsignore | 2 +- src/frontends/kde/dlg/paradlgdata.C | 10 +++--- src/frontends/kde/dlg/paradlgdata.h | 2 +- src/frontends/kde/dlg/tabstack.C | 2 +- src/frontends/kde/moc/.cvsignore | 2 +- src/frontends/kde/paradlg.C | 5 +-- src/frontends/kde/paraextradlg.C | 1 + src/frontends/kde/parageneraldlg.C | 5 +-- src/frontends/kde/printdlg.C | 1 + src/frontends/kde/refdlg.C | 1 + src/frontends/kde/tabcreatedlg.C | 1 + src/frontends/kde/tocdlg.C | 1 + src/frontends/kde/urldlg.C | 1 + src/frontends/xforms/ButtonController.C | 5 +-- src/frontends/xforms/FormPreferences.C | 20 +++++------ src/frontends/xforms/form_graphics.C | 3 ++ src/frontends/xforms/form_paragraph.C | 1 + src/frontends/xforms/form_preferences.C | 1 + src/frontends/xforms/forms/fdfixc.sed | 10 ++++-- src/lyxlookup.h | 9 ++--- src/lyxrc.C | 4 ++- 32 files changed, 122 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8554b5110b..ce56d6b26c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,50 @@ +2000-12-06 Jean-Marc Lasgouttes + + * INSTALL: update PROBLEMS section. + + * src/lyxlookup.h: remove condition on xforms version, since we + should not include it if not appropriate. + +2000-12-05 John Levon + + * src/LColor.C: "latex text" -> "latex inset" (from + Angus Leeming) + + * src/lyxrc.C: "it's" -> "its" (from Angus Leeming) + + * src/frontends/kde/FormTabularCreate.C: + * src/frontends/kde/citationdlg.C: + * src/frontends/kde/copyrightdlg.C: + * src/frontends/kde/paradlg.C: + * src/frontends/kde/paraextradlg.C: + * src/frontends/kde/parageneraldlg.C: + * src/frontends/kde/printdlg.C: + * src/frontends/kde/refdlg.C: + * src/frontends/kde/tabcreatedlg.C: + * src/frontends/kde/tocdlg.C: + * src/frontends/kde/urldlg.C: add necessary headers + (from Angus Leeming) + + * src/frontends/kde/dlg/emptytable.C: + * src/frontends/kde/dlg/tabstack.C: ctors shouldn't have + default parameters (from Angus Leeming) + + * src/frontends/kde/dlg/moc/.cvsignore: + * src/frontends/kde/dlg/.cvsignore: + * src/frontends/kde/moc/.cvsignore: fix the library name + (from Angus Leeming) + + * src/frontends/kde/paradlg.C: + * src/frontends/kde/parageneraldlg.C: + * src/frontends/kde/dlg/para.dlg: + * src/frontends/kde/dlg/paradlgdata.C: added accelerators + + * src/frontends/kde/dlg/README: clarified qtarch version + + * src/frontends/kde/dlg/Makefile.am: removed the + dlg rules as they created spontaneous rebuilds + (not a good idea as it requires qtarch) + 2000-12-05 Jean-Marc Lasgouttes * config/lyxinclude.m4 (LYX_PATH_XFORMS): display also the diff --git a/INSTALL b/INSTALL index d506060d49..ad7aeb2d7a 100644 --- a/INSTALL +++ b/INSTALL @@ -306,9 +306,8 @@ notify us. will be solved if you use --with-included-gettext when configuring LyX. - o It is possible to compile lyx with Digital Unix cxx compiler - version 6.1 (and presumably compaq C++ 6.2 on both Tru64 unix and - linux/alpha, when this will be available), provided one uses + o It is possible to compile lyx with Tru64 Unix cxx compiler + version 6.2, provided one uses CXX=cxx CXXFLAGS='-ptr /tmp/lyx_cxx_repository -std strict_ansi -g -O' @@ -316,17 +315,15 @@ notify us. repository, due to the tricks used by automake for dependencies. Ask Jean-Marc.Lasgouttes@inria.fr for a workaround. - o On Digital Unix with cxx, you may have a compilation error in + o On Tru64 Unix, you may have to compile with + --with-included-string to work around a Tru64 linker limitation + (the STL string template creates names which may be too long). + + o On Tru64 Unix with cxx, you may have a compilation error in lyx_main.C if you have GNU gettext installed. This is due to a bug in gettext. To solve this, you can either (1) configure with --with-included-gettext or (2) add -D__STDC__ to cxx flags. - o The configure script seems to hang while it is checking the LaTeX setup. - We think that this is not a real problem, but rather a symptom of the - fact that the ec-fonts are being rendered. This process can take quite - some time, so the remedy is simply to have patience. (The fonts need to - be rendered at some point to be usable anyways.) - o According to John Collins , on SunOS 4.1.3 you may find two sets of X libraries, and they are of course incompatible :-) One is the set provided as part of OpenWindows, and one is the standard diff --git a/src/LColor.C b/src/LColor.C index d6a8006c75..0d3b77b698 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -85,7 +85,7 @@ LColor::LColor() { footnote, N_("footnote"), "footnote", "DarkRed", "footnote" }, { footnotebg, N_("footnote background"), "footnotebg", "grey60", "footnotebg" }, { footnoteframe, N_("footnote frame"), "footnoteframe", "IndianRed", "footnoteframe" }, - { ert, N_("latex text"), "ert", "DarkRed", "ert" }, + { ert, N_("latex inset"), "ert", "DarkRed", "ert" }, { inset, N_("inset"), "inset", "black", "inset" }, { insetbg, N_("inset background"), "insetbg", "grey60", "insetbg" }, { insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" }, diff --git a/src/frontends/kde/FormTabularCreate.C b/src/frontends/kde/FormTabularCreate.C index d9f1b4b4a6..212ad982dd 100644 --- a/src/frontends/kde/FormTabularCreate.C +++ b/src/frontends/kde/FormTabularCreate.C @@ -23,8 +23,6 @@ #include "BufferView.h" #include "insets/insettabular.h" -using std::endl; - FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) { diff --git a/src/frontends/kde/citationdlg.C b/src/frontends/kde/citationdlg.C index d2b0b79220..c6dc161092 100644 --- a/src/frontends/kde/citationdlg.C +++ b/src/frontends/kde/citationdlg.C @@ -13,6 +13,7 @@ * * ***************************************************************************/ +#include #include "citationdlg.h" CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, const char *name, bool, WFlags) diff --git a/src/frontends/kde/copyrightdlg.C b/src/frontends/kde/copyrightdlg.C index 59ded80198..ddfaa09edf 100644 --- a/src/frontends/kde/copyrightdlg.C +++ b/src/frontends/kde/copyrightdlg.C @@ -7,6 +7,7 @@ *********************************************************************/ +#include #include "copyrightdlg.h" #define Inherited CopyrightDialogData diff --git a/src/frontends/kde/dlg/.cvsignore b/src/frontends/kde/dlg/.cvsignore index 1e006fafea..4b27e295da 100644 --- a/src/frontends/kde/dlg/.cvsignore +++ b/src/frontends/kde/dlg/.cvsignore @@ -3,5 +3,5 @@ Makefile *.deps *.lo .libs -libkde.la +libkdedlg.la *moc.C diff --git a/src/frontends/kde/dlg/Makefile.am b/src/frontends/kde/dlg/Makefile.am index 0653c73062..042c655d4f 100644 --- a/src/frontends/kde/dlg/Makefile.am +++ b/src/frontends/kde/dlg/Makefile.am @@ -37,29 +37,6 @@ libkdedlg_la_SOURCES = \ tabstack.h \ $(GENSOURCES) -# dialog file dependencies - -copyrightdlgdata.C copyrightdlgdata.h: dialogs/copyright.dlg - $(QTARCH) -g $< -indexdlgdata.C indexdlgdata.h: dialogs/index.dlg - $(QTARCH) -g $< -printdlgdata.C printdlgdata.h: dialogs/print.dlg - $(QTARCH) -g $< -paradlgdata.C paradlgdata.h: dialogs/para.dlg - $(QTARCH) -g $< -parageneraldlgdata.C parageneraldlgdata.h: dialogs/parageneral.dlg - $(QTARCH) -g $< -paraabovedlgdata.C paraabovedlgdata.h: dialogs/paraabove.dlg - $(QTARCH) -g $< -parabelowdlgdata.C parabelowdlgdata.h: dialogs/parabelow.dlg - $(QTARCH) -g $< -paraextradlgdata.C paraextradlgdata.h: dialogs/paraextra.dlg - $(QTARCH) -g $< -tabcreatedlgdata.C tabcreatedlgdata.h: dialogs/tabcreate.dlg - $(QTARCH) -g $< - -dlgdata: $(GENSOURCES) - moc/copyrightdlgdata_moc.C: copyrightdlgdata.C copyrightdlgdata.h moc/emptytable_moc.C: emptytable.C emptytable.h moc/indexdlgdata_moc.C: indexdlgdata.C indexdlgdata.h diff --git a/src/frontends/kde/dlg/README b/src/frontends/kde/dlg/README index 43145094bc..f4aa9260ba 100644 --- a/src/frontends/kde/dlg/README +++ b/src/frontends/kde/dlg/README @@ -1,11 +1,14 @@ -These files are generated with qtarch-1.4-6 which can be downloaded +These files are generated with qtarch-1.4-5 which can be downloaded from http://qtarch.sourceforge.net/ Currently you also need this patch : http://www.movement.uklinux.net/patches/lyx/qtarch-1.4.6.diff - + +Eventually the intent is to fold this patch into the official qtarch and +release a qtarch-1.4-6 tarball. + Note this is *not* the latest version, as they only support Qt 2.0. You should compile in the KDE module when you compile qtarch-1.4. diff --git a/src/frontends/kde/dlg/dialogs/para.dlg b/src/frontends/kde/dlg/dialogs/para.dlg index d5c6e62860..df6a6d4143 100644 --- a/src/frontends/kde/dlg/dialogs/para.dlg +++ b/src/frontends/kde/dlg/dialogs/para.dlg @@ -22,7 +22,7 @@ PushButton { Default {true} AutoDefault {false} IsMenuButton {false} - Text {OK} + Text {&OK} AutoRepeat {false} AutoResize {false} Rect {73 555 69 55} @@ -74,7 +74,7 @@ PushButton { Default {false} AutoDefault {false} IsMenuButton {false} - Text {Apply} + Text {&Apply} AutoRepeat {false} AutoResize {false} Rect {215 555 68 55} @@ -103,7 +103,7 @@ PushButton { Default {false} AutoDefault {false} IsMenuButton {false} - Text {Restore} + Text {&Restore} AutoRepeat {false} AutoResize {false} Rect {357 555 68 55} @@ -132,7 +132,7 @@ PushButton { Default {false} AutoDefault {false} IsMenuButton {false} - Text {Cancel} + Text {&Cancel} AutoRepeat {false} AutoResize {false} Rect {498 555 69 55} diff --git a/src/frontends/kde/dlg/emptytable.C b/src/frontends/kde/dlg/emptytable.C index 10ed8e06e8..53ef5225b8 100644 --- a/src/frontends/kde/dlg/emptytable.C +++ b/src/frontends/kde/dlg/emptytable.C @@ -21,7 +21,7 @@ const unsigned int cellsize = 20; -EmptyTable::EmptyTable(QWidget * parent = 0, const char * name = 0) +EmptyTable::EmptyTable(QWidget * parent, const char * name) : QTableView(parent,name) { setNumCols(5); diff --git a/src/frontends/kde/dlg/moc/.cvsignore b/src/frontends/kde/dlg/moc/.cvsignore index 1e006fafea..5f0d90dae7 100644 --- a/src/frontends/kde/dlg/moc/.cvsignore +++ b/src/frontends/kde/dlg/moc/.cvsignore @@ -3,5 +3,5 @@ Makefile *.deps *.lo .libs -libkde.la +libkdedlgmoc.la *moc.C diff --git a/src/frontends/kde/dlg/paradlgdata.C b/src/frontends/kde/dlg/paradlgdata.C index 7c39b753d0..2d1c845bad 100644 --- a/src/frontends/kde/dlg/paradlgdata.C +++ b/src/frontends/kde/dlg/paradlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paradlgdata.C - Last generated: Mon Dec 4 18:21:54 2000 + Last generated: Tue Dec 5 17:05:19 2000 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -36,7 +36,7 @@ ParaDialogData::ParaDialogData ok->setBackgroundMode( QWidget::PaletteBackground ); ok->setFontPropagation( QWidget::NoChildren ); ok->setPalettePropagation( QWidget::NoChildren ); - ok->setText( _("OK") ); + ok->setText( _("&OK") ); ok->setAutoRepeat( false ); ok->setAutoResize( false ); ok->setToggleButton( false ); @@ -62,7 +62,7 @@ ParaDialogData::ParaDialogData apply->setBackgroundMode( QWidget::PaletteBackground ); apply->setFontPropagation( QWidget::NoChildren ); apply->setPalettePropagation( QWidget::NoChildren ); - apply->setText( _("Apply") ); + apply->setText( _("&Apply") ); apply->setAutoRepeat( false ); apply->setAutoResize( false ); apply->setToggleButton( false ); @@ -79,7 +79,7 @@ ParaDialogData::ParaDialogData restore->setBackgroundMode( QWidget::PaletteBackground ); restore->setFontPropagation( QWidget::NoChildren ); restore->setPalettePropagation( QWidget::NoChildren ); - restore->setText( _("Restore") ); + restore->setText( _("&Restore") ); restore->setAutoRepeat( false ); restore->setAutoResize( false ); restore->setToggleButton( false ); @@ -96,7 +96,7 @@ ParaDialogData::ParaDialogData cancel->setBackgroundMode( QWidget::PaletteBackground ); cancel->setFontPropagation( QWidget::NoChildren ); cancel->setPalettePropagation( QWidget::NoChildren ); - cancel->setText( _("Cancel") ); + cancel->setText( _("&Cancel") ); cancel->setAutoRepeat( false ); cancel->setAutoResize( false ); cancel->setToggleButton( false ); diff --git a/src/frontends/kde/dlg/paradlgdata.h b/src/frontends/kde/dlg/paradlgdata.h index 35b2818e08..c769b71ad0 100644 --- a/src/frontends/kde/dlg/paradlgdata.h +++ b/src/frontends/kde/dlg/paradlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paradlgdata.h - Last generated: Mon Dec 4 18:21:54 2000 + Last generated: Tue Dec 5 17:05:19 2000 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/tabstack.C b/src/frontends/kde/dlg/tabstack.C index 9e3e656bcd..14e2841f79 100644 --- a/src/frontends/kde/dlg/tabstack.C +++ b/src/frontends/kde/dlg/tabstack.C @@ -24,7 +24,7 @@ * A tab bar and a widget stack for storing related pages. */ -TabStack::TabStack(QWidget * parent = 0, const char * name = 0) +TabStack::TabStack(QWidget * parent, const char * name) : QWidget(parent,name), tabs(0), stack(0) { stack = new QWidgetStack(this, "stack"); diff --git a/src/frontends/kde/moc/.cvsignore b/src/frontends/kde/moc/.cvsignore index 1e006fafea..bd8e2310e4 100644 --- a/src/frontends/kde/moc/.cvsignore +++ b/src/frontends/kde/moc/.cvsignore @@ -3,5 +3,5 @@ Makefile *.deps *.lo .libs -libkde.la +libkdemoc.la *moc.C diff --git a/src/frontends/kde/paradlg.C b/src/frontends/kde/paradlg.C index ea4c418c85..a23c92a051 100644 --- a/src/frontends/kde/paradlg.C +++ b/src/frontends/kde/paradlg.C @@ -13,6 +13,7 @@ * * ***************************************************************************/ +#include #include "support/lstrings.h" #include "paradlg.h" @@ -30,8 +31,8 @@ ParaDialog::ParaDialog(FormParagraph *form, QWidget *parent, const char *name, b generalpage = new ParaGeneralDialog(this, "generalpage"); extrapage = new ParaExtraDialog(this, "extrapage"); - tabstack->addTabPage(generalpage, _("General")); - tabstack->addTabPage(extrapage, _("Extra")); + tabstack->addTabPage(generalpage, _("&General")); + tabstack->addTabPage(extrapage, _("&Extra")); } ParaDialog::~ParaDialog() diff --git a/src/frontends/kde/paraextradlg.C b/src/frontends/kde/paraextradlg.C index bf587454a6..813d4b364d 100644 --- a/src/frontends/kde/paraextradlg.C +++ b/src/frontends/kde/paraextradlg.C @@ -7,6 +7,7 @@ *********************************************************************/ +#include #include "paraextradlg.h" #include diff --git a/src/frontends/kde/parageneraldlg.C b/src/frontends/kde/parageneraldlg.C index d23e41940d..0330276218 100644 --- a/src/frontends/kde/parageneraldlg.C +++ b/src/frontends/kde/parageneraldlg.C @@ -7,6 +7,7 @@ *********************************************************************/ +#include #include "parageneraldlg.h" #include @@ -27,8 +28,8 @@ ParaGeneralDialog::ParaGeneralDialog // FIXME: free punctuation to whoever can make the value // boxes not be overly large - spacetab->addTabPage(abovepage, _("Spacing Above")); - spacetab->addTabPage(belowpage, _("Spacing Below")); + spacetab->addTabPage(abovepage, _("&Spacing Above")); + spacetab->addTabPage(belowpage, _("Spacing &Below")); connect(abovepage->spaceabove, SIGNAL(highlighted(int)), this, SLOT(spaceaboveHighlighted(int))); connect(belowpage->spacebelow, SIGNAL(highlighted(int)), this, SLOT(spacebelowHighlighted(int))); diff --git a/src/frontends/kde/printdlg.C b/src/frontends/kde/printdlg.C index 6c6981d115..13c998f41b 100644 --- a/src/frontends/kde/printdlg.C +++ b/src/frontends/kde/printdlg.C @@ -4,6 +4,7 @@ * John Levon, moz@compsoc.man.ac.uk */ +#include #include "dlg/printdlgdata.h" #include "printdlg.h" #include "support/lstrings.h" diff --git a/src/frontends/kde/refdlg.C b/src/frontends/kde/refdlg.C index 5db39f2afd..ea826bd6f0 100644 --- a/src/frontends/kde/refdlg.C +++ b/src/frontends/kde/refdlg.C @@ -13,6 +13,7 @@ * * ***************************************************************************/ +#include #include "refdlg.h" RefDialog::RefDialog(FormRef *form, QWidget *parent, const char *name, bool, WFlags) diff --git a/src/frontends/kde/tabcreatedlg.C b/src/frontends/kde/tabcreatedlg.C index 7361802e9e..ec25e47256 100644 --- a/src/frontends/kde/tabcreatedlg.C +++ b/src/frontends/kde/tabcreatedlg.C @@ -4,6 +4,7 @@ * John Levon, */ +#include #include "tabcreatedlg.h" #include "support/lstrings.h" diff --git a/src/frontends/kde/tocdlg.C b/src/frontends/kde/tocdlg.C index b3551bf7ec..7ec38f4e4a 100644 --- a/src/frontends/kde/tocdlg.C +++ b/src/frontends/kde/tocdlg.C @@ -13,6 +13,7 @@ * * ***************************************************************************/ +#include #include "tocdlg.h" TocDialog::TocDialog(FormToc *form, QWidget *parent, const char *name, bool, WFlags) diff --git a/src/frontends/kde/urldlg.C b/src/frontends/kde/urldlg.C index cf03667848..f0535f55f8 100644 --- a/src/frontends/kde/urldlg.C +++ b/src/frontends/kde/urldlg.C @@ -13,6 +13,7 @@ * * ***************************************************************************/ +#include #include "urldlg.h" UrlDialog::UrlDialog(FormUrl *form, QWidget *parent, const char *name, bool, WFlags) diff --git a/src/frontends/xforms/ButtonController.C b/src/frontends/xforms/ButtonController.C index 3ba27dbb33..da4ad9ab71 100644 --- a/src/frontends/xforms/ButtonController.C +++ b/src/frontends/xforms/ButtonController.C @@ -8,6 +8,7 @@ #include "ButtonController.h" #include "support/LAssert.h" +#include "gettext.h" // _() //#include "debug.h" @@ -53,10 +54,10 @@ void ButtonController::refresh() if (cancel_) { if (bp_->buttonStatus(ButtonPolicy::CANCEL)) { fl_set_object_label(cancel_, - cancel_label); + _(cancel_label)); } else { fl_set_object_label(cancel_, - close_label); + _(close_label)); } } if (!read_only_.empty()) { diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 1e05bbf99c..d1ac93e457 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -345,7 +345,7 @@ void FormPreferences::feedback(FL_OBJECT * ob) str = formatted(str, dialog_->text_warning->w-10, FL_SMALL_SIZE, FL_NORMAL_STYLE); - fl_set_object_label(dialog_->text_warning, str.c_str()); + fl_set_object_label(dialog_->text_warning, _(str.c_str())); fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE); } @@ -739,13 +739,13 @@ void FormPreferences::Colors::LoadBrowserLyX() xformColorDB.clear(); XformColor xcol; - xcol.name = N_("GUI background"); + xcol.name = _("GUI background"); xcol.colorID = FL_COL1; fl_getmcolor(FL_COL1, &xcol.r, &xcol.g, &xcol.b); xformColorDB.push_back(xcol); - xcol.name = N_("GUI text"); + xcol.name = _("GUI text"); xcol.colorID = FL_BLACK; fl_getmcolor(FL_BLACK, &xcol.r, &xcol.g, &xcol.b); @@ -754,13 +754,13 @@ void FormPreferences::Colors::LoadBrowserLyX() xformColorDB.push_back(xcol); - xcol.name = N_("GUI selection"); + xcol.name = _("GUI selection"); xcol.colorID = FL_YELLOW; fl_getmcolor(FL_YELLOW, &xcol.r, &xcol.g, &xcol.b); xformColorDB.push_back(xcol); - xcol.name = N_("GUI pointer"); + xcol.name = _("GUI pointer"); xcol.colorID = GUI_COLOR_CURSOR; fl_getmcolor(GUI_COLOR_CURSOR, &xcol.r, &xcol.g, &xcol.b); @@ -1575,11 +1575,11 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob) { if (ob == dialog_->button_bind_file_browse) { string dir = system_lyxdir + string("bind"); - string name = N_("Sys Bind"); + string name = _("Sys Bind"); pair dir1(name, dir); dir = user_lyxdir + string("bind"); - name = N_("User Bind"); + name = _("User Bind"); pair dir2(name, dir); parent_.browse(dialog_->input_bind_file, @@ -1587,11 +1587,11 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob) } else if (ob == dialog_->button_ui_file_browse) { string dir = system_lyxdir + string("ui"); - string name = N_("Sys UI"); + string name = _("Sys UI"); pair dir1(name, dir); dir = user_lyxdir + string("ui"); - name = N_("User UI"); + name = _("User UI"); pair dir2(name, dir); parent_.browse(dialog_->input_ui_file, @@ -3009,7 +3009,7 @@ void FormPreferences::printWarning(string const & warning) str = formatted(str, dialog_->text_warning->w-10, FL_SMALL_SIZE, FL_NORMAL_STYLE); - fl_set_object_label(dialog_->text_warning, str.c_str()); + fl_set_object_label(dialog_->text_warning, _(str.c_str())); fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE); } diff --git a/src/frontends/xforms/form_graphics.C b/src/frontends/xforms/form_graphics.C index f60385700d..bcb4e34026 100644 --- a/src/frontends/xforms/form_graphics.C +++ b/src/frontends/xforms/form_graphics.C @@ -49,6 +49,7 @@ FD_form_graphics * FormGraphics::build_graphics() fl_set_object_lalign(obj, FL_ALIGN_CENTER); fdui->radio_button_group_width = fl_bgn_group(); + // xgettext:no-c-format fdui->radio_width_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 140, 80, 30, _("% of Page")); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT); fdui->radio_width_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 80, 80, 30, _("Default")); @@ -58,12 +59,14 @@ FD_form_graphics * FormGraphics::build_graphics() fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT); fdui->radio_width_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 80, 30, _("Inch")); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT); + // xgettext:no-c-format fdui->radio_width_percent_column = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 160, 96, 30, _("% of Column")); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT); fl_end_group(); fdui->radio_button_group_height = fl_bgn_group(); + // xgettext:no-c-format fdui->radio_height_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 140, 96, 30, _("% of Page")); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT); fdui->radio_height_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 120, 96, 30, _("Inch")); diff --git a/src/frontends/xforms/form_paragraph.C b/src/frontends/xforms/form_paragraph.C index 3ea62f8882..8b660004f3 100644 --- a/src/frontends/xforms/form_paragraph.C +++ b/src/frontends/xforms/form_paragraph.C @@ -163,6 +163,7 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra() fl_set_button_shortcut(obj, scex(_("Length|#L")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + // xgettext:no-c-format fdui->input_pextra_widthp = obj = fl_add_input(FL_INT_INPUT, 240, 70, 90, 30, idex(_("or %|#o"))); fl_set_button_shortcut(obj, scex(_("or %|#o")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); diff --git a/src/frontends/xforms/form_preferences.C b/src/frontends/xforms/form_preferences.C index fa7abc1dc4..4313bdc100 100644 --- a/src/frontends/xforms/form_preferences.C +++ b/src/frontends/xforms/form_preferences.C @@ -102,6 +102,7 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts() fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 210, 65, 200, 30, _("Typewriter")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + // xgettext:no-c-format fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER, 310, 130, 100, 30, idex(_("Zoom %|#Z"))); fl_set_button_shortcut(obj, scex(_("Zoom %|#Z")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); diff --git a/src/frontends/xforms/forms/fdfixc.sed b/src/frontends/xforms/forms/fdfixc.sed index 191483eca9..8dcd0d60a1 100644 --- a/src/frontends/xforms/forms/fdfixc.sed +++ b/src/frontends/xforms/forms/fdfixc.sed @@ -41,16 +41,20 @@ s/#include \"forms\.h\"/#include FORMS_H_LOCATION/ # replace the string with scex(_(string)) /shortcut/ s/".*[|].*"/scex(_(&))/ - # For all lines containing "fl_add" and a string containing |, replace # the string with idex(_(string)) /fl_add/ s/".*[|].*"/idex(_(&))/ -# For all lines containing "fl_add" and a string containing |, add the -# shortcut command after the end of this line +# For all lines containing "fl_add" and a string containing |, add the +# shortcut command after the end of this line /fl_add/ s/idex(\(.*\)").*$/&\ fl_set_button_shortcut(obj,scex(\1")),1);/ +# gettext will get confused if the string contains a "%" unless the line is +# preceeded immediately by //xgettext:no-c-format +/_(".*[%].*")/i\ + // xgettext:no-c-format + # We use new/delete not malloc/free so change to suit. s/\(\(FD_[^ ]*\) \*fdui =\).*sizeof(\*fdui))/\1 new \2/ diff --git a/src/lyxlookup.h b/src/lyxlookup.h index dbe6a40318..9af24af619 100644 --- a/src/lyxlookup.h +++ b/src/lyxlookup.h @@ -12,14 +12,14 @@ functions. This should probably be moved into LyXView (to have different input methods for different frames, but for now we can keep it as it is. */ +#ifndef LYXLOOKUP_H +#define LYXLOOKUP_H #include -#include FORMS_H_LOCATION -#if FL_REVISION < 89 -//#include +#include /// Initialize the compose key handling -extern void InitLyXLookup(Display *, Window ) ; +extern void InitLyXLookup(Display *, Window); /// Read a keysym and/or a string (like XLookupString) extern int LyXLookupString(XEvent * event, @@ -28,4 +28,5 @@ extern int LyXLookupString(XEvent * event, /// Call this when you destroy your window extern void CloseLyXLookup(); + #endif diff --git a/src/lyxrc.C b/src/lyxrc.C index 7b9812df29..db3b8c70bb 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -1663,6 +1663,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_SCREEN_ZOOM: + //xgettext:no-c-format str = N_("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper."); break; @@ -1708,7 +1709,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_TEMPDIRPATH: - str = N_("LyX will place it's temporary directories in this path. They will be deleted when you quit LyX."); + str = N_("LyX will place its temporary directories in this path. They will be deleted when you quit LyX."); break; case RC_USETEMPDIR: @@ -1866,6 +1867,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_DATE_INSERT_FORMAT: + //xgettext:no-c-format str = N_("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\"."); break;