rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on January 28, 2010, 05:50:42 PM

Title: Testing build #253
Post by: rejetto on January 28, 2010, 05:50:42 PM
download @ www.dovedove.it/hfs/hfs253.exe

new commands are yet to be documented. i will soon.

what's new
+ new template macro: dir, disk free, filetime, file changed, load tpl
+ {.get|tpl file.}
- {.current downloads.} parameters 'user' and 'ip' were inverted
- connections box was not compatible with large system fonts 
Title: Re: Testing build #253
Post by: Roessi on January 28, 2010, 09:08:38 PM
perfect thank you rejetto :) now its time to change the rawr tpl again :)
Title: Re: Testing build #253
Post by: Mars on January 28, 2010, 11:25:43 PM
some news in french version

http://www.rejetto.com/forum/index.php/topic,8140.msg1048315.html#msg1048315

forget to say: added one macro (non official)  {.get|external address.} which give your internet IP used by the self test.
 ;)
Title: Re: Testing build #253
Post by: rejetto on January 29, 2010, 10:51:23 AM
dialog1: fixed in the next build
dialog2: i don't understand why the "manage accounts" button is disabled.
there's nothing i know that can disable it.

how could the "external address" thing could be useful?
Title: Re: Testing build #253
Post by: Mars on January 29, 2010, 12:06:25 PM
Quote
dialog2: i don't understand why the "manage accounts" button is disabled.
there's nothing i know that can disable it.
If the following modification is not made, we obtain, in easy mode, the same result as with dialog1. In dialog 2, the button is deactivated to have no this inconvenience.

have a look on the post build 253 FR, the main.pas (of rejetto) is attached with all necessary update

-------------------------------------------------------
procedure TmainFrm.Properties1Click(Sender: TObject);
begin
if selectedFile = NIL then exit;                                                                          
filepropFrm:=TfilepropFrm.Create(mainFrm);
filepropFrm.goToAccountsBtn.Enabled:=mainfrm.Accounts1.Visible;  //add in French Version
try
  if filepropFrm.showModal() = mrCancel then exit;
finally freeAndNIL(filepropFrm) end;
VFSmodified:=TRUE;
filesBox.invalidate();
end;



Quote
Quote from: Mars on Today at 11:04:09
NEXT version?? there is always a next version  

ok, now i got what you meant. you are right.

dialog1: fixed in next release

That it is absolutely sure!!! :D  

Title: Re: Testing build #253
Post by: SilentPliz on January 29, 2010, 03:08:38 PM

how could the "external address" thing could be useful?


I found a use in my case, display the external IP address in the web page, despite the use of a ban \127.0.0.1;192.XXX.XXX in HFS with Stunnel.

With %ip%, it shows only 127.0.0.1
Title: Re: Testing build #253
Post by: Mars on January 29, 2010, 03:33:11 PM
Quote
how could the "external address" thing could be useful?

This macro will reveal all its utility in the next build, but I cannot specify which version yet. ;D
Title: Re: Testing build #253
Post by: Roessi on January 29, 2010, 03:34:19 PM
i dont get the dir command to be used cause of the | as delimiter every macro i use doesnt work cause of the pipes in the output of dir : - /
Title: Re: Testing build #253
Post by: rejetto on January 30, 2010, 02:41:58 PM
i dont get the dir command to be used cause of the | as delimiter every macro i use doesnt work cause of the pipes in the output of dir : - /

aw sheet, i was going to work on the problem before publishing, but i forgot it
Title: Re: Testing build #253
Post by: rejetto on February 02, 2010, 04:22:25 PM
@roessi
well, i decided that the pipe is a good "by default" separator since you can easily use it with {.for each.}
example:

Code: [Select]
{.for each|#file|{.dir|E:\.}|{:
here's another one: {.^#file.}
:}.}

and so you don't even need your loop-function in this case.
but i'll add an optional parameter (in build #254) to let you specify the separator, in case you need to use {.dir.} in different cases.
Title: Re: Testing build #253
Post by: rejetto on February 02, 2010, 05:45:46 PM
If the following modification is not made, we obtain, in easy mode, the same result as with dialog1. In dialog 2, the button is deactivated to have no this inconvenience.

