]> git.lyx.org Git - lyx.git/commitdiff
Whitespace and formatting changes only.
authorAngus Leeming <leeming@lyx.org>
Wed, 2 Apr 2003 09:49:19 +0000 (09:49 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 2 Apr 2003 09:49:19 +0000 (09:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6679 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormDocument.h
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPreferences.h
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/Toolbar_pimpl.h
src/frontends/xforms/xforms_helpers.C

index dc70eadb2fe95852a70509cf71e5e6e38edae8ee..c0715c8c2cc1d52e4768bd0317af8ef3eecdbf91 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-02  Angus Leeming  <leeming@lyx.org>
+
+       * FormDocument.[Ch]:
+       * FormPreferences.[Ch]:
+       * Toolbar_pimpl.[Ch]:
+       * xforms_helpers.C: whitespace and formatting changes.
+       
 2003-04-02  Angus Leeming  <leeming@lyx.org>
 
        * XFormsView.C (create_form_form_main): no longer pass this to the
index 83db26f279e9dc60edfc1c3bfabe4a90c8568140..fd9c18ff3b86d37843eb8020bd14daaec32d066f 100644 (file)
 #include "input_validators.h" // fl_unsigned_float_filter
 #include "xforms_helpers.h"
 
-//#include "buffer.h"
-//#include "BufferView.h"
 #include "CutAndPaste.h"
 #include "debug.h"
 #include "language.h"
-//#include "lyx_main.h" // for user_lyxdir
 #include "lyxrc.h"
 #include "lyxtextclasslist.h"
 #include "tex-strings.h"
@@ -293,8 +290,8 @@ void FormDocument::build()
 
        fl_set_input_return(options_->input_float_placement, FL_RETURN_CHANGED);
 
-       fl_addto_choice(options_->choice_ams_math, 
-               _("Never | Automatically | Yes "));
+       fl_addto_choice(options_->choice_ams_math,
+                       _("Never | Automatically | Yes "));
 
        for (int n = 0; tex_graphics[n][0]; ++n) {
                fl_addto_choice(options_->choice_postscript_driver,
@@ -440,7 +437,7 @@ ButtonPolicy::SMInput FormDocument::input(FL_OBJECT * ob, long)
                string const default_unit = metric ? "cm" : "in";
                if (getString(class_->input_doc_skip).empty())
                        fl_set_choice_text(class_->choice_doc_skip_units,
-                                               default_unit.c_str());
+                                          default_unit.c_str());
 
        } else if (ob == options_->check_use_natbib) {
                setEnabled(options_->choice_citation_format,
@@ -579,17 +576,17 @@ ButtonPolicy::SMInput FormDocument::input(FL_OBJECT * ob, long)
        }
 
        if (ob == paper_->choice_papersize || ob == paper_->radio_portrait
-                       || ob == paper_->radio_landscape) {
+           || ob == paper_->radio_landscape) {
                // either default papersize (preferences) or document
                // papersize has to be A4
                bool const enable = ( fl_get_choice(paper_->choice_papersize) == 1
-                                       && lyxrc.default_papersize == BufferParams::PAPER_A4PAPER )
-                               || fl_get_choice(paper_->choice_papersize) == 7;
+                                     && lyxrc.default_papersize == BufferParams::PAPER_A4PAPER )
+                       || fl_get_choice(paper_->choice_papersize) == 7;
                if (!enable)
                        fl_set_choice(paper_->choice_paperpackage,
-                               BufferParams::PACKAGE_NONE + 1);
+                                     BufferParams::PACKAGE_NONE + 1);
                setEnabled(paper_->choice_paperpackage,
-                       enable && fl_get_button(paper_->radio_portrait));
+                          enable && fl_get_button(paper_->radio_portrait));
        }
 
        return ButtonPolicy::SMI_VALID;
@@ -844,13 +841,13 @@ void FormDocument::UpdateClassParams(BufferParams const & params)
        fl_addto_choice(class_->choice_doc_fontsize,
                        tclass.opt_fontsize().c_str());
        fl_set_choice_text(class_->choice_doc_fontsize,
-                       params.fontsize.c_str());
+                          params.fontsize.c_str());
        fl_clear_choice(class_->choice_doc_pagestyle);
        fl_addto_choice(class_->choice_doc_pagestyle, "default");
        fl_addto_choice(class_->choice_doc_pagestyle,
                        tclass.opt_pagestyle().c_str());
        fl_set_choice_text(class_->choice_doc_pagestyle,
-                       params.pagestyle.c_str());
+                          params.pagestyle.c_str());
 
 }
 
