Author: gs Date: Tue Jul 29 13:57:57 2008 New Revision: 49485 URL: http://svn.opensuse.org/viewcvs/yast?rev=49485&view=rev Log: add file selection for logfile Modified: trunk/auditd/src/complex.ycp trunk/auditd/src/dialogs.ycp trunk/auditd/src/wizards.ycp Modified: trunk/auditd/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/complex.ycp?rev=49485&r1=49484&r2=49485&view=diff ============================================================================== --- trunk/auditd/src/complex.ycp (original) +++ trunk/auditd/src/complex.ycp Tue Jul 29 13:57:57 2008 @@ -90,6 +90,19 @@ y2milestone( "Init logfile settings"); } +symbol HandleLogfileSettingsDialog(string id, map event) { + any action = event["ID"]:nil; + + if ( action == "select_file" ) + { + string file_name = UI::AskForExistingFile("/var/log/audit", "*.log", _("Select the log file") ); + + UI::ChangeWidget( `id("log_file"), `Value, file_name ); + y2milestone( "Logfile changed to: %1", file_name ); + } + return nil; +} + boolean ReallyExit () { // yes-no popup return Popup::YesNo (_("Really exit? @@ -99,7 +112,7 @@ void StoreLogfileSettingsDialog (string id, map event) { Auditd::SetModified( true ); - + y2milestone( "set option to: %1", (string)UI::QueryWidget( `id("log_file"), `Value ) ); Auditd::SetAuditdOption( "log_file", (string)UI::QueryWidget( `id("log_file"), `Value ) ); // Stores all boolean values and turns them to the "yes"/"no" notation Modified: trunk/auditd/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/dialogs.ycp?rev=49485&r1=49484&r2=49485&view=diff ============================================================================== --- trunk/auditd/src/dialogs.ycp (original) +++ trunk/auditd/src/dialogs.ycp Tue Jul 29 13:57:57 2008 @@ -54,9 +54,16 @@ `Frame ( _("General Settings"), `VBox ( - /* A text entry */ - `Left(`InputField(`id("log_file"), `opt(`hstretch), _("Logfile Name")) - ), + + `VSquash( + `HBox( + `InputField(`id("log_file"), `opt(`hstretch), _("Logfile")), + `VBox( + `VSpacing(), + `Bottom(`PushButton(`id("select_file"), _("Select Fi&le"))) + ) + ) + ), `Left(`ComboBox(`id("log_format"), _("Format"), [ `item(`id(`raw), "RAW", true ), Modified: trunk/auditd/src/wizards.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/wizards.ycp?rev=49485&r1=49484&r2=49485&view=diff ============================================================================== --- trunk/auditd/src/wizards.ycp (original) +++ trunk/auditd/src/wizards.ycp Tue Jul 29 13:57:57 2008 @@ -50,6 +50,7 @@ "widget" : `custom, "help" : HELPS["logfile_settings"]:"", "custom_widget" : LogfileSettingsDialogContent(), + "handle" : HandleLogfileSettingsDialog, "init" : InitLogfileSettingsDialog, "store" : StoreLogfileSettingsDialog, ], -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org