Martin,

I have just spotted this in my store of patches. I think that you sent 
it to me around the time of a freeze and I must have subsequently 
forgoten about it.

Would you like to take it back under your own control?

-- 
Angus
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.258
diff -u -p -r1.258 ChangeLog
--- src/frontends/xforms/ChangeLog	2002/01/21 10:47:19	1.258
+++ src/frontends/xforms/ChangeLog	2002/01/24 18:22:49
@@ -1,3 +1,13 @@
+2002-01-24  Martin Vermeer <[EMAIL PROTECTED]>
+
+	* FormBaseDeprecated.[Ch]:
+	* FormBase.[Ch] (showUnderMouse): new method. Use to set the
+	positioning of the dialog under the mouse (true and the default) or
+	out of the way (false). Use before the actual call to the show method).
+
+	* FormMathsPanel.C:
+	* FormTabular.C: invoke showUnderMouse(false)
+
 2002-01-20  Herbert Voss  <[EMAIL PROTECTED]>
 
 	* FormInclude.[C]: better control of unexistings files
Index: src/frontends/xforms/FormBase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBase.C,v
retrieving revision 1.35
diff -u -p -r1.35 FormBase.C
--- src/frontends/xforms/FormBase.C	2001/09/24 10:49:55	1.35
+++ src/frontends/xforms/FormBase.C	2002/01/24 18:22:49
@@ -31,7 +31,7 @@ extern "C" {
 
 FormBase::FormBase(ControlButtons & c, string const & t, bool allowResize)
 	: ViewBC<xformsBC>(c), minw_(0), minh_(0), allow_resize_(allowResize),
-	  title_(t)
+	  title_(t), show_under_mouse_(true)
 {}
 
 
@@ -83,10 +83,16 @@ void FormBase::show()
 			fl_set_form_maxsize(form(), minw_, minh_);
 
 		fl_show_form(form(),
-			FL_PLACE_MOUSE | FL_FREE_SIZE,
+			(show_under_mouse_ ? FL_PLACE_MOUSE | FL_FREE_SIZE : FL_PLACE_FREE),
 			(controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
 			title_.c_str());
 	}
+}
+
+
+void FormBase::showUnderMouse(bool val)
+{
+	show_under_mouse_= val;
 }
 
 
Index: src/frontends/xforms/FormBase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBase.h,v
retrieving revision 1.29
diff -u -p -r1.29 FormBase.h
--- src/frontends/xforms/FormBase.h	2001/09/07 10:11:01	1.29
+++ src/frontends/xforms/FormBase.h	2002/01/24 18:22:49
@@ -47,6 +47,8 @@ protected:
 	void hide();
 	/// Create the dialog if necessary, update it and display it.
 	void show();
+	/// Move dialog window aside:
+	virtual void showUnderMouse(bool);
 
 private:
 	/// Pointer to the actual instantiation of xform's form
@@ -66,6 +68,8 @@ private:
 	bool allow_resize_;
 	/// dialog title, displayed by WM.
   	string title_;
+	/// Flag for moving aside dialog
+	bool show_under_mouse_;
 };
 
 
Index: src/frontends/xforms/FormBaseDeprecated.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBaseDeprecated.C,v
retrieving revision 1.13
diff -u -p -r1.13 FormBaseDeprecated.C
--- src/frontends/xforms/FormBaseDeprecated.C	2001/09/24 10:49:55	1.13
+++ src/frontends/xforms/FormBaseDeprecated.C	2002/01/24 18:22:49
@@ -63,7 +63,7 @@ extern "C" {
 
 FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
 				       string const & t, bool allowResize)
-	: lv_(lv), d_(d), h_(0), r_(0), title_(t),
+	: lv_(lv), d_(d), h_(0), r_(0), title_(t), show_under_mouse_(true),
 	  minw_(0), minh_(0), allow_resize_(allowResize)
 {
 	lyx::Assert(lv && d);
@@ -131,12 +131,16 @@ void FormBaseDeprecated::show()
 			fl_set_form_maxsize(form(), minw_, minh_);
 
 		fl_show_form(form(),
-			FL_PLACE_MOUSE | FL_FREE_SIZE,
+			(show_under_mouse_ ? FL_PLACE_MOUSE | FL_FREE_SIZE : FL_PLACE_FREE),
 			(lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
 			title_.c_str());
 	}
 }
 
