diff --git a/programs/cmm/aelia/aelia.c b/programs/cmm/aelia/aelia.c index 4d62abaed4..bc7cb077a8 100644 --- a/programs/cmm/aelia/aelia.c +++ b/programs/cmm/aelia/aelia.c @@ -59,6 +59,7 @@ edit_box address_box = {250,56,34,0xffffff,0x94AECE,0xffffff,0xffffff,0,UML,#add CustomCursor CursorPointer; dword CursorFile = FROM "pointer.cur"; +#include "favicon.h" #include "ini.h" #include "gui.h" #include "label.h" @@ -243,6 +244,7 @@ void EventOpenDialog() void EventOpenAddress(dword _new_address) { char temp[UML]; +char favicon_address[UML]; if (!ESBYTE[_new_address]) return; debugln("===================================="); debug("address: "); @@ -261,6 +263,7 @@ char temp[UML]; */ io.buffer_data = 0; + favicon.get(NULL); // - build in page if (!strncmp(#address,"aelia:",6)) { @@ -297,6 +300,8 @@ char temp[UML]; strcpy(#address,downloader.url); DrawAddressBox(); io.buffer_data = downloader.bufpointer; + get_absolute_url(#favicon_address, #address, "/favicon.ico"); + favicon.get(#favicon_address); } } @@ -306,6 +311,7 @@ char temp[UML]; } history.add(#address); + favicon.draw(address_box.left-18, address_box.top-1); /* Great! So we have the page in our buffer. @@ -438,12 +444,14 @@ void DrawPage() void DrawAddressBox() { - address_box.left = 97; + address_box.left = 97+19; address_box.top = 11; address_box.width = Form.cwidth - address_box.left - 138; - DrawRectangle(address_box.left-4, address_box.top-5, address_box.width+6, 23, 0x8C8C8C); - DrawWideRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 21, 4, address_box.color); + DrawRectangle(address_box.left-4-19, address_box.top-5, address_box.width+6+19, 23, 0x8C8C8C); + DrawWideRectangle(address_box.left-3-19, address_box.top-3, address_box.width+5+19, 21, 4, address_box.color); address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#address); address_box.offset = 0; edit_box_draw stdcall(#address_box); + favicon.draw(address_box.left-18, address_box.top-1); + DrawBar(address_box.left-2, address_box.top+1, 2, 13, 0xFFFfff); } \ No newline at end of file diff --git a/programs/cmm/aelia/buidin_pages/about.htm b/programs/cmm/aelia/buidin_pages/about.htm index 6c156cf532..0dd4d3752d 100644 Binary files a/programs/cmm/aelia/buidin_pages/about.htm and b/programs/cmm/aelia/buidin_pages/about.htm differ diff --git a/programs/cmm/aelia/favicon.h b/programs/cmm/aelia/favicon.h new file mode 100644 index 0000000000..341cd029e5 --- /dev/null +++ b/programs/cmm/aelia/favicon.h @@ -0,0 +1,83 @@ +struct _favicon +{ + DOWNLOADER favget; + void get(); + void draw(); +} favicon; + +void _favicon::get(dword url) +{ + if (url==NULL) || (!favget.Start(url)) { + favget.Stop(); + favget.bufpointer = NULL; + } + else { + while (favget.state!=STATE_COMPLETED) favget.MonitorProgress(); + } +} + +void _favicon::draw(int x,y) +{ + dword favicon_data_decoded; + if (favget.bufpointer) { + img_decode stdcall (favget.bufpointer, favget.data_full_size, 0); + if (EAX==0) return; + favicon_data_decoded = EAX; + img_draw stdcall(favicon_data_decoded, x,y, 16, 16, 0, 0); + } + else { + _PutImage(x,y,16,16,#blank_icon); + } +} + + +unsigned char blank_icon[768] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0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FF, 0xFF, 0xFF, 0xFF, 0xFF +}; \ No newline at end of file diff --git a/programs/cmm/aelia/prepare_page.h b/programs/cmm/aelia/prepare_page.h index 415a11d35f..bba09c6a6d 100644 --- a/programs/cmm/aelia/prepare_page.h +++ b/programs/cmm/aelia/prepare_page.h @@ -187,8 +187,8 @@ dword DOM_pos; label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); } WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); - stroka_x+=char_width[' ']; } + stroka_x+=char_width[' ']; ESBYTE[line_break] >< zeroch; //restore line text.start = line_break; stroka_x = HTML_PADDING_X; @@ -200,8 +200,8 @@ dword DOM_pos; label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); } WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); - stroka_x+=char_width[' ']; } + stroka_x+=char_width[' ']; stroka_x += get_label_len(text.start); } if (ch=='>') { diff --git a/programs/cmm/lib/debug.h b/programs/cmm/lib/debug.h index 8646c48a73..01a308fea7 100644 --- a/programs/cmm/lib/debug.h +++ b/programs/cmm/lib/debug.h @@ -40,7 +40,8 @@ DONE: inline fastcall void debugln( EDX) { debug( EDX); - debugch('\n'); + debugch(10); + debugch(13); } inline void debugi(dword d_int) diff --git a/programs/cmm/pixie/pixie.c b/programs/cmm/pixie/pixie.c index 1e261175d0..670d7b1e28 100644 --- a/programs/cmm/pixie/pixie.c +++ b/programs/cmm/pixie/pixie.c @@ -316,7 +316,7 @@ void StartPlayingMp3() char item_path[4096]; char notify_message[512]; StopPlayingMp3(); - if (!list.count) { NotifyAndBackFocus("'Pixie Player\nPress O key to open file' -St"); return; } + if (!list.count) { NotifyAndBackFocus("'Pixie Player\nPress O key to open MP3 file' -St"); return; } if (current_playing_file_n > list.count) { current_playing_file_n = list.count; return; } if (current_playing_file_n < 0) { current_playing_file_n = 0; return; } playback_mode = PLAYBACK_MODE_PLAYING;