changeset 2041:034d4d1baf33

merge
author Jorge Arellano Cid <jcid@dillo.org>
date Fri, 20 May 2011 10:29:07 -0400
parents 6c012332ba15 (diff) db2bd1610db1 (current diff)
children 8f021c978252
files
diffstat 3 files changed, 14 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/findbar.cc	Thu May 19 21:22:45 2011 +0000
+++ b/src/findbar.cc	Fri May 20 10:29:07 2011 -0400
@@ -36,10 +36,10 @@
    unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META);
 
    if (e == FL_KEYBOARD) {
-      if (k == FL_Left || k == FL_Right) {
-         if (modifier == FL_SHIFT) {
-            a_UIcmd_send_event_to_tabs_by_wid(e, this);
-            return 1;
+      if (modifier == FL_SHIFT) {
+         if (k == FL_Left || k == FL_Right) {
+            // Let these keys get to the UI
+            return 0;
          }
       } else if (k == FL_Escape && modifier == 0) {
          // Avoid clearing the text with Esc, just hide the findbar.
--- a/src/ui.cc	Thu May 19 21:22:45 2011 +0000
+++ b/src/ui.cc	Fri May 20 10:29:07 2011 -0400
@@ -119,7 +119,16 @@
             return 0;
          }
       } else if (modifier == FL_CTRL) {
-         if (k == 'l') {
+         if (k == 'a' || k == 'e') {
+            position(k == 'a' ? 0 : size());
+            return 1;
+         } else if (k == 'k') {
+            cut(position(), size());
+            return 1;
+         } else if (k == 'd') {
+            cut(position(), position()+1);
+            return 1;
+         } else if (k == 'l') {
             // Make text selected when already focused.
             position(size(), 0);
             return 1;
--- a/src/uicmd.cc	Thu May 19 21:22:45 2011 +0000
+++ b/src/uicmd.cc	Fri May 20 10:29:07 2011 -0400
@@ -341,20 +341,6 @@
 }
 
 /*
- * FLTK regards SHIFT + {Left, Right} as navigation keys.
- * Special handling is required to override it. Here we route
- * these events directly to the recipient.
- * TODO: focus is not remembered correctly.
- */
-void a_UIcmd_send_event_to_tabs_by_wid(int e, void *v_wid)
-{
-   BrowserWindow *bw = a_UIcmd_get_bw_by_widget(v_wid);
-   UI *ui = (UI*)bw->ui;
-   if (ui->tabs())
-      ui->tabs()->handle(e);
-}
-
-/*
  * Create a new UI and its associated BrowserWindow data structure.
  * Use style from v_ui. If non-NULL it must be of type UI*.
  */