appearance: fix

git-svn-id: svn://kolibrios.org@9533 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-12-30 23:13:43 +00:00
parent 18ae50738d
commit c876e40dbc

View File

@ -368,7 +368,7 @@ void EventTabScreensaverClick()
void EventDeleteFile() void EventDeleteFile()
{ {
if (select_list.cur_y) DeleteFile(#cur_file_path); //no not delete default if (select_list.cur_y) DeleteFile(list.get(select_list.cur_y)); //no not delete default
Open_Dir(); Open_Dir();
EventApply(); EventApply();
} }
@ -395,17 +395,16 @@ void EventApply()
{ {
char kivparam[4096+10]; char kivparam[4096+10];
dword file_name = list.get(select_list.cur_y); dword file_name = list.get(select_list.cur_y);
strcpy(#cur_file_path, list.get(select_list.cur_y));
if (tabs.active_tab==TAB_SKINS) if (tabs.active_tab==TAB_SKINS)
{ {
strcpy(#cur_skin_path, #cur_file_path); strcpy(#cur_skin_path, list.get(select_list.cur_y));
SetSystemSkin(#cur_file_path); SetSystemSkin(#cur_skin_path);
MoveSize(OLD, OLD, OLD, WIN_H+4+GetSkinHeight()); MoveSize(OLD, OLD, OLD, WIN_H+4+GetSkinHeight());
} }
if (tabs.active_tab==TAB_WALLPAPERS) if (tabs.active_tab==TAB_WALLPAPERS)
{ {
SelectList_Draw(); SelectList_Draw();
miniprintf(#kivparam, "\\S__%s", #cur_file_path); miniprintf(#kivparam, "\\S__%s", list.get(select_list.cur_y));
if (optionbox_tiled.checked) || (!select_list.cur_y) kivparam[1]='T'; if (optionbox_tiled.checked) || (!select_list.cur_y) kivparam[1]='T';
if (optionbox_auto.checked) { if (optionbox_auto.checked) {
file_name += strrchr(file_name, '/'); file_name += strrchr(file_name, '/');
@ -424,8 +423,8 @@ void EventApply()
void EventOpenFile() void EventOpenFile()
{ {
switch (tabs.active_tab) { switch (tabs.active_tab) {
case TAB_SKINS: RunProgram("/sys/skincfg", #cur_file_path); break; case TAB_SKINS: RunProgram("/sys/skincfg", list.get(select_list.cur_y)); break;
case TAB_WALLPAPERS: RunProgram("/sys/media/kiv", #cur_file_path); break; case TAB_WALLPAPERS: RunProgram("/sys/media/kiv", list.get(select_list.cur_y)); break;
case TAB_SCREENSAVERS: if(select_list.cur_y) RunProgram(list.get(select_list.cur_y), "@ss"); case TAB_SCREENSAVERS: if(select_list.cur_y) RunProgram(list.get(select_list.cur_y), "@ss");
} }
} }
@ -451,8 +450,6 @@ void EventSetSs()
stop: stop:
char folder_path[PATHLEN]; char folder_path[PATHLEN];
char cur_file_path[PATHLEN];
char cur_skin_path[PATHLEN]; char cur_skin_path[PATHLEN];
char default_skin[PATHLEN]; char default_skin[PATHLEN];