mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Get rid of "char const * _(char const *)".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6981 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d2bfb9fa0f
commit
00043ade70
@ -1,3 +1,6 @@
|
||||
2003-05-19 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* gettext.[Ch]: remove "char const * _(char const *)".
|
||||
|
||||
2003-05-19 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
2003-05-19 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* forms/fdfixc.sed:
|
||||
* FormAboutlyx.C (build):
|
||||
* FormCitation.C (update):
|
||||
* FormDocument.C (build):
|
||||
* FormErrorList.C (updateContents):
|
||||
* FormGraphics.C (build):
|
||||
* FormMathsBitmap.C (build):
|
||||
* FormMathsMatrix.C (build):
|
||||
* FormPreferences.C (build, LnFmisc::build, OutputsMisc::build,
|
||||
SpellOptions::build):
|
||||
* FormRef.C (build, updateBrowser, switch_go_button):
|
||||
* FormTabular.C (build):
|
||||
* FormToc.C (updateContents):
|
||||
gettext's _(str) now returns a string rather
|
||||
than char const *, so must add a .c_str() when passing to the xforms
|
||||
lib.
|
||||
|
||||
2003-05-19 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* forms/c_str.sed: removed. Renamed as:
|
||||
|
@ -78,11 +78,11 @@ void FormAboutlyx::build()
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Version").c_str(),
|
||||
version_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Credits").c_str(),
|
||||
credits_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("License"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("License").c_str(),
|
||||
license_->form);
|
||||
|
||||
// Manage the cancel/close button
|
||||
|
@ -461,7 +461,7 @@ void FormCitation::update()
|
||||
fl_set_input(dialog_->input_after,
|
||||
controller().params().getOptions().c_str());
|
||||
|
||||
fl_set_input(dialog_->input_before, _("Not yet supported"));
|
||||
fl_set_input(dialog_->input_before, _("Not yet supported").c_str());
|
||||
setEnabled(dialog_->input_before, false);
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ void FormDocument::build()
|
||||
fl_set_combox_browser_height(obj, 400);
|
||||
|
||||
fl_addto_choice(class_->choice_spacing,
|
||||
_(" Single | OneHalf | Double | Custom "));
|
||||
_(" Single | OneHalf | Double | Custom ").c_str());
|
||||
fl_addto_choice(class_->choice_fontsize, "default|10|11|12");
|
||||
for (int n = 0; tex_fonts[n][0]; ++n) {
|
||||
fl_addto_choice(class_->choice_fonts,tex_fonts[n]);
|
||||
@ -172,7 +172,7 @@ void FormDocument::build()
|
||||
fl_addto_choice(class_->choice_pagestyle,
|
||||
"default|empty|plain|headings|fancy");
|
||||
fl_addto_choice(class_->choice_skip,
|
||||
_(" SmallSkip | MedSkip | BigSkip | Length "));
|
||||
_(" SmallSkip | MedSkip | BigSkip | Length ").c_str());
|
||||
fl_addto_choice(class_->choice_skip_units, units.c_str());
|
||||
|
||||
// Set input filters on doc spacing to make it accept only
|
||||
@ -237,12 +237,13 @@ void FormDocument::build()
|
||||
|
||||
fl_addto_choice(paper_->choice_papersize,
|
||||
_(" Default | Custom | US letter | US legal "
|
||||
"| US executive | A3 | A4 | A5 | B3 | B4 | B5 "));
|
||||
"| US executive | A3 | A4 | A5 "
|
||||
"| B3 | B4 | B5 ").c_str());
|
||||
fl_addto_choice(paper_->choice_paperpackage,
|
||||
_(" None "
|
||||
"| Small Margins "
|
||||
"| Very small Margins "
|
||||
"| Very wide Margins "));
|
||||
"| Very wide Margins ").c_str());
|
||||
|
||||
fl_addto_choice(paper_->choice_custom_width_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_custom_height_units, units.c_str());
|
||||
@ -282,7 +283,7 @@ void FormDocument::build()
|
||||
|
||||
fl_addto_choice(language_->choice_quotes_language,
|
||||
_(" ``text'' | ''text'' | ,,text`` | ,,text'' |"
|
||||
" «text» | »text« "));
|
||||
" «text» | »text« ").c_str());
|
||||
|
||||
// the document options form
|
||||
options_.reset(build_document_options(this));
|
||||
@ -302,14 +303,14 @@ void FormDocument::build()
|
||||
fl_set_input_return(options_->input_float_placement, FL_RETURN_CHANGED);
|
||||
|
||||
fl_addto_choice(options_->choice_ams_math,
|
||||
_("Never | Automatically | Yes "));
|
||||
_("Never | Automatically | Yes ").c_str());
|
||||
|
||||
for (int n = 0; tex_graphics[n][0]; ++n) {
|
||||
fl_addto_choice(options_->choice_postscript_driver,
|
||||
tex_graphics[n]);
|
||||
}
|
||||
fl_addto_choice(options_->choice_citation_format,
|
||||
_(" Author-year | Numerical "));
|
||||
_(" Author-year | Numerical ").c_str());
|
||||
|
||||
// the document bullets form
|
||||
bullets_.reset(build_document_bullet(this));
|
||||
@ -335,8 +336,9 @@ void FormDocument::build()
|
||||
fl_set_input_return(bullets_->input_latex, FL_RETURN_CHANGED);
|
||||
|
||||
fl_addto_choice(bullets_->choice_size,
|
||||
_(" Default | Tiny | Smallest | Smaller | Small |"
|
||||
" Normal | Large | Larger | Largest | Huge | Huger "));
|
||||
_(" Default | Tiny | Smallest | Smaller "
|
||||
"| Small | Normal | Large | Larger | Largest "
|
||||
"| Huge | Huger ").c_str());
|
||||
fl_set_choice(bullets_->choice_size, 1);
|
||||
|
||||
fl_set_input_maxchars(bullets_->input_latex, 80);
|
||||
@ -350,15 +352,15 @@ void FormDocument::build()
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Document"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Document").c_str(),
|
||||
class_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Paper"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Paper").c_str(),
|
||||
paper_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Language"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Language").c_str(),
|
||||
language_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Extra"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Extra").c_str(),
|
||||
options_->form);
|
||||
fbullet = fl_addto_tabfolder(dialog_->tabfolder,_("Bullets"),
|
||||
fbullet = fl_addto_tabfolder(dialog_->tabfolder,_("Bullets").c_str(),
|
||||
bullets_->form);
|
||||
|
||||
if ((XpmVersion < 4) || (XpmVersion == 4 && XpmRevision < 7)) {
|
||||
|
@ -80,7 +80,7 @@ void FormErrorList::updateContents()
|
||||
if (Errors.empty()) {
|
||||
fl_clear_browser(dialog_->browser_errors);
|
||||
fl_add_browser_line(dialog_->browser_errors,
|
||||
_("*** No Lists ***"));
|
||||
_("*** No Lists ***").c_str());
|
||||
setEnabled(dialog_->browser_errors, false);
|
||||
return;
|
||||
}
|
||||
|
@ -263,9 +263,12 @@ void FormGraphics::build()
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("File"), file_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Bounding Box"), bbox_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Extra"), extra_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("File").c_str(),
|
||||
file_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Bounding Box").c_str(),
|
||||
bbox_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Extra").c_str(),
|
||||
extra_->form);
|
||||
|
||||
// set the right default unit
|
||||
switch (lyxrc.default_papersize) {
|
||||
|
@ -104,7 +104,7 @@ void FormMathsBitmap::build()
|
||||
x_ = (fdui->form->w - 90) / 2;
|
||||
y_ = y_close + 10;
|
||||
|
||||
char const * const label = _("Close|^[");
|
||||
string const label = _("Close|^[");
|
||||
fdui->button_close = fl_add_button(FL_NORMAL_BUTTON, x_, y_, 90, 30,
|
||||
idex(label).c_str());
|
||||
fl_set_button_shortcut(fdui->button_close, scex(label).c_str(), 1);
|
||||
|
@ -65,7 +65,8 @@ void FormMathsMatrix::build()
|
||||
{
|
||||
dialog_.reset(build_maths_matrix(this));
|
||||
|
||||
fl_addto_choice(dialog_->choice_valign, _("Top | Center | Bottom"));
|
||||
fl_addto_choice(dialog_->choice_valign,
|
||||
_("Top | Center | Bottom").c_str());
|
||||
fl_set_choice(dialog_->choice_valign, 2);
|
||||
fl_set_input(dialog_->input_halign, h_align_str);
|
||||
dialog_->input_halign->u_vdata = this;
|
||||
|
@ -227,70 +227,70 @@ void FormPreferences::build()
|
||||
// Stack tabs
|
||||
// Now add them to the tabfolder
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Look & Feel"),
|
||||
_("Look & Feel").c_str(),
|
||||
look_n_feel_tab_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Lang Opts"),
|
||||
_("Lang Opts").c_str(),
|
||||
lang_opts_tab_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Conversion"),
|
||||
_("Conversion").c_str(),
|
||||
converters_tab_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Inputs"),
|
||||
_("Inputs").c_str(),
|
||||
inputs_tab_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Outputs"),
|
||||
_("Outputs").c_str(),
|
||||
outputs_tab_->form);
|
||||
|
||||
// now build the nested tabfolders
|
||||
// Starting with look and feel
|
||||
fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
|
||||
_("Screen Fonts"),
|
||||
_("Screen Fonts").c_str(),
|
||||
screen_fonts_.dialog()->form);
|
||||
fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
|
||||
_("Interface"),
|
||||
_("Interface").c_str(),
|
||||
interface_.dialog()->form);
|
||||
fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
|
||||
_("Colors"),
|
||||
_("Colors").c_str(),
|
||||
colors_.dialog()->form);
|
||||
fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
|
||||
_("Misc"),
|
||||
_("Misc").c_str(),
|
||||
lnf_misc_.dialog()->form);
|
||||
fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
|
||||
_("Identity"),
|
||||
_("Identity").c_str(),
|
||||
identity_.dialog()->form);
|
||||
|
||||
// then build converters
|
||||
fl_addto_tabfolder(converters_tab_->tabfolder_inner,
|
||||
_("Formats"),
|
||||
_("Formats").c_str(),
|
||||
formats_.dialog()->form);
|
||||
fl_addto_tabfolder(converters_tab_->tabfolder_inner,
|
||||
_("Converters"),
|
||||
_("Converters").c_str(),
|
||||
converters_.dialog()->form);
|
||||
|
||||
// then build inputs
|
||||
// Paths should probably go in a few inner_tab called Files
|
||||
fl_addto_tabfolder(inputs_tab_->tabfolder_inner,
|
||||
_("Paths"),
|
||||
_("Paths").c_str(),
|
||||
paths_.dialog()->form);
|
||||
fl_addto_tabfolder(inputs_tab_->tabfolder_inner,
|
||||
_("Misc"),
|
||||
_("Misc").c_str(),
|
||||
inputs_misc_.dialog()->form);
|
||||
|
||||
// then building outputs
|
||||
fl_addto_tabfolder(outputs_tab_->tabfolder_inner,
|
||||
_("Printer"),
|
||||
_("Printer").c_str(),
|
||||
printer_.dialog()->form);
|
||||
fl_addto_tabfolder(outputs_tab_->tabfolder_inner,
|
||||
_("Misc"),
|
||||
_("Misc").c_str(),
|
||||
outputs_misc_.dialog()->form);
|
||||
|
||||
// then building usage
|
||||
fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
|
||||
_("Spell checker"),
|
||||
_("Spell checker").c_str(),
|
||||
spelloptions_.dialog()->form);
|
||||
fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
|
||||
_("Language"),
|
||||
_("Language").c_str(),
|
||||
language_.dialog()->form);
|
||||
}
|
||||
|
||||
@ -1887,7 +1887,8 @@ void FormPreferences::LnFmisc::build()
|
||||
setPrehandler(dialog_->check_preview_latex);
|
||||
setPrehandler(dialog_->counter_wm_jump);
|
||||
|
||||
fl_addto_choice(dialog_->choice_display, _("Monochrome|Grayscale|Color|Do not display"));
|
||||
fl_addto_choice(dialog_->choice_display,
|
||||
_("Monochrome|Grayscale|Color|Do not display").c_str());
|
||||
}
|
||||
|
||||
|
||||
@ -1986,7 +1987,8 @@ void FormPreferences::OutputsMisc::build()
|
||||
fl_set_input_return(dialog_->input_paperoption, FL_RETURN_CHANGED);
|
||||
|
||||
fl_addto_choice(dialog_->choice_default_papersize,
|
||||
_(" default | US letter | US legal | US executive | A3 | A4 | A5 | B5 "));
|
||||
_(" default | US letter | US legal "
|
||||
"| US executive | A3 | A4 | A5 | B5 ").c_str());
|
||||
|
||||
// set up the feedback mechanism
|
||||
setPrehandler(dialog_->counter_line_len);
|
||||
@ -2863,7 +2865,7 @@ void FormPreferences::SpellOptions::build()
|
||||
dialog_.reset(build_preferences_spelloptions(&parent_));
|
||||
|
||||
fl_addto_choice(dialog_->choice_spell_command,
|
||||
_(" ispell | aspell "));
|
||||
_(" ispell | aspell ").c_str());
|
||||
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);
|
||||
|
@ -42,7 +42,7 @@ void FormRef::build()
|
||||
|
||||
for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i)
|
||||
fl_addto_choice(dialog_->choice_format,
|
||||
_(InsetRef::types[i].gui_name.c_str()));
|
||||
_(InsetRef::types[i].gui_name).c_str());
|
||||
|
||||
// Force the user to use the browser to change refs.
|
||||
fl_deactivate_object(dialog_->input_ref);
|
||||
@ -175,7 +175,7 @@ void FormRef::updateBrowser(vector<string> const & akeys) const
|
||||
|
||||
if (keys.empty()) {
|
||||
fl_add_browser_line(dialog_->browser_refs,
|
||||
_("*** No labels found in document ***"));
|
||||
_("*** No labels found in document ***").c_str());
|
||||
|
||||
setEnabled(dialog_->browser_refs, false);
|
||||
setEnabled(dialog_->check_sort, false);
|
||||
@ -273,11 +273,11 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
|
||||
void FormRef::switch_go_button()
|
||||
{
|
||||
if (at_ref_) {
|
||||
fl_set_object_label(dialog_->button_go, _("Go back"));
|
||||
tooltips().init(dialog_->button_go, _("Go back to original place."));
|
||||
fl_set_object_label(dialog_->button_go, _("Go back").c_str());
|
||||
tooltips().init(dialog_->button_go, _("Go back to original place.").c_str());
|
||||
} else {
|
||||
fl_set_object_label(dialog_->button_go, _("Go to"));
|
||||
tooltips().init(dialog_->button_go, _("Go to selected reference."));
|
||||
fl_set_object_label(dialog_->button_go, _("Go to").c_str());
|
||||
tooltips().init(dialog_->button_go, _("Go to selected reference.").c_str());
|
||||
}
|
||||
fl_set_button_shortcut(dialog_->button_go, "#G", 1);
|
||||
fl_show_object(dialog_->button_go);
|
||||
|
@ -127,13 +127,13 @@ void FormTabular::build()
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Table"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Table").c_str(),
|
||||
tabular_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Column/Row"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Column/Row").c_str(),
|
||||
column_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Cell"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Cell").c_str(),
|
||||
cell_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("LongTable"),
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("LongTable").c_str(),
|
||||
longtable_options_->form);
|
||||
|
||||
// FIXME: addReadOnly everything
|
||||
|
@ -97,7 +97,7 @@ void FormToc::updateContents()
|
||||
if (type.empty()) {
|
||||
fl_clear_browser(dialog_->browser_toc);
|
||||
fl_add_browser_line(dialog_->browser_toc,
|
||||
_("*** No Lists ***"));
|
||||
_("*** No Lists ***").c_str());
|
||||
setEnabled(dialog_->browser_toc, false);
|
||||
return;
|
||||
}
|
||||
@ -115,7 +115,7 @@ void FormToc::updateContents()
|
||||
if (contents.empty()) {
|
||||
fl_clear_browser(dialog_->browser_toc);
|
||||
fl_add_browser_line(dialog_->browser_toc,
|
||||
_("*** No Lists ***"));
|
||||
_("*** No Lists ***").c_str());
|
||||
setEnabled(dialog_->browser_toc, false);
|
||||
return;
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ s/CHOICE/COMBOX/
|
||||
|
||||
|
||||
# For all lines containing "fl_" and a string _not_ containing |,
|
||||
# replace the string with _(string)
|
||||
/fl_/ s/".[^|]*"/_(&)/
|
||||
# replace the string with _(string).c_str()
|
||||
/fl_/ s/".[^|]*"/_(&).c_str()/
|
||||
|
||||
|
||||
# For all lines containing "_shortcut" and a string containing |,
|
||||
|
@ -1,12 +1,13 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
/**
|
||||
* \file gettext.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Jean-Marc Lasgouttes
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ====================================================== */
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -32,12 +33,6 @@ Messages & getLyXMessages()
|
||||
} // anon namespace
|
||||
|
||||
|
||||
char const * _(char const * str)
|
||||
{
|
||||
return getLyXMessages().get(str).c_str();
|
||||
}
|
||||
|
||||
|
||||
string const _(string const & str)
|
||||
{
|
||||
return getLyXMessages().get(str);
|
||||
|
@ -1,4 +1,14 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file gettext.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Jean-Marc Lasgouttes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
#ifndef _GETTEXT_H_
|
||||
#define _GETTEXT_H_
|
||||
|
||||
@ -34,8 +44,6 @@
|
||||
|
||||
//#ifdef ENABLE_NLS
|
||||
|
||||
///
|
||||
char const * _(char const *);
|
||||
///
|
||||
string const _(string const &);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user