Hello community, here is the log from the commit of package yast2-nis-server for openSUSE:Factory checked in at Thu Jan 22 13:19:29 CET 2009. -------- --- yast2-nis-server/yast2-nis-server.changes 2008-09-04 14:40:59.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-nis-server/yast2-nis-server.changes 2009-01-22 10:26:07.744189000 +0100 @@ -1,0 +2,8 @@ +Thu Jan 22 09:29:03 CET 2009 - jsuchome@suse.cz + +- NisServer::modified used to indicate if changes were done +- ask for abort if changes were done (bnc#460168) +- code cleanup +- 2.18.0 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-nis-server-2.17.2.tar.bz2 New: ---- yast2-nis-server-2.18.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-nis-server.spec ++++++ --- /var/tmp/diff_new_pack.n23620/_old 2009-01-22 13:19:02.000000000 +0100 +++ /var/tmp/diff_new_pack.n23620/_new 2009-01-22 13:19:02.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package yast2-nis-server (Version 2.17.2) +# spec file for package yast2-nis-server (Version 2.18.0) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,12 +19,12 @@ Name: yast2-nis-server -Version: 2.17.2 +Version: 2.18.0 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-nis-server-2.17.2.tar.bz2 +Source0: yast2-nis-server-2.18.0.tar.bz2 Prefix: /usr BuildRequires: doxygen perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-network yast2-nis-client yast2-testsuite Requires: yast2-network yast2-nis-client @@ -65,7 +65,7 @@ Martin Vidner <mvidner@suse.cz> %prep -%setup -n yast2-nis-server-2.17.2 +%setup -n yast2-nis-server-2.18.0 %build %{prefix}/bin/y2tool y2autoconf @@ -115,7 +115,13 @@ %doc %{prefix}/share/doc/packages/yast2-nis-server %exclude %{prefix}/share/doc/packages/yast2-nis-server/COPYING %exclude %{prefix}/share/doc/packages/yast2-nis-server/README + %changelog +* Thu Jan 22 2009 jsuchome@suse.cz +- NisServer::modified used to indicate if changes were done +- ask for abort if changes were done (bnc#460168) +- code cleanup +- 2.18.0 * Thu Sep 04 2008 jsuchome@suse.cz - use rpcbind instead of portmap if available (bnc#423026) - 2.17.2 @@ -223,7 +229,7 @@ * Tue Sep 14 2004 jsuchome@suse.cz - adapted testsuite to changes in yast2-firewall - 2.10.5 -* Tue Aug 31 2004 nashif@suse.de +* Mon Aug 30 2004 nashif@suse.de - use modified flag (#43904) - 2.10.4 * Mon Aug 30 2004 jsuchome@suse.cz @@ -334,10 +340,10 @@ - Make "yast2 nis-server" invoke "yast2 nis_server" (#17570). - Merged proofread texts for the second translation round. - 2.6.9 -* Mon Aug 12 2002 mvidner@suse.cz +* Sun Aug 11 2002 mvidner@suse.cz - Let the table keep the keyboard focus (#16116 workaround). - 2.6.8 -* Sun Aug 04 2002 schwab@suse.de +* Sat Aug 03 2002 schwab@suse.de - Fix requires. * Wed Jul 31 2002 mvidner@suse.cz - Added comments for translators @@ -436,7 +442,7 @@ - Fixed backing up /var/yp/{ypservers,securenets}. - Eliminated redundant bash calls in server selection dialog. - 2.4.12 -* Fri Aug 31 2001 ro@suse.de +* Thu Aug 30 2001 ro@suse.de - added <libycp-devel> to neededforbuild (for testsuite) * Mon Aug 27 2001 mvidner@suse.cz - Fixed starting the client (write yp.conf, set START_PORTMAP). ++++++ yast2-nis-server-2.17.2.tar.bz2 -> yast2-nis-server-2.18.0.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/details.ycp new/yast2-nis-server-2.18.0/src/details.ycp --- old/yast2-nis-server-2.17.2/src/details.ycp 2007-07-19 12:53:29.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/details.ycp 2009-01-22 09:17:18.000000000 +0100 @@ -37,7 +37,12 @@ * @return `back, `abort or `next */ define symbol DetailsDialog () ``{ - string srcdir = NisServer::pwd_srcdir; + + string srcdir = NisServer::pwd_srcdir; + + integer minuid = NisServer::minuid; + integer mingid = NisServer::mingid; + boolean merge_passwd = NisServer::merge_passwd; // help text 1/3 string helptext = _("<p>You can change NIS server source directory (usually @@ -51,39 +56,34 @@ // help text 3/3 helptext = helptext + _("<p>You can also adjust the minimum user and group id.</p>"); - boolean merge_passwd = NisServer::merge_passwd; - - term merge_pass_buttons = `VBox (`Left ( + term minimals = `HBox ( + // To translators: intfield label + `IntField (`id (`minuid), _("Minimum &UID"), 0, 50000, minuid), + `HSpacing (), + // To translators: intfield label + `IntField (`id (`mingid), _("Minimum &GID"), 0, 50000, mingid) + ); + + term contents = `HVSquash (`VBox ( + `InputField (`id (`srcdir), `opt(`notify, `hstretch), + // To translators: textentry label + _("&YP Source directory"), srcdir), + `VSpacing (0.5), // check box label - `CheckBox (`id (`merge_passwd), _("Merge pa&sswords"), merge_passwd) + `Left (`CheckBox (`id (`merge_passwd), _("Merge pa&sswords"), + merge_passwd) + ), + `VSpacing (0.5), + minimals )); - term minimals = `HBox (); - - // To translators: intfield label - minimals = add (minimals, `IntField (`id (`minuid), _("Minimum &UID"), 0, 50000, - NisServer::minuid)); - minimals = add (minimals, `HSpacing ()); - // To translators: intfield label - minimals = add (minimals, `IntField (`id (`mingid), _("Minimum &GID"), 0, 50000, - NisServer::mingid)); - - - term contents = `VBox (); - // To translators: textentry label - contents = add (contents, `TextEntry (`id (`srcdir), `opt(`notify), _("&YP Source directory"), - srcdir)); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, merge_pass_buttons); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, minimals); - + // To translators: dialog label + Wizard::SetContents (_("NIS Master Server Details Setup"), + contents, helptext, true, true); - contents = `HVSquash (contents); - - // To translators: dialog label - Wizard::SetContents (_("NIS Master Server Details Setup"), contents, helptext, true, true); + Wizard::SetBackButton(`back, Label::CancelButton() ); Wizard::SetNextButton(`next, Label::OKButton() ); + Wizard::HideAbortButton(); // If the source directory does not exist, it will be created // with empty passwd, group, shadow @@ -114,7 +114,8 @@ change_enabled = (ui == `srcdir); srcdir = (string) UI::QueryWidget (`id (`srcdir), `Value); - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) + ui = `again; if (ui == `next) { if (SCR::Read (.target.dir, srcdir) == nil && !Mode::config ()) @@ -124,17 +125,27 @@ Message::DirectoryDoesNotExistCreate (srcdir)) ? `next : `again; } + merge_passwd = (boolean) UI::QueryWidget (`id (`merge_passwd), `Value); + minuid = (integer) UI::QueryWidget (`id (`minuid), `Value); + mingid = (integer) UI::QueryWidget (`id (`mingid), `Value); + if (NisServer::minuid != minuid || + NisServer::mingid != mingid || + NisServer::merge_passwd != merge_passwd || + NisServer::pwd_srcdir != srcdir) + { + NisServer::modified = true; + NisServer::minuid = minuid; + NisServer::mingid = mingid; + NisServer::merge_passwd = merge_passwd; + NisServer::pwd_srcdir = srcdir; + } } } until (contains ([`back, `next, `abort], ui)); - NisServer::minuid = (integer) UI::QueryWidget (`id (`minuid), `Value); - NisServer::mingid = (integer) UI::QueryWidget (`id (`mingid), `Value); - NisServer::merge_passwd = - (boolean) UI::QueryWidget (`id (`merge_passwd), `Value); - NisServer::pwd_srcdir = srcdir; - + Wizard::RestoreBackButton(); Wizard::RestoreNextButton(); + Wizard::RestoreAbortButton(); return ui; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/maps.ycp new/yast2-nis-server-2.18.0/src/maps.ycp --- old/yast2-nis-server-2.17.2/src/maps.ycp 2005-09-08 10:37:17.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/maps.ycp 2009-01-21 14:52:45.000000000 +0100 @@ -97,12 +97,17 @@ ui = `abort; } - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) + ui = `again; } until (contains ([`back, `next, `abort], ui)); - current = (list<string>) UI::QueryWidget (`id (`current), `SelectedItems); - NisServer::maps = current; + current = (list<string>)UI::QueryWidget (`id (`current),`SelectedItems); + if (ui == `next && (sort (current) != sort (NisServer::maps))) + { + NisServer::maps = current; + NisServer::modified = true; + } return ui; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/master.ycp new/yast2-nis-server-2.18.0/src/master.ycp --- old/yast2-nis-server-2.17.2/src/master.ycp 2005-09-08 10:37:17.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/master.ycp 2009-01-21 14:47:41.000000000 +0100 @@ -38,6 +38,14 @@ */ define symbol MasterDialog () ``{ + boolean pwd_chfn = NisServer::pwd_chfn; + boolean pwd_chsh = NisServer::pwd_chsh; + boolean start_yppasswdd = NisServer::start_yppasswdd; + string domain = NisServer::domain; + boolean start_ypbind = NisServer::start_ypbind; + boolean nopush = NisServer::nopush; + boolean start_ypxfrd = NisServer::start_ypxfrd; + map<string,any> firewall_widget = GetFirewallWidget (); term firewall_layout = firewall_widget["custom_widget"]:`VBox (); @@ -62,73 +70,68 @@ helptext = helptext + firewall_widget["help"]:""; - term pass_yes_buttons = `VBox (); - // To translators: checkbox label - pass_yes_buttons = add (pass_yes_buttons, `Left (`CheckBox (`id (`allow_gecos), _("Allow changes to &GECOS field"), - NisServer::pwd_chfn))); - // To translators: checkbox label - pass_yes_buttons = add (pass_yes_buttons, `Left (`CheckBox (`id (`allow_shell), _("Allow changes to login &shell"), - NisServer::pwd_chsh))); - pass_yes_buttons = `HBox (`HSpacing (3), pass_yes_buttons); - - term pass_buttons = `VBox (); - pass_buttons = add (pass_buttons, `VSpacing (0.3)); - pass_buttons = add (pass_buttons, `Left (`CheckBox (`id (`change_passwords), `opt (`notify), - // To translators: checkbox label - _("Allow changes to &passwords"), - NisServer::start_yppasswdd))); - pass_buttons = add (pass_buttons, `VSpacing (0.3)); - pass_buttons = add (pass_buttons, pass_yes_buttons); - pass_buttons = add (pass_buttons, `VSpacing (0.3)); - pass_buttons = `HBox (`HSpacing (), pass_buttons); - - term domain_frame = `VBox (); - domain_frame = add (domain_frame, `VSpacing (0.3)); - domain_frame = add (domain_frame, `TextEntry (`id (`domain), "", - NisServer::domain)); - domain_frame = add (domain_frame, `VSpacing (0.3)); - domain_frame = add (domain_frame, `Left ( - // To translators: checkbox label - `CheckBox (`id (`also_client), _("This host is also a NIS &client"), - NisServer::start_ypbind))); - domain_frame = add (domain_frame, `VSpacing (0.3)); - domain_frame = `HBox (`HSpacing (), domain_frame, `HSpacing (4)); - - term contents = `VBox (); - contents = add (contents, `VSpacing (0.5)); - // To translators: frame label - contents = add (contents, `Frame (_("NIS &Domain Name"), domain_frame)); - contents = add (contents, `VSpacing (0.5)); - // To translators: checkbox label - contents = add (contents, `HBox (`HSpacing (), `Left (`CheckBox (`id (`have_slave), _("Active Slave NIS server &exists"), - !NisServer::nopush)))); - contents = add (contents, `VSpacing (0.5)); - // To translators: checkbox label - contents = add (contents, `HBox (`HSpacing (),`Left (`CheckBox (`id (`fast_map), _("&Fast Map distribution (rpc.ypxfrd)"), - NisServer::start_ypxfrd)))); - contents = add (contents, `VSpacing (0.5)); - // To translators: frame label - contents = add (contents, `Frame (_("Changing of passwords"), pass_buttons)); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, firewall_layout); + term pass_yes_buttons = `HBox (`HSpacing (3), `VBox ( + `Left (`CheckBox (`id (`allow_gecos), + // To translators: checkbox label + _("Allow changes to &GECOS field"), pwd_chfn)), + `Left (`CheckBox (`id (`allow_shell), + // To translators: checkbox label + _("Allow changes to login &shell"), pwd_chsh)) + )); + + term pass_buttons = `HBox (`HSpacing (), `VBox ( + `VSpacing (0.3), + `Left (`CheckBox (`id (`change_passwords), `opt (`notify), + // To translators: checkbox label + _("Allow changes to &passwords"), start_yppasswdd) + ), + `VSpacing (0.3), + pass_yes_buttons, + `VSpacing (0.3) + )); + + term domain_frame = `HBox (`HSpacing (), `VBox ( + `VSpacing (0.3), + `InputField (`id (`domain), `opt (`hstretch), "", domain), + `VSpacing (0.3), + `Left (`CheckBox (`id (`also_client), + // To translators: checkbox label + _("This host is also a NIS &client"), start_ypbind) + ), + `VSpacing (0.3) + ), `HSpacing (4)); - contents = `VBox ( - contents, + term contents = `HBox (`HSpacing (4), `VBox ( + `VSpacing (0.5), + // To translators: frame label + `Frame (_("NIS &Domain Name"), domain_frame), + `VSpacing (0.5), + `Left (`CheckBox (`id (`have_slave), + // To translators: checkbox label + _("Active Slave NIS server &exists"), !nopush) + ), + `VSpacing (0.5), + `Left (`CheckBox (`id (`fast_map), + // To translators: checkbox label + _("&Fast Map distribution (rpc.ypxfrd)"), start_ypxfrd) + ), + `VSpacing (0.5), + // To translators: frame label + `Frame (_("Changing of passwords"), pass_buttons), + `VSpacing (0.5), + firewall_layout, `VSpacing (0.5), `PushButton (`id (`details), `opt (`key_F7), // To translators: pushbutton label _("&Other global settings ...")) - ); - - contents = `HBox (`HSpacing (4), contents, `HSpacing (6)); + ), `HSpacing (6)); // To translators: dialog label Wizard::SetContents (_("Master Server Setup"), contents, helptext, true, true); - boolean a = NisServer::start_yppasswdd; - UI::ChangeWidget (`id (`allow_shell), `Enabled, a); - UI::ChangeWidget (`id (`allow_gecos), `Enabled, a); + UI::ChangeWidget (`id (`allow_shell), `Enabled, start_yppasswdd); + UI::ChangeWidget (`id (`allow_gecos), `Enabled, start_yppasswdd); CWMFirewallInterfaces::OpenFirewallInit (firewall_widget, ""); @@ -146,32 +149,63 @@ if (ui == `change_passwords) { - boolean enabled = (boolean) UI::QueryWidget (`id (`change_passwords), `Value); - UI::ChangeWidget (`id (`allow_shell), `Enabled, enabled); - UI::ChangeWidget (`id (`allow_gecos), `Enabled, enabled); + start_yppasswdd= (boolean) + UI::QueryWidget (`id (`change_passwords), `Value); + UI::ChangeWidget (`id (`allow_shell), `Enabled,start_yppasswdd); + UI::ChangeWidget (`id (`allow_gecos), `Enabled,start_yppasswdd); } else if (ui == `next) { - string domainname = (string) UI::QueryWidget (`id (`domain), `Value); + string domainname = (string) + UI::QueryWidget (`id (`domain), `Value); if (!Nis::check_nisdomainname (domainname)) { UI::SetFocus (`id (`domain)); Popup::Error (Nis::valid_nisdomainname ()); ui = `again; + continue; } - if (ui == `next) + domain = domainname; + start_ypbind = (boolean) + UI::QueryWidget (`id (`also_client), `Value); + nopush = ! (boolean) + UI::QueryWidget (`id (`have_slave), `Value); + pwd_chfn = (boolean) + UI::QueryWidget (`id (`allow_gecos), `Value); + pwd_chsh = (boolean) + UI::QueryWidget (`id (`allow_shell), `Value); + start_yppasswdd = (boolean) + UI::QueryWidget (`id (`change_passwords), `Value); + start_ypxfrd = (boolean) + UI::QueryWidget (`id (`fast_map), `Value); + + CheckForDHCPClient (domainname); + CWMFirewallInterfaces::OpenFirewallStore ( + firewall_widget,"",event); + + if (NisServer::modified || + domain != NisServer::domain || + start_ypbind != NisServer::start_ypbind || + nopush != NisServer::nopush || + pwd_chfn != NisServer::pwd_chfn || + pwd_chsh != NisServer::pwd_chsh || + start_yppasswdd != NisServer::start_yppasswdd || + start_ypxfrd != NisServer::start_ypxfrd) { - NisServer::start_ypbind = (boolean) - UI::QueryWidget (`id (`also_client), `Value); - CheckForDHCPClient (domainname); - CWMFirewallInterfaces::OpenFirewallStore ( - firewall_widget,"",event); + NisServer::modified = true; + NisServer::domain = domain; + NisServer::start_ypbind = start_ypbind; + NisServer::nopush = nopush; + NisServer::pwd_chfn = pwd_chfn; + NisServer::pwd_chsh = pwd_chsh; + NisServer::start_yppasswdd = start_yppasswdd; + NisServer::start_ypxfrd = start_ypxfrd; } } - if (ui == `abort && !Popup::ReallyAbort (true)) + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) { ui = `again; } @@ -179,19 +213,6 @@ until ( is (ui,symbol) && contains ([`next, `back, `abort, `details], (symbol) ui)); - NisServer::nopush = - ! (boolean) UI::QueryWidget (`id (`have_slave), `Value); - NisServer::pwd_chfn = - (boolean) UI::QueryWidget (`id (`allow_gecos), `Value); - NisServer::pwd_chsh = - (boolean) UI::QueryWidget (`id (`allow_shell), `Value); - NisServer::start_yppasswdd = - (boolean) UI::QueryWidget (`id (`change_passwords), `Value); - NisServer::start_ypxfrd = - (boolean) UI::QueryWidget (`id (`fast_map), `Value); - NisServer::domain = - (string) UI::QueryWidget (`id (`domain), `Value); - return (symbol) ui; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/NisServer.ycp new/yast2-nis-server-2.18.0/src/NisServer.ycp --- old/yast2-nis-server-2.17.2/src/NisServer.ycp 2008-09-04 14:28:41.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/NisServer.ycp 2009-01-21 10:21:36.000000000 +0100 @@ -5,7 +5,7 @@ * Authors: Martin Vidner <mvidner@suse.cz> * Dan Vesely <dan@suse.cz> * - * $Id: NisServer.ycp 50449 2008-08-28 12:20:44Z jsuchome $ + * $Id: NisServer.ycp 50666 2008-09-04 12:41:08Z jsuchome $ * * Representation of the configuration of nisServer. * Input and output routines. @@ -24,7 +24,6 @@ import "Summary"; import "SuSEFirewall"; -//TODO: make it work like Mail::Touch /** * Data was modified? */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/securenets.ycp new/yast2-nis-server-2.18.0/src/securenets.ycp --- old/yast2-nis-server-2.17.2/src/securenets.ycp 2008-09-02 10:41:14.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/securenets.ycp 2009-01-22 09:25:12.000000000 +0100 @@ -81,24 +81,25 @@ */ define term NetsEditPopup (integer id, string netmask, string network) ``{ - term buttons = `HBox (); - buttons = add (buttons, `PushButton (`id (`ok), `opt (`default, `key_F10), Label::OKButton())); - buttons = add (buttons, `PushButton (`id (`cancel), `opt (`key_F9), Label::CancelButton())); - - term contents = `VBox (); - contents = add (contents, `VSpacing (0.3)); - // To translators: popup dialog heading - contents = add (contents, `Heading (_("Edit netmask and network"))); - contents = add (contents, `VSpacing (0.5)); - // To translators: textentry label - contents = add (contents, `TextEntry (`id(`netmask), _("Net&mask"), netmask)); - contents = add (contents, `VSpacing (0.3)); - // To translators: textentry label - contents = add (contents, `TextEntry (`id(`network), _("Net&work"), network)); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, buttons); - contents = add (contents, `VSpacing (0.3)); - contents = `HBox (`HSpacing (), contents, `HSpacing ()); + term contents = `HBox (`HSpacing (), `VBox ( + `VSpacing (0.3), + // To translators: popup dialog heading + `Heading (_("Edit netmask and network")), + `VSpacing (0.5), + // To translators: textentry label + `InputField (`id (`netmask), `opt (`hstretch), _("Net&mask"), + netmask), + `VSpacing (0.3), + // To translators: textentry label + `InputField (`id (`network), `opt (`hstretch), _("Net&work"), + network), + `VSpacing (0.5), + `ButtonBox ( + `PushButton (`id (`ok), `opt (`default), Label::OKButton()), + `PushButton (`id (`cancel), Label::CancelButton()) + ), + `VSpacing (0.3) + ), `HSpacing ()); UI::OpenDialog (contents); UI::SetFocus (`id (`netmask)); @@ -158,14 +159,6 @@ list<term> allow_query = ItemizeSecurenets (NisServer::securenets); integer n_items = size (allow_query); - term buttons = `HBox ( - `PushButton (`id (`add), Label::AddButton ()), - `PushButton (`id (`edit), Label::EditButton ()), - `Left ( - `PushButton (`id (`delete), Label::DeleteButton ()) - ) - ); - term contents = `VBox ( `Table (`id (`table), `opt (`notify, `immediate), `header ( // To translators: table header @@ -173,7 +166,12 @@ // To translators: table header _("Network") ), allow_query), - buttons + `HBox ( + `PushButton (`id (`add), Label::AddButton ()), + `PushButton (`id (`edit), Label::EditButton ()), + `PushButton (`id (`delete), Label::DeleteButton ()), + `HStretch () + ) ); // To translators: dialog label @@ -229,16 +227,22 @@ } } - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) + ui = `again; } until (contains ([`back, `next, `abort], ui)); if (ui == `back) Wizard::RestoreNextButton(); - // and finally merge - NisServer::securenets = MergeNetsEntries (NisServer::securenets, allow_query); + list<map> securenets = + MergeNetsEntries (NisServer::securenets, allow_query); + // and finally merge + if (ui == `next && (sort (securenets) != sort (NisServer::securenets))) + { + NisServer::securenets = securenets; + NisServer::modified = true; + } return ui; } - } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/slaves.ycp new/yast2-nis-server-2.18.0/src/slaves.ycp --- old/yast2-nis-server-2.17.2/src/slaves.ycp 2005-09-08 10:37:17.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/slaves.ycp 2009-01-21 15:32:27.000000000 +0100 @@ -42,15 +42,17 @@ define string ChooseHostName(list<string> hosts) ``{ string hname = nil; - UI::OpenDialog( - `VBox(`HSpacing(40), - `HBox(`VSpacing(10), - // To translators: selection box label - `SelectionBox(`id(`hosts), _("&Remote hosts"), hosts)), - `HBox(`PushButton(`id(`ok), `opt (`default, `key_F10), - Label::OKButton()), - `PushButton(`id(`cancel), `opt (`key_F9), - Label::CancelButton())))); + UI::OpenDialog (`VBox (`HSpacing(40), + `HBox ( + `VSpacing(10), + // To translators: selection box label + `SelectionBox(`id(`hosts), _("&Remote hosts"), hosts) + ), + `HBox ( + `PushButton (`id(`ok), `opt (`default), Label::OKButton()), + `PushButton(`id(`cancel), Label::CancelButton()) + ) + )); any ret = nil; do { ret = UI::UserInput(); @@ -72,27 +74,30 @@ */ define string YPSlavePopup (string slave) ``{ - term hbox = `HBox (); - // To translators: textentry label - hbox = add (hbox, `TextEntry (`id(`slave), _("&Slave's host name"), slave)); - // To translators: pushbutton label - hbox = add (hbox, `VBox (`VSpacing (), `PushButton (`id (`browse), `opt (`key_F6), _("&Browse")))); - - term contents = `VBox (); - contents = add (contents, `VSpacing (0.3)); - // To translators: popup dialog heading - contents = add (contents, `Heading (_("Edit slave"))); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, hbox); - contents = add (contents, `VSpacing (0.5)); - - hbox = `HBox (); - hbox = add (hbox, `PushButton (`id (`ok), `opt (`default, `key_F10), Label::OKButton())); - hbox = add (hbox, `PushButton (`id (`cancel), `opt (`key_F9), Label::CancelButton())); - - contents = add (contents, hbox); - contents = add (contents, `VSpacing (0.3)); - contents = `HBox (`HSpacing (), contents, `HSpacing ()); + term hbox = `HBox ( + // To translators: textentry label + `InputField (`id (`slave), `opt (`hstretch),_("&Slave's host name"), + slave), + `VBox ( + `VSpacing (), + `PushButton (`id (`browse), `opt (`key_F6), + Label::BrowseButton ()) + ) + ); + + term contents = `HBox (`HSpacing (), `VBox ( + `VSpacing (0.3), + // To translators: popup dialog heading + `Heading (_("Edit slave")), + `VSpacing (0.5), + hbox, + `VSpacing (0.3), + `ButtonBox ( + `PushButton (`id (`ok), `opt (`default), Label::OKButton ()), + `PushButton (`id (`cancel), Label::CancelButton ()) + ), + `VSpacing (0.3) + ), `HSpacing ()); UI::OpenDialog (contents); UI::SetFocus (`id (`slave)); @@ -153,28 +158,32 @@ list<string> slaves = NisServer::ypservers; - term buttons = `HBox (); - // To translators: pushbutton label - buttons = add (buttons, `PushButton (`id (`add), `opt (`key_F3), _("A&dd"))); - // To translators: pushbutton label - buttons = add (buttons, `PushButton (`id (`edit), `opt (`key_F4), _("&Edit"))); - // To translators: pushbutton label - buttons = add (buttons, `PushButton (`id (`delete), `opt (`key_F5), _("De&lete"))); - - term contents = `VBox (); - contents = add (contents, `ReplacePoint (`id (`replace), - // To translators: selection box label - `SelectionBox (`id (`slaves), `opt (`notify), _("&Slaves"), sort(slaves)))); - contents = add (contents, buttons); - - // To translators: dialog label - Wizard::SetContents (_("NIS Master Server Slaves Setup"), contents, helptext, true, true); + term buttons = `HBox ( + `PushButton (`id (`add), Label::AddButton ()), + `PushButton (`id (`edit), Label::EditButton ()), + `PushButton (`id (`delete), Label::DeleteButton ()), + `HStretch () + ); + + term contents = `VBox ( + `ReplacePoint (`id (`replace), + // To translators: selection box label + `SelectionBox (`id (`slaves), `opt (`notify), _("&Slaves"), + sort (slaves)) + ), + buttons + ); + + // To translators: dialog label + Wizard::SetContents (_("NIS Master Server Slaves Setup"), + contents, helptext, true, true); symbol ui = nil; repeat { - boolean anyslaves = UI::QueryWidget (`id (`slaves), `CurrentItem) != nil; + boolean anyslaves = + UI::QueryWidget (`id (`slaves), `CurrentItem) != nil; UI::ChangeWidget (`id (`edit), `Enabled, anyslaves); UI::ChangeWidget (`id (`delete), `Enabled, anyslaves); @@ -186,25 +195,30 @@ if (ui == `edit) { - string selected = (string) UI::QueryWidget (`id (`slaves), `CurrentItem); + string selected = + (string) UI::QueryWidget (`id (`slaves), `CurrentItem); if (selected == nil) continue; string edited = YPSlavePopup (selected); if (edited != nil) { slaves = filter (string e, slaves, ``(e != selected)); slaves = add (slaves, edited); - // To translators: selectionbox label - UI::ReplaceWidget (`id (`replace), `SelectionBox (`id (`slaves), `opt (`notify), _("&Slaves"), sort (slaves))); + UI::ReplaceWidget (`id (`replace), + `SelectionBox (`id (`slaves), + `opt (`notify), _("&Slaves"), sort (slaves)) + ); } } else if (ui == `delete) { - string selected = (string) UI::QueryWidget (`id (`slaves), `CurrentItem); + string selected = + (string) UI::QueryWidget (`id (`slaves), `CurrentItem); if (selected == nil) continue; slaves = filter (string e, slaves, ``(e != selected)); - // To translators: selectionbox label - UI::ReplaceWidget (`id (`replace), `SelectionBox (`id (`slaves), `opt (`notify), _("&Slaves"), sort (slaves))); + UI::ReplaceWidget (`id (`replace), `SelectionBox (`id (`slaves), + `opt (`notify), _("&Slaves"), sort (slaves)) + ); } else if (ui == `add) @@ -213,16 +227,23 @@ if (edited != nil && !contains (slaves, edited)) { slaves = add (slaves, edited); - // To translators: selectionbox label - UI::ReplaceWidget (`id (`replace), `SelectionBox (`id (`slaves), `opt (`notify), _("&Slaves"), sort (slaves))); + UI::ReplaceWidget (`id (`replace), + `SelectionBox (`id (`slaves), + `opt (`notify), _("&Slaves"), sort (slaves)) + ); } } - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) + ui = `again; } until (contains ([`back, `next, `abort], ui)); - NisServer::ypservers = slaves; + if (ui == `next && sort (NisServer::ypservers) != slaves) + { + NisServer::ypservers = slaves; + NisServer::modified = true; + } return ui; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/slave.ycp new/yast2-nis-server-2.18.0/src/slave.ycp --- old/yast2-nis-server-2.17.2/src/slave.ycp 2005-09-08 10:37:17.000000000 +0200 +++ new/yast2-nis-server-2.18.0/src/slave.ycp 2009-01-22 09:18:19.000000000 +0100 @@ -49,25 +49,22 @@ + firewall_widget["help"]:""; - term contents = `VBox (); - contents = add (contents, + term contents = `HVSquash (`VBox ( // textentry label - `TextEntry (`id(`domain),_("NIS &domain name:"),NisServer::domain)); - contents = add (contents, `VSpacing (0.5)); - contents = add (contents, - // text entry label - `TextEntry (`id (`master_ip), _("NIS &master server:"), - NisServer::ui_master_ip)); - - contents = add (contents, `VSpacing ()); - contents = add (contents, - // checkbox label - `CheckBox (`id (`also_client), _("This host is also a NIS &client"), - NisServer::start_ypbind)); - - contents = add (contents, `VSpacing (2)); - contents = add (contents, firewall_layout); - contents = `HVSquash (contents); + `InputField (`id (`domain), `opt(`hstretch), _("N&IS domain name:"), + NisServer::domain), + `VSpacing (0.5), + `InputField (`id (`master_ip), `opt (`hstretch), + // text entry label + ("NIS &master server:"), NisServer::ui_master_ip), + `VSpacing (), + `Left (`CheckBox (`id (`also_client), + // checkbox label + _("This host is also a NIS &client"), NisServer::start_ypbind) + ), + `VSpacing (2), + firewall_layout + )); // To translators: dialog label Wizard::SetContents (_("Slave Server Setup"), @@ -94,38 +91,43 @@ (string) UI::QueryWidget (`id (`master_ip), `Value); string domainname = (string) UI::QueryWidget (`id (`domain), `Value); + boolean start_ypbind = + (boolean) UI::QueryWidget (`id (`also_client), `Value); if (!Address::Check4(master_ip)) { // To translators: error message UI::SetFocus (`id (`master_ip)); Popup::Error (Address::Valid4()); ui = `again; + continue; } else if (!Nis::check_nisdomainname (domainname)) { UI::SetFocus (`id (`domain)); Popup::Error (Nis::valid_nisdomainname ()); ui = `again; + continue; } - if (ui == `next) + if (master_ip != NisServer::ui_master_ip || + domainname!= NisServer::domain || + start_ypbind != NisServer::start_ypbind) { - NisServer::start_ypbind = (boolean) - UI::QueryWidget (`id (`also_client), `Value); - CheckForDHCPClient (domainname); - CWMFirewallInterfaces::OpenFirewallStore ( - firewall_widget,"",event); + NisServer::modified = true; } + + CheckForDHCPClient (domainname); + CWMFirewallInterfaces::OpenFirewallStore ( + firewall_widget,"",event); + NisServer::start_ypbind = start_ypbind; + NisServer::ui_master_ip = master_ip; + NisServer::domain = domainname; } - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && !Popup::ReallyAbort (NisServer::modified)) + ui = `again; } until (ui == `next || ui == `back || ui == `abort); - NisServer::ui_master_ip = - (string) UI::QueryWidget (`id (`master_ip), `Value); - NisServer::domain = - (string) UI::QueryWidget (`id (`domain), `Value); - return (symbol) ui; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/src/what.ycp new/yast2-nis-server-2.18.0/src/what.ycp --- old/yast2-nis-server-2.17.2/src/what.ycp 2006-01-04 14:18:36.000000000 +0100 +++ new/yast2-nis-server-2.18.0/src/what.ycp 2009-01-21 14:10:57.000000000 +0100 @@ -158,12 +158,13 @@ Wizard::SetFocusToNextButton(); ui = (symbol) UI::UserInput (); - if (ui == `cancel) + if (ui == `cancel || ui == `back) { ui = `abort; } - if (ui == `abort && !Popup::ReallyAbort (true)) ui = `again; + if (ui == `abort && NisServer::modified && !Popup::ReallyAbort (true)) + ui = `again; } until (contains ([`back, `next, `abort, `finish], ui)); @@ -182,6 +183,10 @@ } current_button = (symbol) UI::QueryWidget (`id (`rb), `CurrentButton); + + if (NisServer::ui_what != current_button) + NisServer::modified = true; + NisServer::ui_what = current_button; return ui == `next ? current_button : ui; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-nis-server-2.17.2/VERSION new/yast2-nis-server-2.18.0/VERSION --- old/yast2-nis-server-2.17.2/VERSION 2008-09-04 14:37:03.000000000 +0200 +++ new/yast2-nis-server-2.18.0/VERSION 2009-01-22 09:30:35.000000000 +0100 @@ -1 +1 @@ -2.17.2 +2.18.0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org