Subversion Repositories Kolibri OS

Rev

Rev 7757 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7757 Rev 7782
Line 2... Line 2...
2
 
2
 
3
#include "../lib/gui.h"
3
#include "../lib/gui.h"
4
#include "../lib/kfont.h"
4
#include "../lib/kfont.h"
5
#include "../lib/io.h"
5
#include "../lib/io.h"
-
 
6
#include "../lib/cursor.h"
Line 6... Line 7...
6
#include "../lib/cursor.h"
7
#include "../lib/list_box.h"
7
 
8
 
8
#include "../lib/obj/box_lib.h"
9
#include "../lib/obj/box_lib.h"
9
#include "../lib/obj/libini.h"
10
#include "../lib/obj/libini.h"
Line 69... Line 70...
69
#include "ini.h"
70
#include "ini.h"
70
#include "gui.h"
71
#include "gui.h"
71
#include "prepare_page.h"
72
#include "prepare_page.h"
72
//#include "special.h"
73
//#include "special.h"
Line -... Line 74...
-
 
74
 
-
 
75
int menu_id=0;
73
 
76
 
Line 74... Line 77...
74
#define SANDWICH_MENU "Refresh page\nEdit page\nHistory\nDownloader\nAbout"
77
#define SANDWICH_MENU "Refresh page\nEdit page\nHistory\nDownloader\nAbout"
75
 
78
 
76
void InitDlls()
79
void InitDlls()
Line 110... Line 113...
110
			case evNetwork:
113
			case evNetwork:
111
				HandleNetworkEvent();
114
				HandleNetworkEvent();
112
				break;
115
				break;
113
			case evReDraw:
116
			case evReDraw:
114
				draw_window();
117
				draw_window();
115
				if (menu.cur_y>=10) && (menu.cur_y<20) {
-
 
116
					encoding = menu.cur_y - 10;
-
 
117
					EventPageRefresh();
-
 
118
					menu.cur_y = 0;
-
 
119
				}
-
 
120
				if (menu.cur_y>=20) {
-
 
121
					menu.cur_y-=20;
-
 
122
					if (menu.cur_y==0) EventPageRefresh();
-
 
123
					if (menu.cur_y==1) EventRunEdit();
118
				if (CheckActiveProcess(Form.ID)) EventMenuClick();
124
					if (menu.cur_y==2) EventShowHistory();
-
 
125
					if (menu.cur_y==3) EventShowDownloader();
-
 
126
					if (menu.cur_y==4) EventShowInfo();
-
 
127
					menu.cur_y = 0;
-
 
128
				} 
-
 
129
		}
119
		}
130
	}
120
	}
131
}
121
}
Line 405... Line 395...
405
	}
395
	}
406
}
396
}
Line 407... Line 397...
407
 
397
 
408
void EventChangeEncoding()
398
void EventChangeEncoding()
409
{
399
{
410
	menu.selected = encoding + 1;
400
	menu_id = 10;
-
 
401
	open_lmenu(Form.left+Form.cwidth-36,Form.top+TOOLBAR_H+skin_height-6, MENU_ALIGN_TOP_RIGHT, 
-
 
402
		encoding+1, "UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866");
-
 
403
}
-
 
404
 
-
 
405
void EventShowSandwichMenu()
-
 
406
{
-
 
407
	menu_id = 20;
-
 
408
	open_lmenu(Form.left+Form.cwidth+3,Form.top+TOOLBAR_H+skin_height-6, 
-
 
409
		MENU_ALIGN_TOP_RIGHT, 0, SANDWICH_MENU);
-
 
410
}
-
 
411
 
-
 
412
void EventMenuClick()
-
 
413
{
-
 
414
	dword click_id = get_menu_click();
-
 
415
 
-
 
416
	if (menu_id == 10) && (click_id) {
-
 
417
			encoding = click_id-1;
-
 
418
			EventPageRefresh();
-
 
419
			menu_id = 0;
-
 
420
		}
-
 
421
	if (menu_id == 20) {switch(click_id) {
-
 
422
		case 1: EventPageRefresh(); break;
-
 
423
		case 2: EventRunEdit(); break;
-
 
424
		case 3: EventShowHistory(); break;
-
 
425
		case 4: EventShowDownloader(); break;
-
 
426
		case 5: EventShowInfo(); break;
411
	menu.show(Form.left+Form.cwidth-97,Form.top+TOOLBAR_H+skin_height-6, 130, "UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866", 10);
427
	} menu_id = 0;}
Line 412... Line 428...
412
}
428
}
413
 
429
 
414
void EventShowInfo() {
430
void EventShowInfo() {
Line 428... Line 444...
428
void EventGoForward()
444
void EventGoForward()
429
{
445
{
430
	if (history.forward()) EventOpenAddress(history.current());
446
	if (history.forward()) EventOpenAddress(history.current());
431
}
447
}
Line 432... Line -...
432
 
-
 
433
void EventShowSandwichMenu()
-
 
434
{
-
 
435
	menu.selected = 0;
-
 
436
	menu.show(Form.left+Form.cwidth-130,Form.top+TOOLBAR_H+skin_height-10, 130, SANDWICH_MENU, 20);
-
 
437
}
-
 
438
 
448
 
439
void EventPageRefresh()
449
void EventPageRefresh()
440
{
450
{
441
	EventOpenAddress(history.current());
451
	EventOpenAddress(history.current());
Line 545... Line 555...
545
		status_text.text_pointer = _status_text;
555
		status_text.text_pointer = _status_text;
546
		PathShow_prepare stdcall(#status_text);
556
		PathShow_prepare stdcall(#status_text);
547
		PathShow_draw stdcall(#status_text);
557
		PathShow_draw stdcall(#status_text);
548
	}
558
	}
549
}
559
}
-
 
560