Rev 7789 | Rev 7796 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7789 | Rev 7791 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | #include "show_src.h" |
34 | #include "show_src.h" |
35 | #include "download_manager.h" |
35 | #include "download_manager.h" |
Line 36... | Line 36... | ||
36 | 36 | ||
Line -... | Line 37... | ||
- | 37 | bool debug_mode = false; |
|
- | 38 | ||
- | 39 | enum { |
|
- | 40 | NEW_TAB=600, |
|
- | 41 | ENCODINGS=700, |
|
- | 42 | BACK_BUTTON=800, |
|
- | 43 | FORWARD_BUTTON, |
|
- | 44 | REFRESH_BUTTON, |
|
- | 45 | GOTOURL_BUTTON, |
|
- | 46 | CHANGE_ENCODING, |
|
- | 47 | SANDWICH_BUTTON, |
|
- | 48 | VIEW_SOURCE, |
|
- | 49 | EDIT_SOURCE, |
|
- | 50 | OPEN_FILE, |
|
- | 51 | NEW_WINDOW, |
|
- | 52 | VIEW_HISTORY, |
|
- | 53 | DOWNLOAD_MANAGER, |
|
- | 54 | CLEAR_CACHE, |
|
- | 55 | UPDATE_BROWSER, |
|
- | 56 | IN_NEW_TAB, |
|
- | 57 | IN_NEW_WINDOW, |
|
- | 58 | COPY_LINK_URL, |
|
- | 59 | DOWNLOAD_LINK_CONTENTS, |
|
- | 60 | TAB_ID, |
|
- | 61 | TAB_CLOSE_ID = 900 |
|
37 | bool debug_mode = false; |
62 | }; |
Line 38... | Line 63... | ||
38 | 63 | ||
39 | #include "..\TWB\TWB.c" //HTML Parser, a core component |
64 | #include "..\TWB\TWB.c" //HTML Parser, a core component |
Line 61... | Line 86... | ||
61 | char stak[4096]; |
86 | char stak[4096]; |
62 | proc_info Form; |
87 | proc_info Form; |
Line 63... | Line 88... | ||
63 | 88 | ||
Line 64... | Line -... | ||
64 | int menu_id=NULL; |
- | |
65 | - | ||
66 | enum { |
- | |
67 | NEW_TAB=600, |
- | |
68 | ENCODINGS=700, |
- | |
69 | BACK_BUTTON=800, |
- | |
70 | FORWARD_BUTTON, |
- | |
71 | REFRESH_BUTTON, |
- | |
72 | GOTOURL_BUTTON, |
- | |
73 | CHANGE_ENCODING, |
- | |
74 | SANDWICH_BUTTON, |
- | |
75 | VIEW_SOURCE, |
- | |
76 | EDIT_SOURCE, |
- | |
77 | OPEN_FILE, |
- | |
78 | NEW_WINDOW, |
- | |
79 | VIEW_HISTORY, |
- | |
80 | DOWNLOAD_MANAGER, |
- | |
81 | CLEAR_CACHE, |
- | |
82 | UPDATE_BROWSER, |
- | |
83 | IN_NEW_TAB, |
- | |
84 | IN_NEW_WINDOW, |
- | |
85 | COPY_LINK_URL, |
- | |
86 | DOWNLOAD_LINK_CONTENTS, |
- | |
87 | TAB_ID, |
- | |
88 | TAB_CLOSE_ID = 900 |
- | |
89 | }; |
89 | int menu_id=NULL; |
Line 90... | Line 90... | ||
90 | 90 | ||
91 | #include "tabs.h" |
91 | #include "tabs.h" |
Line 233... | Line 233... | ||
233 | history.back(); |
233 | history.back(); |
234 | OpenPage(#http.redirect_url); |
234 | OpenPage(#http.redirect_url); |
235 | } else { |
235 | } else { |
236 | notify("'Too many redirects.' -E"); |
236 | notify("'Too many redirects.' -E"); |
237 | StopLoading(); |
237 | StopLoading(); |
- | 238 | redirect_count = 0; |
|
238 | } |
239 | } |
239 | } else { |
240 | } else { |
240 | // Loading the page is complete, free resources |
241 | // Loading the page is complete, free resources |
241 | redirect_count = 0; |
242 | redirect_count = 0; |
242 | http.free(); |
243 | http.free(); |
Line 428... | Line 429... | ||
428 | pages_cache.clear(); |
429 | pages_cache.clear(); |
429 | notify(#clear_cache_ok); |
430 | notify(#clear_cache_ok); |
430 | return; |
431 | return; |
431 | case IN_NEW_TAB: |
432 | case IN_NEW_TAB: |
432 | open_new_tab = true; |
433 | open_new_tab = true; |
433 | EventOpenNewTab(PageLinks.GetURL(PageLinks.active)); |
434 | EventClickLink(PageLinks.GetURL(PageLinks.active)); |
434 | open_new_tab = false; |
435 | open_new_tab = false; |
435 | return; |
436 | return; |
436 | case IN_NEW_WINDOW: |
437 | case IN_NEW_WINDOW: |
437 | open_new_tab = true; |
438 | open_new_tab = true; |
438 | RunProgram(#program_path, PageLinks.GetURL(PageLinks.active)); |
439 | EventClickLink(PageLinks.GetURL(PageLinks.active)); |
439 | open_new_tab = false; |
440 | open_new_tab = false; |
440 | return; |
441 | return; |
441 | case COPY_LINK_URL: |
442 | case COPY_LINK_URL: |
442 | Clipboard__CopyText(PageLinks.GetURL(PageLinks.active)); |
443 | Clipboard__CopyText(PageLinks.GetURL(PageLinks.active)); |
443 | notify("'URL copied to clipboard'O"); |
444 | notify("'URL copied to clipboard'O"); |