]> git.lyx.org Git - lyx.git/blobdiff - src/PaperLayout.C
citation patch from Angus
[lyx.git] / src / PaperLayout.C
index 3ac090b07c435f4cd5d236efe88b6acc0ce8a266..c9c807ef1b73f9f30a42d32cf1d88527eb4b6565 100644 (file)
 #include "lyx_gui_misc.h"
 #include "BufferView.h"
 #include "gettext.h"
+#include "LyXView.h"
 
 extern FD_form_paper * fd_form_paper;
-extern MiniBuffer * minibuffer;
 extern BufferView * current_view;
 
 
-inline void DeactivatePaperButtons ()
+inline
+void DeactivatePaperButtons ()
 {
        fl_deactivate_object (fd_form_paper->button_ok);
        fl_deactivate_object (fd_form_paper->button_apply);
@@ -29,7 +30,8 @@ inline void DeactivatePaperButtons ()
 }
 
 
-inline void ActivatePaperButtons ()
+inline
+void ActivatePaperButtons ()
 {
        fl_activate_object (fd_form_paper->button_ok);
        fl_activate_object (fd_form_paper->button_apply);
@@ -38,7 +40,8 @@ inline void ActivatePaperButtons ()
 }
 
 
-inline void DisablePaperLayout()
+inline
+void DisablePaperLayout()
 {
         DeactivatePaperButtons();
         fl_deactivate_object (fd_form_paper->choice_paperpackage);
@@ -60,7 +63,8 @@ inline void DisablePaperLayout()
 }
 
 
-inline void EnablePaperLayout()
+inline
+void EnablePaperLayout()
 {
         ActivatePaperButtons();
         fl_activate_object (fd_form_paper->choice_paperpackage);
@@ -82,7 +86,8 @@ inline void EnablePaperLayout()
 }
 
 
-static void checkMarginValues()
+static
+void checkMarginValues()
 {
        int allEmpty;
     
@@ -180,7 +185,7 @@ void MenuLayoutPaper()
 
 void PaperApplyCB(FL_OBJECT *, long)
 {
-       if (! current_view->available()) 
+       if (!current_view->available()) 
                return;
        
        BufferParams * params = &current_view->buffer()->params;
@@ -204,7 +209,7 @@ void PaperApplyCB(FL_OBJECT *, long)
        params->headsep = fl_get_input(fd->input_head_sep);
        params->footskip = fl_get_input(fd->input_foot_skip);
        current_view->buffer()->setPaperStuff();
-       minibuffer->Set(_("Paper layout set"));
+       current_view->owner()->getMiniBuffer()->Set(_("Paper layout set"));
        current_view->buffer()->markDirty();
        
        return;