ChangeLog&CREDITS cleanup, Gnome cleanup, clear minibuffer when clicking, warn when save failed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1112 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-10-13 12:20:38 +00:00
parent 5cd869d52d
commit 68cc667219
19 changed files with 306 additions and 242 deletions

View File

@ -1,3 +1,57 @@
2000-10-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* ChangeLog: cleanup.
* lib/CREDITS: update to add all the contributors we've forgotten.
I have obviously missed some, so tell me whether there were
errors.
2000-10-13 Marko Vendelin <markov@ioc.ee>
* src/frontends/gnome/FormCitation.C
* src/frontends/gnome/FormCitation.h
* src/frontends/gnome/FormError.C
* src/frontends/gnome/FormIndex.C
* src/frontends/gnome/FormRef.C
* src/frontends/gnome/FormRef.h
* src/frontends/gnome/FormUrl.C: hide dialogs on "update" signal
* src/frontends/gnome/FormCitation.C
* src/frontends/gnome/FormCopyright.C
* src/frontends/gnome/FormError.C
* src/frontends/gnome/FormIndex.C
* src/frontends/gnome/FormRef.C
* src/frontends/gnome/FormToc.C
* src/frontends/gnome/FormUrl.C: replacing gettext N_() with _() where
appropriate.
* src/frontends/gnome/Menubar_pimpl.C
* src/frontends/gnome/Menubar_pimpl.h: using new Menu::expand method to
fill the menus.
2000-10-11 Baruch Even <baruch.even@writeme.com>
* src/minibuffer.h:
* src/minibuffer.C: Changed the method ExecCommand to PrepareForCommand
to convey its real action.
* src/minibuffer.C (peek_event): Added action when mouse clicks to
clear the minibuffer and prepare to enter a command.
* src/mathed/formula.C (LocalDispatch): Changed to conform with
the rename from ExecCommand to PrepareForCommand.
* src/lyxfunc.C (Dispatch): ditto.
2000-10-11 Baruch Even <baruch.even@writeme.com>
* src/buffer.C (writeFile): Added test for errors on writing, this
catches all errors and not only file system full errors as intended.
2000-10-13 Dekel Tsur <dekelts@tau.ac.il>
* src/lyx_gui.C (create_forms): better fix for crash with
translated interface.
2000-10-12 John Levon <moz@compsoc.man.ac.uk>
* src/frontends/kde/Makefile.am:
@ -260,7 +314,7 @@
* lib/Makefile.am (EXTRA_DIST): add encodings and languages
2000-10-12 <larsbj@baywatch.lyx.org>
2000-10-12 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/lyxfunctional.h: add operator= that takes a reference
@ -2793,11 +2847,11 @@
usefull.
* src/insets/insetgraphics.h:
* src/insets/insetgraphics.C: Added the use of the GraphicsCache and the
drawing of the inline image.
* src/insets/insetgraphics.C: Added the use of the GraphicsCache
and the drawing of the inline image.
* src/buffer.C: Fixed a bug where a loaded InsetGraphics would be loaded
into the wrong position.
* src/buffer.C: Fixed a bug where a loaded InsetGraphics would be
loaded into the wrong position.
* src/lyxfunc.C: When adding an InsetGraphics the edit dialog is now
launched.
@ -3626,7 +3680,7 @@
* acinclude.m4: recreated
2000-07-24 Amir Karger
2000-07-24 Amir Karger <karger@lyx.org>
* README: add Hebrew, Arabic kmaps
* ANNOUNCE: typo
@ -6931,7 +6985,7 @@
adding title elements to where they belong.
* lib/layouts/scrclass.inc: changed to include stdtitle.inc, then
define the additional tilte elements and then include
define the additional title elements and then include
stdstruct.inc.
* many other layout files: changed to include stdtitle.inc just

View File

