]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphExtra.C
citation patch from Angus
[lyx.git] / src / ParagraphExtra.C
index 57a6e9ba579223ead71bda425f69af4d4894cdfb..b2d2a97d6acb506d270f13360c041ab41120c64a 100644 (file)
@@ -18,7 +18,8 @@ extern FD_form_paragraph_extra * fd_form_paragraph_extra;
 extern BufferView * current_view;
 static bool CheckInputWidth();
 
-inline void DeactivateParagraphExtraButtons ()
+inline
+void DeactivateParagraphExtraButtons ()
 {
        fl_deactivate_object(fd_form_paragraph_extra->button_ok);
        fl_deactivate_object(fd_form_paragraph_extra->button_apply);
@@ -26,7 +27,8 @@ inline void DeactivateParagraphExtraButtons ()
        fl_set_object_lcol(fd_form_paragraph_extra->button_apply, FL_INACTIVE);
 }
 
-inline void ActivateParagraphExtraButtons ()
+inline
+void ActivateParagraphExtraButtons ()
 {
        fl_activate_object(fd_form_paragraph_extra->button_ok);
        fl_activate_object(fd_form_paragraph_extra->button_apply);
@@ -34,7 +36,8 @@ inline void ActivateParagraphExtraButtons ()
        fl_set_object_lcol(fd_form_paragraph_extra->button_apply, FL_BLACK);
 }
 
-inline void DisableParagraphExtra ()
+inline
+void DisableParagraphExtra ()
 {
         DeactivateParagraphExtraButtons();
        fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
@@ -52,7 +55,8 @@ inline void DisableParagraphExtra ()
        fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_startmp);
 }      
 
-inline void EnableParagraphExtra ()
+inline
+void EnableParagraphExtra ()
 {
         ActivateParagraphExtraButtons();
        fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
@@ -76,7 +80,7 @@ bool UpdateParagraphExtra()
        bool update = false;
        if (current_view->available()) {
                update = true;
-               LyXParagraph * par = current_view->text->cursor.par;
+               LyXParagraph * par = current_view->text->cursor.par();
 
                EnableParagraphExtra();
 
@@ -195,9 +199,9 @@ void ParagraphExtraApplyCB(FL_OBJECT *, long)
                } else if (fl_get_button(fd_form_paragraph_extra->radio_pextra_floatflt)) {
                        type = LyXParagraph::PEXTRA_FLOATFLT;
                }
-               text->SetParagraphExtraOpt(type, width, widthp, alignment, hfill,
+               text->SetParagraphExtraOpt(current_view, type, width, widthp, alignment, hfill,
                                           start_minipage);
-               current_view->update(1);
+               current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
                current_view->owner()->getMiniBuffer()->
                        Set(_("ParagraphExtra layout set"));
        }
@@ -278,7 +282,8 @@ void CheckPExtraOptCB(FL_OBJECT * ob, long)
 }
 
 
-static bool CheckInputWidth()
+static
+bool CheckInputWidth()
 {
        string s1 = fl_get_input(fd_form_paragraph_extra->input_pextra_width);
        string s2 = fl_get_input(fd_form_paragraph_extra->input_pextra_widthp);