ah, that's it. It was you.
I think in this "way" you should opt for hiding the button instead of disabling. less cluttering.
from my side, at the moment i decided to keep the button, and enabled.

i'm still undecided, but if i come to removing that button, i think i will also hide
- the accountsBox on the left
- "new account"
- "all/none"
- "any account"
Title: Re: Testing build #253
Post by: rejetto on February 02, 2010, 05:48:17 PM
Yoss moved to http://www.rejetto.com/forum/index.php/topic,8174.0.html
Title: Re: Testing build #253
Post by: Mars on February 02, 2010, 05:54:49 PM
Quote
i'm still undecided, but if i come to removing that button, i think i will also hide
- the accountsBox on the left
- "new account"
- "all/none"
- "any account"
 

or simply this mod
Quote
begin
procedure TmainFrm.filemenuPopup(Sender: TObject);
.....
// default values
setDefaultValues(filemenu.items);
Addfiles1.visible:=TRUE;
Addfolder1.visible:=TRUE;
Properties1.visible:=not easyMode;
Title: Re: Testing build #253
Post by: rejetto on February 02, 2010, 05:59:35 PM
I found a use in my case, display the external IP address in the web page, despite the use of a ban \127.0.0.1;192.XXX.XXX in HFS with Stunnel.
With %ip%, it shows only 127.0.0.1

ah, that's ok
Title: Re: Testing build #253
Post by: rejetto on February 02, 2010, 06:00:22 PM
or simply this mod

it's meant as a provocation? ;)
Title: Re: Testing build #253
Post by: Mars on February 06, 2010, 06:15:59 PM
For you who likes the simplicity, this solution should delight you.   ;D



When loading a new or recent VFS , if the actual is modified , there was nothing to ask saving before.

From now on it will exist in the future build. ;)

Quote
procedure TmainFrm.Loadfilesystem1Click(Sender: TObject);
var
  fn: string;
begin
if blockLoadSave() then exit;
if VFSModified then
 case msgDlg('VFS has changed, save current file system before open new?',MB_ICONINFORMATION+MB_YESNOCANCEL) of
    IDYES: begin
           mainfrm.saveVFS(lastFileOpen);
           if not VFSModified then msgDlg('The VFS was correctly saved,'#13#13'click on OK to continue', MB_ICONASTERISK);
           end;
    IDNO: ; // just go on
    IDCANCEL: exit;
    end;
fn:='';
if PromptForFileName(fn, 'VirtualFileSystem|*.vfs', 'vfs', 'Open VFS file') then
  loadVFS(fn);
end;

............

procedure Tmainfrm.recentsClick(sender:Tobject);
var
  i: integer;
begin
if blockLoadSave() then exit;
i:=strToInt((sender as Tmenuitem).Caption[3]);
if i > length(recentFiles) then exit;
dec(i); // convert to zero based
if FileExists(recentFiles) then
  if vfsmodified then
  case msgDlg('VFS has changed, save current file system before select new file?',MB_ICONINFORMATION+MB_YESNOCANCEL) of
    IDYES: begin
           mainfrm.saveVFS(lastFileOpen);
           if not VFSModified then msgDlg('The VFS was correctly saved,'#13#13'click on OK to continue', MB_ICONASTERISK);
           end;
    IDNO: begin        
           loadVFS(recentFiles)
           end;
    IDCANCEL: exit;
    end
  else
  loadVFS(recentFiles)
else
  begin
  msgDlg('The file does not exist anymore', MB_ICONERROR);
  removeString(recentFiles, i);
  updateRecentFilesMenu();
  end;
end;

Title: Re: Testing build #253
Post by: rejetto on February 08, 2010, 03:14:25 PM
good point mars.

but i opted for adding just this line to both procedures:
if not checkVfsOnQuit() then exit;

isn't it enough?