# include <kapp.h>
#endif
+#ifdef GTKGUI
+# include <gnome--/main.h>
+#endif
+
#include <fcntl.h>
#include "lyx_gui.h"
#include FORMS_H_LOCATION
+#include "support/filetools.h"
#include "combox.h"
#include "lyx.h"
#include "form1.h"
#include "print_form.h"
#include "tex-strings.h"
#include "lyx_main.h"
-#include "latexoptions.h"
+#include "log_form.h"
#include "debug.h"
#include "version.h"
#include "LyXView.h"
#include "language.h"
#include "ColorHandler.h"
-#ifdef TWO_COLOR_ICONS
-#include "banner_bw.xbm"
-#else
-#include "banner.xpm"
-#endif
-
using std::endl;
FD_form_title * fd_form_title;
FD_form_screen * fd_form_screen;
FD_form_toc * fd_form_toc;
FD_form_ref * fd_form_ref;
-FD_LaTeXOptions * fd_latex_options; // from latexoptions.h
-FD_LaTeXLog * fd_latex_log; // from latexoptions.h
+FD_LaTeXLog * fd_latex_log; // from log_form.h
Combox * combo_language;
Combox * combo_language2;
XSetErrorHandler(LyX_XErrHandler);
// A width less than 590 pops up an awkward main window
- if (width < 590) width = 590;
-
+ // The minimal values of width/height (590/400) are defined in
+ // src/lyx.C
+ if (width < 590) width = 590;
+ if (height < 400) height = 400;
+
// If width is not set by geometry, check it against monitor width
if ( !(geometryBitmask & 4) ) {
Screen * scr = DefaultScreenOfDisplay(fl_get_display());
//
// the title form
- if (lyxrc.show_banner) {
+ string banner_file = LibFileSearch("images", "banner", "xpm");
+ if (lyxrc.show_banner && !banner_file.empty()) {
fd_form_title = create_form_form_title();
fl_set_form_dblbuffer(fd_form_title->form_title, 1); // use dbl buffer
fl_set_form_atclose(fd_form_title->form_title, CancelCloseBoxCB, 0);
fl_addto_form(fd_form_title->form_title);
-#ifdef TWO_COLOR_ICONS
- FL_OBJECT *obj = fl_add_bitmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, "");
- fl_set_bitmapbutton_data(obj, banner_bw_width,
- banner_bw_height, banner_bw_bits);
- fl_set_object_color(obj, FL_WHITE, FL_BLACK);
-#else
FL_OBJECT *obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, "");
- fl_set_pixmapbutton_data(obj, const_cast<char **>(banner));
+ fl_set_pixmapbutton_file(obj, banner_file.c_str());
fl_set_pixmapbutton_focus_outline(obj, 3);
-#endif
fl_set_button_shortcut(obj, "^M ^[", 1);
fl_set_object_boxtype(obj, FL_NO_BOX);
fl_set_object_callback(obj, TimerCB, 0);
obj = fl_add_text(FL_NORMAL_TEXT, 248, 265, 170, 16, LYX_VERSION);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-#ifdef TWO_COLOR_ICONS
- fl_set_object_color(obj, FL_WHITE, FL_WHITE);
- fl_set_object_lcol(obj, FL_BLACK);
-#else
-// fl_set_object_color(obj, FL_WHITE, FL_WHITE);
-// fl_set_object_lcol(obj, FL_BLACK);
fl_mapcolor(FL_FREE_COL2, 0x05, 0x2e, 0x4c);
fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b);
fl_set_object_color(obj, FL_FREE_COL2, FL_FREE_COL2);
fl_set_object_lcol(obj, FL_FREE_COL3);
-#endif
fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_end_form();
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();
- fl_set_form_atclose(fd_latex_options->LaTeXOptions,
- CancelCloseBoxCB, 0);
-
// the latex log form
fd_latex_log = create_form_LaTeXLog();
fl_set_form_atclose(fd_latex_log->LaTeXLog,
#ifdef KDEGUI
kapp->processEvents();
#endif
+#ifdef GTKGUI
+ Gnome::Main::instance()->iteration(FALSE);
+#endif
+
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);