#include "minibuffer.h"
#include "print_form.h"
#include "sp_form.h"
-#include "insets/insetindex.h"
#include "LyXView.h"
#include "bufferview_funcs.h"
#include "support/filetools.h"
extern FD_form_table * fd_form_table;
extern FD_form_sendto * fd_form_sendto;
extern FD_form_figure * fd_form_figure;
-extern FD_form_ref * fd_form_ref;
extern FD_form_paragraph_extra * fd_form_paragraph_extra;
extern FD_LaTeXLog * fd_latex_log;
extern FD_form_spell_check * fd_form_spell_check;
extern FD_matrix * fd_matrix;
extern FD_bibitem_form * bibitem_form;
extern FD_include * form;
-extern FD_index_form * index_form;
extern void HideFiguresPopups();
if (fd_form_character->form_character->visible) {
fl_hide_form(fd_form_character->form_character);
}
+#ifdef USE_OLD_DOCUMENT_LAYOUT
if (fd_form_document->form_document->visible) {
fl_hide_form(fd_form_document->form_document);
}
if (fd_form_quotes->form_quotes->visible) {
fl_hide_form(fd_form_quotes->form_quotes);
}
+ if (fd_form_paper->form_paper->visible) {
+ fl_hide_form(fd_form_paper->form_paper);
+ }
+ if (fd_form_bullet) {
+ if (fd_form_bullet->form_bullet->visible) {
+ fl_hide_form(fd_form_bullet->form_bullet);
+ }
+ }
+#endif
if (fd_form_preamble->form_preamble->visible) {
fl_hide_form(fd_form_preamble->form_preamble);
}
- if (fd_form_table->form_table->visible) {
- fl_hide_form(fd_form_table->form_table);
- }
if (fd_form_figure->form_figure->visible) {
fl_hide_form(fd_form_figure->form_figure);
}
- if (fd_form_ref->form_ref->visible) {
- fl_hide_form(fd_form_ref->form_ref);
- }
- if (fd_form_paper->form_paper->visible) {
- fl_hide_form(fd_form_paper->form_paper);
+#ifndef NEW_TABULAR
+ if (fd_form_table->form_table->visible) {
+ fl_hide_form(fd_form_table->form_table);
}
if (fd_form_table_options->form_table_options->visible) {
fl_hide_form(fd_form_table_options->form_table_options);
}
+#endif
if (fd_form_sendto->form_sendto->visible) {
fl_hide_form(fd_form_sendto->form_sendto);
}
fl_trigger_object(fd_form_spell_check->done);
}
}
- if (fd_form_bullet) {
- if (fd_form_bullet->form_bullet->visible) {
- fl_hide_form(fd_form_bullet->form_bullet);
- }
- }
if (fd_panel) {
if (fd_panel->panel->visible) {
fl_hide_form(fd_panel->panel);
fl_hide_form(form->include);
}
}
- if (index_form) {
- if (index_form->index_form->visible) {
- fl_hide_form(index_form->index_form);
- }
- }
HideFiguresPopups();
}
// Again the Signal/Slot mechanism is tailor made for this task.
void updateAllVisibleBufferRelatedDialogs()
{
+#ifdef USE_OLD_DOCUMENT_LAYOUT
if (fd_form_document->form_document->visible) {
UpdateLayoutDocument();
}
- if (fd_form_preamble->form_preamble->visible) {
- UpdateLayoutPreamble();
- }
if (fd_form_quotes->form_quotes->visible) {
UpdateLayoutQuotes();
}
+ if (fd_form_paper->form_paper->visible) {
+ UpdateLayoutPaper();
+ }
+#endif
+ if (fd_form_preamble->form_preamble->visible) {
+ UpdateLayoutPreamble();
+ }
if (fd_form_paragraph->form_paragraph->visible) {
UpdateLayoutParagraph();
}
if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
UpdateParagraphExtra();
}
- if (fd_form_paper->form_paper->visible) {
- UpdateLayoutPaper();
- }
+#ifndef NEW_TABULAR
if (fd_form_table_options->form_table_options->visible) {
UpdateLayoutTable(1); // just like a right mouse click
}
+#endif
if (fd_form_bullet) {
if (fd_form_bullet->form_bullet->visible) {
updateBulletForm();
if (fd_latex_log->LaTeXLog->visible) {
LatexLogUpdate(0,0);
}
-#ifdef ALWAYS_UPDATE_REF
- // Ideally, the RefUpdateCB should be modified so that if the
- // current document is a subdocument the reference list should come
- // from master document (or even be a merger of references from all
- // its sibling documents). For now this has effectively been
- // commented out to ensure that users of multipart documents can
- // access the reference list of a different document. This is
- // of course a compromise and an annoyance for users switching
- // between separate documents. ARRae 241198
- if (fd_form_ref->form_ref->visible) {
- RefUpdateCB(0, 0);
- }
-#endif
if (current_view->buffer()->isReadonly()) {
// a little crude perhaps but it works. ARRae
if (fd_form_character->form_character->visible) {
fl_hide_form(fd_form_character->form_character);
}
+#ifndef NEW_TABULAR
if (fd_form_table->form_table->visible) {
fl_hide_form(fd_form_table->form_table);
}
-
-#ifndef ALWAYS_UPDATE_REF
- // We must update the popup in order to make the
- // insert ref buttons insactive
- if (fd_form_ref->form_ref->visible) {
- RefUpdateCB(0, 0);
- }
#endif
-
#ifndef ALWAYS_CLOSE_MATH_PANELS
// The math popups should be closed only if we switch
// to a readonly buffer
fl_hide_form(form->include);
}
}
- if (index_form) {
- if (index_form->index_form->visible) {
- fl_hide_form(index_form->index_form);
- }
- }
HideFiguresPopups();
}
// Asks for a text
-pair<bool, string> askForText(string const & msg, string const & dflt)
+pair<bool, string> const
+askForText(string const & msg, string const & dflt)
{
fl_set_resource("flInput.cancel.label", idex(_("Cancel|^[")));
fl_set_resource("flInput.ok.label", idex(_("OK|#O")));