aboutsummaryrefslogtreecommitdiffstats
path: root/installer/6/hr/content/selectInstallClass.html
blob: 57a7a5fde462aab1e232be22d14912785c751eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="X-UA-Compatible" content="IE=7"/>
    <title>Install or Upgrade</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"/><link rel="home" href="index.html" title="Instalacija pomoću"/><link rel="up" href="index.html" title="Instalacija pomoću"/><link rel="prev" href="setupSCSI.html" title="Setup SCSI"/><link rel="next" href="selectKeyboard.html" title="Tipkovnica"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script type="text/javascript">
      //The id for tree cookie
      var treeCookieId = "treeview-2152";
      var language = "en";
      var w = new Object();
      //Localization
      txt_filesfound = 'Results';
      txt_enter_at_least_1_char = "You must enter at least one character.";
      txt_browser_not_supported = "JavaScript is disabled on your browser. Please enable JavaScript to enjoy all the features of this site.";
      txt_please_wait = "Please wait. Search in progress...";
      txt_results_for = "Results for: ";
      txt_no_results_for = "";
    </script><style type="text/css">
      input {
      margin-bottom: 5px;
      margin-top: 2px;
      }

      .folder {
      display: block;
      height: 22px;
      padding-left: 20px;
      background: transparent url(../../common/jquery/treeview/images/folder.gif) 0 0px no-repeat;
      }
      
    </style><link rel="shortcut icon" href="favicon.png" type="image/x-icon"/><link rel="stylesheet" type="text/css" href="../../common/css/positioning.css"/><link rel="stylesheet" type="text/css" href="../../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/><link rel="stylesheet" type="text/css" href="../../common/jquery/treeview/jquery.treeview.css"/><link rel="stylesheet" type="text/css" href="webhelp-default.css"/><link rel="stylesheet" type="text/css" href="webhelp-custom.css"/><script type="text/javascript" src="../../common/jquery/jquery-1.4.2.min.js"><!----></script><script type="text/javascript" src="../../common/jquery/jquery-ui-1.8.2.custom.min.js"><!----></script><script type="text/javascript" src="../../common/jquery/jquery.cookie.js"><!----></script><script type="text/javascript" src="../../common/jquery/treeview/jquery.treeview.min.js"><!----></script><script type="text/javascript" src="search/htmlFileList.js"><!----></script><script type="text/javascript" src="search/htmlFileInfoList.js"><!----></script><script type="text/javascript" src="nwSearchFnt.js"><!----></script><script type="text/javascript" src="search/stemmers/en_stemmer.js"><!--//make this scalable to other languages as well.--></script><script type="text/javascript" src="search/index-1.js"><!----></script><script type="text/javascript" src="search/index-2.js"><!----></script><script type="text/javascript" src="search/index-3.js"><!----></script></head><body><div xmlns="" id="header"><div id="navheader"><!----><table><tr><td style="height: 28px; width: 16px;"><a id="showHideButton" onclick="showHideToc();" class="pointLeft" title="Hide TOC tree">.
	    </a></td><td><img src="../../common/images/highlight-blue.gif" alt="H" height="25px" onclick="toggleHighlight()" id="showHideHighlight" style="cursor:pointer" title="Toggle search result highlighting"/></td><td><a accesskey="p" href="setupSCSI.html">Natrag</a> 
		|
		<a accesskey="n" href="selectKeyboard.html">Naprijed</a></td></tr></table></div><div id="headerlogo"><img src="mageia-2013-200p.png" alt="Company Logo"/></div><h1 id="pagetitle">Install or Upgrade<br/> </h1></div><div id="content"><!----><div xml:lang="hr" class="section" title="Install or Upgrade"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="selectInstallClass"><!----></a>Install or Upgrade</h2></div></div></div><div class="mediaobject" align="center"><img src="images/dx2-selectInstallClass.png" align="middle"/></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Instaliraj</p><p>Use this option for a fresh <span class="application">Mageia</span> installation.</p></li><li class="listitem"><p>Upgrade</p><p>If you have one or more <span class="application">Mageia</span> installations on