index 3aced2130ff225ff53d6dc572f38d80606a380a8..ad3a5a34065f6a7af3a303a22dd624522410d6ea 100644 (file)
@@ -32,7 +32,7 @@ struct FD_document_options;
 struct FD_document_bullet;
 
 /** This class provides an XForms implementation of the FormDocument dialog.
   The table-layout-form here changes values for latex-tabulars
*  The table-layout-form here changes values for latex-tabulars
  */
 class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
 public:
index 493ecace5eb84a9ae265dd364d1fd9202134cc8b..7b2634586e00068d4d8c471ae89442d35fb1e8f0 100644 (file)
@@ -535,11 +535,11 @@ FormPreferences::Colors::feedback(FL_OBJECT const * const ob) const
                return _("Modify the LyX object's color. Note: you must then \"Apply\" the change.");
 
        if (ob == dialog_->dial_hue ||
-                 ob == dialog_->slider_saturation ||
-                 ob == dialog_->slider_value ||
-                 ob == dialog_->slider_red ||
-                 ob == dialog_->slider_green ||
-                 ob == dialog_->slider_blue)
+           ob == dialog_->slider_saturation ||
+           ob == dialog_->slider_value ||
+           ob == dialog_->slider_red ||
+           ob == dialog_->slider_green ||
+           ob == dialog_->slider_blue)
                return  _("Find a new color.");
 
        if (ob == dialog_->radio_rgb || ob == dialog_->radio_hsv)
@@ -995,9 +995,9 @@ bool FormPreferences::Converters::input(FL_OBJECT const * const ob)
                return Browser();
 
        if (ob == dialog_->choice_from
-                  || ob == dialog_->choice_to
-                  || ob == dialog_->input_converter
-                  || ob == dialog_->input_flags)
+           || ob == dialog_->choice_to
+           || ob == dialog_->input_converter
+           || ob == dialog_->input_flags)
                return Input();
 
        if (ob == dialog_->button_add)
@@ -1137,7 +1137,7 @@ bool FormPreferences::Converters::Input()
 string const FormPreferences::Converters::GetFrom() const
 {
        ::Formats::FormatList::size_type const i =
-               fl_get_choice(dialog_->choice_from);
+                 fl_get_choice(dialog_->choice_from);
 
        if (i > 0 && i <= local_formats.size())
                return local_formats.get(i - 1).name();
@@ -1150,7 +1150,7 @@ string const FormPreferences::Converters::GetFrom() const
 string const FormPreferences::Converters::GetTo() const
 {
        ::Formats::FormatList::size_type const i =
-               fl_get_choice(dialog_->choice_to);
+                 fl_get_choice(dialog_->choice_to);
 
        if (i > 0 && i <= local_formats.size())
                return local_formats.get(i - 1).name();
@@ -1267,10 +1267,10 @@ bool FormPreferences::Formats::input(FL_OBJECT const * const ob)
                return Browser();
 
        if (ob == dialog_->input_format
-        || ob == dialog_->input_gui_name
-        || ob == dialog_->input_shrtcut
-        || ob == dialog_->input_extension
-        || ob == dialog_->input_viewer)
+           || ob == dialog_->input_gui_name
+           || ob == dialog_->input_shrtcut
+           || ob == dialog_->input_extension
+           || ob == dialog_->input_viewer)
                return Input();
 
        if (ob == dialog_->button_add)
@@ -1847,11 +1847,21 @@ void FormPreferences::LnFmisc::apply(LyXRC & rc) const
        // See FIXME below
        // grfx::DisplayType old_value = rc.display_graphics;
        switch (fl_get_choice(dialog_->choice_display)) {
-               case 4: rc.display_graphics = grfx::NoDisplay; break;
-               case 3: rc.display_graphics = grfx::ColorDisplay; break;
-               case 2: rc.display_graphics = grfx::GrayscaleDisplay; break;
-               case 1: rc.display_graphics = grfx::MonochromeDisplay; break;
-               default: rc.display_graphics = grfx::ColorDisplay; break;
+       case 4:
+               rc.display_graphics = grfx::NoDisplay;
+               break;
+       case 3:
+               rc.display_graphics = grfx::ColorDisplay;
+               break;
+       case 2:
+               rc.display_graphics = grfx::GrayscaleDisplay;
+               break;
+       case 1:
+               rc.display_graphics = grfx::MonochromeDisplay;
+               break;
+       default:
+               rc.display_graphics = grfx::ColorDisplay;
+               break;
        }
 
 #ifdef WITH_WARNINGS
@@ -1923,11 +1933,21 @@ void FormPreferences::LnFmisc::update(LyXRC const & rc)
        fl_set_counter_value(dialog_->counter_wm_jump, rc.wheel_jump);
 
        switch (rc.display_graphics) {
-               case grfx::NoDisplay:           fl_set_choice(dialog_->choice_display, 4); break;
-               case grfx::ColorDisplay:        fl_set_choice(dialog_->choice_display, 3); break;
-               case grfx::GrayscaleDisplay:    fl_set_choice(dialog_->choice_display, 2); break;
-               case grfx::MonochromeDisplay:   fl_set_choice(dialog_->choice_display, 1); break;
-               default:                        fl_set_choice(dialog_->choice_display, 3); break;
+       case grfx::NoDisplay:
+               fl_set_choice(dialog_->choice_display, 4);
+               break;
+       case grfx::ColorDisplay:
+               fl_set_choice(dialog_->choice_display, 3);
+               break;
+       case grfx::GrayscaleDisplay:
+               fl_set_choice(dialog_->choice_display, 2);
+               break;
+       case grfx::MonochromeDisplay:
+               fl_set_choice(dialog_->choice_display, 1);
+               break;
+       default:
+               fl_set_choice(dialog_->choice_display, 3);
+               break;
        }
 }
 
