]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui_misc.C
citation patch from Angus
[lyx.git] / src / lyx_gui_misc.C
index 5f38392c1947a3102fb31db9dd7b3929a0e7f218..449c9b64421f091a4fa33d4be968677414aec13b 100644 (file)
@@ -53,7 +53,6 @@ extern FD_form_preamble * fd_form_preamble;
 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;
@@ -101,30 +100,36 @@ void CloseAllBufferRelatedDialogs()
        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);
        }
@@ -136,11 +141,6 @@ void CloseAllBufferRelatedDialogs()
                        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);
@@ -183,27 +183,31 @@ void CloseAllBufferRelatedDialogs()
 // 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();
@@ -212,36 +216,16 @@ void updateAllVisibleBufferRelatedDialogs()
        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