Subversion Repositories Kolibri OS

Rev

Rev 2626 | Blame | Last modification | View Log | Download | RSS feed

  1. ;-----------------------------------------------------------------------------
  2. Get_ini:
  3.         stdcall dll.Init,[lib_init]    
  4.        
  5.         mov     ebx,ini_file_name
  6.         mov     esi,path
  7.         mov     edi,library_path
  8.         call    copy_file_path
  9. ;------------------------------------------------------------------------------
  10. ; Get panel variables
  11. ;------------------------------------------------------------------------------
  12.         invoke  ini_get_int,library_path,aVariables,aPanelHeight,20
  13.         cmp     eax,100
  14.         ja      @f
  15.  
  16.         cmp     eax,10
  17.         ja      .height
  18. @@:
  19.         mov     eax,20
  20. .height:
  21.         mov     [height],eax
  22. ;--------------------------------------
  23.         invoke  ini_get_int,library_path,aVariables,aPanelWidth,0
  24.         cmp     eax,200
  25.         ja      @f
  26.  
  27.         mov     eax,0
  28. @@:
  29.         mov     [width],eax
  30. ;--------------------------------------
  31.         invoke  ini_get_int,library_path,aVariables,aSoftenHeight,3
  32.         cmp     eax,10
  33.         ja      @f
  34.  
  35.         cmp     eax,1
  36.         ja      .soften_height
  37. @@:
  38.         mov     eax,3
  39. .soften_height:
  40.         mov     [soften_height],eax
  41. ;--------------------------------------
  42.         invoke  ini_get_int,library_path,aVariables,aButtonTopOffset,3
  43.         cmp     eax,10
  44.         ja      @f
  45.  
  46.         cmp     eax,1
  47.         ja      .button_top_offset
  48. @@:
  49.         mov     eax,3
  50. .button_top_offset:
  51.         mov     [button_top_offset],eax
  52. ;--------------------------------------
  53.         invoke  ini_get_int,library_path,aVariables,aButtonBottomOffset,3
  54.         cmp     eax,10
  55.         ja      @f
  56.  
  57.         cmp     eax,1
  58.         ja      .button_bottom_offset
  59. @@:
  60.         mov     eax,3
  61. .button_bottom_offset:
  62.         mov     [button_bottom_offset],eax
  63. ;------------------------------------------------------------------------------
  64. ; Get panel flags
  65. ;------------------------------------------------------------------------------
  66.         invoke  ini_get_int,library_path,aFlags,aSoftenUp,1
  67.         cmp     eax,2
  68.         jb      @f
  69.  
  70.         mov     eax,1
  71. @@:
  72.         mov     [soften_up],eax
  73. ;--------------------------------------
  74.         invoke  ini_get_int,library_path,aFlags,aSoftenDown,1
  75.         cmp     eax,2
  76.         jb      @f
  77.  
  78.         mov     eax,1
  79. @@:
  80.         mov     [soften_down],eax
  81. ;--------------------------------------
  82.         invoke  ini_get_int,library_path,aFlags,aMinimizeLeftButton,1
  83.         cmp     eax,2
  84.         jb      @f
  85.  
  86.         mov     eax,1
  87. @@:
  88.         mov     [minimize_left],eax
  89. ;--------------------------------------
  90.         invoke  ini_get_int,library_path,aFlags,aMinimizeRightButton,1
  91.         cmp     eax,2
  92.         jb      @f
  93.  
  94.         mov     eax,1
  95. @@:
  96.         mov     [minimize_right],eax
  97. ;--------------------------------------
  98.         invoke  ini_get_int,library_path,aFlags,aMenuButton,1
  99.         cmp     eax,2
  100.         jb      @f
  101.  
  102.         mov     eax,1
  103. @@:
  104.         mov     [menu_enable],eax
  105. ;--------------------------------------
  106.         invoke  ini_get_int,library_path,aFlags,aRunApplButtons,1
  107.         cmp     eax,2
  108.         jb      @f
  109.  
  110.         mov     eax,1
  111. @@:
  112.         mov     [run_appl],eax
  113. ;--------------------------------------
  114.         invoke  ini_get_int,library_path,aFlags,aCleanDesktopButton,1
  115.         cmp     eax,2
  116.         jb      @f
  117.  
  118.         mov     eax,1
  119. @@:
  120.         mov     [clean_desktop_enable],eax
  121. ;--------------------------------------
  122.         invoke  ini_get_int,library_path,aFlags,aClock,1
  123.         cmp     eax,2
  124.         jb      @f
  125.  
  126.         mov     eax,1
  127. @@:
  128.         mov     [clock_enable],eax
  129. ;--------------------------------------
  130.         invoke  ini_get_int,library_path,aFlags,aCpuUsage,1
  131.         cmp     eax,2
  132.         jb      @f
  133.  
  134.         mov     eax,1
  135. @@:
  136.         mov     [cpu_usage_enable],eax
  137. ;--------------------------------------
  138.         invoke  ini_get_int,library_path,aFlags,aChangeLang,1
  139.         cmp     eax,2
  140.         jb      @f
  141.  
  142.         mov     eax,1
  143. @@:
  144.         mov     [chlang_enable],eax
  145. ;--------------------------------------
  146.         invoke  ini_get_int,library_path,aFlags,aAttachment,1
  147.         cmp     eax,2
  148.         jb      @f
  149.  
  150.         mov     eax,1
  151. @@:
  152.         mov     [place_attachment],eax
  153. ;--------------------------------------
  154.         invoke  ini_get_int,library_path,aFlags,aButtonsStyle,1
  155.         cmp     eax,2
  156.         jb      @f
  157.  
  158.         mov     eax,1
  159. @@:
  160.         mov     [button_style],eax
  161. ;--------------------------------------
  162.         invoke  ini_get_color,library_path,aColors,aMenuButton,0x44aa44
  163.         mov     [MenuButton_color],eax
  164. ;--------------------------------------
  165.         invoke  ini_get_color,library_path,aColors,aCleanDesktopButton,0x66cc
  166.         mov     [CleanDesktopButton_color],eax
  167. ;--------------------------------------
  168.         invoke  ini_get_color,library_path,aColors,aClock,0x66cc
  169.         mov     [Clock_color],eax
  170. ;--------------------------------------
  171.         invoke  ini_get_color,library_path,aColors,aCpuUsage,0x44aa44
  172.         mov     [CpuUsage_color],eax
  173. ;--------------------------------------
  174.         invoke  ini_get_color,library_path,aColors,aCpuUsageBckgr,0xdd2222
  175.         mov     [CpuUsageBckgr_color],eax
  176. ;--------------------------------------
  177.         invoke  ini_get_color,library_path,aColors,aChangeLang,0x66cc
  178.         mov     [ChangeLang_color],eax
  179. ;--------------------------------------
  180.         invoke  ini_get_color,library_path,aColors,aPageList,0xffffff
  181.         mov     [PageList_color],eax
  182. ;--------------------------------------
  183.         invoke  ini_get_color,library_path,aColors,aPanelText,0xffffff
  184.         mov     [PanelText_color],eax
  185. ;--------------------------------------
  186.         invoke  ini_get_color,library_path,aColors,aAltTab,0xff8000
  187.         mov     [AltTab_color],eax
  188. ;--------------------------------------
  189.         invoke ini_get_str,library_path,aApplicationsPaths,aEnd,end_name,63,Path_def_val
  190. ;--------------------------------------
  191.         invoke ini_get_str,library_path,aApplicationsPaths,aMenu,menu_name,63,Path_def_val
  192. ;--------------------------------------
  193.         invoke ini_get_str,library_path,aApplicationsPaths,aRun,run_name,63,Path_def_val
  194. ;--------------------------------------
  195.         invoke ini_get_str,library_path,aApplicationsPaths,aPrnScr,printscreen_name,63,Path_def_val
  196. ;--------------------------------------
  197.         invoke ini_get_str,library_path,aApplicationsPaths,aClock,calendar_name,63,Path_def_val
  198. ;--------------------------------------
  199.         invoke ini_get_str,library_path,aApplicationsPaths,aCpuUsage,sysmeter_name,63,Path_def_val
  200. ;--------------------------------------
  201.         invoke ini_get_str,library_path,aApplicationsPaths,aMouseEmul,mousemul_name,63,Path_def_val    
  202.        
  203.         ret
  204. ;-----------------------------------------------------------------------------
  205. copy_file_path:
  206.         xor     eax,eax
  207. @@:
  208.         cld
  209.         lodsb
  210.         stosb
  211.         test    eax,eax
  212.         jnz     @b
  213.         mov     esi,edi
  214.         dec     esi
  215. @@:
  216.         std
  217.         lodsb
  218.         cmp     al,'/'
  219.         jnz     @b
  220.         mov     edi,esi
  221.         add     edi,2
  222.         mov     esi,ebx
  223. @@:
  224.         cld
  225.         lodsb
  226.         stosb
  227.         test    eax,eax
  228.         jnz     @b
  229.         ret
  230. ;-----------------------------------------------------------------------------