+void FormBaseDeprecated::showUnderMouse(bool val)
+{
+	show_under_mouse_= val;
+}
 
 void FormBaseDeprecated::hide()
 {
Index: src/frontends/xforms/FormBaseDeprecated.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBaseDeprecated.h,v
retrieving revision 1.7
diff -u -p -r1.7 FormBaseDeprecated.h
--- src/frontends/xforms/FormBaseDeprecated.h	2001/09/07 17:55:37	1.7
+++ src/frontends/xforms/FormBaseDeprecated.h	2002/01/24 18:22:49
@@ -68,6 +68,8 @@ protected: // methods
 
 	/// Create the dialog if necessary, update it and display it.
 	virtual void show();
+	/// Move dialog window aside:
+	virtual void showUnderMouse(bool);
 	/// Hide the dialog.
 	virtual void hide();
 	/// Update the dialog.
@@ -115,6 +117,8 @@ protected: // methods
 	SigC::Connection r_;
 	/// dialog title, displayed by WM.
   	string title_;
+	/// Flag for moving aside dialog
+	bool show_under_mouse_;
 
 private:
 	/// The dialog's minimum allowable dimensions.
Index: src/frontends/xforms/FormMathsPanel.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormMathsPanel.C,v
retrieving revision 1.20
diff -u -p -r1.20 FormMathsPanel.C
--- src/frontends/xforms/FormMathsPanel.C	2002/01/18 12:18:20	1.20
+++ src/frontends/xforms/FormMathsPanel.C	2002/01/24 18:22:50
@@ -151,6 +151,7 @@ FormMathsPanel::FormMathsPanel(LyXView *
 	}
 	ams_ops_.reset(new FormMathsBitmap(lv, d, *this, latex));
 
+	showUnderMouse(false);
 	d->showMathPanel.connect(slot(this, &FormMathsPanel::show));
 }
 
Index: src/frontends/xforms/FormTabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormTabular.C,v
retrieving revision 1.34
diff -u -p -r1.34 FormTabular.C
--- src/frontends/xforms/FormTabular.C	2002/01/16 16:34:03	1.34
+++ src/frontends/xforms/FormTabular.C	2002/01/24 18:22:50
@@ -81,10 +81,9 @@ void FormTabular::showInset(InsetTabular
 		ih_ = inset->hideDialog.connect(slot(this, &FormTabular::hide));
 		inset_ = inset;
 	}
-
+	showUnderMouse(false);
 	show();
 }
-
 
 void FormTabular::updateInset(InsetTabular * inset)
 {
Index: src/mathed/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.199
diff -u -p -r1.199 ChangeLog
--- src/mathed/ChangeLog	2002/01/19 17:05:24	1.199
+++ src/mathed/ChangeLog	2002/01/24 18:22:55
@@ -1,3 +1,6 @@
+2002-01-23  Martin Vermeer <[EMAIL PROTECTED]>
+	* formulabase.C: math panel comes up after right mouse click on formula.
+
 2002-01-19  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* math_factory.C (createMathInset): add a default: label in switch
Index: src/mathed/formulabase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.121
diff -u -p -r1.121 formulabase.C
--- src/mathed/formulabase.C	2002/01/16 14:24:37	1.121
+++ src/mathed/formulabase.C	2002/01/24 18:22:56
@@ -46,6 +46,7 @@
 #include "math_pos.h"
 #include "math_spaceinset.h"
 #include "undo_funcs.h"
+#include "frontends/Dialogs.h"
 
 using std::endl;
 using std::ostream;
@@ -309,6 +310,10 @@ void InsetFormulaBase::insetButtonPress(
 			}	
 			break;
 */
+		case 3:
+			// launch math panel for right mouse button
+			bv->owner()->getDialogs()->showMathPanel();
+			break;
 	}
 	bv->updateInset(this, false);
 }

Reply via email to