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();
}