@ -35,21 +35,39 @@
@bFrancesc Burrull i Mestres
@iE-mail: fburrull@mat.upc.es
Catalan translation.
@bMatej Cepl
@iE-mail: CeplM@seznam.cz
Improvements to the czech keymaps
@bClaudio Coco
@iE-mail: lacocio@iol.it
Italian translation
@bedscott
@iE-mail: edscott@imp.mx
Various bug fixes
@bMatthias Ettrich
@iE-mail: ettrich@kde.org
started the project, implemented
the early versions, various improvements
including undo/redo, tables,
and much, much more.
@bBaruch Even
@iE-mail: baruch.even@writeme.com
New graphics handling scheme and more
@bJohn Michael Floyd
@iE-mail: jmf@pwd.nsw.gov.au
fix to spellchecker.C
@bStefano Ghirlanda
@istefano@zool.su.se
Improvements to lyxserver; LyX-Client perl package
@bHartmut Goebel
@iE-mail: goebel@noris.net
Improvements to Koma-Script classes
@bClaus Hentschel
@iE-mail claus.hentschel@mbau.fh-hannover.de
Win32 port of LyX 1.1.x
@bBernard Michael Hurley
@iE-mail: bernardh@westherts.ac.uk
Fixes to literate programming support.
@bBernhard Iselborn
@iE-mail: biselbor@rhrk.uni-kl.de
some minor bug-fixes, FAQ
@ -81,12 +99,21 @@
@bBernd Kümmerlen
@iE-mail: bkuemmer@ix.urz.uni-heidelberg.de
Initial version of the koma-script textclasses
@bR. Lahaye
@iE-mail: lahaye@postech.ac.kr
-geometry command line option
@bJean-Marc Lasgouttes
@iE-mail: Jean-Marc.Lasgouttes@inria.fr
configure and Makefile-stuff and more
@bVictor Lavrenko
@iE-mail: lyx@lavrenko.pp.ru
Russian translation
@bAngus Leeming
@iE-mail: a.leeming@ic.ac.uk
GUI-I-fication of insets and more
@bJohn Levon
@iE-mail moz@compsoc.man.ac.uk
KDE port
@bJose' Matos
@iE-mail: jamatos@novalis.fc.up.pt
linuxdoc sgml support
@ -154,13 +181,16 @@
@bDekel Tsur
@iE-mail: dekel@math.tau.ac.il
Hebrew support.
Few bug fixes.
Many bug fixes.
@bMatthias Ulrichs
@iE-mail: urlichs@smurf.noris.de
bug reports and small fixes
@bH. Turgut Uyar
@iE-mail: uyar@cs.itu.edu.tr
turkish kbmaps
@bMarko Vendelin
@iE-mail: markov@ioc.ee
Gnome frontend
@bMartin Vermeer
@iE-mail: mv@fgi.fi
svjour/svjog, egs and llncs document classes
@ -178,6 +208,9 @@
@iE-mail: edmar-w-jr@technologist.com
Literate programming support
Various bug fixes
@bSerge Winitzki
@iE-mail: winitzki@erebus.phys.cwru.edu
Updates to the Scientific Word bindings
@bStephan Witt
@iE-mail: stephan.witt@beusen.de
Support for page selection for printing

View File

@ -1238,9 +1238,31 @@ bool Buffer::writeFile(string const & fname, bool flag) const
// Write marker that shows file is complete
ofs << "\n\\the_end" << endl;
ofs.close();
// how to check if close went ok?
return true;
// Following is an attempt... (BE 20001011)
// good() returns false if any error occured, including some
// formatting error.
// bad() returns true if something bad happened in the buffer,
// which should include file system full errors.
bool status = true;
if (!ofs.good()) {
status = false;
#if 0
if (ofs.bad()) {
lyxerr << "Buffer::writeFile: BAD ERROR!" << endl;
} else {
lyxerr << "Buffer::writeFile: NOT SO BAD ERROR!"
<< endl;
}
#endif
}
return status;
}

View File

