mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Angus: What code should handle the mailer.show() request?
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6426 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c663607f25
commit
b25a73386f
@ -7,12 +7,36 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#include "insets/mailinset.h"
|
||||
|
||||
using std::swap;
|
||||
using std::max;
|
||||
using std::min;
|
||||
using std::vector;
|
||||
|
||||
|
||||
class GridInsetMailer : public MailInset {
|
||||
public:
|
||||
GridInsetMailer(MathGridInset & inset) : inset_(inset) {}
|
||||
///
|
||||
virtual string const & name() const
|
||||
{
|
||||
static const string theName = "tabular";
|
||||
return theName;
|
||||
}
|
||||
///
|
||||
virtual string const inset2string() const
|
||||
{
|
||||
lyxerr << "inset2string called" << endl;
|
||||
return "whatever"; //(inset_);
|
||||
}
|
||||
|
||||
protected:
|
||||
InsetBase & inset() const { return inset_; }
|
||||
MathGridInset & inset_;
|
||||
};
|
||||
|
||||
|
||||
void mathed_parse_normal(MathGridInset &, string const & argument);
|
||||
|
||||
namespace {
|
||||
@ -972,6 +996,25 @@ dispatch_result MathGridInset::dispatch
|
||||
{
|
||||
switch (cmd.action) {
|
||||
|
||||
case LFUN_MOUSE_RELEASE: {
|
||||
if (cmd.button() == mouse_button::button3) {
|
||||
WriteStream ws(lyxerr);
|
||||
write(ws);
|
||||
GridInsetMailer mailer(*this);
|
||||
lyxerr << "mailer " << mailer.name() << " active\n";
|
||||
mailer.showDialog();
|
||||
return DISPATCHED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_INSET_DIALOG_UPDATE: {
|
||||
GridInsetMailer mailer(*this);
|
||||
mailer.updateDialog();
|
||||
break;
|
||||
}
|
||||
|
||||
// insert file functions
|
||||
case LFUN_DELETE_LINE_FORWARD:
|
||||
//autocorrect_ = false;
|
||||
//macroModeClose();
|
||||
|
Loading…
Reference in New Issue
Block a user