[yast-commit] r52654 - /trunk/storage/storage/src/include/ep-loop-dialogs.ycp
Author: aschnell Date: Wed Oct 29 11:57:08 2008 New Revision: 52654 URL: http://svn.opensuse.org/viewcvs/yast?rev=52654&view=rev Log: - work on crypt files (bnc #433484) Modified: trunk/storage/storage/src/include/ep-loop-dialogs.ycp Modified: trunk/storage/storage/src/include/ep-loop-dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-loop-dialogs.ycp?rev=52654&r1=52653&r2=52654&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-loop-dialogs.ycp (original) +++ trunk/storage/storage/src/include/ep-loop-dialogs.ycp Wed Oct 29 11:57:08 2008 @@ -87,7 +87,12 @@ fpath = tmp; UI::ChangeWidget(`id(`fpath), `Value, fpath); - // TODO: file existence -> set create + if (Mode::normal()) + { + integer s = (integer) SCR::Read(.target.size, fpath); + create_file = s < 0; + UI::ChangeWidget(`id(`create_file), `Value, create_file); + } break; @@ -99,6 +104,16 @@ case `next: fpath = (string) UI::QueryWidget(`id(`fpath), `Value); + if (fpath == "" || substring(fpath, 0, 1) != "/") + { + // popup text + Popup::Error(sformat(_("The file name \"%1\" is invalid. +Use an absolute path name. +"), fpath)); + widget = `again; + continue; + } + if (create_file) { string tmp = (string) UI::QueryWidget(`id(`size), `Value); @@ -115,10 +130,31 @@ Popup::Error(sformat(_("The size entered is invalid. Enter a size of at least %1."), Storage::KByteToHumanString(min_size_k))); widget = `again; + continue; } } + else + { + integer s = (integer) SCR::Read(.target.size, fpath); + y2milestone("loop file size:%1", s); - // TODO checks, valid filename, file existence + if (Mode::normal()) + { + if (s < 0) + { + // popup text + Popup::Error( sformat(_("The file name \"%1\" does not exist +and the flag for create is off. Either use an existing file or activate +the create flag."), fpath)); + widget = `again; + continue; + } + else + { + size_k = s / 1024; + } + } + } break; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org