src/frontends/controllers/ControlExternal.C
src/frontends/controllers/ControlGraphics.C
src/frontends/controllers/ControlInclude.C
+src/frontends/controllers/ControlNote.C
src/frontends/controllers/ControlPreamble.C
src/frontends/controllers/ControlPrefs.C
src/frontends/controllers/ControlPrint.C
+2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * LColor.[Ch]: Add comment and greyedout logical colors.
2003-07-30 André Pönitz <poenitz@gmx.net>
{ preview, N_("previewed snippet"), "preview", "black", "preview" },
{ note, N_("note"), "note", "yellow", "note" },
{ notebg, N_("note background"), "notebg", "yellow", "notebg" },
+ { comment, N_("comment"), "comment", "magenta", "comment" },
+ { commentbg, N_("comment background"), "commentbg", "linen", "commentbg" },
+ { greyedout, N_("greyedout inset"), "greyedout", "red", "greyedout" },
+ { greyedoutbg, N_("greyedout inset background"), "greyedoutbg", "linen", "greyedoutbg" },
{ depthbar, N_("depth bar"), "depthbar", "IndianRed", "depthbar" },
{ language, N_("language"), "language", "Blue", "language" },
{ command, N_("command inset"), "command", "black", "command" },
note,
/// Background color of notes
notebg,
+ /// Text color for comments
+ comment,
+ /// Background color of comments
+ commentbg,
+ /// Text color for greyedout inset
+ greyedout,
+ /// Background color of greyedout inset
+ greyedoutbg,
/// Color for the depth bars in the margin
+2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * ControlNote.[Ch]: add i18n support.
+
2003-07-27 Lars Gullik Bjønnes <larsbj@gullik.net>
* ControlToc.C (goTo): adjust for lyx::toc
#include "funcrequest.h"
#include "insets/insetnote.h"
#include "debug.h"
+#include "gettext.h"
+
+
+using std::vector;
+
ControlNote::ControlNote(Dialog & parent)
: Dialog::Controller(parent)
params_.reset();
}
+
void ControlNote::dispatchParams()
{
string const lfun = InsetNoteMailer::params2string(string("note"), params());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+void note_gui_tokens(vector<string> & ids, vector<string> & gui_names)
+{
+ char const * const ids_[] = {"Note", "Comment", "Greyedout"};
+ size_t const ids_size = sizeof(ids_) / sizeof(char *);
+ ids = vector<string>(ids_, ids_ + ids_size);
+ gui_names.clear();
+ gui_names.push_back(_("LyX Note"));
+ gui_names.push_back(_("Comment"));
+ gui_names.push_back(_("Greyed Out"));
+}
#include "Dialog.h"
#include "debug.h"
+#include <vector>
class InsetNoteParams;
boost::scoped_ptr<InsetNoteParams> params_;
};
+///
+void note_gui_tokens(std::vector<string> &, std::vector<string> &);
+
#endif // CONTROLNOTE_H
+2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
+
+ (with help from Juergen Spitzmueller)
+ * FormNote.[Ch]: add i18n support to the dialog.
+
2003-07-27 Lars Gullik Bjønnes <larsbj@gullik.net>
* FormToc.C (updateType): adjust for lyx::toc
#include "insets/insetnote.h"
#include "debug.h"
+#include <vector>
+
+using std::vector;
+
+
typedef FormController<ControlNote, FormView<FD_note> > base_class;
FormNote::FormNote(Dialog & parent)
{}
-string const FormNote::predefineds() const
-{
- return _("Note|Comment|Greyedout");
-}
-
-
void FormNote::build()
{
dialog_.reset(build_note(this));
- fl_addto_choice(dialog_->choice_type, predefineds().c_str());
- string str = _("Note: LyX internal only\n"
+ note_gui_tokens(ids_, gui_names_);
+
+ for (int i = 0; i < 3; ++i) {
+ }
+
+ for (int i = 0; i < 3; ++i) {
+ fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
+ }
+
+ string str = _("Lyx Note: LyX internal only\n"
"Comment: Export to LaTeX but don't print\n"
- "Greyedout: Print as grey text");
+ "Greyed Out: Print as grey text");
tooltips().init(dialog_->choice_type, str);
bcview().setOK(dialog_->button_ok);
void FormNote::update()
{
string type(controller().params().type);
- fl_set_choice_text(dialog_->choice_type, type.c_str());
+ for (int i = 0; i < 3; ++i) {
+ if (type == ids_[i])
+ fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
+ }
}
void FormNote::apply()
{
- controller().params().type = fl_get_choice_text(dialog_->choice_type);
+ int i = fl_get_choice(dialog_->choice_type);
+ controller().params().type = ids_[i - 1];
}
/// Update dialog before showing it
virtual void update();
///
- string const predefineds() const;
+ std::vector<string> ids_;
+ ///
+ std::vector<string> gui_names_;
};
#endif // FORMNOTE_H
+2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
+
+ (with help from Juergen Spitzmueller)
+ * insetnote.C: add add i18n support. Use Prefs-definable
+ colours for Comment and Greyedout.
2003-07-30 André Pönitz <poenitz@gmx.net>
{
params_.type = label;
init();
- setLabel(label);
+ setButtonLabel();
}
font.decSize();
font.decSize();
- setLabel(params_.type);
- if (params_.type == "Note" || params_.type == "Comment") {
+ if (params_.type == "Note") {
+ setLabel(_("LyX Note"));
font.setColor(LColor::note);
setBackgroundColor(LColor::notebg);
+ } else if (params_.type == "Comment") {
+ setLabel(_("Comment"));
+ font.setColor(LColor::comment);
+ setBackgroundColor(LColor::commentbg);
} else {
- font.setColor(LColor::red);
- setBackgroundColor(LColor::background);
+ setLabel(_("Greyed Out"));
+ font.setColor(LColor::greyedout);
+ setBackgroundColor(LColor::greyedoutbg);
}
setLabelFont(font);
}