[yast-commit] r47997 - in /trunk/backup: package/yast2-backup.changes src/functions.ycp src/ui.ycp
Author: locilka
Date: Mon Jun 2 18:20:08 2008
New Revision: 47997
URL: http://svn.opensuse.org/viewcvs/yast?rev=47997&view=rev
Log:
- TextEntry items replaced with InputField items.
- Checking existence of directory included for backup (bnc #395835)
- Added Browse button for selecting the filename to store the
backup to.
- Added confirmation dialog before removing dierctory included for
backup.
Modified:
trunk/backup/package/yast2-backup.changes
trunk/backup/src/functions.ycp
trunk/backup/src/ui.ycp
Modified: trunk/backup/package/yast2-backup.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/backup/package/yast2-backup.changes?rev=47997&r1=47996&r2=47997&view=diff
==============================================================================
--- trunk/backup/package/yast2-backup.changes (original)
+++ trunk/backup/package/yast2-backup.changes Mon Jun 2 18:20:08 2008
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Mon Jun 2 18:07:34 CEST 2008 - locilka@suse.cz
+
+- TextEntry items replaced with InputField items.
+- Checking existence of directory included for backup (bnc #395835)
+- Added Browse button for selecting the filename to store the
+ backup to.
+- Added confirmation dialog before removing dierctory included for
+ backup.
+
+-------------------------------------------------------------------
Mon May 19 09:43:11 CEST 2008 - locilka@suse.cz
- Replacing Wizard::SetFocusToNextButton with UI::SetFocus which
Modified: trunk/backup/src/functions.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/backup/src/functions.ycp?rev=47997&r1=47996&r2=47997&view=diff
==============================================================================
--- trunk/backup/src/functions.ycp (original)
+++ trunk/backup/src/functions.ycp Mon Jun 2 18:20:08 2008
@@ -104,7 +104,7 @@
((size(combo_content) > 0) ?
`ComboBox(`id(`te), `opt(`hstretch, `editable), label, combo_content)
:
- `TextEntry(`id(`te), label, value)
+ `InputField (`id (`te), `opt (`hstretch), label, value)
),
`VSpacing(1.0),
`HBox(
@@ -137,7 +137,7 @@
UI::OpenDialog(
`VBox(
`HBox (
- `TextEntry(`id(`te), label, value),
+ `InputField (`id (`te), `opt (`hstretch), label, value),
`HSpacing(1.0),
`VBox (
`VSpacing(0.9),
Modified: trunk/backup/src/ui.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/backup/src/ui.ycp?rev=47997&r1=47996&r2=47997&view=diff
==============================================================================
--- trunk/backup/src/ui.ycp (original)
+++ trunk/backup/src/ui.ycp Mon Jun 2 18:20:08 2008
@@ -27,6 +27,8 @@
import "Nfs";
import "PackageSystem";
import "Popup";
+import "Confirm";
+import "Mode";
include "backup/help_texts.ycp";
include "backup/functions.ycp";
@@ -713,7 +715,14 @@
Wizard::SetContents(_("Archive Settings"),
`VBox(
`VSpacing(0.5),
- `TextEntry(`id(`filename), Label::FileName()),
+ `HBox (
+ `InputField (`id (`filename), `opt (`hstretch), Label::FileName()),
+ `HSpacing(1),
+ `VBox (
+ `Label (""),
+ `PushButton (`id(`browse_file), Label::BrowseButton())
+ )
+ ),
`VSpacing(0.5),
`Frame(_("Backup Location"),
@@ -729,7 +738,7 @@
`HBox(
`HSpacing(2),
// text entry label
- `TextEntry(`id(`nfsserver), _("I&P Address or Name of NFS Server"), Backup::nfsserver),
+ `InputField (`id (`nfsserver), `opt (`hstretch), _("I&P Address or Name of NFS Server"), Backup::nfsserver),
`HSpacing(1),
// push button label
`VBox(
@@ -741,7 +750,7 @@
`HBox(
`HSpacing(2),
// text entry label
- `TextEntry(`id(`nfsexport), _("&Remote Directory"), Backup::nfsexport),
+ `InputField (`id (`nfsexport), `opt (`hstretch), _("&Remote Directory"), Backup::nfsexport),
`HSpacing(1),
// push button label
`VBox(
@@ -841,10 +850,20 @@
while (!cont)
{
+ ret = (symbol) UI::UserInput();
+
+ if (ret == `browse_file) {
+ // TRANSLATORS: explanatory headline for UI::AskForExistingFile pop-up
+ string new_filename = UI::AskForExistingFile("", "", _("Where would you like to store the backup?"));
+ if (new_filename != nil && new_filename != "") {
+ UI::ChangeWidget (`id(`filename), `Value, new_filename);
+ }
+ continue;
+ }
+
// update dialog (enable/disable widgets)
update_location_dialog();
- ret = (symbol)UI::UserInput();
Backup::nfsserver = (string)UI::QueryWidget(`id(`nfsserver), `Value);
Backup::nfsexport = (string)UI::QueryWidget(`id(`nfsexport), `Value);
@@ -1100,7 +1119,7 @@
`Left(
`HBox(
// text entry label
- `TextEntry(`id(`user_size), _("Custom &Size")),
+ `InputField (`id (`user_size), `opt (`hstretch), _("Custom &Size")),
`ComboBox(`id(`user_unit), "", description_combo_units),
`HStretch()
)
@@ -3242,7 +3261,7 @@
),
`VSpacing(1.0),
// text entry label
- `TextEntry(`id(`tmp), `opt(`hstretch), _("&Temporary Location of Archive Parts"), Backup::tmp_dir),
+ `InputField (`id (`tmp), `opt(`hstretch), _("&Temporary Location of Archive Parts"), Backup::tmp_dir),
`VSpacing(0.5)
),
expert_options_help(), true, true
@@ -3520,7 +3539,7 @@
`VSpacing(0.5),
`HBox(
`HSpacing(1.0),
- `TextEntry(`id(`dir), label, dir),
+ `InputField (`id(`dir), `opt (`vstretch), label, dir),
`HSpacing(1),
`VBox(
`Label(""),
@@ -3799,7 +3818,7 @@
`VSquash(
`MinHeight(6,
// selection box
- `SelectionBox(`id(`include), `opt(`shrinkable), _("Directories Included in Search"), [])
+ `SelectionBox(`id(`include), `opt(`shrinkable), _("&Directories Included in Search"), [])
)
),
`HBox(
@@ -3975,7 +3994,7 @@
if (regexpmatch(new_dir, "^.+/$")) {
new_dir = regexpsub(new_dir, "^(.+)/$", "\\1");
}
-
+
if (new_dir == Backup::default_include_dir) {
y2milestone("Selecting the whole fs '/'");
Backup::include_dirs = [Backup::default_include_dir];
@@ -3986,18 +4005,35 @@
}
void AddIncludeItem () {
- // return $[ "text" : text, "clicked" : input ];
- map
participants (1)
-
locilka@svn.opensuse.org