]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBaseDeprecated.C
Prevent crashes experienced by speakers of "long" languages like Norwegian
[lyx.git] / src / frontends / xforms / FormBaseDeprecated.C
index 0ab52cee51c4edf2edabf675c2de32d14e0d86c3..41c808f0c425c54fb96a84464d599ccd7cc71c55 100644 (file)
@@ -15,6 +15,7 @@
 #include "Dialogs.h"
 #include "FormBaseDeprecated.h"
 #include "xformsBC.h"
+#include "xforms_resize.h"
 #include "GUIRunTime.h"
 #include "Tooltips.h"
 #include "LyXView.h"
@@ -83,8 +84,12 @@ void FormBaseDeprecated::show()
        if (!form()) {
                build();
 
+               double const scale = scale_to_fit_tabs(form());
+               if (scale > 1.001)
+                       scale_form(form(), scale);
+
                bc().refresh();
+
                // work around dumb xforms sizing bug
                minw_ = form()->w;
                minh_ = form()->h;
@@ -98,15 +103,15 @@ void FormBaseDeprecated::show()
 
        if (form()->visible) {
                fl_raise_form(form());
-               /* This XMapWindow() will hopefully ensure that
-                * iconified dialogs are de-iconified. Mad props
-                * out to those crazy Xlib guys for forgetting a
-                * XDeiconifyWindow(). At least WindowMaker, when
-                * being notified of the redirected MapRequest will
-                * specifically de-iconify. From source, fvwm2 seems
-                * to do the same.
-                */
-               XMapWindow(fl_get_display(), form()->window);
+               /* This XMapWindow() will hopefully ensure that
+                * iconified dialogs are de-iconified. Mad props
+                * out to those crazy Xlib guys for forgetting a
+                * XDeiconifyWindow(). At least WindowMaker, when
+                * being notified of the redirected MapRequest will
+                * specifically de-iconify. From source, fvwm2 seems
+                * to do the same.
+                */
+               XMapWindow(fl_get_display(), form()->window);
        } else {
                connect();
 
@@ -117,10 +122,12 @@ void FormBaseDeprecated::show()
                        fl_set_form_maxsize(form(), minw_, minh_);
 
                fl_show_form(form(),
-                       FL_PLACE_MOUSE | FL_FREE_SIZE,
-                       (lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
-                       title_.c_str());
+                            FL_PLACE_MOUSE | FL_FREE_SIZE,
+                            (lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
+                            title_.c_str());
        }
+
+       tooltips().set();
 }
 
 
@@ -219,9 +226,9 @@ FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
 void FormBaseBD::connect()
 {
        u_ = d_->updateBufferDependent.
-                connect(slot(this, &FormBaseBD::updateSlot));
+               connect(slot(this, &FormBaseBD::updateSlot));
        h_ = d_->hideBufferDependent.
-                connect(slot(this, &FormBaseBD::hide));
+               connect(slot(this, &FormBaseBD::hide));
        FormBaseDeprecated::connect();
 }