|  | @@ -283,7 +283,6 @@ laLogEntry* logEnsure(int Create){
 | 
											
												
													
														|  |  void logPrintTV(int Continued, char* format, va_list v){
 |  |  void logPrintTV(int Continued, char* format, va_list v){
 | 
											
												
													
														|  |      if(!format || !format[0]) return;
 |  |      if(!format || !format[0]) return;
 | 
											
												
													
														|  |      laLogEntry* le=logEnsure(Continued);
 |  |      laLogEntry* le=logEnsure(Continued);
 | 
											
												
													
														|  | -    va_list aptr;
 |  | 
 | 
											
												
													
														|  |      strSafePrintV(&le->Content, format, v);
 |  |      strSafePrintV(&le->Content, format, v);
 | 
											
												
													
														|  |      laNotifyUsers("la.logs");
 |  |      laNotifyUsers("la.logs");
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
										
											
												
													
														|  | @@ -311,8 +310,63 @@ void logClear(){
 | 
											
												
													
														|  |      while(l=lstPopItem(&MAIN.Logs)){ strSafeDestroy(&l->Content); memFree(l); }
 |  |      while(l=lstPopItem(&MAIN.Logs)){ strSafeDestroy(&l->Content); memFree(l); }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +#define PROGRESSW (LA_RH*15)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +void laShowProgressV(real p1, real p2, char* format, va_list v){
 | 
											
												
													
														|  | 
 |  | +    laBoxedTheme *bt = _LA_THEME_TAB; real* fg=laThemeColor(bt,LA_BT_TEXT); real* bg=laThemeColor(bt,LA_BT_NORMAL);
 | 
											
												
													
														|  | 
 |  | +    if(!MAIN.Progress.Called){
 | 
											
												
													
														|  | 
 |  | +        laRecordTime(&MAIN.Progress.TimeCalled); MAIN.Progress.Called=1;
 | 
											
												
													
														|  | 
 |  | +    }else{
 | 
											
												
													
														|  | 
 |  | +        laTimeRecorder tm; laRecordTime(&tm);
 | 
											
												
													
														|  | 
 |  | +        real t=laTimeElapsedSecondsf(&tm,&MAIN.Progress.TimeCalled); if(t<0.1) return;
 | 
											
												
													
														|  | 
 |  | +        memcpy(&MAIN.Progress.TimeCalled,&tm,sizeof(laTimeRecorder));
 | 
											
												
													
														|  | 
 |  | +        if(!MAIN.Progress.Shown){
 | 
											
												
													
														|  | 
 |  | +            int w=XDisplayWidth(MAIN.dpy, 0),h=XDisplayHeight(MAIN.dpy, 0);
 | 
											
												
													
														|  | 
 |  | +            XMoveResizeWindow(MAIN.dpy,MAIN.Progress.w,w/2-PROGRESSW/2,h/2-LA_RH*2/2,PROGRESSW,LA_RH*2);
 | 
											
												
													
														|  | 
 |  | +            long a=LA_COLOR3_TO_HEX(bg);
 | 
											
												
													
														|  | 
 |  | +            XSetForeground(MAIN.dpy,MAIN.Progress.gc,LA_COLOR3_TO_HEX(fg));
 | 
											
												
													
														|  | 
 |  | +            XSetBackground(MAIN.dpy,MAIN.Progress.gc,LA_COLOR3_TO_HEX(bg));
 | 
											
												
													
														|  | 
 |  | +            XSetWindowBackground(MAIN.dpy,MAIN.Progress.w,LA_COLOR3_TO_HEX(bg));
 | 
											
												
													
														|  | 
 |  | +            XMapWindow(MAIN.dpy,MAIN.Progress.w); XSync(MAIN.dpy, 0); XFlush(MAIN.dpy);
 | 
											
												
													
														|  | 
 |  | +            MAIN.Progress.Shown=1;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +    XClearWindow(MAIN.dpy,MAIN.Progress.w);
 | 
											
												
													
														|  | 
 |  | +    if(p1>=0) MAIN.Progress.p1=p1; if(p2>=0) MAIN.Progress.p2=p2;
 | 
											
												
													
														|  | 
 |  | +    XFillRectangle(MAIN.dpy,MAIN.Progress.w,MAIN.Progress.gc,0,0,PROGRESSW*MAIN.Progress.p1,LA_RH);
 | 
											
												
													
														|  | 
 |  | +    XFillRectangle(MAIN.dpy,MAIN.Progress.w,MAIN.Progress.gc,0,LA_RH,PROGRESSW*MAIN.Progress.p2,LA_RH);
 | 
											
												
													
														|  | 
 |  | +    XFlush(MAIN.dpy); XSync(MAIN.dpy, 0);
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +void laShowProgress(real p1, real p2, char* format, ...){
 | 
											
												
													
														|  | 
 |  | +    va_list aptr; va_start(aptr, format);
 | 
											
												
													
														|  | 
 |  | +    laShowProgressV(p1,p2,format,aptr);
 | 
											
												
													
														|  | 
 |  | +    va_end(aptr);
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +void laHideProgress(){
 | 
											
												
													
														|  | 
 |  | +    if(!MAIN.Progress.Shown){
 | 
											
												
													
														|  | 
 |  | +        MAIN.Progress.Called=0; return;
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +    laTimeRecorder tm; laRecordTime(&tm);
 | 
											
												
													
														|  | 
 |  | +    real t=laTimeElapsedSecondsf(&tm,&MAIN.Progress.TimeCalled);
 | 
											
												
													
														|  | 
 |  | +    if(t<0.2){ usleep((TNS_MIN2(0.2-t,0.2))*1000000); }
 | 
											
												
													
														|  | 
 |  | +    XUnmapWindow(MAIN.dpy,MAIN.Progress.w);
 | 
											
												
													
														|  | 
 |  | +    MAIN.Progress.Called = MAIN.Progress.Shown = 0;
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  //=======================
 |  |  //=======================
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +void laInitProgressWindow(){
 | 
											
												
													
														|  | 
 |  | +    MAIN.Progress.w=XCreateSimpleWindow(MAIN.dpy, RootWindow(MAIN.dpy, 0), 0, 0, PROGRESSW, LA_RH*2, 0, BlackPixel(MAIN.dpy, 0), WhitePixel(MAIN.dpy, 0));
 | 
											
												
													
														|  | 
 |  | +    if(!MAIN.Progress.w) return;
 | 
											
												
													
														|  | 
 |  | +    Atom window_type = XInternAtom(MAIN.dpy, "_NET_WM_WINDOW_TYPE", False); long value = XInternAtom(MAIN.dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
 | 
											
												
													
														|  | 
 |  | +    XChangeProperty(MAIN.dpy, MAIN.Progress.w, window_type,XA_ATOM, 32, PropModeReplace, (unsigned char *) &value,1 );
 | 
											
												
													
														|  | 
 |  | +    MAIN.Progress.gc=XCreateGC(MAIN.dpy,MAIN.Progress.w,0,&MAIN.Progress.gc_values);
 | 
											
												
													
														|  | 
 |  | +    if(MAIN.Progress.gc<0) return;
 | 
											
												
													
														|  | 
 |  | +    XSetFillStyle(MAIN.dpy, MAIN.Progress.gc, FillSolid);
 | 
											
												
													
														|  | 
 |  | +    XSetLineAttributes(MAIN.dpy, MAIN.Progress.gc, 2, LineSolid, CapButt, JoinBevel);
 | 
											
												
													
														|  | 
 |  | +    XSync(MAIN.dpy,0);
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  void laSetFontFolderPath(char* absolute){
 |  |  void laSetFontFolderPath(char* absolute){
 | 
											
												
													
														|  |      strcpy(MAIN.SysFontDir,absolute); int len=strlen(MAIN.SysFontDir);
 |  |      strcpy(MAIN.SysFontDir,absolute); int len=strlen(MAIN.SysFontDir);
 | 
											
												
													
														|  |      if(MAIN.SysFontDir[len-1]!='/'){ MAIN.SysFontDir[len]='/'; MAIN.SysFontDir[len+1]=0; }
 |  |      if(MAIN.SysFontDir[len-1]!='/'){ MAIN.SysFontDir[len]='/'; MAIN.SysFontDir[len+1]=0; }
 | 
											
										
											
												
													
														|  | @@ -475,6 +529,8 @@ int laGetReady(){
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      laAddExtraExtension(LA_FILETYPE_UDF,"udf",0);
 |  |      laAddExtraExtension(LA_FILETYPE_UDF,"udf",0);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    laInitProgressWindow();
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      //tns_RegisterResourcesForSoftwareRender();
 |  |      //tns_RegisterResourcesForSoftwareRender();
 | 
											
												
													
														|  |      la_RegisterGeneralProps();
 |  |      la_RegisterGeneralProps();
 | 
											
												
													
														|  |      la_RegisterBuiltinTemplates();
 |  |      la_RegisterBuiltinTemplates();
 |