your system, the installer will allow you to upgrade one of them to the
latest release.</p><div class="warning" title="Upozorenje" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Upozorenje</h3><p>Only upgrading from a previous Mageia version that was <span class="emphasis"><em>still
supported</em></span> when this installer's version was released, has been
thoroughly tested. If you want to upgrade a Mageia version that had already
reached its End	Of Life when this one was released, then it is better to do
a clean install while preserving your <code class="literal">/home</code> partition.</p></div></li></ul></div><div class="note" title="Bilješka" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Bilješka</h3><p>If during install you decide to stop the installation, it is possible to
reboot, but please think twice before you do this. Once a partition has been
formatted or updates have started to be installed, your computer isn't in
the same state anymore and rebooting it could very well leave you with an
unusable system. If in spite of that you are very sure rebooting is what you
want, go to a text terminal by pressing the three keys <span class="guilabel">Alt Ctrl
F2</span> at the same time. After that, press <span class="guilabel">Alt Ctrl
Delete</span> simultaneously to reboot.</p></div><div class="tip" title="Savjet" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Savjet</h3><p>If you have discovered that you forgot to select an additional language, you
can return from the "Install or Upgrade" screen to the language choice
screen by pressing <span class="guilabel">Alt Ctrl Home</span>. Do
<span class="emphasis"><em>not</em></span> do this later in the install.</p></div></div><script xmlns="" type="text/javascript" src="main.js"><!----></script><hr xmlns=""/><div xmlns="" class="copyright">© Mageia</div><div xmlns="" class="license"><a href="index.html#CC_BY-SA">CC BY-SA 3.0</a></div><div id="upload_date">Uploaded on 14/07/2017</div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setupSCSI.html">Natrag</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="selectKeyboard.html">Naprijed</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Početak</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></div><div><div id="leftnavigation"><div id="tabs"><ul><li><a href="#treeDiv"><em>Contents</em></a></li><li><a href="#searchDiv"><em>Traži</em></a></li></ul><div id="treeDiv"><img src="../../common/images/loading.gif" alt="loading table of contents..." id="tocLoading" style="display:block;"/><div id="ulTreeDiv" style="display:none"><ul id="tree" class="filetree"><li><span class="file section"><a href="Select-and-use-ISOs.html">Select and use ISOs</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e18">Uvod</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e28">Media</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e30">Definition</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e35">Classical installation media</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e37">Common features</a></span></li></ul></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e52">Live media</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e54">Common features</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e68">Live DVD Plasma</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e77">Live DVD GNOME</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e86">Live DVD Xfce</a></span></li></ul></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e95">Boot-only CD media</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e97">Common features</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e108">netinstall.iso</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e113">netinstall-nonfree.iso</a></span></li></ul></li></ul></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e118">Downloading and Checking Media</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e120">Downloading</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e132">Checking the integrity of the downloaded media</a></span></li></ul></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e145">Burn or dump the ISO</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e148">Burning the ISO to a CD/DVD</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e153">Dump the ISO to a USB stick</a></span><ul><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e159">Using a graphical tool within Mageia</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e163">Using a graphical tool within Windows</a></span></li><li><span class="file section"><a href="Select-and-use-ISOs.html#d4e170">Using Command line within a GNU/Linux system</a></span></li></ul></li></ul></li></ul></li><li><span class="file section"><a href="installer.html">DrakX, Mageia instalacijski program</a></span><ul><li><span class="file section"><a href="installer.html#installationSteps">The installation steps</a></span></li><li><span class="file section"><a href="installer.html#installationProblems">Installation Problems and Possible Solutions</a></span><ul><li><span class="file section"><a href="installer.html#noX">No Graphical Interface</a></span></li><li><span class="file section"><a href="installer.html#installFreezes">The Install Freezes</a></span></li><li><span class="file section"><a href="installer.html#kernelOptions">RAM problem</a></span></li><li><span class="file section"><a href="installer.html#DynamicPartitions">Dynamic partitions</a></span></li></ul></li></ul></li><li><span class="file section"><a href="selectLanguage.html">Molim izaberite jezik koji želite koristiti</a></span></li><li><span class="file section"><a href="acceptLicense.html">Licenca i bilješka o izdanju</a></span><ul><li><span class="file section"><a href="acceptLicense.html#license">Ugovor o licenci</a></span></li><li><span class="file section"><a href="acceptLicense.html#releaseNotes">Bilješke o izdanju</a></span></li></ul></li><li><span class="file section"><a href="setupSCSI.html">Setup SCSI</a></span></li><li id="webhelp-currentid"><span class="file section"><a href="selectInstallClass.html">Install or Upgrade</a></span></li><li><span class="file section"><a href="selectKeyboard.html">Tipkovnica</a></span></li><li><span class="file section"><a href="doPartitionDisks.html">Particioniranje</a></span></li><li><span class="file section"><a href="ask_mntpoint_s.html">Odaberite mjesta montiranja</a></span></li><li><span class="file section"><a href="takeOverHdConfirm.html">Confirm hard disk to be formatted</a></span></li><li><span class="file section"><a href="diskdrake.html">Custom disk partitioning with DiskDrake</a></span></li><li><span class="file section"><a href="formatPartitions.html">Formatiram</a></span></li><li><span class="file section"><a href="add_supplemental_media.html">Odabir Medija (Konfiguracija dopunskog instalacijskog medija)</a></span></li><li><span class="file section"><a href="media_selection.html">Media Selection (Nonfree)</a></span></li><li><span class="file section"><a href="chooseDesktop.html">Odabir radnog okruženja</a></span></li><li><span class="file section"><a href="choosePackageGroups.html">Odabir grupe paketa</a></span></li><li><span class="file section"><a href="minimal-install.html">Minimal Install</a></span></li><li><span class="file section"><a href="choosePackagesTree.html">Izaberi pojedinačne pakete</a></span></li><li><span class="file section"><a href="addUser.html">Upravljanje korisnikom i superkorisnikom</a></span><ul><li><span class="file section"><a href="addUser.html#root-password">Poostavi administratorsku (root) lozinku:</a></span></li><li><span class="file section"><a href="addUser.html#enterUser">Unesite korisnika</a></span></li><li><span class="file section"><a href="addUser.html#addUserAdvanced">Napredno korisničko upravljanje</a></span></li></ul></li><li><span class="file section"><a href="configureX_chooser.html">Konfiguracija grafičke kartice i monitora</a></span></li><li><span class="file section"><a href="configureX_card_list.html">Choose an X Server (Configure your Graphic Card)</a></span></li><li><span class="file section"><a href="configureX_monitor.html">Izaberite vaš monitor</a></span></li><li><span class="file section"><a href="setupBootloader.html">Glavne postavke bootloadera</a></span><ul><li><span class="file section"><a href="setupBootloader.html#d4e848">Sučelje bootloadera</a></span><ul><li><span class="file section"><a href="setupBootloader.html#d4e858">Grub2 on Legacy/MBR and Legacy/GPT systems</a></span></li><li><span class="file section"><a href="setupBootloader.html#d4e864">Grub2-efi on UEFI systems</a></span></li></ul></li><li><span class="file section"><a href="setupBootloader.html#d4e872">Using a Mageia bootloader</a></span></li><li><span class="file section"><a href="setupBootloader.html#d4e886">Using an existing bootloader</a></span></li><li><span class="file section"><a href="setupBootloader.html#d4e889">Using chain loading</a></span></li><li><span class="file section"><a href="setupBootloader.html#d4e903">Options</a></span><ul><li><span class="file section"><a href="setupBootloader.html#d4e905">First page</a></span></li><li><span class="file section"><a href="setupBootloader.html#d4e937">Next page</a></span></li></ul></li></ul></li><li><span class="file section"><a href="setupBootloaderAddEntry.html">Add or Modify a Boot Menu Entry</a></span></li><li><span class="file section"><a href="misc-params.html">Summary of miscellaneous parameters</a></span><ul><li><span class="file section"><a href="misc-params.html#misc-params-system">System parameters</a></span></li><li><span class="file section"><a href="misc-params.html#misc-params-hardware">Hardware parameters</a></span></li><li><span class="file section"><a href="misc-params.html#misc-params-network">Network and Internet parameters</a></span></li><li><span class="file section"><a href="misc-params.html#misc-params-security">Sigurnost</a></span></li></ul></li><li><span class="file section"><a href="configureTimezoneUTC.html">Konfigurirajte vremensku zonu</a></span></li><li><span class="file section"><a href="selectCountry.html">Select your Country / Region</a></span><ul><li><span class="file section"><a href="selectCountry.html#inputMethod">Input method</a></span></li></ul></li><li><span class="file section"><a href="configureServices.html">Konfigurirajte vaše servise</a></span></li><li><span class="file section"><a href="selectMouse.html">Select mouse</a></span></li><li><span class="file section"><a href="soundConfig.html">Konfiguracija zvuka</a></span><ul><li><span class="file section"><a href="soundConfig.html#soundConfig-Advanced">Napredno</a></span></li></ul></li><li><span class="file section"><a href="securityLevel.html">Sigurnosna Razina</a></span></li><li><span class="file section"><a href="installUpdates.html">Nadogradnje</a></span></li><li><span class="file section"><a href="exitInstall.html">Čestitamo</a></span></li><li><span class="file section"><a href="uninstall-Mageia.html">Uninstalling Mageia</a></span><ul><li><span class="file section"><a href="uninstall-Mageia.html#d4e1192">Howto</a></span></li></ul></li></ul></div></div><div id="searchDiv"><div id="search"><form onsubmit="Verifie(ditaSearch_Form);return false" name="ditaSearch_Form" class="searchForm"><fieldset class="searchFieldSet"><legend>Traži</legend><center><input id="textToSearch" name="textToSearch" type="text" class="searchText"/> &nbsp; <input onclick="Verifie(ditaSearch_Form)" type="button" class="searchButton" value="Go" id="doSearch"/></center></fieldset></form></div><div id="searchResults"><center/></div></div></div></div></div></body></html>
s="hl opt">== 0 and die "ask_from_list: empty list\n" . backtrace(); @$l == 1 and return $l->[0]; goto &ask_from_listf_raw_no_check; } sub ask_from_listf_raw_no_check { my ($o, $common, $f, $l, $o_def) = @_; if (@$l <= ($::isWizard ? 1 : 2)) { my ($ok, $cancel) = map { $_ && may_apply($f, $_) } @$l; if (length "$ok$cancel" < 70) { my $ret = eval { put_in_hash($common, { ok => $ok, if_($cancel, cancel => $cancel, focus_cancel => $o_def eq $l->[1]) }); ask_from_no_check($o, $common, []) ? $l->[0] : $l->[1]; }; die if $@ && $@ !~ /^wizcancel/; return $@ ? undef : $ret; } } ask_from_no_check($o, $common, [ { val => \$o_def, type => 'list', list => $l, format => $f } ]) && $o_def; } sub ask_from_treelist { my ($o, $title, $message, $separator, $l, $o_def) = @_; ask_from_treelistf($o, $title, $message, $separator, undef, $l, $o_def); } sub ask_from_treelist_ { my ($o, $title, $message, $separator, $l, $o_def) = @_; my $transl = sub { join '|', map { translate($_) } split(quotemeta($separator), $_[0]) }; ask_from_treelistf($o, $title, $message, $separator, $transl, $l, $o_def); } sub ask_from_treelistf { my ($o, $title, $message, $separator, $f, $l, $o_def) = @_; ask_from($o, $title, $message, [ { val => \$o_def, separator => $separator, list => $l, format => $f, sort => 1 } ]) or return; $o_def; } sub ask_many_from_list { my ($o, $title, $message, @l) = @_; @l = grep { @{$_->{list}} } @l or return ''; foreach my $h (@l) { $h->{e}{$_} = { text => may_apply($h->{label}, $_), val => $h->{val} ? $h->{val}->($_) : do { my $i = $h->{value} ? $h->{value}->($_) : $h->{values} ? member($_, @{$h->{values}}) : 0; \$i; }, type => 'bool', help => may_apply($h->{help}, $_, ''), icon => may_apply($h->{icon2f}, $_, ''), } foreach @{$h->{list}}; if ($h->{sort}) { $h->{list} = [ sort { $h->{e}{$a}{text} cmp $h->{e}{$b}{text} } @{$h->{list}} ]; } } $o->ask_from($title, $message, [ map { my $h = $_; map { $h->{e}{$_} } @{$h->{list}} } @l ]) or return; @l = map { my $h = $_; [ grep { ${$h->{e}{$_}{val}} } @{$h->{list}} ]; } @l; wantarray() ? @l : $l[0]; } sub ask_from_entry { my ($o, $title, $message, %callback) = @_; first(ask_from_entries($o, $title, $message, [''], %callback)); } sub ask_from_entries { my ($o, $title, $message, $l, %callback) = @_; my @l = map { my $i = ''; { label => $_, val => \$i } } @$l; $o->ask_from_({ title => $title, messages => $message, %callback, focus_first => 1 }, \@l) or return; map { ${$_->{val}} } @l; } sub ask_from__add_modify_remove { my ($o, $title, $message, $l, %callback) = @_; die "ask_from__add_modify_remove only handles one item" if @$l != 1; $callback{$_} or internal_error("missing callback $_") foreach qw(Add Modify Remove); if ($o->can('ask_from__add_modify_removeW')) { $o->ask_from__add_modify_removeW($title, $message, $l, %callback); } else { my $e = $l->[0]; my $chosen_element; put_in_hash($e, { allow_empty_list => 1, val => \$chosen_element, type => 'list' }); while (1) { my $continue; my @l = (@$l, map { my $s = $_; { val => translate($_), clicked_may_quit => sub { my $r = $callback{$s}->($chosen_element); defined $r or return; $continue = 1; } } } N_("Add"), if_(@{$e->{list}} > 0, N_("Modify"), N_("Remove"))); $o->ask_from_({ title => $title, messages => $message, %callback }, \@l) or return; return 1 if !$continue; } } } #- can get a hash of callback: validate #- moreove if you pass a hash with a field list -> combo #- if you pass a hash with a field hidden -> emulate stty -echo sub ask_from { my ($o, $title, $message, $l, %callback) = @_; ask_from_($o, { title => $title, messages => $message, %callback }, $l); } sub _normalize_entry { my ($o, $e) = @_; if (my $li = $e->{list}) { ref($e->{val}) =~ /SCALAR|REF/ or internal_error($e->{val} ? "field {val} must be a reference (it is $e->{val})" : "field {val} is mandatory"); #-# if ($e->{sort} || @$li > 10 && !exists $e->{sort}) { my @l2 = map { may_apply($e->{format}, $_) } @$li; my @places = sort { $l2[$a] cmp $l2[$b] } 0 .. $#l2; $e->{list} = $li = [ map { $li->[$_] } @places ]; } $e->{type} = 'iconlist' if $e->{icon2f}; $e->{type} = 'treelist' if $e->{separator} && $e->{type} ne 'combo'; add2hash_($e, { not_edit => 1 }); $e->{type} ||= 'combo'; if (!$e->{not_edit}) { die q(when using "not_edit" you must use strings, not a data structure) if ref(${$e->{val}}) || any { ref $_ } @$li; } if ($e->{type} ne 'combo' || $e->{not_edit}) { ${$e->{val}} = $li->[0] if !member(may_apply($e->{format}, ${$e->{val}}), map { may_apply($e->{format}, $_) } @$li); } } elsif ($e->{type} eq 'range') { $e->{min} <= $e->{max} or die "bad range min $e->{min} > max $e->{max} (called from " . join(':', caller()) . ")"; ${$e->{val}} = max($e->{min}, min(${$e->{val}}, $e->{max})); } elsif ($e->{type} eq 'button' || $e->{clicked} || $e->{clicked_may_quit}) { $e->{type} = 'button'; $e->{clicked_may_quit} ||= $e->{clicked} ? sub { $e->{clicked}(); 0 } : sub {}; $e->{val} = \ (my $_v = $e->{val}) if !ref($e->{val}); } elsif (!$e->{type} && !$e->{val}) { $e->{type} = 'only_label'; $e->{val} = \ (my $_v = $o->adapt_markup(delete $e->{label})); } elsif ($e->{type} eq 'label' || !ref($e->{val})) { $e->{type} = 'label'; $e->{val} = \ (my $_v = $e->{val}) if !ref($e->{val}); } elsif ($e->{type} eq 'expander') { _normalize_entries($o, $e->{children}); } else { $e->{type} ||= 'entry'; } $e->{label} = $o->adapt_markup($e->{label}) if $e->{label}; } sub _normalize_entries { my ($o, $l) = @_; ref($l) eq 'ARRAY' or internal_error('ask_from_normalize'); _normalize_entry($o, $_) foreach @$l; #- do not display empty lists and one element lists @$l = grep { if ($_->{list} && $_->{not_edit} && !$_->{allow_empty_list}) { if (!@{$_->{list}}) { eval { require 'log.pm'; #- "require log" causes some pb, perl thinking that "log" is the log() function log::l("ask_from_normalize: empty list for $_->{label}\n" . backtrace()); }; } @{$_->{list}} > 1; } else { 1; } } @$l; } sub ask_from_normalize { my ($o, $common, $l) = @_; if ($common->{focus_first}) { if (my $e = find { $_->{val} } @$l) { $e->{focus} = sub { 1 }; } } _normalize_entries($o, $l); if (!$common->{title} && $::isStandalone) { ($common->{title} = $0) =~ s|.*/||; } $common->{interactive_help} ||= $o->{interactive_help}; $common->{interactive_help} ||= $common->{interactive_help_id} && $o->interactive_help_sub_get_id($common->{interactive_help_id}); if (!$::isInstall) { delete $common->{$_} foreach qw(interactive_help interactive_help_id); } $common->{advanced_label} ||= N("Advanced"); $common->{advanced_label_close} and log::l("advanced_label_close is not used anymore"); $common->{$_} = $common->{$_} ? [ map { $o->adapt_markup($_) } deref($common->{$_}) ] : [] foreach qw(messages advanced_messages); if ($common->{callbacks}) { $common->{callbacks}{changed} and internal_error(q(global "changed" callback is not handled anymore, use a per-entry changed callback)); $common->{callbacks}{focus_out} and internal_error(q(global "focus_out" callback is not handled anymore, use a per-entry focus_out callback)); add2hash($common, delete $common->{callbacks}); } if (my $complete = delete $common->{complete}) { $common->{validate} = sub { !first($complete->()) }; } add2hash_($common, { validate => sub { 1 } }); } sub migrate_advanced { my ($common, $l) = @_; my ($l1, $l2) = partition { !$_->{advanced} } @$l; my $advanced_message = join("\n", @{$common->{advanced_messages}}); [ @$l1, if_(@$l2, { type => 'expander', if_($advanced_message, message => $advanced_message), text => $common->{advanced_label}, expanded => $common->{advanced_state}, children => $l2, }) ]; } =item ask_from_($o, $common, $l) ask_from_() takes global options ($common): =over 4 =item * B<title>: window title =item * B<messages>: message displayed in the upper part of the window =item * B<ok>: force the name of the "Ok"/"Next" button =item * B<cancel>: force the name of the "Cancel"/"Previous" button =item * B<focus_cancel>: force focus on the "Cancel" button =item * I<focus_first>: (deprecated) force focus on the first entry =item * B<ok_disabled>: function returning whether {ok} should be disabled (grayed) =item * B<validate>: function called when {ok} is pressed. If it returns false, the first entry is focused, otherwise it quits =item * I<advanced>: (deprecated) function called when the "advanced" expander is toggled =item * I<advanced_messages>: (deprecated) message displayed when "Advanced" is pressed =item * I<advanced_label>: (deprecated) force the name of the "Advanced" button =item * I<advanced_label_close>: (deprecated) force the name of the "Basic" button =item * I<advanced_state>: (deprecated) if set to 1, force the "Advanced" part of the dialog to be opened initially =item * I<advanced_title>: title of the advanced item popup dialog (else reusing main title) =item * I<callbacks>: (deprecated) functions called when something happen: complete advanced ok_disabled =back ask_from_ takes a list of entries with fields: =over 4 =item * B<val>: reference to the value =item * B<label>: description =item * B<title>: a boolean: whether the label should be displayed as a title (see GNOME's HIG) =item * B<icon>: icon to put before the description =item * B<help>: tooltip =item * I<advanced>: (deprecated) whether it is shown in by default or only in advanced mode =item * B<focus_out>: function called when the entry is focused out =item * B<changed>: function called when the entry is modified =item * B<validate>: function called when "Ok" is pressed. If it returns false, this entry is focused, otherwise it quits =item * B<disabled>: function returning whether it should be disabled (grayed) =item * B<focus>: function returning whether it should be focused =item * B<alignment>: preferred alignment =item * B<do_not_expand>: do not eat all horizontal space =item * B<install_button>: if possible, use improved graphical style =item * B<gtk>: gtk preferences =item * B<type>: =over 4 =item * B<button>: (with clicked or clicked_may_quit) I<type> defaults to button if clicked or clicked_may_quit is there. I<val> need not be a reference. If I<clicked_may_quit> return true, it's as if "Ok" was pressed. =item * B<label>: I<val> need not be a reference. I<type> defaults to label if val is not a reference. =item * B<bool>: (with "text" or "image" (which overrides text) giving an image filename) =item * B<range>: (with min, max, SpinButton) =item * B<combo>: (with list, not_edit, format) =item * B<list>: (with list, icon2f (aka icon), separator (aka tree), format (aka pre_format function), It has these optional parameters: