79
79
vector<radio_choice> choices;
82
:type(OPTION_END), description(NULL), option_name(NULL)
82
:type(OPTION_END), untranslated_description(NULL), option_name(NULL)
86
option_item(const char *_description,
87
const char *_long_description,
86
option_item(const char *_untranslated_description,
87
const char *_untranslated_long_description,
88
88
const char *_option_name, bool def)
89
89
:type(OPTION_BOOL),
90
description(_description),
91
long_description(_long_description),
90
untranslated_description(_untranslated_description),
91
untranslated_long_description(_untranslated_long_description),
92
92
option_name(_option_name),
97
option_item(const char *_description,
98
const char *_long_description,
97
option_item(const char *_untranslated_description,
98
const char *_untranslated_long_description,
99
99
const char *_option_name,
101
101
:type(OPTION_STRING),
102
description(_description),
103
long_description(_long_description),
102
untranslated_description(_untranslated_description),
103
untranslated_long_description(_untranslated_long_description),
104
104
option_name(_option_name),
109
109
/** \brief Construct a radio item from a list of choices,
110
110
* destroying each choice after it's inserted into the list.
112
static option_item radio(const char *description,
113
const char *long_description,
112
static option_item radio(const char *untranslated_description,
113
const char *untranslated_long_description,
114
114
const char *option_name,
116
116
const radio_choice *choice_1,
150
150
radio_choice *choice(const char *value,
151
const char *description,
152
const char *long_description)
151
const char *untranslated_description,
152
const char *untranslated_long_description)
154
154
return new radio_choice(value,
156
W_(long_description));
155
untranslated_description,
156
untranslated_long_description);
159
159
option_item ui_options[]={
196
196
N_("This option controls whether aptitude will wait for confirmation after a download before it goes ahead and installs packages."),
197
197
PACKAGE "::UI::Pause-After-Download",
199
choice("No", _("Never"),
200
_("Never wait for the user after downloading packages: always begin the installation immediately.")),
201
choice("OnlyIfError", _("When an error occurs"),
202
_("Wait for confirmation if an error occurred during the download. If there were no errors, begin installing packages immediately.")),
203
choice("Yes", _("Always"),
204
_("Always wait for the user to confirm the download before proceeding with the installation.")),
199
choice("No", N_("Never"),
200
N_("Never wait for the user after downloading packages: always begin the installation immediately.")),
201
choice("OnlyIfError", N_("When an error occurs"),
202
N_("Wait for confirmation if an error occurred during the download. If there were no errors, begin installing packages immediately.")),
203
choice("Yes", N_("Always"),
204
N_("Always wait for the user to confirm the download before proceeding with the installation.")),
206
206
option_item(N_("Use a 'status-line' download indicator for all downloads"),
207
207
N_("If this option is enabled, aptitude will display "
208
208
"the status of ongoing downloads at the bottom of "
209
209
"the screen, rather than opening a new view."),
210
210
PACKAGE "::UI::Minibuf-Download-Bar", false),
211
option_item(N_("Display the extended description area by default"),
212
N_("If this option is enabled, the long description "
211
option_item(N_("Display the information area by default"),
212
N_("If this option is enabled, the information "
213
213
"area (the pane at the bottom of the screen) in the "
214
214
"package list will be visible when the program "
215
215
"starts; otherwise, it will be initially hidden."),
216
216
PACKAGE "::UI::Description-Visible-By-Default", true),
217
option_item(N_("Display tabs for the available views"),
218
N_("If this option is enabled, tabs will appear at the top "
219
"of the screen listing the currently opened views."),
220
PACKAGE "::UI::ViewTabs", true),
221
option_item(N_("Display tabs for the information area"),
222
N_("If this option is enabled, tabs will appear at the top of "
223
"the information area (the pane at the bottom of the screen) "
224
"listing the different displays of information that can be "
226
PACKAGE "::UI::InfoAreaTabs", false),
217
227
option_item(N_("Advance to the next item after changing the state of a package"),
218
228
N_("If this option is enabled, then performing an "
219
229
"action on a package (for instance, installing or "
278
288
option_item(N_("URL to use to download changelogs"),
279
289
N_("This option controls the template that's used to "
280
290
"download changelogs from the Debian Web site. You "
281
"should only need to change this if the URL of "
282
"the package archive changes."),
291
"should only need to change this if the changelogs move "
292
"to a different URL."),
283
293
PACKAGE "::Changelog-URL-Template",
284
294
"http://cgi.debian.org/cgi-bin/get-changelog?package=%s"),
285
295
option_item(N_("Display a preview of what will be done before doing it"),
345
355
N_("If this option is enabled, and you perform an "
346
356
"install run while some packages are broken, "
347
357
"aptitude will automatically apply the current "
348
"suggestion of the problem resolver. Otherwise,"
358
"suggestion of the problem resolver. Otherwise, "
349
359
"aptitude will prompt you for a solution to the "
350
360
"broken dependencies."),
351
361
PACKAGE "::Auto-Fix-Broken", true),
352
362
option_item(N_("Install recommended packages automatically"),
353
N_("If this option is enabled and \"automatically "
363
N_("If this option is enabled and \"automatically "
354
364
"resolve dependencies\" is also enabled, aptitude "
355
365
"will attempt to install the recommendations of "
356
366
"newly installed packages in addition to their "
360
370
"If this option is enabled and \"Remove unused "
361
371
"packages automatically\" is enabled, packages "
362
372
"that are recommended by an installed package "
363
"will not automatically be removed."),
364
PACKAGE "::Recommends-Important", true),
373
"will not be automatically removed."),
374
"Apt::Install-Recommends", true),
365
375
option_item(N_("Remove unused packages automatically"),
366
376
N_("If this option is enabled, packages that are "
367
377
"automatically installed and that no manually "
380
390
"depends on them: they will never be targeted "
381
391
"for removal as unused packages."),
382
392
PACKAGE "::Keep-Unused-Pattern", ""),
393
option_item(N_("Allow dependency resolutions that break holds or forbids"),
394
N_("If this option is enabled, then whenever aptitude "
395
"solves a dependency problem, it will consider "
396
"modifying held packages, or installing forbidden "
397
"package versions. With this option disabled, these "
398
"solutions will be rejected by default."
400
"NOTE: At present, this restriction only applies to situations "
401
"in which aptitude's dependency resolver (the red bar "
402
"at the bottom of the screen) is activated. aptitude "
403
"will still break holds when automatically installing "
404
"the dependencies of a package that has just been "
405
"selected for installation or upgrade, due to apt bug "
407
PACKAGE "::ProblemResolver::Allow-Break-Holds", false),
438
/** \brief Instantiate a widget for the given option description.
440
* Any untranslated strings in the structure are translated
441
* by calls to gettext().
413
443
cw::treeitem *parse_option(const option_item &option)
415
445
eassert(option.type != option_item::OPTION_END);
416
446
switch(option.type)
418
448
case option_item::OPTION_BOOL:
419
return make_boolean_item(W_(option.description),
420
W_(option.long_description),
449
return make_boolean_item(W_(option.untranslated_description),
450
_(option.untranslated_long_description),
421
451
option.option_name,
422
452
option.b_default);
423
453
case option_item::OPTION_STRING:
424
return make_string_item(W_(option.description),
425
W_(option.long_description),
454
return make_string_item(W_(option.untranslated_description),
455
_(option.untranslated_long_description),
426
456
option.option_name,
427
457
option.s_default);
428
458
case option_item::OPTION_RADIO:
429
return make_radio_item(W_(option.description),
430
W_(option.long_description),
459
return make_radio_item(W_(option.untranslated_description),
460
_(option.untranslated_long_description),
431
461
option.option_name,
433
463
option.s_default);