Subversion Repositories Kolibri OS

Rev

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

Rev 7960 Rev 7975
Line 61... Line 61...
61
	DrawBar(0, _y, Form.cwidth, 1, sc.work_graph);
61
	DrawBar(0, _y, Form.cwidth, 1, sc.work_graph);
62
	DrawBar(0, _y+1, Form.cwidth, SEARCH_H-1, sc.work);
62
	DrawBar(0, _y+1, Form.cwidth, SEARCH_H-1, sc.work);
63
 
63
 
Line 64... Line 64...
64
	search_box.top = _y + 6;
64
	search_box.top = _y + 6;
65
	search_box.width = math.min(Form.width - 200, 250);
65
	search_box.width = math.min(Form.width - 200, 150);
Line 66... Line 66...
66
 
66
 
Line 67... Line 67...
67
	DrawRectangle(search_box.left-1, search_box.top-1, search_box.width+2, 23,sc.work_graph);
67
	DrawRectangle(search_box.left-1, search_box.top-1, search_box.width+2, 23,sc.work_graph);
Line 68... Line 68...
68
 
68
 
69
	edit_box_draw stdcall(#search_box);
69
	edit_box_draw stdcall(#search_box);
Line 70... Line 70...
70
 
70
 
71
	DrawCaptButton(search_box.left+search_box.width+14, search_box.top-1, 90, 
71
	DrawCaptButton(search_box.left+search_box.width+14, search_box.top-1, 100, 
72
		TOOLBAR_ICON_HEIGHT+1, _btn_find, sc.work_light, sc.work_text, T_FIND_NEXT);
72
		TOOLBAR_ICON_HEIGHT+1, _btn_find, sc.work_light, sc.work_text, T_FIND_NEXT);
Line 73... Line 73...
73
 
73
 
74
	sprintf(#matches, T_MATCHES, found.count);
74
	sprintf(#matches, T_MATCHES, found.count);
75
	WriteTextWithBg(search_box.left+search_box.width+14+110, 
75
	WriteTextWithBg(search_box.left+search_box.width+14+115, 
Line 95... Line 95...
95
 
95
 
Line 96... Line 96...
96
int SEARCH::find_next(int _cur_pos)
96
int SEARCH::find_next(int _cur_pos)
97
{
97
{
98
	int i;
98
	int i;
-
 
99
	dword t1, t2;
99
	if (!search_text[0]) return false;
100
	if (!search_text[0]) return false;
Line 100... Line 101...
100
 
101
 
101
	if (!streq(#found_text, #search_text)) {
102
	if (!streq(#found_text, #search_text)) {
102
		strcpy(#found_text, #search_text);
103
		strcpy(#found_text, #search_text);
103
		find_all();
-
 
104
	}
104
		find_all();
-
 
105
		draw_window();
Line 105... Line 106...
105
	draw_window();
106
	}
-
 
107
 
-
 
108
	for (i=0; i
106
 
109
		if (signed found.get(i) - lines.get(_cur_pos) > 0) {
-
 
110
			t1 = found.get(i);
107
	//for (i=_cur_pos+1; i
111
			while(t1 > lines.get(_cur_pos)) _cur_pos++;	
-
 
112
			return _cur_pos-1;
108
	//	if (strstri(lines.get(i),#search_text)) return i;
113
		}
109
	//}
114
	}