changeset 1373:e3683ea10681

move link signal emitter/receiver from Widget to Layout http://lists.auriga.wearlab.de/pipermail/dillo-dev/2009-October/006936.html
author corvid <corvid@lavabit.com>
date Thu, 29 Oct 2009 02:21:08 +0000
parents 7a7cb284486c
children d53735f4d362
files dw/image.cc dw/layout.cc dw/layout.hh dw/selection.cc dw/textblock.cc dw/widget.cc dw/widget.hh src/form.cc src/html.cc src/html_common.hh src/table.cc
diffstat 11 files changed, 212 insertions(+), 264 deletions(-) [+]
line wrap: on
line diff
--- a/dw/image.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/image.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -229,7 +229,7 @@
    core::style::Tooltip *tooltip = getStyle()->x_tooltip;
 
    if (currLink != -1) {
-      (void) emitLinkEnter (currLink, -1, -1, -1);
+      (void) layout->emitLinkEnter (this, currLink, -1, -1, -1);
    }
    if (tooltip) {
       tooltip->onEnter();
@@ -243,7 +243,7 @@
 
    if (currLink != -1) {
       currLink = -1;
-      (void) emitLinkEnter (-1, -1, -1, -1);
+      (void) layout->emitLinkEnter (this, -1, -1, -1, -1);
    }
    if (tooltip) {
       tooltip->onLeave();
@@ -286,11 +286,11 @@
             /* \todo Using MAP/AREA styles would probably be best */
             setCursor(newLink == -1 ? getStyle()->cursor :
                                       core::style::CURSOR_POINTER);
-            (void) emitLinkEnter (newLink, -1, -1, -1);
+            (void) layout->emitLinkEnter (this, newLink, -1, -1, -1);
          }
       } else if (isMap && currLink != -1) {
          /* server-side image map */
-         (void) emitLinkEnter (currLink, -1, x, y);
+         (void) layout->emitLinkEnter (this, currLink, -1, x, y);
       }
    }
    return true;
@@ -303,7 +303,8 @@
    currLink = mapList? mapList->link (mapKey, contentX(event),contentY(event)):
               getStyle()->x_link;
    if (event->button == 3){
-      (void)emitLinkPress(currLink, getStyle()->x_img, -1,-1,event);
+      (void)layout->emitLinkPress(this, currLink, getStyle()->x_img, -1, -1,
+                                  event);
       ret = true;
    } else if (event->button == 1 || currLink != -1){
       clicking = true;
@@ -320,7 +321,7 @@
       int x = isMap ? contentX(event) : -1;
       int y = isMap ? contentY(event) : -1;
       clicking = false;
-      emitLinkClick (currLink, getStyle()->x_img, x, y, event);
+      layout->emitLinkClick (this, currLink, getStyle()->x_img, x, y, event);
       return true;
    }
    return false;
--- a/dw/layout.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/layout.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -66,6 +66,110 @@
    emitVoid (CANVAS_SIZE_CHANGED, 3, argv);
 }
 
