Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7531 → Rev 7532

/programs/cmm/notes/ini.h
0,0 → 1,20
#include "../lib/obj/libini.h"
 
_ini ini = { "/sys/settings/app.ini", "Notes" };
 
void LoadIniSettings()
{
load_dll(libini, #lib_init,1);
Form.left = ini.GetInt("WinX", 150);
Form.top = ini.GetInt("WinY", 50);
//Form.width = ini.GetInt("WinW", 640);
//Form.height = ini.GetInt("WinH", 560);
}
 
void SaveIniSettings()
{
ini.SetInt("WinX", Form.left);
ini.SetInt("WinY", Form.top);
//ini.SetInt("WinW", Form.width);
//ini.SetInt("WinH", Form.height);
}
/programs/cmm/notes/notes.c
39,7 → 39,10
#define DELETE_BTN 4;
#define DELETE_W sizeof(DELETE_TEXT)+2*6
 
proc_info Form;
 
#include "engine.h"
#include "ini.h"
 
dword ed_mouse;
edit_box notebox = {NULL,NULL,NULL,COL_BG_ACTIVE,0x94AECE,COL_BG_ACTIVE,0xffffff,0,
68,6 → 71,7
if (param) notes.OpenTxt(#param); else notes.OpenTxt(abspath("notes.txt"));
 
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
LoadIniSettings();
 
loop() switch(WaitEvent())
{
164,9 → 168,10
{
int i;
if (window_dragable)
DefineUnDragableWindow(100,100,WIN_W, WIN_H);
DefineUnDragableWindow(Form.left,Form.top,WIN_W, WIN_H);
else
DefineDragableWindow(100,100,WIN_W, WIN_H);
DefineDragableWindow(Form.left,Form.top,WIN_W, WIN_H);
GetProcessInfo(#Form, SelfInfo);
notes.SetSizes(RED_LINE_X+1, HEADER_HEIGHT, WIN_W-1, RED_LINE_X*LINES_COUNT, RED_LINE_X);
DrawRectangle3D(0,0,WIN_W,TITLE_H-1,0xBB6535, 0xCD6F3B);
DrawRectangle3D(1,1,WIN_W-2,TITLE_H-3,0xEFBFA4, 0xDD8452);
213,6 → 218,7
void EventExitApp()
{
notes.SaveTxt();
SaveIniSettings();
ExitProcess();
}
 
/programs/cmm/panels_cfg/panels_cfg.c
180,7 → 180,7
//DOCKY
frame_y = calc(y.inc(20));
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0);
DrawPanelsImage(y.n, dkLocation);
DrawPanelsImage(y.n, dkLocation+1);
WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
dkFsize.draw(22, y.inc(35));
dkAshow.draw(win_center_x, y.n);
/programs/cmm/sysmon/sysmon.c
48,7 → 48,7
load_dll(libimg, #libimg_init,1);
load_dll(libini, #lib_init,1);
 
GetTmpDiskSizesFromIni();
GetTmpDiskSizes();
loop()
{
153,15 → 153,21
return max_h - idle;
}
 
_ini ini = { "/sys/settings/system.ini", "DiskSizes" };
void GetTmpDiskSizesFromIni()
dword GetDiskSize(dword disk_n)
{
char i, key[2];
key[1]=0;
BDVK bdvk;
char tmp_path[8];
strcpy(#tmp_path, "/tmp0/1");
tmp_path[4] = disk_n + '0';
GetFileInfo(#tmp_path, #bdvk);
return bdvk.sizelo;
}
void GetTmpDiskSizes()
{
char i;
for (i=0; i<=9; i++)
{
key[0]=i+'0';
tmp_size[i] = ini.GetInt(#key, 0) / 1024 / 1024;
tmp_size[i] = GetDiskSize(i) / 1024 / 1024;
}
}