mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
whitespace changes only (believe it or not!)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3801 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
48ba1f8323
commit
0fde5a4c78
@ -57,7 +57,7 @@ pair<bool, string> const askForText_pimpl(string const & msg, string const & dfl
|
||||
fl_set_resource("flInput.clear.label", idex(_("Clear|#e")));
|
||||
char const * tmp = fl_show_input(msg.c_str(), dflt.c_str());
|
||||
if (tmp != 0)
|
||||
return make_pair<bool, string>(true, string(tmp));
|
||||
return make_pair<bool, string>(true, string(tmp));
|
||||
else
|
||||
return make_pair<bool, string>(false, string());
|
||||
return make_pair<bool, string>(false, string());
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-03-20 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* lots: whitespace changes.
|
||||
|
||||
2002-03-20 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormParagraph.C: a little more factorisation.
|
||||
|
@ -89,9 +89,9 @@ void DropDown::line_up()
|
||||
if (fl_get_browser(browser_) > 1)
|
||||
fl_select_browser_line(browser_, fl_get_browser(browser_) - 1);
|
||||
if (fl_get_browser(browser_) >= fl_get_browser_topline(browser_) +
|
||||
fl_get_browser_screenlines(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_)
|
||||
- fl_get_browser_screenlines(browser_) + 1);
|
||||
fl_get_browser_screenlines(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_)
|
||||
- fl_get_browser_screenlines(browser_) + 1);
|
||||
if (fl_get_browser(browser_) < fl_get_browser_topline(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_));
|
||||
}
|
||||
@ -102,9 +102,9 @@ void DropDown::line_down()
|
||||
if (fl_get_browser(browser_) < fl_get_browser_maxline(browser_))
|
||||
fl_select_browser_line(browser_, fl_get_browser(browser_) + 1);
|
||||
if (fl_get_browser(browser_) >= fl_get_browser_topline(browser_) +
|
||||
fl_get_browser_screenlines(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_)
|
||||
- fl_get_browser_screenlines(browser_) + 1);
|
||||
fl_get_browser_screenlines(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_)
|
||||
- fl_get_browser_screenlines(browser_) + 1);
|
||||
if (fl_get_browser(browser_) < fl_get_browser_topline(browser_))
|
||||
fl_set_browser_topline(browser_, fl_get_browser(browser_));
|
||||
}
|
||||
@ -119,7 +119,7 @@ int DropDown::peek(XEvent * xev)
|
||||
|
||||
if (xev->type == ButtonPress) {
|
||||
if (!(x >= form_->x && x <= (form_->x + form_->w) &&
|
||||
y >= form_->y && y << (form_->y + form_->h))) {
|
||||
y >= form_->y && y << (form_->y + form_->h))) {
|
||||
fl_hide_form(form_);
|
||||
return 1;
|
||||
}
|
||||
@ -129,37 +129,37 @@ int DropDown::peek(XEvent * xev)
|
||||
KeySym keysym_return;
|
||||
XLookupString(&xev->xkey, s_r, 10, &keysym_return, 0);
|
||||
switch (keysym_return) {
|
||||
case XK_Down:
|
||||
line_down();
|
||||
return 1;
|
||||
case XK_Up:
|
||||
line_up();
|
||||
return 1;
|
||||
case XK_Return:
|
||||
completed();
|
||||
return 1;
|
||||
case XK_Escape:
|
||||
fl_deselect_browser(browser_);
|
||||
completed();
|
||||
return 1;
|
||||
default:
|
||||
// FIXME: if someone has a got a way to
|
||||
// convince the event to fall back to the
|
||||
// minibuffer, I'm glad to hear it.
|
||||
// fl_XPutBackEvent() doesn't work.
|
||||
case XK_Down:
|
||||
line_down();
|
||||
return 1;
|
||||
case XK_Up:
|
||||
line_up();
|
||||
return 1;
|
||||
case XK_Return:
|
||||
completed();
|
||||
return 1;
|
||||
case XK_Escape:
|
||||
fl_deselect_browser(browser_);
|
||||
completed();
|
||||
return 1;
|
||||
default:
|
||||
// FIXME: if someone has a got a way to
|
||||
// convince the event to fall back to the
|
||||
// minibuffer, I'm glad to hear it.
|
||||
// fl_XPutBackEvent() doesn't work.
|
||||
|
||||
// This is a bit less elegant perhaps, but works
|
||||
// well enough. Angus 11 Jan 2002
|
||||
if (s_r[0] && isprint(s_r[0])) {
|
||||
key_pressed(s_r[0]);
|
||||
return 1;
|
||||
}
|
||||
// This is a bit less elegant perhaps, but works
|
||||
// well enough. Angus 11 Jan 2002
|
||||
if (s_r[0] && isprint(s_r[0])) {
|
||||
key_pressed(s_r[0]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DropDown::completed()
|
||||
{
|
||||
XUngrabPointer(fl_get_display(), CurrentTime);
|
||||
|
@ -59,17 +59,12 @@ void FormAboutlyx::build()
|
||||
|
||||
// stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
|
||||
version_->form);
|
||||
version_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
|
||||
license_->form);
|
||||
license_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
|
||||
credits_->form);
|
||||
credits_->form);
|
||||
|
||||
// Manage the cancel/close button
|
||||
bc().setCancel(dialog_->button_close);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -60,4 +60,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // FORMABOUTLYX_H
|
||||
|
||||
|
@ -97,9 +97,9 @@ void FormBase::show()
|
||||
fl_set_form_maxsize(form(), minw_, minh_);
|
||||
|
||||
fl_show_form(form(),
|
||||
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
||||
(controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
|
||||
title_.c_str());
|
||||
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
||||
(controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
|
||||
title_.c_str());
|
||||
}
|
||||
|
||||
tooltips().set();
|
||||
|
@ -39,7 +39,8 @@ public:
|
||||
virtual ~FormBase();
|
||||
|
||||
/** input callback function. invoked only by the xforms callback
|
||||
interface */
|
||||
* interface
|
||||
*/
|
||||
void InputCB(FL_OBJECT *, long);
|
||||
|
||||
Tooltips & tooltips();
|
||||
@ -53,11 +54,11 @@ protected:
|
||||
void show();
|
||||
|
||||
/** Prepare the way to:
|
||||
1. display feedback as the mouse moves over ob. This feedback will
|
||||
typically be rather more verbose than just a tooltip.
|
||||
2. activate the button controller after a paste with the middle
|
||||
mouse button.
|
||||
*/
|
||||
* 1. display feedback as the mouse moves over ob. This feedback will
|
||||
* typically be rather more verbose than just a tooltip.
|
||||
* 2. activate the button controller after a paste with the middle
|
||||
* mouse button.
|
||||
*/
|
||||
static void setPrehandler(FL_OBJECT * ob);
|
||||
|
||||
private:
|
||||
@ -67,7 +68,8 @@ private:
|
||||
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
||||
|
||||
/** Redraw the form (on receipt of a Signal indicating, for example,
|
||||
that the xform colors have been re-mapped). */
|
||||
* that the xform colors have been re-mapped).
|
||||
*/
|
||||
virtual void redraw();
|
||||
|
||||
/// The dialog's minimum allowable dimensions.
|
||||
|
@ -117,9 +117,9 @@ void FormBaseDeprecated::show()
|
||||
fl_set_form_maxsize(form(), minw_, minh_);
|
||||
|
||||
fl_show_form(form(),
|
||||
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
||||
(lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
|
||||
title_.c_str());
|
||||
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
||||
(lyxrc.dialogs_iconify_with_main ? FL_TRANSIENT : 0),
|
||||
title_.c_str());
|
||||
}
|
||||
|
||||
tooltips().set();
|
||||
@ -221,9 +221,9 @@ FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
|
||||
void FormBaseBD::connect()
|
||||
{
|
||||
u_ = d_->updateBufferDependent.
|
||||
connect(slot(this, &FormBaseBD::updateSlot));
|
||||
connect(slot(this, &FormBaseBD::updateSlot));
|
||||
h_ = d_->hideBufferDependent.
|
||||
connect(slot(this, &FormBaseBD::hide));
|
||||
connect(slot(this, &FormBaseBD::hide));
|
||||
FormBaseDeprecated::connect();
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,10 @@ protected: // methods
|
||||
virtual xformsBC & bc() = 0;
|
||||
|
||||
/** Redraw the form (on receipt of a Signal indicating, for example,
|
||||
that the xform colors have been re-mapped).
|
||||
Must be virtual because dialogs with tabbed folders will need to
|
||||
redraw the form for each tab.
|
||||
*/
|
||||
* that the xform colors have been re-mapped).
|
||||
* Must be virtual because dialogs with tabbed folders will need to
|
||||
* redraw the form for each tab.
|
||||
*/
|
||||
virtual void redraw();
|
||||
|
||||
/// Create the dialog if necessary, update it and display it.
|
||||
@ -81,7 +81,7 @@ protected: // methods
|
||||
/// Build the dialog
|
||||
virtual void build() = 0;
|
||||
/** Filter the inputs on callback from xforms
|
||||
Return true if inputs are valid.
|
||||
* Return true if inputs are valid.
|
||||
*/
|
||||
virtual bool input( FL_OBJECT *, long) {
|
||||
return true;
|
||||
@ -105,17 +105,17 @@ protected: // methods
|
||||
virtual FL_FORM * form() const = 0;
|
||||
|
||||
/** Prepare the way to:
|
||||
1. display feedback as the mouse moves over ob. This feedback will
|
||||
typically be rather more verbose than just a tooltip.
|
||||
2. activate the button controller after a paste with the middle
|
||||
mouse button.
|
||||
*/
|
||||
* 1. display feedback as the mouse moves over ob. This feedback will
|
||||
* typically be rather more verbose than just a tooltip.
|
||||
* 2. activate the button controller after a paste with the middle
|
||||
* mouse button.
|
||||
*/
|
||||
static void setPrehandler(FL_OBJECT * ob);
|
||||
|
||||
/** Which LyXFunc do we use?
|
||||
We could modify Dialogs to have a visible LyXFunc* instead and
|
||||
save a couple of bytes per dialog.
|
||||
*/
|
||||
* We could modify Dialogs to have a visible LyXFunc* instead and
|
||||
* save a couple of bytes per dialog.
|
||||
*/
|
||||
LyXView * lv_;
|
||||
/// Used so we can get at the signals we have to connect to.
|
||||
Dialogs * d_;
|
||||
@ -139,8 +139,8 @@ private:
|
||||
|
||||
|
||||
/** This class is an XForms GUI base class for Buffer Independent dialogs.
|
||||
Such dialogs do not require an update Connection although they may use
|
||||
an update() function which is also supported by restore().
|
||||
* Such dialogs do not require an update Connection although they may use
|
||||
* an update() function which is also supported by restore().
|
||||
*/
|
||||
class FormBaseBI : public FormBaseDeprecated {
|
||||
protected:
|
||||
|
@ -86,13 +86,13 @@ void FormCharacter::build()
|
||||
|
||||
// insert default language box manually
|
||||
fl_addto_form(dialog_->form);
|
||||
FL_OBJECT * ob = dialog_->choice_language;
|
||||
fl_hide_object(dialog_->choice_language);
|
||||
FL_OBJECT * ob = dialog_->choice_language;
|
||||
fl_hide_object(dialog_->choice_language);
|
||||
|
||||
combo_language2_.reset(new Combox(FL_COMBOX_DROPLIST));
|
||||
combo_language2_->add(ob->x, ob->y, ob->w, ob->h, 250);
|
||||
combo_language2_->shortcut("#L", 1);
|
||||
combo_language2_->setcallback(ComboInputCB, this);
|
||||
combo_language2_.reset(new Combox(FL_COMBOX_DROPLIST));
|
||||
combo_language2_->add(ob->x, ob->y, ob->w, ob->h, 250);
|
||||
combo_language2_->shortcut("#L", 1);
|
||||
combo_language2_->setcallback(ComboInputCB, this);
|
||||
fl_end_form();
|
||||
|
||||
// build up the combox entries
|
||||
@ -137,6 +137,7 @@ void FormCharacter::apply()
|
||||
controller().setToggleAll(toggleall);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
template<class A>
|
||||
@ -147,9 +148,10 @@ typename vector<A>::size_type findPos(vector<A> const & vec, A const & val)
|
||||
return 0;
|
||||
return it - vec.begin();
|
||||
}
|
||||
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void FormCharacter::update()
|
||||
{
|
||||
int pos = int(findPos(family_, controller().getFamily()));
|
||||
|
@ -103,8 +103,10 @@ void updateStyle(FD_form_citation * dialog, string command)
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormCB<ControlCitation, FormDB<FD_form_citation> > base_class;
|
||||
|
||||
|
||||
FormCitation::FormCitation(ControlCitation & c)
|
||||
: base_class(c, _("Citation"), false)
|
||||
{}
|
||||
@ -238,8 +240,8 @@ void FormCitation::findBiblio(biblio::Direction const dir)
|
||||
|
||||
|
||||
vector<string>::const_iterator const cit =
|
||||
biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, caseSensitive);
|
||||
biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, caseSensitive);
|
||||
|
||||
if (cit == bibkeys.end())
|
||||
return;
|
||||
@ -278,7 +280,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
|
||||
string const tmp = formatted(biblio::getInfo(theMap,
|
||||
bibkeys[sel-1]),
|
||||
dialog_->browser_info->w-10);
|
||||
dialog_->browser_info->w-10);
|
||||
fl_add_browser_line(dialog_->browser_info, tmp.c_str());
|
||||
|
||||
// Highlight the selected browser_bib key in browser_cite if
|
||||
@ -338,7 +340,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
|
||||
// Add the selected browser_bib key to browser_cite
|
||||
fl_addto_browser(dialog_->browser_cite,
|
||||
bibkeys[sel-1].c_str());
|
||||
bibkeys[sel-1].c_str());
|
||||
citekeys.push_back(bibkeys[sel-1]);
|
||||
|
||||
int const n = int(citekeys.size());
|
||||
|
@ -139,7 +139,7 @@ void FormDocument::build()
|
||||
vector<string> units_vec = getLatexUnits();
|
||||
#if 0
|
||||
for (vector<string>::iterator it = units_vec.begin();
|
||||
it != units_vec.end(); ++it) {
|
||||
it != units_vec.end(); ++it) {
|
||||
if (contains(*it, "%"))
|
||||
it = units_vec.erase(it, it+1) - 1;
|
||||
}
|
||||
@ -396,8 +396,8 @@ namespace {
|
||||
bool saveParamsAsDefault(BufferParams const ¶ms)
|
||||
{
|
||||
if (!Alert::askQuestion(_("Do you want to save the current settings"),
|
||||
_("for the document layout as default?"),
|
||||
_("(they will be valid for any new document)")))
|
||||
_("for the document layout as default?"),
|
||||
_("(they will be valid for any new document)")))
|
||||
return false;
|
||||
|
||||
string const fname = AddName(AddPath(user_lyxdir, "templates/"),
|
||||
@ -413,6 +413,7 @@ bool saveParamsAsDefault(BufferParams const ¶ms)
|
||||
|
||||
} //namespace
|
||||
|
||||
|
||||
bool FormDocument::input(FL_OBJECT * ob, long data)
|
||||
{
|
||||
State cb = static_cast<State>(data);
|
||||
@ -501,7 +502,7 @@ bool FormDocument::input(FL_OBJECT * ob, long data)
|
||||
|
||||
if (ob == paper_->radio_landscape)
|
||||
fl_set_choice(paper_->choice_paperpackage,
|
||||
BufferParams::PACKAGE_NONE + 1);
|
||||
BufferParams::PACKAGE_NONE + 1);
|
||||
|
||||
if (ob == paper_->choice_papersize) {
|
||||
int const paperchoice = fl_get_choice(paper_->choice_papersize);
|
||||
@ -548,8 +549,8 @@ bool FormDocument::input(FL_OBJECT * ob, long data)
|
||||
|| paperchoice == 2 || paperchoice > 5;
|
||||
int const default_unit = metric ? 8 : 9;
|
||||
if (strip(fl_get_input(paper_->input_custom_width)).empty())
|
||||
fl_set_choice(paper_->choice_custom_width_units,
|
||||
default_unit);
|
||||
fl_set_choice(paper_->choice_custom_width_units,
|
||||
default_unit);
|
||||
if (strip(fl_get_input(paper_->input_custom_height)).empty())
|
||||
fl_set_choice(paper_->choice_custom_height_units,
|
||||
default_unit);
|
||||
@ -694,8 +695,8 @@ bool FormDocument::class_apply(BufferParams ¶ms)
|
||||
params.setDefSkip(VSpace(VSpace::MEDSKIP));
|
||||
break;
|
||||
case 3:
|
||||
params.setDefSkip(VSpace(VSpace::BIGSKIP));
|
||||
break;
|
||||
params.setDefSkip(VSpace(VSpace::BIGSKIP));
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
string const length =
|
||||
@ -778,14 +779,14 @@ bool FormDocument::class_apply()
|
||||
s += _(" paragraphs couldn't be converted");
|
||||
}
|
||||
Alert::alert(_("Conversion Errors!"),s,
|
||||
_("into chosen document class"));
|
||||
_("into chosen document class"));
|
||||
}
|
||||
|
||||
} else {
|
||||
// problem changing class -- warn user and retain old style
|
||||
Alert::alert(_("Conversion Errors!"),
|
||||
_("Errors loading new document class."),
|
||||
_("Reverting to original document class."));
|
||||
_("Errors loading new document class."),
|
||||
_("Reverting to original document class."));
|
||||
combo_doc_class->select(int(old_class) + 1);
|
||||
}
|
||||
}
|
||||
@ -1014,8 +1015,8 @@ void FormDocument::class_update(BufferParams const & params)
|
||||
string const default_unit = metric ? "cm" : "in";
|
||||
string const length = params.getDefSkip().asLyXCommand();
|
||||
updateWidgetsFromLengthString(class_->input_doc_skip,
|
||||
class_->choice_default_skip_units,
|
||||
length, default_unit);
|
||||
class_->choice_default_skip_units,
|
||||
length, default_unit);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -1142,11 +1143,11 @@ void FormDocument::paper_update(BufferParams const & params)
|
||||
|
||||
// Default unit choice is cm if metric, inches if US paper.
|
||||
bool const metric = (paperchoice == 1 && lyxrc.default_papersize > 3)
|
||||
|| paperchoice == 2 || paperchoice > 5;
|
||||
|| paperchoice == 2 || paperchoice > 5;
|
||||
string const default_unit = metric ? "cm" : "in";
|
||||
updateWidgetsFromLengthString(paper_->input_custom_width,
|
||||
paper_->choice_custom_width_units,
|
||||
params.paperwidth, default_unit);
|
||||
paper_->choice_custom_width_units,
|
||||
params.paperwidth, default_unit);
|
||||
setEnabled(paper_->input_custom_width, useCustom);
|
||||
setEnabled(paper_->choice_custom_width_units, useCustom);
|
||||
|
||||
@ -1269,15 +1270,15 @@ bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
|
||||
|
||||
//display warning if input is not valid
|
||||
if (ob == class_->input_doc_skip
|
||||
|| ob == paper_->input_custom_width
|
||||
|| ob == paper_->input_custom_height
|
||||
|| ob == paper_->input_outer_margin
|
||||
|| ob == paper_->input_inner_margin
|
||||
|| ob == paper_->input_top_margin
|
||||
|| ob == paper_->input_bottom_margin
|
||||
|| ob == paper_->input_head_height
|
||||
|| ob == paper_->input_head_sep
|
||||
|| ob == paper_->input_foot_skip) {
|
||||
|| ob == paper_->input_custom_width
|
||||
|| ob == paper_->input_custom_height
|
||||
|| ob == paper_->input_outer_margin
|
||||
|| ob == paper_->input_inner_margin
|
||||
|| ob == paper_->input_top_margin
|
||||
|| ob == paper_->input_bottom_margin
|
||||
|| ob == paper_->input_head_height
|
||||
|| ob == paper_->input_head_sep
|
||||
|| ob == paper_->input_foot_skip) {
|
||||
if (!ok) {
|
||||
postWarning(_("Invalid Length (valid example: 10mm)"));
|
||||
return false;
|
||||
@ -1461,8 +1462,8 @@ void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
|
||||
} else {
|
||||
// unable to load new style
|
||||
Alert::alert(_("Conversion Errors!"),
|
||||
_("Unable to switch to new document class."),
|
||||
_("Reverting to original document class."));
|
||||
_("Unable to switch to new document class."),
|
||||
_("Reverting to original document class."));
|
||||
combo_doc_class->select(int(lv_->buffer()->params.textclass) + 1);
|
||||
}
|
||||
lv_->allowInput();
|
||||
|
@ -55,15 +55,15 @@ void FormERT::apply()
|
||||
|
||||
void FormERT::update()
|
||||
{
|
||||
switch (controller().params().status) {
|
||||
case InsetERT::Open:
|
||||
switch (controller().params().status) {
|
||||
case InsetERT::Open:
|
||||
fl_set_button(dialog_->radio_open, 1);
|
||||
break;
|
||||
case InsetERT::Collapsed:
|
||||
case InsetERT::Collapsed:
|
||||
fl_set_button(dialog_->radio_collapsed, 1);
|
||||
break;
|
||||
case InsetERT::Inlined:
|
||||
case InsetERT::Inlined:
|
||||
fl_set_button(dialog_->radio_inlined, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ void FormExternal::build()
|
||||
dialog_.reset(build_external());
|
||||
|
||||
string const choice =
|
||||
" " + getStringFromVector(controller().getTemplates(), " | ") + " ";
|
||||
" " + getStringFromVector(controller().getTemplates(), " | ") + " ";
|
||||
fl_addto_choice(dialog_->choice_template, choice.c_str());
|
||||
|
||||
fl_set_input_return (dialog_->input_filename, FL_RETURN_CHANGED);
|
||||
|
@ -93,9 +93,9 @@ void FormInclude::apply()
|
||||
|
||||
string const file = fl_get_input(dialog_->input_filename);
|
||||
if (controller().fileExists(file))
|
||||
controller().params().cparams.setContents(file);
|
||||
controller().params().cparams.setContents(file);
|
||||
else
|
||||
controller().params().cparams.setContents("");
|
||||
controller().params().cparams.setContents("");
|
||||
|
||||
if (fl_get_button(dialog_->radio_useinput))
|
||||
controller().params().flag = InsetInclude::INPUT;
|
||||
|
@ -29,9 +29,9 @@ FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
|
||||
void FormInset::connect()
|
||||
{
|
||||
u_ = d_->updateBufferDependent.
|
||||
connect(slot(this, &FormInset::updateSlot));
|
||||
connect(slot(this, &FormInset::updateSlot));
|
||||
h_ = d_->hideBufferDependent.
|
||||
connect(slot(this, &FormInset::hide));
|
||||
connect(slot(this, &FormInset::hide));
|
||||
FormBaseDeprecated::connect();
|
||||
}
|
||||
|
||||
|
@ -86,4 +86,3 @@ bool FormMathsDeco::input(FL_OBJECT * ob, long)
|
||||
apply();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -99,8 +99,8 @@ bool FormMathsDelim::input(FL_OBJECT *, long)
|
||||
|
||||
int const i = fl_get_bmtable(dialog_->bmtable);
|
||||
int const button = fl_get_bmtable_numb(dialog_->bmtable);
|
||||
bool const both = (button == FL_MIDDLE_MOUSE)
|
||||
|| (fl_get_button(dialog_->radio_both) != 0);
|
||||
bool const both = (button == FL_MIDDLE_MOUSE ||
|
||||
fl_get_button(dialog_->radio_both) != 0);
|
||||
|
||||
if (i >= 0) {
|
||||
if (side || (button == FL_RIGHT_MOUSE))
|
||||
|
@ -52,7 +52,7 @@ extern "C" {
|
||||
|
||||
|
||||
FormMathsMatrix::FormMathsMatrix(LyXView * lv, Dialogs * d,
|
||||
FormMathsPanel const & p)
|
||||
FormMathsPanel const & p)
|
||||
: FormMathsSub(lv, d, p, _("Maths Matrix"), false)
|
||||
{}
|
||||
|
||||
|
@ -404,7 +404,7 @@ void FormMathsPanel::mathDisplay() const
|
||||
|
||||
FormMathsSub::FormMathsSub(LyXView * lv, Dialogs * d, FormMathsPanel const & p,
|
||||
string const & t, bool allowResize)
|
||||
: FormBaseBD(lv, d, t, allowResize), parent_(p), bc_("Close")
|
||||
: FormBaseBD(lv, d, t, allowResize), parent_(p), bc_("Close")
|
||||
{}
|
||||
|
||||
|
||||
@ -420,5 +420,3 @@ void FormMathsSub::disconnect()
|
||||
parent_.setActive(0);
|
||||
FormBaseBD::disconnect();
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ bool FormMathsSpace::input(FL_OBJECT *, long data)
|
||||
|
||||
if (data >= 0 && data < 6) {
|
||||
space_ = short(data);
|
||||
apply();
|
||||
apply();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -56,38 +56,38 @@ void FormMathsStyle::build()
|
||||
dialog_.reset(build_maths_style());
|
||||
|
||||
fl_set_bmtable_data(dialog_->bmtable_style1, 1, 1,
|
||||
style1_width, style1_height, style1_bits);
|
||||
style1_width, style1_height, style1_bits);
|
||||
fl_set_bmtable_maxitems(dialog_->bmtable_style1, 1);
|
||||
bc().addReadOnly(dialog_->bmtable_style1);
|
||||
|
||||
fl_set_bmtable_data(dialog_->bmtable_style2, 1, 3,
|
||||
style2_width, style2_height, style2_bits);
|
||||
style2_width, style2_height, style2_bits);
|
||||
fl_set_bmtable_maxitems(dialog_->bmtable_style2, 3);
|
||||
bc().addReadOnly(dialog_->bmtable_style2);
|
||||
|
||||
fl_set_bmtable_data(dialog_->bmtable_font1, 1, 5,
|
||||
font1_width, font1_height, font1_bits);
|
||||
font1_width, font1_height, font1_bits);
|
||||
fl_set_bmtable_maxitems(dialog_->bmtable_font1, 5);
|
||||
bc().addReadOnly(dialog_->bmtable_font1);
|
||||
|
||||
fl_set_bmtable_data(dialog_->bmtable_font2, 1, 3,
|
||||
font2_width, font2_height, font2_bits);
|
||||
font2_width, font2_height, font2_bits);
|
||||
fl_set_bmtable_maxitems(dialog_->bmtable_font2, 3);
|
||||
bc().addReadOnly(dialog_->bmtable_font2);
|
||||
|
||||
bc().setCancel(dialog_->button_close);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FormMathsStyle::apply()
|
||||
{
|
||||
if ((style_ >= 0) && (style_ < 4))
|
||||
parent_.insertSymbol(latex_mathstyle[style_]);
|
||||
else
|
||||
if ((style_ >= 4) && (style_ < 14))
|
||||
else if ((style_ >= 4) && (style_ < 14))
|
||||
parent_.dispatchFunc(latex_mathfontcmds[style_ - 4]);
|
||||
}
|
||||
|
||||
|
||||
bool FormMathsStyle::input(FL_OBJECT * ob, long data)
|
||||
{
|
||||
style_ = fl_get_bmtable(ob);
|
||||
|
@ -1111,7 +1111,7 @@ bool FormPreferences::Converters::Input()
|
||||
} else {
|
||||
fl_set_object_label(dialog_->button_add, idex(_("Modify|#M")));
|
||||
fl_set_button_shortcut(dialog_->button_add,
|
||||
scex(_("Modify|#M")), 1);
|
||||
scex(_("Modify|#M")), 1);
|
||||
|
||||
int top = max(sel-5, 0);
|
||||
fl_set_browser_topline(dialog_->browser_all, top);
|
||||
@ -1374,18 +1374,18 @@ bool FormPreferences::Formats::Input()
|
||||
|
||||
if (sel < 0) {
|
||||
fl_set_object_label(dialog_->button_add,
|
||||
idex(_("Add|#A")));
|
||||
idex(_("Add|#A")));
|
||||
fl_set_button_shortcut(dialog_->button_add,
|
||||
scex(_("Add|#A")), 1);
|
||||
scex(_("Add|#A")), 1);
|
||||
|
||||
fl_deselect_browser(dialog_->browser_all);
|
||||
setEnabled(dialog_->button_delete, false);
|
||||
|
||||
} else {
|
||||
fl_set_object_label(dialog_->button_add,
|
||||
idex(_("Modify|#M")));
|
||||
idex(_("Modify|#M")));
|
||||
fl_set_button_shortcut(dialog_->button_add,
|
||||
scex(_("Modify|#M")), 1);
|
||||
scex(_("Modify|#M")), 1);
|
||||
|
||||
int const top = max(sel-5, 0);
|
||||
fl_set_browser_topline(dialog_->browser_all, top);
|
||||
@ -1645,7 +1645,7 @@ void FormPreferences::Language::build()
|
||||
combo_default_lang->setcallback(ComboCB, &parent_);
|
||||
|
||||
for (Languages::const_iterator cit = languages.begin();
|
||||
cit != languages.end(); ++cit) {
|
||||
cit != languages.end(); ++cit) {
|
||||
combo_default_lang->addto(cit->second.lang());
|
||||
}
|
||||
|
||||
@ -1792,10 +1792,10 @@ void FormPreferences::Language::update()
|
||||
|
||||
void FormPreferences::Language::ComboCB(int, void * v, Combox * combox)
|
||||
{
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(v);
|
||||
// This is safe, as nothing is done to the pointer, other than
|
||||
// to use its address in a block-if statement.
|
||||
pre->bc().valid(pre->input(reinterpret_cast<FL_OBJECT *>(combox), 0));
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(v);
|
||||
// This is safe, as nothing is done to the pointer, other than
|
||||
// to use its address in a block-if statement.
|
||||
pre->bc().valid(pre->input(reinterpret_cast<FL_OBJECT *>(combox), 0));
|
||||
}
|
||||
|
||||
|
||||
@ -2025,7 +2025,7 @@ void FormPreferences::OutputsMisc::update()
|
||||
fl_set_input(dialog_->input_paperoption,
|
||||
lyxrc.view_dvi_paper_option.c_str());
|
||||
fl_set_button(dialog_->check_autoreset_classopt,
|
||||
lyxrc.auto_reset_options);
|
||||
lyxrc.auto_reset_options);
|
||||
|
||||
}
|
||||
|
||||
@ -2690,8 +2690,8 @@ bool FormPreferences::ScreenFonts::input()
|
||||
activate = false;
|
||||
str = N_("Fonts must be positive!");
|
||||
|
||||
// Fontsizes -- tiny < script < footnote etc.
|
||||
} else if (strToDbl(fl_get_input(dialog_->input_tiny)) >
|
||||
// Fontsizes -- tiny < script < footnote etc.
|
||||
strToDbl(fl_get_input(dialog_->input_script)) ||
|
||||
strToDbl(fl_get_input(dialog_->input_script)) >
|
||||
strToDbl(fl_get_input(dialog_->input_footnote)) ||
|
||||
@ -2838,11 +2838,7 @@ void FormPreferences::SpellOptions::build()
|
||||
dialog_.reset(parent_.build_spelloptions());
|
||||
|
||||
fl_addto_choice(dialog_->choice_spell_command,
|
||||
#if 0
|
||||
_(" none | ispell | aspell "));
|
||||
#else
|
||||
_(" ispell | aspell "));
|
||||
#endif
|
||||
fl_set_input_return(dialog_->input_alt_lang, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_escape_chars, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_personal_dict, FL_RETURN_CHANGED);
|
||||
|
@ -77,9 +77,9 @@ private:
|
||||
string const getFeedback(FL_OBJECT *);
|
||||
///
|
||||
void browse(FL_OBJECT * input,
|
||||
string const & title, string const & pattern,
|
||||
std::pair<string,string> const & dir1= std::make_pair(string(),string()),
|
||||
std::pair<string,string> const & dir2 = std::make_pair(string(),string()));
|
||||
string const & title, string const & pattern,
|
||||
std::pair<string,string> const & dir1= std::make_pair(string(),string()),
|
||||
std::pair<string,string> const & dir2 = std::make_pair(string(),string()));
|
||||
|
||||
/// Fdesign generated methods
|
||||
FD_form_preferences * build_preferences();
|
||||
|
@ -234,7 +234,7 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long)
|
||||
|
||||
// if we type into file, select that as a target
|
||||
if (ob == dialog_->input_file && fl_get_button(dialog_->radio_printer)
|
||||
&& strlen(fl_get_input(dialog_->input_file))) {
|
||||
&& strlen(fl_get_input(dialog_->input_file))) {
|
||||
fl_set_button(dialog_->radio_file, 1);
|
||||
fl_set_button(dialog_->radio_printer, 0);
|
||||
} else if (ob == dialog_->input_printer) {
|
||||
|
@ -127,7 +127,7 @@ void FormSpellchecker::partialUpdate(int id)
|
||||
fl_add_browser_line(dialog_->browser, w.c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 2:
|
||||
// show exit message
|
||||
fl_show_messages(controller().getMessage().c_str());
|
||||
|
@ -152,8 +152,7 @@ void FormTabular::build()
|
||||
vector<string> units_vec = getLatexUnits();
|
||||
#if 0
|
||||
for (vector<string>::iterator it = units_vec.begin();
|
||||
it != units_vec.end(); ++it)
|
||||
{
|
||||
it != units_vec.end(); ++it) {
|
||||
if (contains(*it, "%"))
|
||||
it = units_vec.erase(it, it + 1) - 1;
|
||||
}
|
||||
@ -214,20 +213,18 @@ void FormTabular::update()
|
||||
// to set if we are in first/last cell of row or if the left/right
|
||||
// cell is also a multicolumn.
|
||||
if (tabular->IsFirstCellInRow(cell) ||
|
||||
tabular->IsMultiColumn(cell-1))
|
||||
{
|
||||
tabular->IsMultiColumn(cell-1)) {
|
||||
fl_set_button(cell_options_->check_border_left,
|
||||
tabular->LeftLine(cell)?1:0);
|
||||
tabular->LeftLine(cell)?1:0);
|
||||
setEnabled(cell_options_->check_border_left, true);
|
||||
} else {
|
||||
fl_set_button(cell_options_->check_border_left, 0);
|
||||
setEnabled(cell_options_->check_border_left, false);
|
||||
}
|
||||
if (tabular->IsLastCellInRow(cell) ||
|
||||
tabular->IsMultiColumn(cell+1))
|
||||
{
|
||||
tabular->IsMultiColumn(cell+1)) {
|
||||
fl_set_button(cell_options_->check_border_right,
|
||||
tabular->RightLine(cell)?1:0);
|
||||
tabular->RightLine(cell)?1:0);
|
||||
setEnabled(cell_options_->check_border_right, true);
|
||||
} else {
|
||||
fl_set_button(cell_options_->check_border_right, 0);
|
||||
@ -527,7 +524,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
LyXTabular * tabular = inset_->tabular.get();
|
||||
string str1 =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
column_options_->choice_value_column_width);
|
||||
string str2;
|
||||
LyXLength llen = tabular->GetColumnPWidth(cell);
|
||||
if (!llen.zero())
|
||||
@ -564,35 +561,33 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
// No point in processing directives that you can't do anything with
|
||||
// anyhow, so exit now if the buffer is read-only.
|
||||
if (lv_->buffer()->isReadonly()) {
|
||||
update();
|
||||
return false;
|
||||
}
|
||||
if ((ob == column_options_->input_column_width) ||
|
||||
(ob == column_options_->choice_value_column_width))
|
||||
{
|
||||
string const str =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
inset_->tabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH, str);
|
||||
|
||||
//check if the input is valid
|
||||
string const input =
|
||||
fl_get_input(column_options_->input_column_width);
|
||||
if (!input.empty() && !isValidLength(input) && !isStrDbl(input)) {
|
||||
postWarning(_("Invalid Length (valid example: 10mm)"));
|
||||
update();
|
||||
return false;
|
||||
}
|
||||
if ((ob == column_options_->input_column_width) ||
|
||||
(ob == column_options_->choice_value_column_width)) {
|
||||
string const str =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
inset_->tabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH, str);
|
||||
|
||||
update(); // update for alignment
|
||||
return true;
|
||||
//check if the input is valid
|
||||
string const input =
|
||||
fl_get_input(column_options_->input_column_width);
|
||||
if (!input.empty() && !isValidLength(input) && !isStrDbl(input)) {
|
||||
postWarning(_("Invalid Length (valid example: 10mm)"));
|
||||
return false;
|
||||
}
|
||||
|
||||
update(); // update for alignment
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((ob == cell_options_->input_mcolumn_width) ||
|
||||
(ob == cell_options_->choice_value_mcolumn_width))
|
||||
{
|
||||
(ob == cell_options_->choice_value_mcolumn_width)) {
|
||||
string const str =
|
||||
getLengthFromWidgets(cell_options_->input_mcolumn_width,
|
||||
cell_options_->choice_value_mcolumn_width);
|
||||
cell_options_->choice_value_mcolumn_width);
|
||||
inset_->tabularFeatures(lv_->view(), LyXTabular::SET_MPWIDTH, str);
|
||||
|
||||
//check if the input is valid
|
||||
@ -642,7 +637,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
num = LyXTabular::MULTICOLUMN;
|
||||
else if (ob == tabular_options_->check_longtable) {
|
||||
if (fl_get_button(tabular_options_->check_longtable))
|
||||
num = LyXTabular::SET_LONGTABULAR;
|
||||
num = LyXTabular::SET_LONGTABULAR;
|
||||
else
|
||||
num = LyXTabular::UNSET_LONGTABULAR;
|
||||
} else if (ob == tabular_options_->check_rotate_tabular) {
|
||||
@ -673,8 +668,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
(ob == longtable_options_->check_lt_lastfoot) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
(ob == longtable_options_->check_lastfoot_empty)) {
|
||||
num = static_cast<LyXTabular::Feature>(checkLongtableOptions(ob, special));
|
||||
} else if (ob == longtable_options_->check_lt_newpage) {
|
||||
num = LyXTabular::SET_LTNEWPAGE;
|
||||
@ -719,18 +713,15 @@ int FormTabular::checkLongtableOptions(FL_OBJECT * ob, string & special)
|
||||
if ((ob == longtable_options_->check_1head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above))
|
||||
{
|
||||
(ob == longtable_options_->check_lastfoot_2border_above)) {
|
||||
special = "dl_above";
|
||||
} else if ((ob == longtable_options_->check_1head_2border_below) ||
|
||||
(ob == longtable_options_->check_head_2border_below) ||
|
||||
(ob == longtable_options_->check_foot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below))
|
||||
{
|
||||
(ob == longtable_options_->check_head_2border_below) ||
|
||||
(ob == longtable_options_->check_foot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below)) {
|
||||
special = "dl_below";
|
||||
} else if ((ob == longtable_options_->check_1head_empty) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
(ob == longtable_options_->check_lastfoot_empty)) {
|
||||
special = "empty";
|
||||
} else {
|
||||
special = "";
|
||||
@ -738,27 +729,24 @@ int FormTabular::checkLongtableOptions(FL_OBJECT * ob, string & special)
|
||||
if ((ob == longtable_options_->check_lt_firsthead) ||
|
||||
(ob == longtable_options_->check_1head_2border_above) ||
|
||||
(ob == longtable_options_->check_1head_2border_below) ||
|
||||
(ob == longtable_options_->check_1head_empty))
|
||||
{
|
||||
(ob == longtable_options_->check_1head_empty)) {
|
||||
return (flag ? LyXTabular::SET_LTFIRSTHEAD :
|
||||
LyXTabular::UNSET_LTFIRSTHEAD);
|
||||
LyXTabular::UNSET_LTFIRSTHEAD);
|
||||
} else if ((ob == longtable_options_->check_lt_head) ||
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_below))
|
||||
{
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_below)) {
|
||||
return (flag ? LyXTabular::SET_LTHEAD : LyXTabular::UNSET_LTHEAD);
|
||||
} else if ((ob == longtable_options_->check_lt_foot) ||
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_below))
|
||||
{
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_below)) {
|
||||
return (flag ? LyXTabular::SET_LTFOOT : LyXTabular::UNSET_LTFOOT);
|
||||
} else if ((ob == longtable_options_->check_lt_lastfoot) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
(ob == longtable_options_->check_lastfoot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty)) {
|
||||
return (flag ? LyXTabular::SET_LTLASTFOOT :
|
||||
LyXTabular::UNSET_LTLASTFOOT);
|
||||
LyXTabular::UNSET_LTLASTFOOT);
|
||||
}
|
||||
|
||||
return LyXTabular::LAST_ACTION;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright 2000-2001 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author \author Jürgen Vigna, jug@sad.it
|
||||
* \author Jürgen Vigna, jug@sad.it
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Copyright 1995-2001 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author unknown.
|
||||
* \author Jürgen Vigna, jug@sad.it
|
||||
*/
|
||||
|
||||
#ifndef FORMTABULARCREATE_H
|
||||
|
@ -70,8 +70,7 @@ char const * function_names[] = {
|
||||
"tan", "tanh"
|
||||
};
|
||||
|
||||
int const nr_function_names = sizeof(function_names) /
|
||||
sizeof(char const *);
|
||||
int const nr_function_names = sizeof(function_names) / sizeof(char const *);
|
||||
|
||||
char const * latex_arrow[] = {
|
||||
"downarrow", "leftarrow", "Downarrow", "Leftarrow",
|
||||
@ -239,17 +238,17 @@ int const nr_latex_ams_ops = sizeof(latex_ams_ops) / sizeof(char const *);
|
||||
static char const ** mathed_get_pixmap_from_icon(int d)
|
||||
{
|
||||
switch (d) {
|
||||
case MM_FRAC: return frac;
|
||||
case MM_SQRT: return sqrt_xpm;
|
||||
case MM_SUPER: return super_xpm;
|
||||
case MM_SUB: return sub_xpm;
|
||||
case MM_STYLE: return style_xpm;
|
||||
case MM_DELIM: return delim;
|
||||
case MM_MATRIX: return matrix;
|
||||
case MM_EQU: return equation;
|
||||
case MM_DECO: return deco;
|
||||
case MM_SPACE: return space_xpm;
|
||||
default: return 0;
|
||||
case MM_FRAC: return frac;
|
||||
case MM_SQRT: return sqrt_xpm;
|
||||
case MM_SUPER: return super_xpm;
|
||||
case MM_SUB: return sub_xpm;
|
||||
case MM_STYLE: return style_xpm;
|
||||
case MM_DELIM: return delim;
|
||||
case MM_MATRIX: return matrix;
|
||||
case MM_EQU: return equation;
|
||||
case MM_DECO: return deco;
|
||||
case MM_SPACE: return space_xpm;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +273,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
|
||||
case 8: latex_str = latex_ams_rel; break;
|
||||
case 9: latex_str = latex_ams_nrel; break;
|
||||
case 10: latex_str = latex_ams_ops; break;
|
||||
// Add AMS stuff here -- MV
|
||||
// Add AMS stuff here -- MV
|
||||
}
|
||||
|
||||
for (int k = 0; latex_str[k][0] > ' '; ++k) {
|
||||
|
@ -87,7 +87,7 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
|
||||
: owner_(view), menubackend_(&mb), current_group_(0)
|
||||
{
|
||||
for (MenuBackend::const_iterator menu = menubackend_->begin();
|
||||
menu != menubackend_->end() ; ++menu) {
|
||||
menu != menubackend_->end() ; ++menu) {
|
||||
if (menu->menubar()) {
|
||||
FL_OBJECT * group = fl_bgn_group();
|
||||
makeMenubar(*menu);
|
||||
@ -328,6 +328,7 @@ void add_toc2(int menu, string const & extra_label,
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void Menubar::Pimpl::add_toc(int menu, string const & extra_label,
|
||||
vector<int> & smn, Window win)
|
||||
{
|
||||
|
@ -56,8 +56,8 @@ struct equal_to_second_in_pair
|
||||
typedef typename T::second_type second_argument_type;
|
||||
|
||||
bool operator() (
|
||||
pair < typename T::first_type, typename T::second_type > const & left,
|
||||
typename T::second_type const & right) const
|
||||
pair < typename T::first_type, typename T::second_type > const & left,
|
||||
typename T::second_type const & right) const
|
||||
{
|
||||
return left.second == right;
|
||||
}
|
||||
@ -69,9 +69,9 @@ void RadioButtonGroup::setButton(int value)
|
||||
{
|
||||
#if 0
|
||||
ButtonValueMap::const_iterator it =
|
||||
find_if(map.begin(), map.end(),
|
||||
bind2nd(equal_to_second_in_pair<ButtonValuePair>(),
|
||||
value));
|
||||
find_if(map.begin(), map.end(),
|
||||
bind2nd(equal_to_second_in_pair<ButtonValuePair>(),
|
||||
value));
|
||||
#else
|
||||
ButtonValueMap::const_iterator it =
|
||||
find_if(map.begin(), map.end(),
|
||||
@ -81,7 +81,7 @@ void RadioButtonGroup::setButton(int value)
|
||||
// If we found nothing, report it and return
|
||||
if (it == map.end()) {
|
||||
lyxerr << "BUG: Requested value in RadioButtonGroup doesn't exists"
|
||||
<< endl;
|
||||
<< endl;
|
||||
}
|
||||
else {
|
||||
fl_set_button(it->first, 1);
|
||||
@ -103,8 +103,8 @@ int RadioButtonGroup::getButton()
|
||||
{
|
||||
// Find the first button that is active
|
||||
ButtonValueMap::iterator it =
|
||||
find_if(map.begin(), map.end(),
|
||||
is_set_button<ButtonValuePair> ());
|
||||
find_if(map.begin(), map.end(),
|
||||
is_set_button<ButtonValuePair> ());
|
||||
|
||||
// If such a button was found, return its value.
|
||||
if (it != map.end()) {
|
||||
|
@ -24,12 +24,12 @@ namespace {
|
||||
|
||||
extern "C" {
|
||||
|
||||
static
|
||||
void C_intern_timeout_cb(int, void * data)
|
||||
{
|
||||
Timeout * to = static_cast<Timeout *>(data);
|
||||
to->emit();
|
||||
}
|
||||
static
|
||||
void C_intern_timeout_cb(int, void * data)
|
||||
{
|
||||
Timeout * to = static_cast<Timeout *>(data);
|
||||
to->emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -275,15 +275,15 @@ void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height)
|
||||
|
||||
if (!fullname.empty()) {
|
||||
lyxerr[Debug::GUI] << "Full icon name is `"
|
||||
<< fullname << "'" << endl;
|
||||
<< fullname << "'" << endl;
|
||||
fl_set_pixmapbutton_file(obj, fullname.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (act == LFUN_INSERT_MATH && !arg.empty()) {
|
||||
char const ** pixmap = get_pixmap_from_symbol(arg.c_str(),
|
||||
buttonwidth,
|
||||
height);
|
||||
buttonwidth,
|
||||
height);
|
||||
if (pixmap) {
|
||||
lyxerr[Debug::GUI] << "Using mathed-provided icon"
|
||||
<< endl;
|
||||
@ -297,7 +297,7 @@ void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height)
|
||||
fullname = LibFileSearch("images", "unknown", "xpm");
|
||||
if (!fullname.empty()) {
|
||||
lyxerr[Debug::GUI] << "Using default `unknown' icon"
|
||||
<< endl;
|
||||
<< endl;
|
||||
fl_set_pixmapbutton_file(obj, fullname.c_str());
|
||||
}
|
||||
}
|
||||
@ -453,7 +453,7 @@ void Toolbar::Pimpl::clean()
|
||||
void Toolbar::Pimpl::push(int nth)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Toolbar::push: trying to trigger no `"
|
||||
<< nth << '\'' << endl;
|
||||
<< nth << '\'' << endl;
|
||||
|
||||
if (nth <= 0 || nth >= int(toollist.size())) {
|
||||
// item nth not found...
|
||||
|
Loading…
Reference in New Issue
Block a user