+// ----------------------------------------------------------------------
+
+bool Layout::LinkReceiver::enter (Widget *widget, int link, int img,
+                                  int x, int y)
+{
+   return false;
+}
+
+bool Layout::LinkReceiver::press (Widget *widget, int link, int img,
+                                  int x, int y, EventButton *event)
+{
+   return false;
+}
+
+bool Layout::LinkReceiver::release (Widget *widget, int link, int img,
+                                    int x, int y, EventButton *event)
+{
+   return false;
+}
+
+bool Layout::LinkReceiver::click (Widget *widget, int link, int img,
+                                    int x, int y, EventButton *event)
+{
+   return false;
+}
+
+// ----------------------------------------------------------------------
+
+bool Layout::LinkEmitter::emitToReceiver (lout::signal::Receiver *receiver,
+                                          int signalNo, int argc,
+                                          lout::object::Object **argv)
+{
+   LinkReceiver *linkReceiver = (LinkReceiver*)receiver;
+
+   switch (signalNo) {
+   case ENTER:
+      return linkReceiver->enter ((Widget*)argv[0],
+                                  ((Integer*)argv[1])->getValue (),
+                                  ((Integer*)argv[2])->getValue (),
+                                  ((Integer*)argv[3])->getValue (),
+                                  ((Integer*)argv[4])->getValue ());
+
+   case PRESS:
+      return linkReceiver->press ((Widget*)argv[0],
+                                  ((Integer*)argv[1])->getValue (),
+                                  ((Integer*)argv[2])->getValue (),
+                                  ((Integer*)argv[3])->getValue (),
+                                  ((Integer*)argv[4])->getValue (),
+                                  (EventButton*)argv[5]);
+
+   case RELEASE:
+      return linkReceiver->release ((Widget*)argv[0],
+                                    ((Integer*)argv[1])->getValue (),
+                                    ((Integer*)argv[2])->getValue (),
+                                    ((Integer*)argv[3])->getValue (),
+                                    ((Integer*)argv[4])->getValue (),
+                                    (EventButton*)argv[5]);
+
+   case CLICK:
+      return linkReceiver->click ((Widget*)argv[0],
+                                  ((Integer*)argv[1])->getValue (),
+                                  ((Integer*)argv[2])->getValue (),
+                                  ((Integer*)argv[3])->getValue (),
+                                  ((Integer*)argv[4])->getValue (),
+                                  (EventButton*)argv[5]);
+
+   default:
+      misc::assertNotReached ();
+   }
+   return false;
+}
+
+bool Layout::LinkEmitter::emitEnter (Widget *widget, int link, int img,
+                                     int x, int y)
+{
+   Integer ilink (link), iimg (img), ix (x), iy (y);
+   Object *argv[5] = { widget, &ilink, &iimg, &ix, &iy };
+   return emitBool (ENTER, 5, argv);
+}
+
+bool Layout::LinkEmitter::emitPress (Widget *widget, int link, int img,
+                                     int x, int y, EventButton *event)
+{
+   Integer ilink (link), iimg (img), ix (x), iy (y);
+   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
+   return emitBool (PRESS, 6, argv);
+}
+
+bool Layout::LinkEmitter::emitRelease (Widget *widget, int link, int img,
+                                       int x, int y, EventButton *event)
+{
+   Integer ilink (link), iimg (img), ix (x), iy (y);
+   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
+   return emitBool (RELEASE, 6, argv);
+}
+
+bool Layout::LinkEmitter::emitClick (Widget *widget, int link, int img,
+                                     int x, int y, EventButton *event)
+{
+   Integer ilink (link), iimg (img), ix (x), iy (y);
+   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
+   return emitBool (CLICK, 6, argv);
+}
+
 // ---------------------------------------------------------------------
 
 Layout::Anchor::~Anchor ()
--- a/dw/layout.hh	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/layout.hh	Thu Oct 29 02:21:08 2009 +0000
@@ -29,6 +29,78 @@
       virtual void canvasSizeChanged (int width, int ascent, int descent);
    };
 
