Author: jsuchome Date: Thu Jan 8 15:10:46 2009 New Revision: 54473 URL: http://svn.opensuse.org/viewcvs/yast?rev=54473&view=rev Log: - do not require double clicking in LDAP Browser tree (bnc#464144) - disable renaming of the LDAP objects and modification of objectClass attribute in the LDAP Browser (bnc#464148) - 2.17.19 Modified: branches/SuSE-Code-11-Branch/ldap-client/VERSION branches/SuSE-Code-11-Branch/ldap-client/package/yast2-ldap-client.changes branches/SuSE-Code-11-Branch/ldap-client/src/ldap_browser.ycp Modified: branches/SuSE-Code-11-Branch/ldap-client/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ldap-client/VERSION?rev=54473&r1=54472&r2=54473&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/ldap-client/VERSION (original) +++ branches/SuSE-Code-11-Branch/ldap-client/VERSION Thu Jan 8 15:10:46 2009 @@ -1 +1 @@ -2.17.18 +2.17.19 Modified: branches/SuSE-Code-11-Branch/ldap-client/package/yast2-ldap-client.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ldap-client/package/yast2-ldap-client.changes?rev=54473&r1=54472&r2=54473&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/ldap-client/package/yast2-ldap-client.changes (original) +++ branches/SuSE-Code-11-Branch/ldap-client/package/yast2-ldap-client.changes Thu Jan 8 15:10:46 2009 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Jan 8 14:55:20 CET 2009 - jsuchome@suse.cz + +- do not require double clicking in LDAP Browser tree (bnc#464144) +- disable renaming of the LDAP objects and modification of + objectClass attribute in the LDAP Browser (bnc#464148) +- 2.17.19 + +------------------------------------------------------------------- Fri Dec 12 16:16:03 CET 2008 - jsuchome@suse.cz - really use 'exop' as default value for pam_password (bnc#458363) Modified: branches/SuSE-Code-11-Branch/ldap-client/src/ldap_browser.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ldap-client/src/ldap_browser.ycp?rev=54473&r1=54472&r2=54473&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/ldap-client/src/ldap_browser.ycp (original) +++ branches/SuSE-Code-11-Branch/ldap-client/src/ldap_browser.ycp Thu Jan 8 15:10:46 2009 @@ -129,7 +129,7 @@ "scope" : 1, "dn_only" : true, "not_found_ok" : true ] - ); + ); if (size (out) > 0) { tree_items = maplist (string dn, out, { @@ -145,6 +145,8 @@ UI::ReplaceWidget (`id (`reptree), textmode ? `Tree (`id(`tree), root_dn, tree_items) : `Tree (`id(`tree), `opt(`notify), root_dn, tree_items)); + // no item is selected + UI::ChangeWidget (`tree, `CurrentItem, nil); } else if (root_dn == "") { @@ -159,9 +161,12 @@ return `item(`id(dn), dn, false, []); }); if (size (tree_items) > 0) + { UI::ReplaceWidget (`id (`reptree), textmode ? `Tree (`id(`tree), root_dn, tree_items) : `Tree (`id(`tree), `opt(`notify), root_dn, tree_items)); + UI::ChangeWidget (`tree, `CurrentItem, nil); + } if (size (topdns) == 1) root_dn = bases[0,"namingContexts",0]:""; } @@ -222,7 +227,7 @@ term cont = `HBox(`HSpacing (1.5), `VBox( `Left (`Label (current_dn)), - `Table(`id(`table), `opt(`notify), `header( + `Table(`id(`table), `opt (`notify, `immediate), `header( // table header 1/2 _("Attribute") + " ", // table header 2/2 @@ -242,6 +247,11 @@ if (size (items) == 0) UI::ChangeWidget (`id(`edit), `Enabled, false); + else + { + // no item is selected + UI::ChangeWidget (`table, `CurrentItem, nil); + } UI::ChangeWidget (`id(`save), `Enabled, false); UI::SetFocus (`id(`table)); @@ -471,7 +481,8 @@ while (true) { - result = (symbol) UI::UserInput (); + map event = UI::WaitForEvent (); + result = (symbol) event["ID"]:nil; if (result == `cancel && !Popup::ReallyAbort (false)) result = `not_next; @@ -507,17 +518,18 @@ if (! dns[current_dn]:false) { UI::BusyCursor (); - subdns = sort ((list<string>) SCR::Read (.ldap.search, $[ + subdns = (list<string>) SCR::Read (.ldap.search, $[ "base_dn" : current_dn, "scope" : 1, "dn_only" : true, "not_found_ok" : true, - ])); + ]); if (subdns == nil) { y2warning ("the search for %1 returned nil...", current_dn); continue; } + else subdns = sort (subdns); dns [current_dn] = true; if (size (subdns) > 0) // TODO if size (subdns) > 0) || dn has glyph @@ -531,6 +543,7 @@ open_items = $[]; } current_dn = (string) UI::QueryWidget (`id(`tree),`CurrentItem); + if (current_dn == nil) current_dn = ""; } data = Ldap::GetLDAPEntry (current_dn); tmp_data = $[]; @@ -550,11 +563,32 @@ root_dn = ""; set_tree_term (); } - // events in Edit Entry part - if (result == `edit || result == `table) + if (result == `edit) + result = `table; + if (result == `table && event["EventReason"]:"" == "SelectionChanged") + { + string attr = (string) UI::QueryWidget (`id(`table), `CurrentItem); + boolean enable = true; + if (size (attr) < size (current_dn) && + substring (current_dn, 0, size (attr) + 1) == (attr + "=")) + { + y2debug ("disabling %1 for editing...", attr); + enable = false; + } + if (attr == "objectClass") + enable = false; + UI::ChangeWidget (`id (`edit), `Enabled, enable); + } + else if (result == `table) { string attr = (string) UI::QueryWidget (`id(`table), `CurrentItem); + if (UI::QueryWidget (`id (`edit), `Enabled) == false) + { + y2milestone ("editing the value of attribute '%1' is not allowed", attr); + result = `notnext; + continue; + } list<string> value = tmp_data [attr]:data[attr]:[]; value = LdapPopup::EditAttribute ($[ "attr" : attr, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org