Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9347 → Rev 9348

/programs/cmm/browser/TWB/render.h
10,9 → 10,11
if (style.title)
{
strncpy(#header, _line, sizeof(TWebBrowser.header)-1);
if (!application_mode) {
strncat(#header, " - ", sizeof(TWebBrowser.header)-1);
strncat(#header, #version, sizeof(TWebBrowser.header)-1);
}
}
else if (t_html) && (!t_body) {
//
}
/programs/cmm/browser/WebView.c
45,6 → 45,7
bool debug_mode = false;
bool show_images = true;
bool source_mode = false;
bool application_mode = false;
 
_history history;
 
56,15 → 57,14
 
#include "history.h"
 
#define PADDING 9
#define TSZE 25
#define STATUSBAR_H 15
#define TAB_H 20
dword TOOLBAR_H = PADDING+TSZE+PADDING+2;
dword PADDING = 9;
dword TSZE = 25;
dword STATUSBAR_H = 15;
dword TAB_H = 20;
dword TOOLBAR_H = 0;
 
_http http = 0;
 
 
progress_bar prbar;
proc_info Form;
 
80,7 → 80,7
od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" };
 
char editURL[URL_SIZE+1];
edit_box omnibox_edit = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff,
edit_box omnibox_edit = {, 0, 0, 0xffffff,
0x94AECE, 0xffffff, 0xffffff,0x10000000,URL_SIZE-2,#editURL,0,,19,19};
 
//===================================================//
110,6 → 110,9
history.add(#param + 8);
} else if (!strncmp(#param, "-new ", 5)) {
history.add(#param + 5);
} else if (!strncmp(#param, "-app ", 5)) {
history.add(#param + 5);
application_mode = true;
} else {
if (GetProcessesCount("WEBVIEW") == 1) {
history.add(#param);
127,8 → 130,23
void main()
{
int redirect_count=0;
 
TOOLBAR_H = PADDING+TSZE+PADDING+2;
 
LoadLibraries();
HandleParam();
 
if (application_mode) {
TOOLBAR_H = 0;
PADDING = 0;
TSZE = 0;
STATUSBAR_H = 0;
TAB_H = 0;
}
 
omnibox_edit.left = PADDING+TSZE*2+PADDING+6;
omnibox_edit.top = PADDING+3;
 
WB1.list.SetFont(8, 14, 10011000b);
WB1.list.no_selection = true;
WB1.custom_encoding = -1;
364,6 → 382,7
 
SetElementSizes();
 
if (!application_mode) {
DrawBar(0,0, Form.cwidth,PADDING, sc.work);
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.work_dark, sc.work, 180));
379,6 → 398,7
 
DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x,
WB1.list.h-1, scroll_wv.bckg_col);
}
 
if (!canvas.bufw) {
EventOpenFirstPage();
386,11 → 406,14
WB1.DrawPage();
DrawOmnibox();
}
if (!application_mode) {
DrawProgress();
DrawStatusBar(NULL);
DrawTabsBar();
}
 
}
 
void EventOpenFirstPage()
{
OpenPage(history.current());
747,6 → 770,7
void DrawProgress()
{
dword pct;
if (application_mode) return;
if (!http.transfer) return;
if (http_get_type==PAGE) && (prbar.max) pct = prbar.value*30/prbar.max; else pct = 10;
if (http_get_type==IMG) pct = prbar.value * 70 / prbar.max + 30;
755,6 → 779,7
 
void EventShowPageMenu()
{
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #rmb_menu);
menu_id = VIEW_SOURCE;
}
761,6 → 786,7
 
void EventShowLinkMenu()
{
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #link_menu);
menu_id = IN_NEW_TAB;
}
767,6 → 793,7
 
void EventShowMainMenu()
{
if (application_mode) return;
open_lmenu(Form.cwidth - PADDING -4, PADDING + TSZE + 3,
MENU_TOP_RIGHT, NULL, #main_menu);
menu_id = OPEN_FILE;
774,6 → 801,7
 
void EventShowEncodingsList()
{
if (application_mode) return;
open_lmenu(Form.cwidth-4, Form.cheight - STATUSBAR_H + 12,
MENU_BOT_RIGHT, WB1.cur_encoding + 1,
"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866");
858,6 → 886,7
{
dword status_y = Form.cheight - STATUSBAR_H + 4;
dword status_w = Form.cwidth - 90;
if (application_mode) return;
if (Form.status_window>2) return;
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_msg) {
871,7 → 900,7
void DrawOmnibox()
{
int imgxoff;
if (application_mode) return;
DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+18, 24, sc.work_graph,
sc.work_graph, sc.work_graph, sc.work_dark);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+18, 1, 0xD8DCD8);
890,6 → 919,7
 
void SetOmniboxText(dword _text)
{
if (application_mode) return;
edit_box_set_text stdcall (#omnibox_edit, _text);
omnibox_edit.pos = omnibox_edit.flags = 0;
DrawOmnibox();