+   class LinkReceiver: public lout::signal::Receiver
+   {
+   public:
+      /**
+       * \brief Called, when a link is entered, left, or the position has
+       *    changed.
+       *
+       * When a link is entered, this method is called with the respective
+       * arguments. When a link is left, this method is called with all
+       * three arguments (\em link, \em x, \em y) set to -1.
+       *
+       * When coordinates are supported, a change of the coordinates also
+       * causes emitting this signal.
+       */
+      virtual bool enter (Widget *widget, int link, int img, int x, int y);
+
+      /**
+       * \brief Called, when the user has pressed the mouse button on a
+       *    link (but not yet released).
+       *
+       * The causing event is passed as \em event.
+       */
+      virtual bool press (Widget *widget, int link, int img, int x, int y,
+                          EventButton *event);
+
+      /**
+       * \brief Called, when the user has released the mouse button on a
+       *    link.
+       *
+       * The causing event is passed as \em event.
+       */
+      virtual bool release (Widget *widget, int link, int img, int x, int y,
+                            EventButton *event);
+
+      /**
+       * \brief Called, when the user has clicked on a link.
+       *
+       * For mouse interaction, this is equivalent to "press" and "release"
+       * on the same link. In this case, \em event contains the "release"
+       * event.
+       *
+       *
+       * When activating links via keyboard is supported, only a "clicked"
+       * signal will be emitted, and \em event will be NULL.
+       */
+      virtual bool click (Widget *widget, int link, int img, int x, int y,
+                          EventButton *event);
+   };
+
+   class LinkEmitter: public lout::signal::Emitter
+   {
+   private:
+      enum { ENTER, PRESS, RELEASE, CLICK };
+
+   protected:
+      bool emitToReceiver (lout::signal::Receiver *receiver, int signalNo,
+                           int argc, lout::object::Object **argv);
+
+   public:
+      inline void connectLink (LinkReceiver *receiver) { connect (receiver); }
+
+      bool emitEnter (Widget *widget, int link, int img, int x, int y);
+      bool emitPress (Widget *widget, int link, int img, int x, int y,
+                      EventButton *event);
+      bool emitRelease (Widget *widget, int link, int img, int x, int y,
+                        EventButton *event);
+      bool emitClick (Widget *widget, int link, int img, int x, int y,
+                      EventButton *event);
+   };
+
+   LinkEmitter linkEmitter;
+
 private:
    class Emitter: public lout::signal::Emitter
    {
@@ -141,6 +213,24 @@
    Layout (Platform *platform);
    ~Layout ();
 
+   inline void connectLink (LinkReceiver *receiver)
+   { linkEmitter.connectLink (receiver); }
+
+   inline bool emitLinkEnter (Widget *w, int link, int img, int x, int y)
+   { return linkEmitter.emitEnter (w, link, img, x, y); }
+
+   inline bool emitLinkPress (Widget *w, int link, int img,
+                              int x, int y, EventButton *event)
+   { return linkEmitter.emitPress (w, link, img, x, y, event); }
+
+   inline bool emitLinkRelease (Widget *w, int link, int img,
+                                int x, int y, EventButton *event)
+   { return linkEmitter.emitRelease (w, link, img, x, y, event); }
+
+   inline bool emitLinkClick (Widget *w, int link, int img,
+                              int x, int y, EventButton *event)
+   { return linkEmitter.emitClick (w, link, img, x, y, event); }
+
    lout::misc::ZoneAllocator *textZone;
 
    void addWidget (Widget *widget);
--- a/dw/selection.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/selection.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -118,8 +118,7 @@
       if (linkNo != -1) {
          // link handling
          if (event) {
-            // return value is ignored
-            itWidget->emitLinkPress (linkNo, -1, -1, -1, event);
+            (void) layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event);
             resetLink ();
             linkState = LINK_PRESSED;
             linkButton = event->button;
@@ -162,7 +161,7 @@
          } else {
             if (event && event->button == 3) {
                // menu popup
-               itWidget->emitLinkPress (-1, -1, -1, -1, event);
+               layout->emitLinkPress (itWidget, -1, -1, -1, -1, event);
                ret = true;
             }
          }
@@ -182,14 +181,12 @@
       // link handling
       ret = true;
       if (linkNo != -1)
-         // return value is ignored
-         itWidget->emitLinkRelease (linkNo, -1, -1, -1, event);
+         (void) layout->emitLinkRelease (itWidget, linkNo, -1, -1, -1, event);
 
       // The link where the user clicked the mouse button?
       if (linkNo == linkNumber) {
          resetLink ();
-         // return value is ignored
-         itWidget->emitLinkClick (linkNo, -1, -1, -1, event);
+         (void) layout->emitLinkClick (itWidget, linkNo, -1, -1, -1, event);
       } else {
          if (event->button == 1)
             // Reset links and switch to selection mode. The selection
--- a/dw/textblock.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/textblock.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -548,7 +548,7 @@
          hoverTooltip->onMotion ();
 
       if (hoverLink != linkOld)
-         return emitLinkEnter (hoverLink, -1, -1, -1);
+         return layout->emitLinkEnter (this, hoverLink, -1, -1, -1);
       else
          return hoverLink != -1;
    }
@@ -561,7 +561,7 @@
 void Textblock::leaveNotifyImpl (core::EventCrossing *event)
 {
    hoverLink = -1;
-   (void) emitLinkEnter (hoverLink, -1, -1, -1);
+   (void) layout->emitLinkEnter (this, hoverLink, -1, -1, -1);
    if (hoverTooltip) {
       hoverTooltip->onLeave();
       hoverTooltip = NULL;
--- a/dw/widget.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/widget.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -127,112 +127,6 @@
 
 // ----------------------------------------------------------------------
 
-bool Widget::LinkReceiver::enter (Widget *widget, int link, int img,
-                                  int x, int y)
-{
-   return false;
-}
-
-bool Widget::LinkReceiver::press (Widget *widget, int link, int img,
-                                  int x, int y, EventButton *event)
-{
-   return false;
-}
-
-bool Widget::LinkReceiver::release (Widget *widget, int link, int img,
-                                    int x, int y, EventButton *event)
-{
-   return false;
-}
-
-bool Widget::LinkReceiver::click (Widget *widget, int link, int img,
-                                    int x, int y, EventButton *event)
-{
-   return false;
-}
-
-
-bool Widget::LinkEmitter::emitToReceiver (lout::signal::Receiver *receiver,
-                                          int signalNo, int argc,
-                                          lout::object::Object **argv)
-{
-   LinkReceiver *linkReceiver = (LinkReceiver*)receiver;
-
-   switch (signalNo) {
-   case ENTER:
-      return linkReceiver->enter ((Widget*)argv[0],
-                                  ((Integer*)argv[1])->getValue (),
-                                  ((Integer*)argv[2])->getValue (),
-                                  ((Integer*)argv[3])->getValue (),
-                                  ((Integer*)argv[4])->getValue ());
-
-   case PRESS:
-      return linkReceiver->press ((Widget*)argv[0],
-                                  ((Integer*)argv[1])->getValue (),
-                                  ((Integer*)argv[2])->getValue (),
-                                  ((Integer*)argv[3])->getValue (),
-                                  ((Integer*)argv[4])->getValue (),
-                                  (EventButton*)argv[5]);
-
-   case RELEASE:
-      return linkReceiver->release ((Widget*)argv[0],
-                                    ((Integer*)argv[1])->getValue (),
-                                    ((Integer*)argv[2])->getValue (),
-                                    ((Integer*)argv[3])->getValue (),
-                                    ((Integer*)argv[4])->getValue (),
-                                    (EventButton*)argv[5]);
-
-   case CLICK:
-      return linkReceiver->click ((Widget*)argv[0],
-                                  ((Integer*)argv[1])->getValue (),
-                                  ((Integer*)argv[2])->getValue (),
-                                  ((Integer*)argv[3])->getValue (),
-                                  ((Integer*)argv[4])->getValue (),
-                                  (EventButton*)argv[5]);
-
-   default:
-      misc::assertNotReached ();
-   }
-
-   /* Compiler happiness. */
-   return false;
-}
-
-bool Widget::LinkEmitter::emitEnter (Widget *widget, int link, int img,
-                                     int x, int y)
-{
-   Integer ilink (link), iimg (img), ix (x), iy (y);
-   Object *argv[5] = { widget, &ilink, &iimg, &ix, &iy };
-   return emitBool (ENTER, 5, argv);
-}
-
-bool Widget::LinkEmitter::emitPress (Widget *widget, int link, int img,
-                                     int x, int y, EventButton *event)
-{
-   Integer ilink (link), iimg (img), ix (x), iy (y);
-   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
-   return emitBool (PRESS, 6, argv);
-}
-
-bool Widget::LinkEmitter::emitRelease (Widget *widget, int link, int img,
-                                       int x, int y, EventButton *event)
-{
-   Integer ilink (link), iimg (img), ix (x), iy (y);
-   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
-   return emitBool (RELEASE, 6, argv);
-}
-
-bool Widget::LinkEmitter::emitClick (Widget *widget, int link, int img,
-                                     int x, int y, EventButton *event)
-{
-   Integer ilink (link), iimg (img), ix (x), iy (y);
-   Object *argv[6] = { widget, &ilink, &iimg, &ix, &iy, event };
-   return emitBool (CLICK, 6, argv);
-}
-
-
-// ----------------------------------------------------------------------
-
 int Widget::CLASS_ID = -1;
 
 Widget::Widget ()
--- a/dw/widget.hh	Tue Oct 27 16:47:17 2009 +0000
+++ b/dw/widget.hh	Thu Oct 29 02:21:08 2009 +0000
@@ -35,80 +35,6 @@
       virtual void leaveNotify (Widget *widget, EventCrossing *event);
    };
 
-   /**
-    * \brief This receiver is for signals related to HTML pages.
-    *
-    * The \em link argument to all signals defines a number, which has
-    * been passed before, e.g. by setting dw::core::style::Style::x_link.
-    * When defining this number (e.g in dw::core::style::Style::x_link),
-    * and when receiving the signal, the caller must interpret these numbers
-    * in a consistent way. In the HTML link block, this number is an index
-    * to an array of URLs.
-    *
-    * \em link = -1 represents an undefined link.
-    *
-    * The \em img argument to all signals defines a number which has
-    * been passed before, e.g. by setting dw::core::style::Style::x_img.
-    * When defining this number (e.g in dw::core::style::Style::x_img),
-    * and when receiving the signal, the caller must interpret these numbers
-    * in a consistent way. In the HTML link block, this number is an index
-    * to an array of structures containing image information.
-    *
-    * \em img = -1 represents an undefined image.
-    *
-    * \em x and \em y define the coordinates within the link area. They are
-    * only used for server-side image maps, see dw::Image.
-    *
-    * \sa dw::Image, dw::Textblock
-    */
-   class LinkReceiver: public lout::signal::Receiver
-   {
-   public:
-      /**
-       * \brief Called, when a link is entered, left, or the position has
-       *    changed.
-       *
-       * When a link is entered, this method is called with the respective
-       * arguments. When a link is left, this method is called with all
-       * three arguments (\em link, \em x, \em y) set to -1.
-       *
-       * When coordinates are supported, a change of the coordinates also
-       * causes emitting this signal.
-       */
-      virtual bool enter (Widget *widget, int link, int img, int x, int y);
-
-      /**
-       * \brief Called, when the user has pressed the mouse button on a
-       *    link (but not yet released).
-       *
-       * The causing event is passed as \em event.
-       */
-      virtual bool press (Widget *widget, int link, int img, int x, int y,
-                          EventButton *event);
-
-      /**
-       * \brief Called, when the user has released the mouse button on a
-       *    link.
-       *
-       * The causing event is passed as \em event.
-       */
-      virtual bool release (Widget *widget, int link, int img, int x, int y,
-                            EventButton *event);
-
-      /**
-       * \brief Called, when the user has clicked on a link.
-       *
-       * For mouse interaction, this is equivalent to "press" and "release"
-       * on the same link. In this case, \em event contains the "release"
-       * event.
-       *
-       * When activating links via keyboard is supported, only a "clicked"
-       * signal will be emitted, and \em event will be NULL.
-       */
-      virtual bool click (Widget *widget, int link, int img, int x, int y,
-                          EventButton *event);
-   };
-
 private:
    class EventEmitter: public lout::signal::Emitter
    {
@@ -131,27 +57,6 @@
       void emitLeaveNotify (Widget *widget, EventCrossing *event);
    };
 
-   class LinkEmitter: public lout::signal::Emitter
-   {
-   private:
-      enum { ENTER, PRESS, RELEASE, CLICK };
-
-   protected:
-      bool emitToReceiver (lout::signal::Receiver *receiver, int signalNo,
-                           int argc, lout::object::Object **argv);
-
-   public:
-      inline void connectLink (LinkReceiver *receiver) { connect (receiver); }
-
-      bool emitEnter (Widget *widget, int link, int img, int x, int y);
-      bool emitPress (Widget *widget, int link, int img, int x, int y,
-                      EventButton *event);
-      bool emitRelease (Widget *widget, int link, int img, int x, int y,
-                        EventButton *event);
-      bool emitClick (Widget *widget, int link, int img, int x, int y,
-                      EventButton *event);
-   };
-
    EventEmitter eventEmitter;
 
    style::Style *style;
@@ -248,7 +153,6 @@
    int parentRef;
 
 protected:
-   LinkEmitter linkEmitter;
 
    /**
     * \brief The current allocation: size and position, always relative to the
@@ -373,24 +277,6 @@
    inline void connectEvent (EventReceiver *receiver)
    { eventEmitter.connectEvent (receiver); }
 
-   inline void connectLink (LinkReceiver *receiver)
-   { linkEmitter.connectLink (receiver); }
-
-   inline bool emitLinkEnter (int link, int img, int x, int y)
-   { return linkEmitter.emitEnter (this, link, img, x, y); }
-
-   inline bool emitLinkPress (int link, int img,
-                              int x, int y, EventButton *event)
-   { return linkEmitter.emitPress (this, link, img, x, y, event); }
-
-   inline bool emitLinkRelease (int link, int img,
-                                int x, int y, EventButton *event)
-   { return linkEmitter.emitRelease (this, link, img, x, y, event); }
-
-   inline bool emitLinkClick (int link, int img,
-                              int x, int y, EventButton *event)
-   { return linkEmitter.emitClick (this, link, img, x, y, event); }
-
    inline bool usesHints ()       { return flags & USES_HINTS; }
    inline bool hasContents ()     { return flags & HAS_CONTENTS; }
 
--- a/src/form.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/src/form.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -856,8 +856,6 @@
       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 @@
          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);
       }
--- a/src/html.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/src/html.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -382,9 +382,6 @@
    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 @@
 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 @@
    /* 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 @@
 }
 
 /*
- * 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 @@
                             new ::object::String(URL_STR(usemap_url)));
       a_Url_free (usemap_url);
    }
-   html->connectSignals((Widget*)Image->dw);
 }
 
 /*
@@ -2635,8 +2621,6 @@
    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
--- a/src/html_common.hh	Tue Oct 27 16:47:17 2009 +0000
+++ b/src/html_common.hh	Thu Oct 29 02:21:08 2009 +0000
@@ -121,7 +121,7 @@
 
 class DilloHtml {
 private:
-   class HtmlLinkReceiver: public dw::core::Widget::LinkReceiver {
+   class HtmlLinkReceiver: public dw::core::Layout::LinkReceiver {
    public:
       DilloHtml *html;
 
--- a/src/table.cc	Tue Oct 27 16:47:17 2009 +0000
+++ b/src/table.cc	Thu Oct 29 02:21:08 2009 +0000
@@ -292,10 +292,6 @@
 
       ((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: