diff options
author | corvid <corvid@lavabit.com> | 2011-06-16 03:30:57 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-06-16 03:30:57 +0000 |
commit | 3fbfa30696de499dbc08635fee1188e0e488bf6d (patch) | |
tree | 135c9cee30201a0d7592cf9358d2fda195a277b7 /dw/selection.cc | |
parent | 6d2e5e9b2f38854ed4be28b552d020f17838ff1e (diff) |
rm unused double-click code
Diffstat (limited to 'dw/selection.cc')
-rw-r--r-- | dw/selection.cc | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/dw/selection.cc b/dw/selection.cc index 6f48140f..9702eee0 100644 --- a/dw/selection.cc +++ b/dw/selection.cc @@ -60,17 +60,6 @@ SelectionState::~SelectionState () reset (); } - -bool SelectionState::DoubleClickEmitter::emitToReceiver (lout::signal::Receiver - *receiver, - int signalNo, - int argc, - Object **argv) -{ - ((DoubleClickReceiver*)receiver)->doubleClick (); - return false; -} - void SelectionState::reset () { resetSelection (); @@ -98,24 +87,14 @@ void SelectionState::resetLink () } bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo, - EventButton *event, bool withinContent) + EventButton *event) { Widget *itWidget = it->getWidget (); bool ret = false; if (!event) return ret; - if (event->button == 1 && !withinContent && event->numPressed == 2) { - // When the user double-clicks on empty parts, emit the double click - // signal instead of normal processing. Used for full screen - // mode. - doubleClickEmitter.emitDoubleClick (); - // Reset everything, so that dw::core::Selection::buttonRelease will - // ignore the "release" event following soon. - highlight (false, 0); - reset (); - ret = true; - } else if (linkNo != -1) { + if (linkNo != -1) { // link handling (void) layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event); resetLink (); @@ -165,7 +144,7 @@ bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo, } bool SelectionState::buttonRelease (Iterator *it, int charPos, int linkNo, - EventButton *event, bool withinContent) + EventButton *event) { Widget *itWidget = it->getWidget (); bool ret = false; @@ -207,7 +186,7 @@ bool SelectionState::buttonRelease (Iterator *it, int charPos, int linkNo, } bool SelectionState::buttonMotion (Iterator *it, int charPos, int linkNo, - EventMotion *event, bool withinContent) + EventMotion *event) { if (linkState == LINK_PRESSED) { //link handling @@ -231,21 +210,17 @@ bool SelectionState::buttonMotion (Iterator *it, int charPos, int linkNo, */ bool SelectionState::handleEvent (EventType eventType, Iterator *it, int charPos, int linkNo, - MousePositionEvent *event, - bool withinContent) + MousePositionEvent *event) { switch (eventType) { case BUTTON_PRESS: - return buttonPress (it, charPos, linkNo, (EventButton*)event, - withinContent); + return buttonPress (it, charPos, linkNo, (EventButton*)event); case BUTTON_RELEASE: - return buttonRelease (it, charPos, linkNo, (EventButton*)event, - withinContent); + return buttonRelease (it, charPos, linkNo, (EventButton*)event); case BUTTON_MOTION: - return buttonMotion (it, charPos, linkNo, (EventMotion*)event, - withinContent); + return buttonMotion (it, charPos, linkNo, (EventMotion*)event); default: |