#include "tex-strings.h"
#include "lyx_main.h"
#include "latexoptions.h"
-#include "error.h"
+#include "debug.h"
#include "version.h"
#include "LyXView.h"
#include "buffer.h"
};
-static int LyX_XErrHandler(Display *display, XErrorEvent *xeev)
+extern "C" int LyX_XErrHandler(Display *display, XErrorEvent *xeev)
{
//#warning Please see if you can trigger this!
// emergency save
- if (!bufferlist.isEmpty())
+ if (!bufferlist.empty())
bufferlist.emergencyWriteAll();
// Get the reason for the crash.
char etxt[513];
XGetErrorText(display, xeev->error_code, etxt, 512);
- lyxerr.print(etxt);
+ lyxerr << etxt << endl;
// By doing an abort we get a nice backtrace. (hopefully)
abort();
return 0; // Solaris CC wants us to return something
fl_get_app_resources(res, num_res);
Display *display = fl_get_display();
if (!display) {
- lyxerr.print("LyX: unable to access X display, exiting");
+ lyxerr << "LyX: unable to access X display, exiting" << endl;
exit(1);
}
fcntl(ConnectionNumber(display), F_SETFD, FD_CLOEXEC);
fl_set_font_name(FL_BOLD_STYLE, menufontname.c_str());
else
#endif
- lyxerr.print("Could not set menu font to " + menufontname);
+ lyxerr << "Could not set menu font to "
+ << menufontname << endl;
#if FL_REVISION > 85
if (fl_set_font_name(FL_NORMAL_STYLE, popupfontname.c_str()) < 0)
fl_set_font_name(FL_NORMAL_STYLE, popupfontname.c_str());
else
#endif
- lyxerr.print("Could not set popup font to " + popupfontname);
+ lyxerr << "Could not set popup font to "
+ << popupfontname << endl;
// put here (after fl_initialize) to avoid segfault. Cannot be done
// in setDefaults() (Matthias 140496)
void LyXGUI::create_forms()
{
- lyxerr.debug("Initializing LyXView...");
+ lyxerr.debug() << "Initializing LyXView..." << endl;
lyxViews = new LyXView(width, height);
- lyxerr.debug("Initializing LyXView...done");
+ lyxerr.debug() << "Initializing LyXView...done" << endl;
// From here down should be done by somebody else. (Lgb)
fl_addto_choice(fd_form_character->choice_color,
_(" No change %l| No color | Black | White | Red | Green "
"| Blue | Cyan | Magenta | Yellow %l| Reset "));
+ fl_set_form_minsize(fd_form_character->form_character,
+ fd_form_character->form_character->w,
+ fd_form_character->form_character->h);
// the document form
fd_form_document = create_form_form_document();
_(" Smallskip | Medskip | Bigskip | Length "));
fl_set_input_return(fd_form_document->input_default_skip,
FL_RETURN_ALWAYS);
+ fl_set_form_minsize(fd_form_document->form_document,
+ fd_form_document->form_document->w,
+ fd_form_document->form_document->h);
// the paper form
fd_form_paper = create_form_form_paper();
// the ref form
fd_form_ref = create_form_form_ref();
fl_set_form_atclose(fd_form_ref->form_ref, CancelCloseBoxCB, 0);
+ fl_set_form_minsize(fd_form_ref->form_ref, fd_form_ref->form_ref->w,
+ fd_form_ref->form_ref->h);
// the latex options form
fd_latex_options = create_form_LaTeXOptions();
while (!finished) {
if (fl_check_forms() == FL_EVENT) {
- lyxerr.print("LyX: This shouldn't happen...");
+ lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);
}
}