Revert "Make Up key bring focus to Subject line, if the cursor is on the first line...
authorAndrej Kacian <andrej@kacian.sk>
Wed, 18 Jun 2014 11:11:39 +0000 (13:11 +0200)
committerAndrej Kacian <andrej@kacian.sk>
Wed, 18 Jun 2014 11:13:36 +0000 (13:13 +0200)
src/compose.c

index cfdda3f..8c7952b 100644 (file)
@@ -11065,10 +11065,6 @@ static gboolean completion_set_focus_to_subject
                                         GdkEventKey  *event,
                                         Compose      *compose)
 {
                                         GdkEventKey  *event,
                                         Compose      *compose)
 {
-       GtkTextBuffer *buffer;
-       GtkTextMark *mark;
-       GtkTextIter iter;
-
        cm_return_val_if_fail(compose != NULL, FALSE);
 
        /* make backtab move to subject field */
        cm_return_val_if_fail(compose != NULL, FALSE);
 
        /* make backtab move to subject field */
@@ -11076,25 +11072,6 @@ static gboolean completion_set_focus_to_subject
                gtk_widget_grab_focus(compose->subject_entry);
                return TRUE;
        }
                gtk_widget_grab_focus(compose->subject_entry);
                return TRUE;
        }
-
-       // Up key should also move the focus to subject field, if the cursor
-       // is on the first line.
-       if ((event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_KP_Up)
-         && (event->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK)) == 0) {
-               buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
-               g_return_val_if_fail(buffer != NULL, FALSE);
-
-               mark = gtk_text_buffer_get_mark(buffer, "insert");
-               g_return_val_if_fail(mark != NULL, FALSE);
-
-               gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
-
-               if (gtk_text_iter_get_line(&iter) == 0) {
-                       gtk_widget_grab_focus(compose->subject_entry);
-                       return TRUE;
-               }
-       }
-
        return FALSE;
 }
 
        return FALSE;
 }