@ -94,9 +94,6 @@ void FormCitation::showInset( InsetCommand * const inset )
inset_ = inset;
ih_ = inset_->hide.connect(slot(this, &FormCitation::hide));
#ifdef WITH_WARNINGS
#warning This connection to update will do nothing!
#endif
u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::update));
h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide));
@ -371,8 +368,8 @@ void FormCitation::showStageAction()
Gtk::Alignment * mbox = manage( new Gtk::Alignment(0.5, 0.5, 0, 0) );
Gtk::ButtonBox * bbox = manage( new Gtk::HButtonBox() );
string const addlabel = N_("_Add new citation");
string const editlabel = N_("_Edit/remove citation(s)");
string const addlabel = _("_Add new citation");
string const editlabel = _("_Edit/remove citation(s)");
Gnome::PixButton * b_add = manage(new Gnome::PixButton(addlabel, GNOME_STOCK_PIXMAP_NEW));
Gnome::PixButton * b_edit = manage(new Gnome::PixButton(editlabel, GNOME_STOCK_PIXMAP_PROPERTIES));
@ -397,7 +394,7 @@ void FormCitation::showStageAction()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Citation: Select action "), false, accel);
mainAppWin->add_action(*dialog_, _(" Citation: Select action "), false, accel);
initWidgets();
@ -451,9 +448,9 @@ void FormCitation::showStageSearch()
search_text_ = manage( new Gnome::Entry() );
button_regexp_ = manage( new Gtk::CheckButton(N_("Use Regular Expression")) );
button_regexp_ = manage( new Gtk::CheckButton(_("Use Regular Expression")) );
b_ok = manage( new Gtk::Button(N_("Search")) );
b_ok = manage( new Gtk::Button(_("Search")) );
b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) );
// set up spacing
@ -471,7 +468,7 @@ void FormCitation::showStageSearch()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Insert Citation: Enter keyword(s) or regular expression "));
mainAppWin->add_action(*dialog_, _(" Insert Citation: Enter keyword(s) or regular expression "));
initWidgets();
@ -527,11 +524,11 @@ void FormCitation::showStageSelect()
// constructing CList
vector<string> colnames;
colnames.push_back("INVISIBLE");
colnames.push_back(N_("Key"));
colnames.push_back(N_("Author(s)"));
colnames.push_back(N_("Title"));
colnames.push_back(N_("Year"));
colnames.push_back(N_("Journal"));
colnames.push_back(_("Key"));
colnames.push_back(_("Author(s)"));
colnames.push_back(_("Title"));
colnames.push_back(_("Year"));
colnames.push_back(_("Journal"));
clist_bib_ = manage( new Gtk::CList(colnames) );
bbox->set_layout(GTK_BUTTONBOX_END);
@ -549,7 +546,7 @@ void FormCitation::showStageSelect()
bbox->children().push_back(Element(*b_ok, false, false));
bbox->children().push_back(Element(*b_cancel, false, false));
tbox->children().push_back(Element(*manage(new Gtk::Label(N_("Text after"))), false, false));
tbox->children().push_back(Element(*manage(new Gtk::Label(_("Text after"))), false, false));
tbox->children().push_back(Element(*text_after_, true, true));
tbox->children().push_back(Element(*manage(new Gtk::VSeparator()), false, false));
tbox->children().push_back(Element(*bbox, false, false));
@ -560,7 +557,7 @@ void FormCitation::showStageSelect()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Insert Citation: Select citation "), true);
mainAppWin->add_action(*dialog_, _(" Insert Citation: Select citation "), true);
initWidgets();
@ -607,9 +604,9 @@ void FormCitation::showStageEdit()
text_after_ = manage( new Gnome::Entry() );
button_unselect_ = manage( new Gnome::PixButton( N_("_Remove"), GNOME_STOCK_PIXMAP_TRASH ) );
button_up_ = manage( new Gnome::PixButton( N_("_Up"), GNOME_STOCK_PIXMAP_UP ) );
button_down_ = manage( new Gnome::PixButton( N_("_Down"), GNOME_STOCK_PIXMAP_DOWN ) );
button_unselect_ = manage( new Gnome::PixButton( _("_Remove"), GNOME_STOCK_PIXMAP_TRASH ) );
button_up_ = manage( new Gnome::PixButton( _("_Up"), GNOME_STOCK_PIXMAP_UP ) );
button_down_ = manage( new Gnome::PixButton( _("_Down"), GNOME_STOCK_PIXMAP_DOWN ) );
b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) );
b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) );
@ -639,7 +636,7 @@ void FormCitation::showStageEdit()
t2box->children().push_back(Element(*sw, true, true));
t2box->children().push_back(Element(*actbbox, false, false));
tbox->children().push_back(Element(*manage(new Gtk::Label(N_("Text after"))), false, false));
tbox->children().push_back(Element(*manage(new Gtk::Label(_("Text after"))), false, false));
tbox->children().push_back(Element(*text_after_, true, true));
tbox->children().push_back(Element(*manage(new Gtk::VSeparator()), false, false));
tbox->children().push_back(Element(*bbox, false, false));
@ -657,7 +654,7 @@ void FormCitation::showStageEdit()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Citation: Edit "), true, accel);
mainAppWin->add_action(*dialog_, _(" Citation: Edit "), true, accel);
initWidgets();
@ -729,6 +726,13 @@ void FormCitation::updateButtons()
}
}
void FormCitation::update(bool buffchanged)
{
if (buffchanged) hide();
}
void FormCitation::selectionToggled(gint row,
gint ,//column,
GdkEvent * ,//event,
@ -749,7 +753,7 @@ void FormCitation::selectionToggled(gint row,
if (keyfound)
info_->show_string(info);
else
info_->show_string(N_("--- No such key in the database ---"));
info_->show_string(_("--- No such key in the database ---"));
}
else
{

View File

@ -45,8 +45,8 @@ private:
/// Slot launching dialog to an existing inset
void showInset( InsetCommand * const );
/// The following three methods do nothing in this implementation
virtual void update(bool = false) { }
virtual void update(bool = false);
/// The following two methods do nothing in this implementation
virtual void apply() { }
void show() { }

View File

@ -12,6 +12,7 @@
*/
#include <config.h>
#include "gettext.h"
#include "Dialogs.h"
#include "FormCopyright.h"
@ -42,9 +43,9 @@ void FormCopyright::show()
vector<string> authors; //null. Authors are not listed in LyX copyright dialogbox.
dialog_ = new Gnome::About(PACKAGE, VERSION,
"(C) 1995 by Matthias Ettrich, \n1995-2000 LyX Team",
_("(C) 1995 by Matthias Ettrich, \n1995-2000 LyX Team"),
authors,
"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\nLyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",
_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\nLyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."),
NULL);
// it should be disconnected before deleting dialog_ in FormCopyright::hide()

View File

@ -86,7 +86,7 @@ void FormError::show()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Error "));
mainAppWin->add_action(*dialog_, _(" Error "));
// setting focus
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_close->gtkobj()), GTK_CAN_DEFAULT);
@ -102,8 +102,9 @@ void FormError::show()
}
}
void FormError::update(bool)
void FormError::update(bool buffchanged)
{
if (buffchanged) hide();
}
void FormError::hide()

