Code covered by the BSD License  

Highlights from
HTML Indexer

image thumbnail

HTML Indexer

by

 

16 Aug 2004 (Updated )

automated multi-language html index, index for print, batch image scaling

dlgLimba(languages, cefaci)
function limba = dlgLimba(languages, cefaci)
% limba = dlgLimba(languages, cefaci)
%
% dialog pentru introducerea/stergerea unei noi limbi 
%
% noua, 15.09.03
% v.041 - 14.11.2003 delete language as well
%       intoarce un numar pentru cefaci='delete' 
%       si un string pentru cefaci='add'

if nargin < 2
    cefaci = 'add';
end;

switch cefaci
case 'add'
prompt={'language to add:'}; def={'romana'}; dlgTitle='quadra: adauga o limba'; 
raspuns=inputdlg(prompt,dlgTitle,1,def);
if ~isempty(raspuns) limba = deal(raspuns{:}); else limba = 0; end;
% mai tirziu direct cu 'cite vrei ? cell de N'
case 'delete'
    prompt={'languageto delete (no undo):'}; dlgTitle='quadra: taie o limba'; 
    for i=1:size(languages,1)
        prompt(i) = {['limba nr. ' num2str(i)]};
        def(i) = {deblank(languages(i,:))};
    end;
    prompt(i+1) = {'number corresponding to language to be deleted'};
    def(i+1) = {'0'};
    raspuns=inputdlg(prompt,dlgTitle,1,def);
    if ~isempty(raspuns) limba = max(0,min(i,str2num(deal(raspuns{i+1})))); else limba = 0; end;
end;

Contact us