mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
add status messages to math hull inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9312 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d23bb9eaa8
commit
9a45f8922c
@ -1,3 +1,7 @@
|
|||||||
|
2004-11-26 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* math_hullinset.C (getStatus): add status messages
|
||||||
|
|
||||||
2004-11-24 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2004-11-24 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* Most insets: rename priv_dispatch to doDispatch
|
* Most insets: rename priv_dispatch to doDispatch
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "CutAndPaste.h"
|
#include "CutAndPaste.h"
|
||||||
|
#include "FuncStatus.h"
|
||||||
#include "LColor.h"
|
#include "LColor.h"
|
||||||
#include "LaTeXFeatures.h"
|
#include "LaTeXFeatures.h"
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
@ -48,6 +49,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
using lyx::cap::grabAndEraseSelection;
|
using lyx::cap::grabAndEraseSelection;
|
||||||
|
using lyx::support::bformat;
|
||||||
using lyx::support::subst;
|
using lyx::support::subst;
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
@ -1102,19 +1104,35 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
|
|||||||
if (!rowChangeOK()
|
if (!rowChangeOK()
|
||||||
&& (s == "append-row"
|
&& (s == "append-row"
|
||||||
|| s == "delete-row"
|
|| s == "delete-row"
|
||||||
|| s == "copy-row"))
|
|| s == "copy-row")) {
|
||||||
return false;
|
flag.message(bformat(
|
||||||
|
N_("Can't change number of rows in '%1$s'"),
|
||||||
|
type_));
|
||||||
|
flag.enabled(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (nrows() <= 1
|
if (nrows() <= 1
|
||||||
&& (s == "delete-row" || s == "swap-row"))
|
&& (s == "delete-row" || s == "swap-row")) {
|
||||||
return false;
|
flag.message(N_("Only one row"));
|
||||||
|
flag.enabled(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!colChangeOK()
|
if (!colChangeOK()
|
||||||
&& (s == "append-column"
|
&& (s == "append-column"
|
||||||
|| s == "delete-column"
|
|| s == "delete-column"
|
||||||
|| s == "copy-column"))
|
|| s == "copy-column")) {
|
||||||
return false;
|
flag.message(bformat(
|
||||||
|
N_("Can't change number of columns in '%1$s'"),
|
||||||
|
type_));
|
||||||
|
flag.enabled(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (ncols() <= 1
|
if (ncols() <= 1
|
||||||
&& (s == "delete-column" || s == "swap-column"))
|
&& (s == "delete-column" || s == "swap-column")) {
|
||||||
return false;
|
flag.message(N_("Only one column"));
|
||||||
|
flag.enabled(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return MathGridInset::getStatus(cur, cmd, flag);
|
return MathGridInset::getStatus(cur, cmd, flag);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user