Author: juhliarik Date: Wed Jun 20 09:49:57 2007 New Revision: 38914 URL: http://svn.opensuse.org/viewcvs/yast?rev=38914&view=rev Log: redesign UI Modified: trunk/kdump/src/Kdump.ycp trunk/kdump/src/dialogs.ycp trunk/kdump/src/uifunctions.ycp Modified: trunk/kdump/src/Kdump.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/Kdump.ycp?rev=38914&r1=38913&r2=38914&view=diff ============================================================================== --- trunk/kdump/src/Kdump.ycp (original) +++ trunk/kdump/src/Kdump.ycp Wed Jun 20 09:49:57 2007 @@ -124,7 +124,7 @@ "KDUMP_DUMPDEV" : "", "KDUMP_VERBOSE" : "3", "KDUMP_DUMPLEVEL" : "24", - "KDUMP_DUMPFORMAT" : "elf", //or "compressed" + "KDUMP_DUMPFORMAT" : "ELF", //or "compressed" ]; /** @@ -211,7 +211,8 @@ integer i = 0; //available_partitions = parts; foreach (string key, udevids, { - string value = parts[i]:"" +"/by-id/" + udevids[i]:""; + string disk_from_partition = filterchars(parts[i]:"", "abcdefghijklmnopqrstuvwxyz/"); + string value = disk_from_partition +"/by-id/" + udevids[i]:"" +" ( " + parts[i]:"" +" )"; available_partitions = available_partitions + value; i= i+1; }); Modified: trunk/kdump/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/dialogs.ycp?rev=38914&r1=38913&r2=38914&view=diff ============================================================================== --- trunk/kdump/src/dialogs.ycp (original) +++ trunk/kdump/src/dialogs.ycp Wed Jun 20 09:49:57 2007 @@ -153,7 +153,7 @@ ], - "TargetKdump" : $[ + /*"TargetKdump" : $[ "widget" : `custom, "custom_widget" : `VBox( `Frame(_("Saving Target for kdump Image"),`HBox(`HSpacing(1),`VBox( @@ -175,8 +175,60 @@ //"store" : "help" : HelpKdump("TargetKdump"), + ],*/ + + "TargetKdump" : $[ + "widget" : `custom, + "custom_widget" : `VBox( + `Frame(_("Saving Target for kdump Image"),`HBox(`HSpacing(1),`VBox( + `RadioButtonGroup(`id("DumpTarget"), `HBox( + `Left(`RadioButton(`id("local_filesystem"), `opt(`notify), "&Local Filesytem")), + `Left(`RadioButton(`id("ftp"), `opt(`notify), "F&TP")), + `Left(`RadioButton(`id("ssh"), `opt(`notify), "&SSH (scp)")), + `Left(`RadioButton(`id("nfs"), `opt(`notify), "N&FS")), + `Left(`RadioButton(`id("smb"), `opt(`notify), "C&IFS (SMB)")) + )) + + ))), + + `VSpacing(1), + `ReplacePoint(`id("Targets"), ftp) + //`VStretch() + ), + "init" : InitTargetKdump, + "handle" : HandleTargetKdump, + //"store" : + "help" : HelpKdump("TargetKdump"), + + ], + + "EnableRawPartitions" : $[ + //TRANSLATORS: CheckBox Label + "label" : _("&Enable Save Image to Raw Partition"), + "widget" : `checkbox, + //"init" : + //"handle" : + //"store" : + "help" : HelpKdump("EnableRawPartitions"), ], - + + "RawPartitions" : $[ + //TRANSLATORS: ComboBox Label + "widget" : `custom, + "custom_widget" : `VBox( + `CheckBoxFrame(`id("enable_raw_partitions"),_("Enable Ra&w Saving in Initrd"), true, + `HBox(`HSpacing(1),`VBox( + `Left(`ComboBox(`id("raw_partitions"), + "&The List of Available Raw Paritions of All Disks Without Known Filesystem")) + )) + ) + ), + "init" : InitRawPartitions, + //"handle" : + //"store" : StoreRawPartitions, + "help" : HelpKdump("RawPartitions"), + ], + "NumberDumps" : $[ //TRANSLATORS: IntField Label "label" : _("N&umber of Old Dumps"), @@ -244,15 +296,15 @@ "DumpLevel" : $[ "widget" : `custom, "custom_widget" : `VBox( - `Frame ( _("Dump Level"), `VBox( + `Frame ( _("Include in Dumping"), `VBox( `Left(`HBox(`HSpacing(1),`VBox( - `Left(`CheckBox(`id("zero_page"), "&Zero Page")), - `Left(`CheckBox(`id("cache_page"), `opt(`notify), "Cach&e Page")), + `Left(`CheckBox(`id("zero_page"), "&Pages Filled with Zero")), + `Left(`CheckBox(`id("cache_page"), `opt(`notify), "Cach&e Pages")), `HBox(`HSpacing(2),`VBox( - `Left(`CheckBox(`id("cache_private"), `opt(`notify), "Cache Priva&te")) + `Left(`CheckBox(`id("cache_private"), `opt(`notify), "Cache Priva&te Pages")) )), - `Left(`CheckBox(`id("user_data"), "&User Data")), - `Left(`CheckBox(`id("free_page"), "&Free Page")) + `Left(`CheckBox(`id("user_data"), "&User Data Pages")), + `Left(`CheckBox(`id("free_page"), "&Free Pages")) //`VStretch () ))) ))), @@ -305,7 +357,7 @@ "DisBackButton", "EnableDisalbeKdump", "KdumpMemory", ], ], - + /* "general" : $[ "contents" : `VBox( @@ -324,17 +376,19 @@ "DisBackButton", "DumpFormat", "EnableReboot", ] - ], + ],*/ "dump_filtering" : $[ "contents" : `VBox( "DumpLevel", + `VSpacing(1), + "DumpFormat", `VStretch () ), - "caption" : _("kdump - Dump Level"), - "tree_item_label" : _("Dump Level"), + "caption" : _("kdump - Dump Filtering"), + "tree_item_label" : _("Dump Filtering"), "widget_names" : [ - "DisBackButton", "DumpLevel", + "DisBackButton", "DumpLevel", "DumpFormat", ] ], @@ -342,29 +396,43 @@ "dump_target" : $[ "contents" : `VBox( - "TargetKdump" + "TargetKdump", + `VSpacing(1), + "RawPartitions", + `VStretch () ), "caption" : _("Dump Target"), "tree_item_label" : _("Dump Target"), "widget_names" : [ - "DisBackButton", "TargetKdump", + "DisBackButton", "TargetKdump","RawPartitions" ] ], "exp_settings" : $[ "contents" : `VBox( + `Frame ( _("Custom Kernel for kdump"),`HBox(`HSpacing(1),`VBox( + `Left("InitrdKernel") + ))), + `VSpacing(1), `Frame ( _("Command Line"),`HBox(`HSpacing(1),`VBox( //`Left("KernelCommandLine"), `Left(`HBox( `Left("KdumpCommandLine"), `Left("SwitchKdumpComLine"), + `HStretch () )) ))), `VSpacing(1), `Frame ( _("The Run-level to Boot"),`HBox(`HSpacing(1),`VBox( - `Left("RunLevel"), - `HStretch () + `Left(`HBox( + `Left("RunLevel"), + `VBox( + `Label(""), + `Left("EnableReboot") + ), + `HStretch () + )) ))), `VSpacing(1), @@ -373,16 +441,8 @@ `Left("NumberDumps") ))), - `VSpacing(1), - `Frame ( _("Custom Kernel for kdump"),`HBox(`HSpacing(1),`VBox( - `Left(`HBox( - "InitrdKernel", - `VBox ( - `Label(""), - "SelectKernel" - ) - )) - ))), + + `VStretch () ), @@ -392,14 +452,14 @@ "DisBackButton","KdumpCommandLine", "SwitchKdumpComLine", "RunLevel", "EnableDeleteImages", "NumberDumps", - "InitrdKernel", "SelectKernel", + "InitrdKernel", "SelectKernel", "EnableReboot" ] ], ]; symbol RunKdumpDialogs() { - list<string> sim_dialogs = [ "start_up", "general", "dump_filtering", "dump_target" ,"exp_settings"]; + list<string> sim_dialogs = [ "start_up", "dump_filtering", "dump_target" ,"exp_settings"]; return DialogTree::ShowAndRun ($[ //return CWMTab::CreateWidget($[ Modified: trunk/kdump/src/uifunctions.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/uifunctions.ycp?rev=38914&r1=38913&r2=38914&view=diff ============================================================================== --- trunk/kdump/src/uifunctions.ycp (original) +++ trunk/kdump/src/uifunctions.ycp Wed Jun 20 09:49:57 2007 @@ -57,9 +57,9 @@ term local_filesystem = `VBox( `Frame(_("Local Filesystem"),`HBox(`HSpacing(1),`VBox( - `Left(`ComboBox(`id("local_partitions"), "&The List of Available Paritions of All Disks with Filesystem")), - `Left(`CheckBox(`id("enable_raw_partit"),"&Enable Save Image to Raw Partition")), - `Left(`ComboBox(`id("raw_partitions"), "&The List of Raw Paritions of All isks Without Filesystem")), + //`Left(`ComboBox(`id("local_partitions"), "&The List of Available Paritions of All Disks with Filesystem")), + //`Left(`CheckBox(`id("enable_raw_partit"),"&Enable Save Image to Raw Partition")), + //`Left(`ComboBox(`id("raw_partitions"), "&The List of Raw Paritions of All isks Without Filesystem")), `Left(`HBox( `TextEntry(`id("dir_save_image"), _("&Directory for Saving Dumps")), `VBox ( `Label(""), @@ -69,7 +69,7 @@ ))) ); - +/* term network = `VBox( `VSpacing(1), `Frame(_("Network"),`HBox(`HSpacing(1), @@ -82,21 +82,25 @@ )) ); - +*/ term ftp = `VBox( `Frame(_("FTP"),`HBox(`HSpacing(1),`VBox( `Left(`HBox( `Left(`TextEntry(`id ("server"), _("Server Nam&e"))), - `Left(`TextEntry(`id ("port"), _("P&ort"))), + `Left(`IntField(`id ("port"), _("P&ort"), 0,65536,21)), `HStretch () )), - `Left(`TextEntry( `id("dir"), _("&Directory on Server"))), - `Left(`CheckBox(`id ("anonymous"), `opt (`notify),_("&Anonymous"))), // text entry - `Left(`TextEntry(`id ("user_name"), _("&User Name"))), - // password entry - `Left(`Password(`id ("password"), _("&Password"))) + `Left(`TextEntry( `id("dir"), _("&Directory on Server"))), + `Left(`CheckBox(`id ("anonymous"), `opt (`notify),_("Enable Anonymous &FTP"))), + + `Left(`HBox( + // text entry + `Left(`TextEntry(`id ("user_name"), _("&User Name"))), + // password entry + `Left(`Password(`id ("password"), _("&Password"))) + )) ))) ); @@ -105,9 +109,9 @@ `Frame(_("SSH (scp)"),`HBox(`HSpacing(1),`VBox( `Left(`HBox( `Left(`TextEntry(`id ("server"), _("Server Nam&e"))), - `Left(`TextEntry(`id ("port"), _("P&ort"))), + `Left(`IntField(`id ("port"), _("P&ort"), 0,65536,22)), `HStretch () - )), + )), `Left(`TextEntry( `id("dir"), _("&Directory on Server"))), // text entry `Left(`TextEntry(`id ("user_name"), _("&User Name"))) @@ -128,13 +132,18 @@ term smb = `VBox( `Frame(_("CIFS (SMB)"),`HBox(`HSpacing(1),`VBox( `Left(`TextEntry(`id ("server"), _("Server Nam&e"))), - // text entry - `Left(`TextEntry(`id ("share"), _("Sha&re"))), - `Left(`TextEntry( `id("dir"), _("&Directory on Server"))), - // text entry - `Left(`TextEntry(`id ("user_name"), _("&User Name"))), - // password entry - `Left(`Password(`id ("password"), _("&Password"))) + `Left(`HBox( + // text entries + `Left(`TextEntry(`id ("share"), _("Exported Sha&re"))), + `Left(`TextEntry( `id("dir"), _("&Directory on Server"))) + )), + `Left(`CheckBox(`id ("anonymous"), `opt (`notify),_("&Use Authentication"), true)), + `Left(`HBox( + // text entry + `Left(`TextEntry(`id ("user_name"), _("&User Name"))), + // password entry + `Left(`Password(`id ("password"), _("&Password"))) + )) ))) ); @@ -254,44 +263,45 @@ */ void InitTargetKdump (string key) { - + SetUpKDUMP_SAVE_TARGET(Kdump::KDUMP_SETTINGS["KDUMP_SAVEDIR"]:nil); //Popup::Message(Kdump::KDUMP_SETTINGS["KDUMP_SAVEDIR"]:nil); //Popup::Message(KDUMP_SAVE_TARGET["target"]:nil); if (KDUMP_SAVE_TARGET["target"]:nil == "file") { UI::ChangeWidget(`id ("local_filesystem"), `Value, true); - UI::ReplaceWidget (`id ("Network"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), `Empty()); UI::ReplaceWidget (`id ("Targets"), local_filesystem); - UI::ChangeWidget(`id("local_partitions"), `Items, Kdump::available_partitions); + //UI::ChangeWidget(`id("local_partitions"), `Items, Kdump::available_partitions); y2milestone("[kdump] (InitTargetKdump) Kdump::available_partitions %1", Kdump::available_partitions); + /* if (size(Kdump::uknown_fs_partitions)>0) { UI::ChangeWidget(`id("raw_partitions"), `Items, Kdump::uknown_fs_partitions); } else { UI::ChangeWidget(`id("raw_partitions"), `Enabled, false); UI::ChangeWidget(`id("enable_raw_partit"), `Enabled, false); - } + }*/ UI::ChangeWidget(`id ("dir_save_image"), `Value, KDUMP_SAVE_TARGET["dir"]:nil); } else if (KDUMP_SAVE_TARGET["target"]:nil == "nfs") { - UI::ChangeWidget(`id ("network"), `Value, true); - UI::ReplaceWidget (`id ("Targets"), `Empty()); - UI::ReplaceWidget (`id ("Network"), network); + //UI::ChangeWidget(`id ("network"), `Value, true); + //UI::ReplaceWidget (`id ("Targets"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), network); UI::ReplaceWidget (`id ("Targets"), nfs); UI::ChangeWidget(`id ("nfs"), `Value, true); UI::ChangeWidget(`id ("server"), `Value, KDUMP_SAVE_TARGET["server"]:nil); UI::ChangeWidget(`id ("dir"), `Value, KDUMP_SAVE_TARGET["dir"]:nil); } else if (KDUMP_SAVE_TARGET["target"]:nil == "ssh") { - UI::ChangeWidget(`id ("network"), `Value, true); - UI::ReplaceWidget (`id ("Targets"), `Empty()); - UI::ReplaceWidget (`id ("Network"), network); + //UI::ChangeWidget(`id ("network"), `Value, true); + //UI::ReplaceWidget (`id ("Targets"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), network); UI::ReplaceWidget (`id ("Targets"), ssh); UI::ChangeWidget(`id ("ssh"), `Value, true); foreach (string key, ["server", "port", "user_name", "dir" ], { UI::ChangeWidget(`id (key), `Value, KDUMP_SAVE_TARGET[key]:nil); }); } else if (KDUMP_SAVE_TARGET["target"]:nil == "ftp") { - UI::ChangeWidget(`id ("network"), `Value, true); - UI::ReplaceWidget (`id ("Targets"), `Empty()); - UI::ReplaceWidget (`id ("Network"), network); + //UI::ChangeWidget(`id ("network"), `Value, true); + //UI::ReplaceWidget (`id ("Targets"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), network); UI::ReplaceWidget (`id ("Targets"), ftp); UI::ChangeWidget(`id ("ftp"), `Value, true); foreach (string key, ["server", "port", "dir" ], { @@ -306,9 +316,9 @@ UI::ChangeWidget(`id ("password"), `Value, KDUMP_SAVE_TARGET["password"]:nil); } } else if (KDUMP_SAVE_TARGET["target"]:nil == "cifs") { - UI::ChangeWidget(`id ("network"), `Value, true); - UI::ReplaceWidget (`id ("Targets"), `Empty()); - UI::ReplaceWidget (`id ("Network"), network); + //UI::ChangeWidget(`id ("network"), `Value, true); + //UI::ReplaceWidget (`id ("Targets"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), network); UI::ReplaceWidget (`id ("Targets"), smb); UI::ChangeWidget(`id ("smb"), `Value, true); foreach (string key, ["server", "dir", "share", "user_name", "password"], { @@ -319,7 +329,15 @@ } +/** + * Function initializes option "Kdump Command Line" + * or "Kdump Command Line Append" + */ +void InitRawPartitions (string key) { + UI::ChangeWidget(`id("raw_partitions"), `Items, Kdump::available_partitions); + +} /** * Function handles "Saving Target for kdump Image" * @@ -330,7 +348,7 @@ any radiobutton = event["ID"]:nil; if (radiobutton == "local_filesystem") { - UI::ReplaceWidget (`id ("Network"), `Empty()); + //UI::ReplaceWidget (`id ("Network"), `Empty()); UI::ReplaceWidget (`id ("Targets"), local_filesystem); UI::ChangeWidget(`id("local_partitions"), `Items, Kdump::available_partitions); if (size(Kdump::uknown_fs_partitions)>0) { @@ -340,12 +358,6 @@ UI::ChangeWidget(`id("enable_raw_partit"), `Enabled, false); } set_network = false; - } else if (radiobutton == "network") { - UI::ReplaceWidget (`id ("Targets"), `Empty()); - if (!set_network) - UI::ReplaceWidget (`id ("Network"), network); - set_network = true; - //any net = UI::QueryWidget(`id("NetworkRB"), `CurrentButton); } else if (radiobutton == "ftp") { UI::ReplaceWidget (`id ("Targets"), ftp); } else if (radiobutton == "ssh") { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org