mousecfg: fix
appearance: add a flag to update dock on skin change git-svn-id: svn://kolibrios.org@7612 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d746259b38
commit
93915682d2
@ -34,6 +34,7 @@
|
|||||||
?define T_PICTURE_MODE " <20>®«®¦¥¨¥ ª à⨪¨ "
|
?define T_PICTURE_MODE " <20>®«®¦¥¨¥ ª à⨪¨ "
|
||||||
?define T_CHECKBOX_STRETCH "<EFBFBD> áâïãâì"
|
?define T_CHECKBOX_STRETCH "<EFBFBD> áâïãâì"
|
||||||
?define T_CHECKBOX_TILED "‡ ¬®áâ¨âì"
|
?define T_CHECKBOX_TILED "‡ ¬®áâ¨âì"
|
||||||
|
?define T_UPDATE_DOCK "Žˇ®˘«ďâě Dock-Ż Ą«ě"
|
||||||
#else
|
#else
|
||||||
?define WINDOW_HEADER "Appearance"
|
?define WINDOW_HEADER "Appearance"
|
||||||
?define T_SKINS "Skins"
|
?define T_SKINS "Skins"
|
||||||
@ -43,6 +44,7 @@
|
|||||||
?define T_PICTURE_MODE " Picture Mode "
|
?define T_PICTURE_MODE " Picture Mode "
|
||||||
?define T_CHECKBOX_STRETCH "Stretch"
|
?define T_CHECKBOX_STRETCH "Stretch"
|
||||||
?define T_CHECKBOX_TILED "Tiled"
|
?define T_CHECKBOX_TILED "Tiled"
|
||||||
|
?define T_UPDATE_DOCK "Update Dock"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PANEL_H 40
|
#define PANEL_H 40
|
||||||
@ -69,6 +71,7 @@ block skp;
|
|||||||
|
|
||||||
_tabs tabs = { LP, LP, NULL, NULL, SKINS };
|
_tabs tabs = { LP, LP, NULL, NULL, SKINS };
|
||||||
|
|
||||||
|
checkbox update_docky = { T_UPDATE_DOCK, false };
|
||||||
checkbox checkbox1 = { "Checkbox", true };
|
checkbox checkbox1 = { "Checkbox", true };
|
||||||
more_less_box spinbox1 = { 23, 0, 999, "SpinBox" };
|
more_less_box spinbox1 = { 23, 0, 999, "SpinBox" };
|
||||||
edit_box edit_cmm = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff,
|
edit_box edit_cmm = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff,
|
||||||
@ -141,6 +144,7 @@ void main()
|
|||||||
if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder();
|
if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder();
|
||||||
checkbox1.click(id);
|
checkbox1.click(id);
|
||||||
spinbox1.click(id);
|
spinbox1.click(id);
|
||||||
|
if (update_docky.click(id)) EventUpdateDocky();
|
||||||
if (!optionbox_stretch.checked) && (optionbox_stretch.click(id)) EventSetWallpMode_Stretch();
|
if (!optionbox_stretch.checked) && (optionbox_stretch.click(id)) EventSetWallpMode_Stretch();
|
||||||
if (!optionbox_tiled.checked) && (optionbox_tiled.click(id)) EventSetWallpMode_Tiled();
|
if (!optionbox_tiled.checked) && (optionbox_tiled.click(id)) EventSetWallpMode_Tiled();
|
||||||
break;
|
break;
|
||||||
@ -187,8 +191,7 @@ void main()
|
|||||||
|
|
||||||
void draw_window()
|
void draw_window()
|
||||||
{
|
{
|
||||||
system.color.get();
|
DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x74,NULL,WINDOW_HEADER,0);
|
||||||
DefineAndDrawWindow(screen.width-600/2,80,630,404+skin_height,0x74,0xE4DFE1,WINDOW_HEADER,0);
|
|
||||||
GetProcessInfo(#Form, SelfInfo);
|
GetProcessInfo(#Form, SelfInfo);
|
||||||
IF (Form.status_window>=2) return;
|
IF (Form.status_window>=2) return;
|
||||||
DrawWindowContent();
|
DrawWindowContent();
|
||||||
@ -200,6 +203,8 @@ void DrawWindowContent()
|
|||||||
incn y;
|
incn y;
|
||||||
int list_w;
|
int list_w;
|
||||||
|
|
||||||
|
system.color.get();
|
||||||
|
|
||||||
if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
|
if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
|
||||||
|
|
||||||
DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work);
|
DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work);
|
||||||
@ -223,9 +228,9 @@ void DrawWindowContent()
|
|||||||
|
|
||||||
skp.set_size(
|
skp.set_size(
|
||||||
select_list.x + select_list.w + TAB_PADDING + scroll1.size_x + 20,
|
select_list.x + select_list.w + TAB_PADDING + scroll1.size_x + 20,
|
||||||
select_list.y + 30,
|
select_list.y + 30 + 50,
|
||||||
list_w,
|
list_w,
|
||||||
select_list.h - 50
|
230 //select_list.h - 50 - 50
|
||||||
);
|
);
|
||||||
|
|
||||||
SelectList_Draw();
|
SelectList_Draw();
|
||||||
@ -235,9 +240,9 @@ void DrawWindowContent()
|
|||||||
{
|
{
|
||||||
DrawBar(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work);
|
DrawBar(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work);
|
||||||
DrawRectangle(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work_graph);
|
DrawRectangle(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work_graph);
|
||||||
|
update_docky.draw(skp.x, select_list.y+15);
|
||||||
y.n = skp.y;
|
y.n = skp.y;
|
||||||
DrawFrame(skp.x, skp.y, skp.w, skp.h, " Components Preview ");
|
DrawFrame(skp.x, skp.y, skp.w, skp.h, " Components Preview ");
|
||||||
checkbox1.draw(skp.x+20, y.inc(30));
|
|
||||||
spinbox1.draw(skp.x+20, y.inc(30));
|
spinbox1.draw(skp.x+20, y.inc(30));
|
||||||
WriteText(skp.x+20, y.inc(30), 0x90, system.color.work_text, "C-- Edit");
|
WriteText(skp.x+20, y.inc(30), 0x90, system.color.work_text, "C-- Edit");
|
||||||
DrawEditBoxPos(skp.x+20, y.inc(20), #edit_cmm);
|
DrawEditBoxPos(skp.x+20, y.inc(20), #edit_cmm);
|
||||||
@ -390,16 +395,18 @@ void EventSetWallpMode_Tiled()
|
|||||||
EventApply();
|
EventApply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "..\lib\patterns\restart_process.h"
|
||||||
void EventApply()
|
void EventApply()
|
||||||
{
|
{
|
||||||
char kivpath[4096+10];
|
char kivpath[4096+10];
|
||||||
EventSetNewCurrent();
|
EventSetNewCurrent();
|
||||||
if (tabs.active_tab==SKINS)
|
if (tabs.active_tab==SKINS)
|
||||||
{
|
{
|
||||||
draw_window();
|
|
||||||
cur = select_list.cur_y;
|
cur = select_list.cur_y;
|
||||||
SetSystemSkin(#cur_file_path);
|
SetSystemSkin(#cur_file_path);
|
||||||
|
SelectList_Draw();
|
||||||
strcpy(#cur_skin_path, #cur_file_path);
|
strcpy(#cur_skin_path, #cur_file_path);
|
||||||
|
EventUpdateDocky();
|
||||||
}
|
}
|
||||||
if (tabs.active_tab==WALLPAPERS)
|
if (tabs.active_tab==WALLPAPERS)
|
||||||
{
|
{
|
||||||
@ -411,6 +418,15 @@ void EventApply()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventUpdateDocky()
|
||||||
|
{
|
||||||
|
if (!update_docky.checked) return;
|
||||||
|
KillProcessByName("@docky", MULTIPLE);
|
||||||
|
RunProgram("/sys/@docky",NULL);
|
||||||
|
pause(50);
|
||||||
|
ActivateWindow(GetProcessSlot(Form.ID));
|
||||||
|
}
|
||||||
|
|
||||||
void EventOpenFile()
|
void EventOpenFile()
|
||||||
{
|
{
|
||||||
if (tabs.active_tab==SKINS) RunProgram("/sys/skincfg", #cur_file_path);
|
if (tabs.active_tab==SKINS) RunProgram("/sys/skincfg", #cur_file_path);
|
||||||
|
@ -72,12 +72,12 @@ void main() {
|
|||||||
else IF (double_click_delay.click(id)) ApplyCfg();
|
else IF (double_click_delay.click(id)) ApplyCfg();
|
||||||
ELSE IF (emulation.click(id)) {
|
ELSE IF (emulation.click(id)) {
|
||||||
IF (emulation.checked == true) RunProgram("/sys/mousemul", 0);
|
IF (emulation.checked == true) RunProgram("/sys/mousemul", 0);
|
||||||
ELSE KillProcessByName("/sys/mousemul", SINGLE);
|
ELSE KillProcessByName("mousemul", SINGLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ELSE IF (madmouse.click(id)) {
|
ELSE IF (madmouse.click(id)) {
|
||||||
IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0);
|
IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0);
|
||||||
ELSE KillProcessByName("/sys/madmouse", SINGLE);
|
ELSE KillProcessByName("madmouse", SINGLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user