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 | |
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')
-rw-r--r-- | src/form.cc | 4 | ||||
-rw-r--r-- | src/html.cc | 24 | ||||
-rw-r--r-- | src/html_common.hh | 2 | ||||
-rw-r--r-- | src/table.cc | 4 |
4 files changed, 5 insertions, 29 deletions
diff --git a/src/form.cc b/src/form.cc index 4a7e399a..bd10b4f6 100644 --- a/src/form.cc +++ b/src/form.cc @@ -856,8 +856,6 @@ void Html_tag_open_button(DilloHtml *html, const char *tag, int tagsize) HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ()); S_TOP(html)->textblock = html->dw = page; - /* right button press for menus for button contents */ - html->connectSignals(page); value = a_Html_get_attr_wdef(html, tag, tagsize, "value", NULL); name = a_Html_get_attr_wdef(html, tag, tagsize, "name", NULL); @@ -1915,8 +1913,6 @@ static Embed *Html_input_image(DilloHtml *html, const char *tag, int tagsize) HT2TB(html)->addWidget (button, html->styleEngine->style ()); // gtk_widget_set_sensitive(widget, FALSE); /* Until end of FORM! */ - /* a right button press brings up the image menu */ - html->connectSignals((Widget*)Image->dw); } else { a_Url_free(url); } 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 diff --git a/src/html_common.hh b/src/html_common.hh index 8795637f..933274fe 100644 --- a/src/html_common.hh +++ b/src/html_common.hh @@ -121,7 +121,7 @@ struct _DilloHtmlState { class DilloHtml { private: - class HtmlLinkReceiver: public dw::core::Widget::LinkReceiver { + class HtmlLinkReceiver: public dw::core::Layout::LinkReceiver { public: DilloHtml *html; diff --git a/src/table.cc b/src/table.cc index c8f904b5..43304206 100644 --- a/src/table.cc +++ b/src/table.cc @@ -292,10 +292,6 @@ static void Html_tag_open_table_cell(DilloHtml *html, ((dw::Table*)S_TOP(html)->table)->addCell (col_tb, colspan, rowspan); S_TOP(html)->textblock = html->dw = col_tb; - - /* Handle it when the user clicks on a link */ - html->connectSignals(col_tb); - break; default: |