Eolite: fix for PunkJoker

WebView and TxtRead: combine toolbars into one file to save 2 sectors in IMG

git-svn-id: svn://kolibrios.org@7428 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2018-10-02 20:13:25 +00:00
parent 2df98112f7
commit 6a4eb2fa29
8 changed files with 23 additions and 42 deletions

View File

@ -52,7 +52,6 @@ img_files = {
{"MEDIA/KIV.INI", PROGS .. "/media/kiv/trunk/kiv.ini"},
{"MEDIA/PIXIE/PIXIE.INI", PROGS .. "/cmm/pixie2/pixie.ini"},
{"MEDIA/PIXIE/SKIN.PNG", PROGS .. "/cmm/pixie2/skin.png"},
{"NETWORK/WV_SKIN.PNG", PROGS .. "/cmm/browser/wv_skin.png"},
{"NETWORK/FTPC.INI", PROGS .. "/network/ftpc/ftpc.ini"},
{"NETWORK/FTPD.INI", "common/network/ftpd.ini"},
{"NETWORK/USERS.INI", "common/network/users.ini"},

View File

@ -32,7 +32,7 @@ _http http = {0, 0, 0, 0, 0, 0, 0};
char homepage[] = FROM "html\\homepage.htm""\0";
#ifdef LANG_RUS
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.8b";
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.8c";
?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤­¨© á« ©¤"
char loading[] = "‡ £à㧪  áâà ­¨æë...<br>";
@ -47,7 +47,7 @@ char link_menu[] =
"Š®¯¨à®¢ âì áá뫪ã
ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨";
#else
char version[]="Text-based Browser 1.8";
char version[]="Text-based Browser 1.8c";
?define IMAGES_CACHE_CLEARED "Images cache cleared"
?define T_LAST_SLIDE "This slide is the last"
char loading[] = "Loading...<br>";
@ -115,6 +115,7 @@ char editURL[sizeof(URL)];
int mouse_twb;
edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19};
#define SKIN_Y 24
void main()
{
@ -124,7 +125,7 @@ void main()
load_dll(libimg, #libimg_init,1);
load_dll(libHTTP, #http_lib_init,1);
load_dll(iconv_lib, #iconv_open,0);
Libimg_LoadImage(#skin, abspath("wv_skin.png"));
Libimg_LoadImage(#skin, "/sys/toolbar.png");
wv_progress_bar.progress_color = 0x72B7EB;
CreateDir("/tmp0/1/downloads");
if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME);
@ -253,10 +254,10 @@ void Draw_Window()
DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 25,border_color);
DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0);
DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0);
img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0);
img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 0, SKIN_Y);
DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0);
DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0);
img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 105, 0);
img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 102, SKIN_Y);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color);
if (!header)
@ -414,7 +415,7 @@ void OpenPage()
}
if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8))
{
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 131, 0);
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 68, SKIN_Y);
if (!strncmp(#URL,"http:",5)) {
http.get(#URL);
@ -450,13 +451,14 @@ void OpenPage()
DrawEditBoxWebView()
{
int skin_x_offset;
DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color);
DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color);
address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL);
address_box.offset = 0;
edit_box_draw stdcall(#address_box);
if (http.transfer > 0) EAX = 131; else EAX = 54;
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, EAX, 0);
if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51;
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

View File

@ -92,7 +92,7 @@ void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name)
void _SystemDiscs::Get()
{
byte ret = 0;
bool kolibrios_exists=false;
char dev_name[10], sys_discs[10];
int i1, j1, dev_num_i, dev_disc_num;
dword devbuf;
@ -113,7 +113,8 @@ void _SystemDiscs::Get()
}
if (!strcmp(#sys_discs, "/rd/1"))
{
if (dir_exists("/kolibrios")) {
if (dir_exists("/kolibrios")) && (!kolibrios_exists) {
kolibrios_exists=true;
list.add("/kolibrios");
dev_num++;
}

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager v3.96c"
#define ABOUT_TITLE "EOLITE 3.96c"
#define TITLE "Eolite File Manager v3.96d"
#define ABOUT_TITLE "EOLITE 3.96d"
#ifdef LANG_RUS
?define T_FILE "” ©«"

View File

@ -2,36 +2,15 @@
* Template C-- program.
*/
#define MEMSIZE 4096*10
#define MEMSIZE 4096*5
#include "../lib/io.h"
#include "../lib/gui.h"
#include "../lib/kolibri.h"
#include "../lib/fs.h"
proc_info Form;
void main()
{
word btn;
loop() switch(WaitEvent())
{
case evButton:
btn = GetButtonID();
if (btn == 1) ExitProcess();
break;
case evKey:
GetKeys();
if (key_scancode == SCAN_CODE_ESC) ExitProcess();
break;
case evReDraw:
draw_window();
break;
}
RunProgram("/sys/syspanel", "/sys/settings/games.ini");
}
void draw_window()
{
DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0);
GetProcessInfo(#Form, SelfInfo);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 961 B

View File

@ -21,7 +21,7 @@
#define DEFAULT_EDITOR "/sys/tinypad"
#define INTRO_TEXT "This is a plain Text Reader.\nTry to open some text file."
#define VERSION "Text Reader v1.21"
#define VERSION "Text Reader v1.21a"
#define ABOUT "Idea: Leency, punk_joker
Code: Leency, Veliant, KolibriOS Team
@ -299,8 +299,8 @@ void draw_window()
x.n = 0;
DrawToolbarButton(OPEN_FILE, x.inc(8));
DrawToolbarButton(SHOW_FILE_PROPERTIES, x.inc(TOOLBAR_BUTTON_WIDTH + PADDING));
DrawToolbarButton(MAGNIFY_PLUS, x.inc(TOOLBAR_BUTTON_WIDTH + PADDING + PADDING));
DrawToolbarButton(MAGNIFY_MINUS, x.inc(TOOLBAR_BUTTON_WIDTH - 1));
DrawToolbarButton(MAGNIFY_MINUS, x.inc(TOOLBAR_BUTTON_WIDTH + PADDING + PADDING));
DrawToolbarButton(MAGNIFY_PLUS, x.inc(TOOLBAR_BUTTON_WIDTH - 1));
DrawToolbarButton(CHANGE_ENCODING, x.inc(TOOLBAR_BUTTON_WIDTH + PADDING + PADDING));
charsets_menu_left = x.n;
DrawToolbarButton(RUN_EDIT, x.inc(TOOLBAR_BUTTON_WIDTH + PADDING));
@ -328,7 +328,7 @@ void DrawPage()
void DrawToolbarButton(char image_id, int x)
{
DefineButton(x+1, 6, TOOLBAR_ICON_WIDTH-2, TOOLBAR_ICON_HEIGHT-2, 10+image_id + BT_HIDE, 0);
img_draw stdcall(skin.image, x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, 0, image_id*TOOLBAR_ICON_HEIGHT);
img_draw stdcall(skin.image, x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, TOOLBAR_ICON_WIDTH-1*image_id, 0);
}
void DrawScroller()