diff options
author | corvid <corvid@lavabit.com> | 2009-10-29 02:21:08 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-10-29 02:21:08 +0000 |
commit | 21f85b39f22ff0f5cd373a4cfedba115ee533e98 (patch) | |
tree | 2f0f83b174694e8bca454480942bc0f1bcdec799 /src/html.cc | |
parent | 2949961d999576c217bb5be79fd643d53eb6698a (diff) |
move link signal emitter/receiver from Widget to Layout
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2009-October/006936.html
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/html.cc b/src/html.cc index 2b318123..dcc2363e 100644 --- a/src/html.cc +++ b/src/html.cc @@ -382,9 +382,6 @@ static void Html_add_textblock(DilloHtml *html, int space) HT2TB(html)->addParbreak (space, html->styleEngine->wordStyle ()); S_TOP(html)->textblock = html->dw = textblock; S_TOP(html)->hand_over_break = true; - - /* Handle it when the user clicks on a link */ - html->connectSignals(textblock); } /* @@ -393,15 +390,16 @@ static void Html_add_textblock(DilloHtml *html, int space) DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url, const char *content_type) { - /* Init event receiver */ - linkReceiver.html = this; - /* Init main variables */ bw = p_bw; page_url = a_Url_dup(url); base_url = a_Url_dup(url); dw = NULL; + /* Init event receiver */ + linkReceiver.html = this; + HT2LT(this)->connectLink (&linkReceiver); + a_Bw_add_doc(p_bw, this); /* Init for-parsing variables */ @@ -485,9 +483,6 @@ void DilloHtml::initDw() /* Create the main widget */ dw = stack->getRef(0)->textblock = new Textblock (prefs.limit_text_width); - /* Handle it when the user clicks on a link */ - connectSignals(dw); - bw->num_page_bugs = 0; dStr_truncate(bw->page_bugs, 0); } @@ -536,14 +531,6 @@ DilloHtml::~DilloHtml() } /* - * Connect all signals of a textblock or an image. - */ -void DilloHtml::connectSignals(Widget *dw) -{ - dw->connectLink (&linkReceiver); -} - -/* * Process the newly arrived html and put it into the page structure. * (This function is called by Html_callback whenever there's new data) */ @@ -2171,7 +2158,6 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize) new ::object::String(URL_STR(usemap_url))); a_Url_free (usemap_url); } - html->connectSignals((Widget*)Image->dw); } /* @@ -2635,8 +2621,6 @@ static void Html_tag_open_li(DilloHtml *html, const char *tag, int tagsize) HT2TB(html)->addParbreak (0, wordStyle); *ref_list_item = list_item; S_TOP(html)->textblock = html->dw = list_item; - /* Handle it when the user clicks on a link */ - html->connectSignals(list_item); if (style->listStyleType == LIST_STYLE_TYPE_NONE) { // none |