Whitespace and formatting changes only.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6679 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-04-02 09:49:19 +00:00
parent c93bea2449
commit 67a1cfd4cc
8 changed files with 80 additions and 57 deletions

View 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

View File

@ -24,12 +24,9 @@
#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());
}

View 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:

View 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();
}

View 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:

View 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);
}
}

View 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

View 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);
}
}