@@ -2665,16 +2685,16 @@ FormPreferences::ScreenFonts::feedback(FL_OBJECT const * const ob) const
        if (ob == dialog_->counter_dpi)
                return LyXRC::getDescription(LyXRC::RC_SCREEN_DPI);
        if (ob == dialog_->input_tiny
-                || ob == dialog_->input_script
-                || ob == dialog_->input_footnote
-                || ob == dialog_->input_small
-                || ob == dialog_->input_large
-                || ob == dialog_->input_larger
-                || ob == dialog_->input_larger
-                || ob == dialog_->input_largest
-                || ob == dialog_->input_normal
-                || ob == dialog_->input_huge
-                || ob == dialog_->input_huger)
+           || ob == dialog_->input_script
+           || ob == dialog_->input_footnote
+           || ob == dialog_->input_small
+           || ob == dialog_->input_large
+           || ob == dialog_->input_larger
+           || ob == dialog_->input_larger
+           || ob == dialog_->input_largest
+           || ob == dialog_->input_normal
+           || ob == dialog_->input_huge
+           || ob == dialog_->input_huger)
                return LyXRC::getDescription(LyXRC::RC_SCREEN_FONT_SIZES);
        return string();
 }
index bc6b5f8270e9f9667fd8e26779410c796d43c6b9..bcf55de2526874edefdd3dd7538ce0752b538005 100644 (file)
@@ -48,7 +48,7 @@ struct FD_preferences_spelloptions;
 
 
 /** This class provides an XForms implementation of the FormPreferences Dialog.
   The preferences dialog allows users to set/save their preferences.
*  The preferences dialog allows users to set/save their preferences.
  */
 class FormPreferences : public FormCB<ControlPrefs, FormDB<FD_preferences> > {
 public:
index c51b9b17f250e7d853e7b4ac75403a1253432507..9e8a2cf6d20b62f6741002952093c8eb698c0abe 100644 (file)
@@ -234,11 +234,10 @@ void ToolbarCB(FL_OBJECT * ob, long ac)
 
 extern "C" {
 
-       static
-       void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
-       {
-               ToolbarCB(ob, data);
-       }
+void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
+{
+       ToolbarCB(ob, data);
+}
 
 }
 
index c26ceb63797131aadd108416babee94aeb8a2e3c..982646c603e27338fe2d516518238be87b5ff1c3 100644 (file)
@@ -24,7 +24,7 @@ class Tooltips;
 class Combox;
 
 /** The LyX xforms toolbar class
 */
+ */
 struct Toolbar::Pimpl {
 public:
        /// called when user selects a layout from combox
index 67055a5c1a5425e78446ff0ce11ee70d4a986a95..aceff7a8da213ff4a51df87a80f14048cb0a2228 100644 (file)
@@ -47,7 +47,7 @@ std::pair<string, string> parse_shortcut(string const & str)
 
        string::value_type c = str[i + 1];
        return make_pair(str.substr(0, i) + str.substr(i + 1),
-               string("#") + c);
+                        string("#") + c);
 }
 
 
@@ -172,7 +172,7 @@ void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
                fl_set_choice_text(choice, default_unit.c_str());
        } else {
                updateWidgetsFromLength(input, choice,
-                               LyXLength(str), default_unit);
+                                       LyXLength(str), default_unit);
        }
 }