View File

@ -86,7 +86,7 @@ void FormIndex::show()
{
using namespace Gtk::Box_Helpers;
Gtk::Label * label = manage( new Gtk::Label(N_("Keyword")) );
Gtk::Label * label = manage( new Gtk::Label(_("Keyword")) );
Gtk::Box * mbox = manage( new Gtk::HBox() );
Gtk::ButtonBox * bbox = manage( new Gtk::HButtonBox() );
Gtk::Separator * sep = manage( new Gtk::VSeparator() );
@ -116,7 +116,7 @@ void FormIndex::show()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Index "));
mainAppWin->add_action(*dialog_, _(" Index "));
// setting focus
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(keyword_->get_entry()->gtkobj()), GTK_CAN_DEFAULT);
@ -140,7 +140,8 @@ void FormIndex::show()
void FormIndex::update(bool switched)
{
if (switched) {
if (switched)
{
hide();
return;
}

View File

@ -113,7 +113,7 @@ void FormRef::showStageError(string const & mess)
// packing dialog to main window
dialog_ = alig;
mainAppWin->add_action(*dialog_, N_(" Reference "));
mainAppWin->add_action(*dialog_, _(" Reference "));
// setting focus
gtk_widget_grab_focus (GTK_WIDGET(b_cancel->gtkobj()));
@ -182,7 +182,7 @@ void FormRef::showStageSelect()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" Reference: Select reference "), true);
mainAppWin->add_action(*dialog_, _(" Reference: Select reference "), true);
// setting focus
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_ok->gtkobj()), GTK_CAN_DEFAULT);
@ -251,27 +251,27 @@ void FormRef::showStageAction()
Gtk::Menu * menu = manage( new Gtk::Menu() );
Gtk::MenuItem * e;
e = manage( new Gtk::MenuItem(N_("Ref")) );
e = manage( new Gtk::MenuItem(_("Ref")) );
e->activate.connect(bind<Type>(slot(this, &FormRef::changeType), REF));
e->show();
menu->append( *e );
e = manage( new Gtk::MenuItem(N_("Page")) );
e = manage( new Gtk::MenuItem(_("Page")) );
e->activate.connect(bind<Type>(slot(this, &FormRef::changeType), PAGEREF));
e->show();
menu->append( *e );
e = manage( new Gtk::MenuItem(N_("TextRef")) );
e = manage( new Gtk::MenuItem(_("TextRef")) );
e->activate.connect(bind<Type>(slot(this, &FormRef::changeType), VREF));
e->show();
menu->append( *e );
e = manage( new Gtk::MenuItem(N_("TextPage")) );
e = manage( new Gtk::MenuItem(_("TextPage")) );
e->activate.connect(bind<Type>(slot(this, &FormRef::changeType), VPAGEREF));
e->show();
menu->append( *e );
e = manage( new Gtk::MenuItem(N_("PrettyRef")) );
e = manage( new Gtk::MenuItem(_("PrettyRef")) );
e->activate.connect(bind<Type>(slot(this, &FormRef::changeType), PRETTYREF));
e->show();
menu->append( *e );
@ -297,8 +297,8 @@ void FormRef::showStageAction()
bbox->children().push_back(Element(*b_ok, false, false));
bbox->children().push_back(Element(*b_cancel, false, false));
table->attach( *manage( new Gtk::Label(N_("Type:")) ), 0, 1, 0, 1, 0, 0 );
table->attach( *manage( new Gtk::Label(N_("Name:")) ), 0, 1, 1, 2, 0, 0 );
table->attach( *manage( new Gtk::Label(_("Type:")) ), 0, 1, 0, 1, 0, 0 );
table->attach( *manage( new Gtk::Label(_("Name:")) ), 0, 1, 1, 2, 0, 0 );
table->attach( *choice_, 1, 2, 0, 1 );
table->attach( *name_, 1, 2, 1, 2 );
@ -308,7 +308,7 @@ void FormRef::showStageAction()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, string(N_(" Reference: ")) + params.getContents() + string(" "));
mainAppWin->add_action(*dialog_, string(_(" Reference: ")) + params.getContents() + string(" "));
// setting focus
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_cancel->gtkobj()), GTK_CAN_DEFAULT);
@ -329,6 +329,11 @@ void FormRef::showStageAction()
}
}
void FormRef::update(bool buffchanged)
{
if (buffchanged) hide();
}
void FormRef::hide()
{
if (dialog_!=NULL) mainAppWin->remove_action();

View File

@ -72,7 +72,7 @@ private:
void showInset( InsetCommand * const );
/// Update dialog before showing it (not used in this implementation)
virtual void update(bool = false) { hide(); }
virtual void update(bool = false);
/// Apply from dialog (modify or create inset)
virtual void apply();
/// Explicitly free the dialog.

View File

@ -97,19 +97,19 @@ void FormToc::show()
choice_->get_menu()->items().clear();
e = manage( new Gtk::MenuItem(N_("Table of Contents")) );
e = manage( new Gtk::MenuItem(_("Table of Contents")) );
e->activate.connect(bind<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_TOC));
choice_->get_menu()->append( *e );
e = manage( new Gtk::MenuItem(N_("List of Figures")) );
e = manage( new Gtk::MenuItem(_("List of Figures")) );
e->activate.connect(bind<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOF));
choice_->get_menu()->append( *e );
e = manage( new Gtk::MenuItem(N_("List of Tables")) );
e = manage( new Gtk::MenuItem(_("List of Tables")) );
e->activate.connect(bind<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOT));
choice_->get_menu()->append( *e );
e = manage( new Gtk::MenuItem(N_("List of Algorithms")) );
e = manage( new Gtk::MenuItem(_("List of Algorithms")) );
e->activate.connect(bind<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOA));
choice_->get_menu()->append( *e );
@ -117,7 +117,7 @@ void FormToc::show()
b_refresh = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_refresh") ) );
b_close = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_close") ) );
b_refresh->clicked.connect(slot(this, &FormToc::update));
b_refresh->clicked.connect(bind<bool>(slot(this, &FormToc::update),false));
b_close->clicked.connect(dialog_->destroy.slot());
dialog_->destroy.connect(slot(this, &FormToc::free));
@ -145,7 +145,7 @@ void FormToc::update(bool)
if (dialog_ != NULL &&
!lv_->view()->available())
{
wintitle = N_( "*** No Document ***");
wintitle = _( "*** No Document ***");
dialog_->set_title(wintitle);
list_->items().clear();
@ -164,25 +164,25 @@ void FormToc::update(bool)
if( params.getCmdName() == "tableofcontents" )
{
type = Buffer::TOC_TOC;
wintitle = N_("Table of Contents");
wintitle = _("Table of Contents");
selection = 0;
}
else if( params.getCmdName() == "listoffigures" )
{
type = Buffer::TOC_LOF;
wintitle = N_("List of Figures");
wintitle = _("List of Figures");
selection = 1;
}
else if( params.getCmdName() == "listofalgorithms" )
{
type = Buffer::TOC_LOA;
wintitle = N_("List of Algorithms");
wintitle = _("List of Algorithms");
selection = 3;
}
else
{
type = Buffer::TOC_LOT;
wintitle = N_("List of Tables");
wintitle = _("List of Tables");
selection = 2;
}

View File

@ -88,7 +88,7 @@ void FormUrl::show()
url_ = manage( new Gnome::Entry() );
name_ = manage( new Gnome::Entry() );
html_type_ = manage( new Gtk::CheckButton(N_("HTML type")) );
html_type_ = manage( new Gtk::CheckButton(_("HTML type")) );
b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) );
b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) );
@ -114,9 +114,9 @@ void FormUrl::show()
bbox->children().push_back(Element(*b_ok, false, false));
bbox->children().push_back(Element(*b_cancel, false, false));
label = manage( new Gtk::Label(N_("URL")) );
label = manage( new Gtk::Label(_("URL")) );
table->attach( *label, 0, 1, 0, 1, 0, 0 );
label = manage( new Gtk::Label(N_("Name")) );
label = manage( new Gtk::Label(_("Name")) );
table->attach( *label, 0, 1, 1, 2, 0, 0 );
table->attach( *url_, 1, 2, 0, 1 );
table->attach( *name_, 1, 2, 1, 2 );
@ -128,7 +128,7 @@ void FormUrl::show()
// packing dialog to main window
dialog_ = mbox;
mainAppWin->add_action(*dialog_, N_(" URL "));
mainAppWin->add_action(*dialog_, _(" URL "));
// setting focus
GTK_WIDGET_SET_FLAGS (GTK_WIDGET(url_->get_entry()->gtkobj()), GTK_CAN_DEFAULT);
@ -152,7 +152,8 @@ void FormUrl::show()
void FormUrl::update(bool switched)
{
if (switched) {
if (switched)
{
hide();
return;
}

View File

@ -116,7 +116,7 @@ void Menubar::Pimpl::updateList(vector<Buffer::TocItem> * toclist, vector<ListsH
string label;
menu.push_back(Gnome::UI::Item(Gnome::UI::Icon(GNOME_STOCK_MENU_REFRESH),
N_("Refresh"), slot(this, &Menubar::Pimpl::updateAllLists)));
_("Refresh"), slot(this, &Menubar::Pimpl::updateAllLists)));
if (toclist->size() > max_number_of_items)
composeTocUIInfo(menu, *toclist, toclist->begin(), 0);
@ -146,7 +146,7 @@ Menubar::Pimpl::composeTocUIInfo(vector<Gnome::UI::Info> & menu,
vector<Buffer::TocItem>::const_iterator begin,
int mylevel)
{
string label = N_("<No Name>");
string label = _("<No Name>");
vector<Buffer::TocItem>::const_iterator end = toclist.end();
vector<Buffer::TocItem>::const_iterator it;
@ -210,7 +210,8 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
return;
}
Menu menu = menubackend_->getMenu(menu_name);
Menu menu = Menu();
menubackend_->getMenu(menu_name).expand(menu, owner_->buffer());
for (Menu::const_iterator i = menu.begin(); i != menu.end(); ++i)
{
@ -333,43 +334,6 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
break;
}
case MenuItem::Lastfiles: {
int ii = 1;
for (LastFiles::const_iterator cit = lastfiles->begin();
cit != lastfiles->end() && ii < 10; ++cit, ++ii)
{
int action = lyxaction.getPseudoAction(LFUN_FILE_OPEN, (*cit));
string label = tostr(ii) + ". " + MakeDisplayPath((*cit),30);
path = rootpath + label;
label = "_" + label;
Menus.push_back(Gnome::UI::Item(label,
bind<int>(slot(this, &Menubar::Pimpl::callback), action),
label));
}
break;
}
case MenuItem::Documents: {
std::vector<string> names = bufferlist.getFileNames();
for (std::vector<string>::const_iterator cit = names.begin();
cit != names.end() ; ++cit)
{
int action = lyxaction.getPseudoAction(LFUN_SWITCHBUFFER, *cit);
string label = MakeDisplayPath(*cit, 30);
path = rootpath + label;
Menus.push_back(Gnome::UI::Item(label,
bind<int>(slot(this, &Menubar::Pimpl::callback), action),
label));
}
break;
}
case MenuItem::Toc: {
ListsHolder t;
t.path = path;
@ -377,39 +341,15 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
break;
}
case MenuItem::ViewFormats: {
add_formats(Menus, LFUN_PREVIEW, true);
case MenuItem::Documents:
case MenuItem::Lastfiles:
case MenuItem::ViewFormats:
case MenuItem::UpdateFormats:
case MenuItem::ExportFormats:
lyxerr << "Menubar::Pimpl::create_submenu: "
"this should not happen" << endl;
break;
}
case MenuItem::UpdateFormats: {
add_formats(Menus, LFUN_UPDATE, true);
break;
}
case MenuItem::ExportFormats: {
add_formats(Menus, LFUN_EXPORT, false);
break;
}
}
}
}
void Menubar::Pimpl::add_formats(vector<Gnome::UI::Info> & Menus, kb_action action, bool viewable)
{
vector<pair<string,string> > names =
viewable
? Exporter::GetViewableFormats(owner_->buffer())
: Exporter::GetExportableFormats(owner_->buffer());
for (vector<pair<string,string> >::const_iterator cit = names.begin();
cit != names.end() ; ++cit) {
int action2 = lyxaction.getPseudoAction(action, (*cit).first);
string label = (*cit).second;
Menus.push_back(Gnome::UI::Item(label,
bind<int>(slot(this, &Menubar::Pimpl::callback), action2),
label));
}
}

