[Commits] [SCM] claws branch, master, updated. 3.17.0-185-g082fde6
ticho at claws-mail.org
ticho at claws-mail.org
Thu Nov 29 18:20:24 CET 2018
The branch, master has been updated
via 082fde6208af540238cea27d93d9603ce54753a1 (commit)
from 1e39691952b7907d1fe0bb91861ceb5fce539b71 (commit)
Summary of changes:
src/sourcewindow.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 082fde6208af540238cea27d93d9603ce54753a1
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Thu Nov 29 18:18:30 2018 +0100
Fix improper GTK API usage in sourceview's "select all".
GtkTextView does not implement GtkEditable interface.
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
index f3465b7..568dcb9 100644
--- a/src/sourcewindow.c
+++ b/src/sourcewindow.c
@@ -203,14 +203,22 @@ static gint source_window_delete_cb(GtkWidget *widget, GdkEventAny *event,
static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
SourceWindow *sourcewin)
{
+ GtkTextBuffer *buffer;
+ GtkTextIter start, end;
if (!event || !sourcewin) return FALSE;
-
+
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sourcewin->text));
+ if (!buffer) return FALSE;
+
switch (event->keyval) {
case GDK_KEY_A:
case GDK_KEY_a:
- if ((event->state & GDK_CONTROL_MASK) != 0)
- gtk_editable_select_region(GTK_EDITABLE(sourcewin->text), 0, -1);
+ if ((event->state & GDK_CONTROL_MASK) != 0) {
+ gtk_text_buffer_get_start_iter(buffer, &start);
+ gtk_text_buffer_get_end_iter(buffer, &end);
+ gtk_text_buffer_select_range(buffer, &start, &end);
+ }
break;
case GDK_KEY_W:
case GDK_KEY_w:
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list