Author SHA1 Message Date
Leency 64f89ca01e app_plus: fix open OpenDial, set much better text 2026-06-01 16:24:50 +03:00
Leency 02a0a7c566 sysmon: fix checkbox state while using Tab key (#448)
Press Tab. Now you'll see how checkbox state is changing.

Reviewed-on: KolibriOS/kolibrios#448
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-05-29 18:35:43 +00:00
Leency ca4cf1fb9f dl: fix text overlap (#450)
fixed overlapping text "Save to:"

Reviewed-on: KolibriOS/kolibrios#450
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-05-29 18:14:36 +00:00
5 changed files with 63 additions and 107 deletions

No files matched your search

+25 -43
View File
@@ -1,4 +1,4 @@
#define MEMSIZE 1024*40
#define MEMSIZE 1024*60
#include "..\lib\strings.h"
#include "..\lib\mem.h"
#include "..\lib\gui.h"
@@ -15,9 +15,8 @@
#define WINW 570
#define WINH 300
#define CONX 30 //content X pos
#define SCRX WINW-180
#define SCRY 20
#define CONX 28 //content X pos
#define CONY 25 //content X pos
char default_dir[] = "/sys";
od_filter filter2;
@@ -34,30 +33,29 @@ od_filter filter2;
//===================================================//
#ifdef LANG_RUS
?define WINDOW_TITLE_TEXT "Внимание! Это важно."
?define CONTENT_HEADER_TEXT "ПАПКА /KOLIBRIOS/ НЕ НАЙДЕНА"
?define DESCRIPTION_TEXT "Попробуйте найти ее самостоятельно.
Содержимое искомой папки показано на
картинке справа. В случае неверно
выбранной папки требуется выполнить
перезагрузку ПК и попробовать снова."
?define WINDOW_TITLE_TEXT "Внимание!"
?define CONTENT_HEADER_TEXT "KolibriOS работает в режиме дискеты"
?define DESCRIPTION_TEXT "Многие приложения сейчас недоступны.
Причина в том, что не смонтирован дополнительный системный
каталог. Но вы можете найти и задать его вручную. Его название
'kolibrios'. Вы также можете загрузить latest-dirstr.7z через
WebView и найти его внутри."
?define MANUALLY_BUTTON_TEXT "Указать папку /kolibrios/..."
?define OPEN_ANYWAY_BUTTON_TEXT "Запустить APP+ (некоторые программы будут недоступны)"
#else
?define WINDOW_TITLE_TEXT "Warning! It's important."
?define CONTENT_HEADER_TEXT "/KOLIBRIOS/ IS NOT MOUNTED"
?define DESCRIPTION_TEXT "Try to find it manually. It should look
like image on the right.
Note: this action can be done only once
per 1 session of the OS running. If you
will choose the wrong folder then you
need to reboot a system to try again."
?define WINDOW_TITLE_TEXT "Warning!"
?define CONTENT_HEADER_TEXT "KolibriOS is in a Floppy-mode now"
?define DESCRIPTION_TEXT "A lot of apps aren't available.
The reason is that additional system directory is not mounted.
But you can find and set it manually. Its name is 'kolibrios'.
You can also download latest-dirstr.7z via WebView and find
it inside."
?define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..."
?define OPEN_ANYWAY_BUTTON_TEXT "Open APP+ anyway (some programs won't be available) "
#endif
char kolibrios_dirs[] = "..\0 3D \0demos \0develop\0drivers\0emul \0games \0grafx2";
//===================================================//
// //
// CODE //
@@ -104,33 +102,17 @@ void draw_window()
{
sc.get();
DefineAndDrawWindow(screen.w-WINW/2, 100, WINW, WINH+skin_h, 0x34, sc.work, WINDOW_TITLE_TEXT,0);
WriteTextB(CONX+2,SCRY+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT);
WriteTextB(CONX,SCRY,0x81,0xB92234,CONTENT_HEADER_TEXT);
draw_screen();
WriteTextLines(CONX,SCRY+50,0x90,sc.work_text,DESCRIPTION_TEXT,20);
draw_icon_16w(CONX+2, CONY-3, 5);
WriteTextB(CONX+27+2,CONY+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT);
WriteTextB(CONX+27,CONY,0x81,0xB92234,CONTENT_HEADER_TEXT);
WriteTextLines(CONX,CONY+42,0x90,sc.work_text,DESCRIPTION_TEXT,20);
DrawButtons();
}
void draw_screen()
{
char i;
int icon_n=1;
DrawRectangle(WINW-180-1,SCRY-1, 145+1,170+1, sc.line);
DrawBar(SCRX,SCRY,145,170,0xFFFfff);
DrawBar(SCRX+25,SCRY+5,144-25,20,0xBBDDFF);
for (i=0; i<8; i++) {
draw_icon_16(SCRX+5, i*20+SCRY+5, icon_n);
WriteText(SCRX+27, i*20+SCRY+11, 0x80, 0, i*8 + #kolibrios_dirs);
icon_n = 0;
}
}
void DrawButtons()
{
DrawStandartCaptButton(CONX, WINH-80, BTN_MANUAL_SEARCH, MANUALLY_BUTTON_TEXT);
DrawStandartCaptButton(CONX, WINH-42, BTN_OPEN_ANYWAY, OPEN_ANYWAY_BUTTON_TEXT);
//DrawCaptButton(CONX, WINH-80, 300, 25, BTN_MANUAL_SEARCH, sc.button, sc.button_text, MANUALLY_BUTTON_TEXT);
//DrawCaptButton(CONX, WINH-42, 500, 25, BTN_OPEN_ANYWAY, sc.button, sc.button_text, OPEN_ANYWAY_BUTTON_TEXT);
DrawStandartCaptButton(CONX, WINH-CONY-58, BTN_MANUAL_SEARCH, MANUALLY_BUTTON_TEXT);
DrawStandartCaptButton(CONX, WINH-CONY-22, BTN_OPEN_ANYWAY, OPEN_ANYWAY_BUTTON_TEXT);
}
void CheckKosMounted()
+1 -1
View File
@@ -58,7 +58,7 @@
char dl_shared[] = "DL";
#define URL_SPEED_TEST "http://kolibrios.org/speedtest/100MB.zip"
#define URL_SPEED_TEST "http://speedtest.tele2.net/100MB.zip"
enum {
BTN_EXIT=1,
+34 -51
View File
@@ -32,7 +32,6 @@ char proxy_address[256];
#include "settings.h"
char* active_status;
char* save_path_set = false;
edit_box ed = {WIN_W-GAPX-GAPX,GAPX,20,0xffffff,0x94AECE,0xffffff,0xffffff,
0x10000000, sizeof(uEdit)-2, #uEdit, 0, ed_focus + ed_always_focus, 19, 19};
@@ -42,8 +41,6 @@ progress_bar pb = {0, GAPX, 52, WIN_W - GAPX - GAPX, 17, 0, NULL, NULL,
void main()
{
dword save_path_separator_pos;
dword path_pointer;
// dword shared_url; // only used by the disabled -mem branch (long URL via SHM)
load_dll(libini, #lib_init,1);
@@ -59,21 +56,14 @@ void main()
InitDownload();
if (param) {
path_pointer = #param;
//save path specified? Example: https://example.com/file|/sys/media/ac97snd
if (save_path_separator_pos = strchr(#param, '|')) {
save_path_set = true;
strcpy(#filepath, save_path_separator_pos+1);
ESBYTE[save_path_separator_pos] = '\0';
}
if (streqrp(#param, "-e ")) {
autoclose.checked = true;
path_pointer += 3;
param += 3;
}
if (streqrp(#param, "-eo ")) {
autoclose.checked = true;
open_file = true;
path_pointer += 4;
param += 4;
}
// Disabled long-URL-via-SHM ("DL") channel. memopen was never
@@ -83,13 +73,12 @@ void main()
// shared_url = memopen(#dl_shared, URL_SIZE+1, SHM_OPEN + SHM_WRITE);
// strcpy(#uEdit, shared_url);
// } else {
strcpy(#uEdit, #param);
// }
if (streq(#param, "-test")) {
strcpy(#uEdit, URL_SPEED_TEST);
} else {
strcpy(#uEdit, path_pointer);
debugln(path_pointer);
}
// }
}
if (uEdit[0]) StartDownloading(); else {
edit_box_set_text stdcall (#ed, "http://");
@@ -182,12 +171,8 @@ void DrawWindow()
DrawBar(GAPX, WIN_H - 58, WIN_W - GAPX - GAPX, 1, sc.light);
DrawBar(GAPX, WIN_H - 58 + 1, WIN_W - GAPX - GAPX, 1, sc.dark);
WriteText(GAPX, WIN_H - 48, 0x90, sc.work_text, T_SAVE_TO);
if (save_path_set) {
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #filepath, sc.light);
} else {
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #save_dir, sc.light);
}
WriteTextWithBg(GAPX, WIN_H - 48, 0xD0, sc.work_text, T_SAVE_TO, sc.work);
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #save_dir, sc.light);
edit_box_draw stdcall (#ed);
progressbar_draw stdcall(#pb);
autoclose.draw(GAPX, WIN_H - 24);
@@ -320,39 +305,37 @@ void SaveFile(int attempt)
char notify_message[4296];
char file_name[URL_SIZE+96];
//if save_path is not set than we have to combine it
if (!save_path_set) {
strcpy(#filepath, #save_dir);
chrcat(#filepath, '/'); ///need to check the last symbol
if (attempt > 9) {
notify("'Too many saving attempts' -E");
return;
}
strcpy(#filepath, #save_dir);
chrcat(#filepath, '/'); ///need to check the last symbol
if (attempt > 0) {
chrcat(#filepath, attempt+'0');
chrcat(#filepath, '_');
}
//Content-Disposition: attachment; filename="RealFootball_2018_Nokia_5800_EN_IGP_EU_TS_101.zip"
if (http.header_field("content-disposition", #file_name, sizeof(file_name))) {
if (EDX = strstr(#file_name,"filename=\"")) {
strcat(#filepath, EDX+10);
ESBYTE[strchr(#filepath,'\"')] = '\0';
}
} else {
// Clean all slashes at the end
strcpy(#file_name, #uEdit);
while (file_name[strlen(#file_name)-1] == '/') {
file_name[strlen(#file_name)-1] = 0;
}
strcat(#filepath, #file_name+strrchr(#file_name, '/'));
}
for (i=0; i<strlen(#filepath); i++) if(filepath[i]==':')||(filepath[i]=='?')filepath[i]='-';
if (attempt > 9) {
notify("'Too many saving attempts' -E");
return;
}
if (attempt > 0) {
chrcat(#filepath, attempt+'0');
chrcat(#filepath, '_');
}
//Content-Disposition: attachment; filename="RealFootball_2018_Nokia_5800_EN_IGP_EU_TS_101.zip"
if (http.header_field("content-disposition", #file_name, sizeof(file_name))) {
if (EDX = strstr(#file_name,"filename=\"")) {
strcat(#filepath, EDX+10);
ESBYTE[strchr(#filepath,'\"')] = '\0';
}
} else {
// Clean all slashes at the end
strcpy(#file_name, #uEdit);
while (file_name[strlen(#file_name)-1] == '/') {
file_name[strlen(#file_name)-1] = 0;
}
strcat(#filepath, #file_name+strrchr(#file_name, '/'));
}
for (i=0; i<strlen(#filepath); i++) if(filepath[i]==':')||(filepath[i]=='?')filepath[i]='-';
while (file_exists(#filepath)) {
SaveFile(attempt+1);
return;
+1 -9
View File
@@ -11,7 +11,6 @@
#include "../lib/gui.h"
#include "../lib/random.h"
#include "../lib/kfont.h"
#include "../lib/fs.h"
#include "../lib/obj/libimg.h"
#include "../lib/obj/libini.h"
@@ -416,7 +415,6 @@ void EventStopPlaying()
void EventStartPlaying()
{
word i;
BDVK CopyFile_atr;
char item_path[4096];
char notify_message[512];
EventStopPlaying();
@@ -435,13 +433,7 @@ void EventStartPlaying()
DrawPlayList();
DrawTopPanel();
//start_playing_time =
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
if (player_run_id < 0) {
RunProgram("/sys/network/dl", "-e http://builds.kolibrios.org/en_US/data/programs/media/ac97snd/ac97snd.bin|/sys/media/ac97snd");
pause(100);
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
if (player_run_id < 0) notify("'AC97SND backend not found and its download failed :('-E");
}
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
//player_run_id = RunProgram("/kolibrios/media/minimp3", #item_path);
sprintf(#notify_message,"'Now playing:\n%s' -St",#current_filename);
if (!repeat) && (window_mode==WINDOW_MODE_SMALL)
+2 -3
View File
@@ -128,8 +128,7 @@ void main()
break;
case SCAN_CODE_TAB:
show_system.checked ^= 1;
SelectList_LineChanged();
break;
goto _DRAW_WINDOW;
default:
if (select_list.ProcessKey(key_scancode)) {
SelectList_LineChanged();
@@ -157,6 +156,7 @@ void main()
case evReDraw:
sc.get();
DefineAndDrawWindow(Form.left, Form.top, Form.width, Form.height, 0x33, sc.work, T_APP_TITLE, 0);
WriteText(GAP+5, WIN_CONTENT_Y-20, 0x90, sc.work_text, T_PROC_HEADER);
_DRAW_WINDOW:
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) break;
@@ -168,7 +168,6 @@ void main()
}
right_w = Form.cwidth - RIGHT_X - GAP;
right_w &= ~1; // make sure the number is even
WriteText(GAP+5, WIN_CONTENT_Y-20, 0x90, sc.work_text, T_PROC_HEADER);
DefineButton(RIGHT_X-38,WIN_CONTENT_Y-25,18,18,BTN_SHOWHIDE_SENSORS,sc.button);
DrawRectangle3D(RIGHT_X-38,WIN_CONTENT_Y-25,19,18,sc.line,sc.light);