View File

@ -16,6 +16,7 @@
#endif
#include <vector>
#include "gettext.h"
#include "LString.h"
#include <gnome--/app.h>
#include "frontends/Menubar.h"
@ -90,8 +91,6 @@ protected:
};
/// populate lists
void updateList(vector<Buffer::TocItem> *, vector<ListsHolder> *);
/// Add to "Menus" the list of exportable/viewable formats
void add_formats(vector<Gnome::UI::Info> & Menus, kb_action action, bool viewable);
private:
///

View File

@ -325,8 +325,8 @@ void LyXGUI::create_forms()
lyxerr[Debug::INIT] << "Initializing form_character...done" << endl;
// build up the combox entries
combo_language2->addto(_("No change"));
combo_language2->addto(_("Reset"));
combo_language2->addline(_("No change"));
combo_language2->addline(_("Reset"));
for(Languages::const_iterator cit = languages.begin();
cit != languages.end(); ++cit) {
#ifdef DO_USE_DEFAULT_LANGUAGE
@ -334,7 +334,6 @@ void LyXGUI::create_forms()
#endif
combo_language2->addto((*cit).second.lang());
}
combo_language2->select_text(_("No change"));
// the preamble form
fd_form_preamble = create_form_form_preamble();

View File

@ -840,7 +840,7 @@ string const LyXFunc::Dispatch(int ac,
// --- Misc -------------------------------------------
case LFUN_EXEC_COMMAND:
owner->getMiniBuffer()->ExecCommand();
owner->getMiniBuffer()->PrepareForCommand();
break;
case LFUN_CANCEL: // RVDK_PATCH_5

View File

@ -1090,7 +1090,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
//------- dummy actions
case LFUN_EXEC_COMMAND:
bv->owner()->getMiniBuffer()->ExecCommand();
bv->owner()->getMiniBuffer()->PrepareForCommand();
break;
default:

View File

@ -126,7 +126,11 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord,
default:
return 0;
}
} else if (event == FL_PUSH) {
// This actually clears the buffer.
mini->PrepareForCommand();
}
return 0;
}
@ -138,7 +142,7 @@ extern "C" int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
}
void MiniBuffer::ExecCommand()
void MiniBuffer::PrepareForCommand()
{
text.erase();
fl_set_input(the_buffer, "");

View File

@ -35,7 +35,7 @@ public:
///
void Init();
///
void ExecCommand();
void PrepareForCommand();
/** allows to store and reset the contents one time. Usefull
for status messages like "load font" (Matthias)
*/