Author: gs Date: Thu Aug 7 15:56:37 2008 New Revision: 49825 URL: http://svn.opensuse.org/viewcvs/yast?rev=49825&view=rev Log: add the possibility to example rules file Modified: trunk/auditd/src/complex.ycp trunk/auditd/src/dialogs.ycp Modified: trunk/auditd/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/complex.ycp?rev=49825&r1=49824&r2=49825&view=diff ============================================================================== --- trunk/auditd/src/complex.ycp (original) +++ trunk/auditd/src/complex.ycp Thu Aug 7 15:56:37 2008 @@ -280,6 +280,14 @@ Report::Error( _("Cannnot create tmp file for rules" ) ); } } + else if ( action == "load" ) + { + string file_name = UI::AskForExistingFile("/usr/share/doc/packages/audit", "*.rules", _("Select example file") ); + string example_rules = (string)SCR::Read(.target.string, file_name ); + + UI::ChangeWidget( `id("rules"), `Value, example_rules ); + y2milestone( "Example rules loaded: %1", file_name ); + } return nil; } Modified: trunk/auditd/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/dialogs.ycp?rev=49825&r1=49824&r2=49825&view=diff ============================================================================== --- trunk/auditd/src/dialogs.ycp (original) +++ trunk/auditd/src/dialogs.ycp Thu Aug 7 15:56:37 2008 @@ -188,7 +188,8 @@ `VBox( `Left(`ComboBox( `id("audit_enabled"), `opt(`notify), _("Configure Enabled Flag"), [`item(`id("enable"), _("Enable Auditing"), true ), // -e 1 - `item(`id("disable"), _("Disable Auditing") ) // -e 0 + `item(`id("disable"), _("Disable Auditing") ), // -e 0 + `item(`id("lock"), _("Lock Rules (until next boot)")) // -e 2 ] )), `VStretch() @@ -204,7 +205,9 @@ `HSpacing(2.0), `PushButton( `id( "restore" ), _("Restore 'audit.rules'") ), `HSpacing(2.0), - `PushButton( `id( "reset" ), _("Restore and Reset") ) + `PushButton( `id( "reset" ), _("Restore and Reset") ), + `HSpacing(2.0), + `PushButton( `id( "load" ), _("Load Example") ) ) ), `VStretch() -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org