mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
remove preamble and tooltips menu entries on qt2; small compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5855 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
098a9edf78
commit
fec072f968
@ -1,17 +1,20 @@
|
||||
src/buffer.C
|
||||
src/bufferlist.C
|
||||
src/BufferView.C
|
||||
src/bufferview_funcs.C
|
||||
src/BufferView_pimpl.C
|
||||
src/Chktex.C
|
||||
src/converter.C
|
||||
src/CutAndPaste.C
|
||||
src/LColor.C
|
||||
src/LaTeX.C
|
||||
src/LyXAction.C
|
||||
src/MenuBackend.C
|
||||
src/buffer.C
|
||||
src/bufferlist.C
|
||||
src/bufferview_funcs.C
|
||||
src/converter.C
|
||||
src/debug.C
|
||||
src/exporter.C
|
||||
src/ext_l10n.h
|
||||
src/frontends/controllers/biblio.C
|
||||
src/frontends/LyXView.C
|
||||
src/frontends/controllers/ButtonController.h
|
||||
src/frontends/controllers/character.C
|
||||
src/frontends/controllers/ControlAboutlyx.C
|
||||
src/frontends/controllers/ControlBibtex.C
|
||||
src/frontends/controllers/ControlCharacter.C
|
||||
@ -27,13 +30,13 @@ src/frontends/controllers/ControlSearch.C
|
||||
src/frontends/controllers/ControlSpellchecker.C
|
||||
src/frontends/controllers/ControlThesaurus.C
|
||||
src/frontends/controllers/ControlVCLog.C
|
||||
src/frontends/controllers/biblio.C
|
||||
src/frontends/controllers/character.C
|
||||
src/frontends/controllers/frnt_lang.C
|
||||
src/frontends/controllers/helper_funcs.C
|
||||
src/frontends/gnome/GLog.C
|
||||
src/frontends/LyXView.C
|
||||
src/frontends/qt2/Alert_pimpl.C
|
||||
src/frontends/qt2/FileDialog.C
|
||||
src/frontends/qt2/lengthcombo.C
|
||||
src/frontends/qt2/QAbout.C
|
||||
src/frontends/qt2/QBibitem.C
|
||||
src/frontends/qt2/QBibtex.C
|
||||
@ -45,8 +48,8 @@ src/frontends/qt2/QCommandBuffer.C
|
||||
src/frontends/qt2/QDelimiterDialog.C
|
||||
src/frontends/qt2/QDocument.C
|
||||
src/frontends/qt2/QDocumentDialog.C
|
||||
src/frontends/qt2/QError.C
|
||||
src/frontends/qt2/QERT.C
|
||||
src/frontends/qt2/QError.C
|
||||
src/frontends/qt2/QExternal.C
|
||||
src/frontends/qt2/QExternalDialog.C
|
||||
src/frontends/qt2/QFloat.C
|
||||
@ -54,8 +57,8 @@ src/frontends/qt2/QGraphics.C
|
||||
src/frontends/qt2/QGraphicsDialog.C
|
||||
src/frontends/qt2/QInclude.C
|
||||
src/frontends/qt2/QIndex.C
|
||||
src/frontends/qt2/QLog.C
|
||||
src/frontends/qt2/QLPrintDialog.C
|
||||
src/frontends/qt2/QLog.C
|
||||
src/frontends/qt2/QMathDialog.C
|
||||
src/frontends/qt2/QMathMatrixDialog.C
|
||||
src/frontends/qt2/QMinipage.C
|
||||
@ -78,9 +81,9 @@ src/frontends/qt2/QToc.C
|
||||
src/frontends/qt2/QURL.C
|
||||
src/frontends/qt2/QVCLog.C
|
||||
src/frontends/qt2/QWrap.C
|
||||
src/frontends/qt2/lengthcombo.C
|
||||
src/frontends/xforms/Alert_pimpl.C
|
||||
src/frontends/xforms/ColorHandler.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/FileDialog.C
|
||||
src/frontends/xforms/FormAboutlyx.C
|
||||
src/frontends/xforms/FormBase.C
|
||||
@ -89,8 +92,8 @@ src/frontends/xforms/FormBibtex.C
|
||||
src/frontends/xforms/FormCharacter.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/FormDocument.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/FormERT.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/FormExternal.C
|
||||
src/frontends/xforms/FormFiledialog.C
|
||||
src/frontends/xforms/FormFloat.C
|
||||
@ -123,14 +126,15 @@ src/frontends/xforms/FormToc.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
src/frontends/xforms/FormVCLog.C
|
||||
src/frontends/xforms/FormWrap.C
|
||||
src/frontends/xforms/input_validators.C
|
||||
src/frontends/xforms/Menubar_pimpl.C
|
||||
src/frontends/xforms/xforms_helpers.C
|
||||
src/frontends/xforms/XMiniBuffer.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/input_validators.C
|
||||
src/frontends/xforms/xforms_helpers.C
|
||||
src/gettext.h
|
||||
src/importer.C
|
||||
src/insets/insetbib.C
|
||||
src/insets/inset.C
|
||||
src/insets/insetbib.C
|
||||
src/insets/insetcaption.C
|
||||
src/insets/inseterror.C
|
||||
src/insets/insetert.C
|
||||
@ -157,15 +161,12 @@ src/insets/inseturl.C
|
||||
src/insets/insetwrap.C
|
||||
src/kbsequence.C
|
||||
src/language.C
|
||||
src/LaTeX.C
|
||||
src/LColor.C
|
||||
src/lengthcommon.C
|
||||
src/LyXAction.C
|
||||
src/lyx_cb.C
|
||||
src/lyx_main.C
|
||||
src/lyxfind.C
|
||||
src/lyxfont.C
|
||||
src/lyxfunc.C
|
||||
src/lyx_main.C
|
||||
src/lyxrc.C
|
||||
src/lyxtextclasslist.C
|
||||
src/lyxvc.C
|
||||
@ -174,11 +175,10 @@ src/mathed/formulamacro.C
|
||||
src/mathed/math_hullinset.C
|
||||
src/mathed/math_parboxinset.C
|
||||
src/mathed/ref_inset.C
|
||||
src/MenuBackend.C
|
||||
src/paragraph.C
|
||||
src/support/filetools.C
|
||||
src/tabular.C
|
||||
src/text.C
|
||||
src/text2.C
|
||||
src/text3.C
|
||||
src/text.C
|
||||
src/ext_l10n.h
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyxfunc.C (getStatus): query lyx_gui::getStatus() to catter for
|
||||
unimplemented lfuns. Make LFUN_THESAURUS_ENTRY status unknown if
|
||||
thesaurus is not compiled in
|
||||
|
||||
2002-12-17 Alfredo Braunstein <abraunst@libero.it>
|
||||
|
||||
* lyxfunc.C: correct inversion of WORDFINDBACK/FORWARD
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyx_gui.h: add new function lyx_gui::getStatus, which can be
|
||||
used by a frontend to indicate that some lfun is not implemented.
|
||||
|
||||
2002-12-12 John Levon <levon@movementarian.org>
|
||||
|
||||
* LyXKeySym.h: add isText()
|
||||
|
@ -14,12 +14,14 @@
|
||||
|
||||
#include "LColor.h"
|
||||
#include "LString.h"
|
||||
#include "FuncStatus.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class Dialogs;
|
||||
class LyXFont;
|
||||
class LyXComm;
|
||||
class FuncRequest;
|
||||
|
||||
/// GUI interaction
|
||||
namespace lyx_gui {
|
||||
@ -44,6 +46,13 @@ void start(string const & batch, std::vector<string> const & files);
|
||||
*/
|
||||
void exit();
|
||||
|
||||
|
||||
/**
|
||||
* return the status flag for a given action. This can be used to tell
|
||||
* that a given lfun is not implemented by a frontend
|
||||
*/
|
||||
FuncStatus getStatus(FuncRequest const & ev);
|
||||
|
||||
/** Eg, passing LColor::black returns "000000",
|
||||
* passing LColor::white returns "ffffff".
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "Alert_pimpl.h"
|
||||
|
||||
#include "BoostFormat.h"
|
||||
|
||||
#include "gettext.h"
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
@ -61,7 +61,7 @@ askForText_pimpl(string const & msg, string const & dflt)
|
||||
fmt % msg;
|
||||
string const title = fmt.str();
|
||||
#else
|
||||
string const title = qt_("LyX: ") + msg;
|
||||
string const title = _("LyX: ") + msg;
|
||||
#endif
|
||||
QAskForTextDialog d(0, toqstr(title), true);
|
||||
// less than ideal !
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* Alert_pimpl.C (askForText_pimpl): replace qt_() with _()
|
||||
|
||||
2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* QLPopupMenu.C (populate): ignore unknown lfuns; do not insert
|
||||
separator as first item of a menu
|
||||
|
||||
* lyx_gui.C (getStatus): indicate that LFUN_LAYOUT_PREAMBLE and
|
||||
LFUN_TOOLTIPS_TOGGLE are not implemented
|
||||
|
||||
2002-12-18 Edwin Leuven <e.leuven@uva.nl>
|
||||
|
||||
* BulletsModule.C: fix crash on custom bullet cancel
|
||||
|
@ -119,7 +119,8 @@ void QLPopupMenu::populate(Menu * menu)
|
||||
Menu::const_iterator end = menu->end();
|
||||
for (; m != end; ++m) {
|
||||
if (m->kind() == MenuItem::Separator) {
|
||||
insertSeparator();
|
||||
if (count() > 0)
|
||||
insertSeparator();
|
||||
} else if (m->kind() == MenuItem::Submenu) {
|
||||
pair<int, QLPopupMenu *> res = createMenu(this, &(*m), owner_);
|
||||
setItemEnabled(res.first, !disabled(m->submenu()));
|
||||
@ -127,7 +128,8 @@ void QLPopupMenu::populate(Menu * menu)
|
||||
} else {
|
||||
FuncStatus const status =
|
||||
owner_->view()->getLyXFunc().getStatus(m->action());
|
||||
if (status.disabled() && m->optional())
|
||||
if ((status.disabled() && m->optional())
|
||||
|| status.unknown())
|
||||
continue;
|
||||
insertItem(toqstr(getLabel(*m)), m->action());
|
||||
setItemEnabled(m->action(), !status.disabled());
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "lyx_main.h"
|
||||
#include "lyxrc.h"
|
||||
#include "lyxfont.h"
|
||||
#include "funcrequest.h"
|
||||
|
||||
// FIXME: move this stuff out again
|
||||
#include "bufferlist.h"
|
||||
@ -168,6 +169,21 @@ void lyx_gui::exit()
|
||||
}
|
||||
|
||||
|
||||
FuncStatus lyx_gui::getStatus(FuncRequest const & ev)
|
||||
{
|
||||
FuncStatus flag;
|
||||
switch (ev.action) {
|
||||
case LFUN_LAYOUT_PREAMBLE:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
flag.unknown(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
string const lyx_gui::hexname(LColor::color col)
|
||||
{
|
||||
QColor color(toqstr(lcolor.getX11Name(col)));
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* Menubar_pimpl.C (create_submenu): correctly ignore unknown lfuns
|
||||
|
||||
* lyx_gui.C (getStatus): implement as a dummy action
|
||||
|
||||
2002-12-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* XPainter.C: missed a #ifdef USE_XFORMS_IMAGE_LOADER.
|
||||
|
@ -230,12 +230,14 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
|
||||
vector<string> extra_labels(menu.size());
|
||||
vector<string>::iterator it = extra_labels.begin();
|
||||
vector<string>::iterator last = it;
|
||||
for (Menu::const_iterator i = menu.begin(); i != end; ++i, ++it)
|
||||
for (Menu::const_iterator i = menu.begin(); i != end; ++i, ++it) {
|
||||
FuncStatus flag = view->getLyXFunc().getStatus(i->action());
|
||||
if (i->kind() == MenuItem::Separator)
|
||||
*last = "%l";
|
||||
else if (!i->optional() ||
|
||||
!(view->getLyXFunc().getStatus(i->action()).disabled()))
|
||||
else if (!(i->optional() && flag.disabled())
|
||||
&& ! flag.unknown())
|
||||
last = it;
|
||||
}
|
||||
|
||||
it = extra_labels.begin();
|
||||
size_type count = 0;
|
||||
@ -263,11 +265,11 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
|
||||
case MenuItem::Command: {
|
||||
FuncStatus const flag =
|
||||
view->getLyXFunc().getStatus(item.action());
|
||||
// handle optional entries.
|
||||
if (item.optional()
|
||||
&& (flag.disabled())) {
|
||||
// handle optional or unknown entries.
|
||||
if (flag.unknown()
|
||||
|| (item.optional() && flag.disabled())) {
|
||||
lyxerr[Debug::GUI]
|
||||
<< "Skipping optional item "
|
||||
<< "Skipping item "
|
||||
<< item.label() << endl;
|
||||
break;
|
||||
}
|
||||
@ -296,7 +298,7 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
|
||||
pupmode += "%B";
|
||||
if (flag.onoff(false))
|
||||
pupmode += "%b";
|
||||
if (flag.disabled() || flag.unknown())
|
||||
if (flag.disabled())
|
||||
pupmode += "%i";
|
||||
else
|
||||
all_disabled = false;
|
||||
|
@ -317,6 +317,12 @@ void lyx_gui::exit()
|
||||
}
|
||||
|
||||
|
||||
FuncStatus lyx_gui::getStatus(FuncRequest const & /*ev*/)
|
||||
{
|
||||
// Nothing interesting to do here
|
||||
return FuncStatus();
|
||||
}
|
||||
|
||||
string const lyx_gui::hexname(LColor::color col)
|
||||
{
|
||||
string const name = lcolor.getX11Name(col);
|
||||
|
@ -271,9 +271,20 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
|
||||
return flag.disabled(true);
|
||||
}
|
||||
|
||||
if (ev.action == LFUN_UNKNOWN_ACTION) {
|
||||
switch (ev.action) {
|
||||
case LFUN_UNKNOWN_ACTION:
|
||||
#ifndef HAVE_LIBAIKSAURUS
|
||||
case LFUN_THESAURUS_ENTRY:
|
||||
#endif
|
||||
flag.unknown(true);
|
||||
break;
|
||||
default:
|
||||
flag |= lyx_gui::getStatus(ev);
|
||||
}
|
||||
|
||||
if (flag.unknown()) {
|
||||
setStatusMessage(N_("Unknown action"));
|
||||
return flag.unknown(true);
|
||||
return flag;
|
||||
}
|
||||
|
||||
// the default error message if we disable the command
|
||||
@ -331,11 +342,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
|
||||
}
|
||||
disable = !mathcursor && !view()->getLyXText()->selection.set();
|
||||
break;
|
||||
#ifndef HAVE_LIBAIKSAURUS
|
||||
case LFUN_THESAURUS_ENTRY:
|
||||
disable = true;
|
||||
break;
|
||||
#endif
|
||||
case LFUN_RUNCHKTEX:
|
||||
disable = lyxrc.chktex_command == "none";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user