From: Andrey C. <sku...@us...> - 2006-11-03 16:12:43
|
Update of /cvsroot/eas-dev/eas/client In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30821/client Modified Files: Makefile main.prg Added Files: eas.xpm Log Message: Add localization and documentation, small fixes. --- NEW FILE: eas.xpm --- /* XPM */ static char *eas[]={ "16 16 167 2", ".g c None", "aJ c None", "ag c None", ".q c None", "#4 c None", ".h c None", "aK c None", ".i c None", ".# c None", "Qt c None", "ah c #afafb0", ".j c #afb6be", ".a c #aeb6be", "#S c #adadad", "aC c #acacac", "#i c #abb4be", "#v c #1a4165", "#X c #1a4267", ".6 c #1a456b", "#t c #1b4360", "#Y c #1b456d", "#W c #1c466d", "#u c #1e4667", ".3 c #1e4c70", "#Z c #1e5182", "#P c #1f323f", "#y c #1f3f55", ".5 c #1f496c", ".4 c #1f4a6c", "#l c #205077", "#1 c #213648", "#G c #222b30", "#s c #224d6c", "#w c #225580", "#o c #232e33", "#g c #233c4e", "#V c #23598d", "#M c #255987", "#0 c #255e94", "a# c #2563a2", "#D c #265e8d", ".7 c #265e8e", ".W c #265f91", "a. c #2666a6", "#m c #276091", "aa c #2767a7", "ab c #28639f", ".2 c #2a608b", "#9 c #2a6fb5", ".K c #2c73b6", "#U c #2c74b8", "#z c #2e2f2f", "ac c #2f3e4e", "am c #2f79c4", "#8 c #2f7cca", ".y c #2f80d1", "an c #305b86", "al c #307ece", ".z c #3080d0", "ak c #3080d1", "#7 c #3182d5", ".t c #3184d7", "#Q c #323333", ".x c #3282cf", "aj c #3283d5", "#6 c #3283d6", ".m c #3284d7", ".L c #3381c8", ".w c #3382cf", ".n c #3383d5", ".v c #3384d2", ".u c #3385d5", ".0 c #3486d5", "aw c #356799", ".P c #3584d5", ".D c #3585d5", "av c #366ea6", "#a c #3687d1", ".E c #3688d4", ".l c #3785d4", "ax c #385675", "#. c #394043", "#h c #3d3e3e", ".Z c #3d87d2", ".s c #3e87d2", "ao c #3f4347", "au c #3f6e9e", "ay c #444a51", "ad c #464646", ".V c #4996bf", "#L c #4d9ac3", "#H c #4e4e4e", "#J c #538dc8", "ai c #5585b5", ".d c #558ec7", "#K c #55addd", "#p c #565656", "az c #585858", "#e c #58aed9", ".Y c #5a9fbf", "ap c #5c5c5c", ".o c #5c86b1", ".9 c #5cb6e0", "#n c #5cb7e2", "#O c #5cb8e2", "#k c #5db6df", "#C c #5db6e1", "#F c #5db7e0", "#N c #5db9e3", "#x c #5dbae3", "#B c #5e92c7", "#E c #5eb9e3", "#f c #5ebae4", ".J c #5ebae5", ".Q c #5ebbe7", ".F c #5ebbe8", "#T c #5f90c2", ".M c #5fbae3", "#2 c #616161", ".T c #61c0e9", ".R c #61c0ea", ".S c #61c1ea", ".c c #6294c6", "#d c #62c0e8", ".U c #62c0e9", ".G c #62c0ea", ".H c #62c1ea", ".I c #62c1eb", ".8 c #63c3ef", ".X c #63c4ee", ".1 c #63c5f0", "#b c #63c6f0", "at c #64798e", ".e c #6492c0", "#r c #64c5f0", "## c #6596c8", ".A c #667d8f", ".k c #6797c8", "ae c #696969", "#j c #69cffb", "#c c #6ad0fc", "aF c #6c6c6c", ".N c #6d93a4", "aG c #707070", "aA c #737373", "#A c #757575", "#R c #767676", "#q c #7ea0c3", "aH c #7f7f7f", "aq c #818181", ".b c #82a1c2", ".C c #83a3c4", "#5 c #869db4", "aE c #888888", ".f c #8ea0b3", "aB c #929292", ".r c #92aac1", "#I c #959595", ".O c #95abc1", "af c #989898", ".B c #9ca1a4", "#3 c #9e9e9e", "as c #a0a0a1", "ar c #a1a1a1", "aD c #a2a2a2", ".p c #a3a3a4", "aI c #a5a5a5", "QtQtQtQtQtQt.#.a.b.c.d.e.f.g.h.i", "QtQtQtQtQt.j.k.l.m.m.m.m.n.o.p.q", "QtQtQt.#.r.s.t.u.v.w.w.x.y.z.A.B", "QtQt.#.C.D.t.E.F.G.H.I.J.K.L.M.N", "QtQt.O.P.t.E.Q.R.S.T.U.V.W.J.X.Y", "Qt.j.Z.m.0.F.1.2.3.4.5.6.7.8.9#.", ".i##.m.t#a#b#c.I.T#d#e.W#f.8#g#h", "#i.D.m.0.Q#j.I.T.U#k#l#m.8#n#o#p", "#q.m.t#a#b#r#s#t#u#v#w#x.8#y#z#A", "#B.m.0.Q#c#c.I.T#C#D#E#j#F#G#H#I", "#J.m.v#K.R.G.G.G#L#M#N#O#P#Q#R#S", "#T.m.y#U#V#W#v#X#Y#Z#0#1#z#2#3#4", "#5#6#7#8#9a.a#a#aaabacadaeafagQt", "ahaiaj#7akalalamanaoapaqarag.#Qt", "#4asatauavawaxayazaAaBaC.h.#QtQt", ".iagaDaEaAaFaGaHaBaIaJaKQtQtQtQt"}; Index: Makefile =================================================================== RCS file: /cvsroot/eas-dev/eas/client/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 5 Jun 2006 20:54:53 -0000 1.4 +++ Makefile 3 Nov 2006 16:12:06 -0000 1.5 @@ -7,10 +7,10 @@ include ../Makefile.var CLIPINCLUDE= -I$(CLIPROOT)/include CLIP = $(CLIPROOT)/bin/clip -CLIPLIBS = -L$(CLIPROOT)/lib -lclip-codb -lclip-ui -lclip-xml -lexpat -EASLIBS = -leas -lcodb_query +CLIPLIBS = -L$(CLIPROOT)/lib -lclip-codb -lcodb-query -lclip-ui -lclip-xml -lexpat +EASLIBS = -leas CLIPFLAGS = -a -O -b -ICONS = eas-logo.xpm +ICONS = eas-logo.xpm eas.xpm .SUFFIXES: .prg .o .po .PHONY: all clean Index: main.prg =================================================================== RCS file: /cvsroot/eas-dev/eas/client/main.prg,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- main.prg 20 Jun 2006 10:25:52 -0000 1.9 +++ main.prg 3 Nov 2006 16:12:06 -0000 1.10 @@ -155,10 +155,6 @@ for i=cfg:execute to len(cfg:params) aadd( params, cfg:params[i] ) next - if cfg:repo != '' - aadd( params, 'repository' ) - aadd( params, cfg:repo ) - endif if cfg:dbPath != '' aadd( params, 'dbpath' ) aadd( params, cfg:dbPath ) @@ -222,6 +218,7 @@ // Create window win := UIWindow(i18n("Entrance to system"), NIL, "regWindow", .F. ) + win:setIcon(UIImage( EAS_MODULES+PATH_DELIM+"icons"+PATH_DELIM+"eas.xpm")) loginWindow := win // Grid @@ -237,7 +234,7 @@ cap:add( gTitle ) wIcon := UIImage( EAS_MODULES+PATH_DELIM+"icons"+PATH_DELIM+"eas-logo.xpm") gTitle:add( wIcon ) - wVer := UILabel( i18n('Version ')+EASGetVersion() ) + wVer := UILabel( i18n("Version ")+EASGetVersion() ) gTitle:addEnd( wVer ) // Set styles @@ -263,9 +260,9 @@ bb:setAlignment( ALIGN_CENTER ) t:add(bb,"6,1-4",.T.) - bD := UIButton( i18n("&Ok"), {|o,e| sessionBegin(win) } ) + bD := UIButton( i18n("&Ok"), {|o,e| sessionBegin(win) } ) bb:add( bD, .T., .T. ) - bb:add( UIButton( i18n("&Exit"), {|o,e| applicationQuit() } ), .T., .T. ) + bb:add( UIButton( i18n("&Exit"), {|o,e| applicationQuit() } ), .T., .T. ) win:setDefault(bD) // TODO: click default on ENTER pressed win:setFocus(pF) @@ -338,14 +335,71 @@ /* Usage information */ static function printUsage() - ?? PRG_NAME+'. Ver. '+EASVERSION+'. Client program for E/AS.'+chr(10)+chr(10) - ?? "Usage: "+PRG_NAME+" [options]&\n" - ?? "Options:&\n" - ?? " -h, --help Print this information&\n" - ?? " -c cfg_file Read configuration from file cfg_file&\n" - ?? " -o RAW://user:password@host:port Connect to server host:port with defined username and password&\n" - ?? " -repo path/URL Set repository path or URL&\n" - ?? " -e component method [args...] Execute method of component with optional argumens&\n" - ?? " -d driver Use clip-ui driver&\n" - ?? " -debug level Set debug output level&\n" + ?? PRG_NAME+'. '+i18n("Version ")+EASVERSION+'. '+i18n("Client program for E/AS.")+chr(10)+chr(10) + ?? i18n("Usage: ")+PRG_NAME+i18n(" [options]")+chr(10) + ?? i18n("Options:")+chr(10) + ?? i18n(" -h, --help Print this information")+chr(10) + ?? i18n(" -c cfg_file Read configuration from file cfg_file")+chr(10) + ?? i18n(" -o RAW://user:password@host:port Connect to server host:port with defined username and password")+chr(10) + ?? i18n(" -e component method [args...] Execute method of component with optional argumens")+chr(10) + ?? i18n(" -d driver Use clip-ui driver")+chr(10) + ?? i18n(" -debug level Set debug output level")+chr(10) +return NIL + +/* About dialog */ +function dialogAbout() + local win, t, cap, bb, bD + // Create window + win := UIWindow(i18n("About"), NIL, "aboutWindow", .F. ) + win:setIcon(UIImage( EAS_MODULES+PATH_DELIM+"icons"+PATH_DELIM+"eas.xpm")) + + // Grid + t := UIGrid(,8,4) + t:setSpacing(0) + t:setPadding(3) + win:userSpace:add(t,.T.,.T.) + + // Title + cap := UIFrame() + cap:setType( FRAME_RAISED ) + gTitle := UIHBox(,3,0) + cap:add( gTitle ) + wIcon := UIImage( EAS_MODULES+PATH_DELIM+"icons"+PATH_DELIM+"eas-logo.xpm") + gTitle:add( wIcon ) + wVer := UILabel( i18n("Version ")+EASGetVersion() ) + gTitle:addEnd( wVer ) + + // Set styles + driver := getDriver() + driver:setStyle(cap, 'color.bg', 'white') + driver:setStyle(wVer, 'color.fg', 'darkred') + + t:add(cap, "1,1-4+",.T.) + + // Text + t:add(UILabel(i18n("Client software for E/AS platform")), "2,1-4+") + t:add(UILabel(i18n("Version:")+" "+EASGetVersion()), "3,1-4+") + t:add(UILabel(i18n("Driver:")+" "+driver:driver), "4,1-4+") + t:add(UILabel(i18n("(c) 2003-2006, E/AS Software Foundation. All rights reserved.")), "5,1-4+") + t:add(UILabel(i18n("This software is distributed under the GPL")), "6,1-4+") + t:add(UILabel(i18n("Web: http://eas.lrn.ru")), "7,1-4+") + + // Close button + bb := UIButtonBar() + bb:setAlignment( ALIGN_CENTER ) + t:add(bb,"8,1-4",.T.) + + bD := UIButton( i18n("&Close"), {|o,e| win:close() } ) + bb:add( bD, .T., .T. ) + + win:setDefault(bD) + win:setFocus(bD) + + // Set keys + win:setKeyEvent("Enter", {|o,e| win:close() } ) + win:setKeyEvent("Esc", {|o,e| win:close() } ) + + win:setPlacement( .T. ) + win:show() + return NIL \ No newline at end of file |