[Commits] [SCM] claws branch, master, updated. 3.18.0-303-gcbf024d6e
paul at claws-mail.org
paul at claws-mail.org
Fri Dec 17 12:08:18 UTC 2021
The branch, master has been updated
via cbf024d6e0abf27f20ba71fc62e216806fc57df3 (commit)
from 2fb4305cab537002c4887f9d086169b2d3c73629 (commit)
Summary of changes:
src/action.c | 2 +-
src/compose.c | 3 ++-
src/editaddress.c | 6 ++++--
src/gtk/gtkaspell.c | 3 ++-
src/gtk/inputdialog.c | 3 ++-
src/plugins/python/python-shell.c | 29 ++++++++---------------------
6 files changed, 19 insertions(+), 27 deletions(-)
- Log -----------------------------------------------------------------
commit cbf024d6e0abf27f20ba71fc62e216806fc57df3
Author: paul <paul at claws-mail.org>
Date: Fri Dec 17 12:07:30 2021 +0000
where GDK_KEY_Return is accepted, also accept GDK_KEY_KP_Enter
diff --git a/src/action.c b/src/action.c
index 84a3d2da0..f134b37cc 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1149,7 +1149,7 @@ static gint io_dialog_key_pressed_cb(GtkWidget *widget, GdkEventKey *event,
{
if (event && (event->keyval == GDK_KEY_Escape ||
event->keyval == GDK_KEY_Return ||
- event->keyval == GDK_KEY_KP_Enter))
+ event->keyval == GDK_KEY_KP_Enter))
hide_io_dialog_cb(widget, data);
return TRUE;
}
diff --git a/src/compose.c b/src/compose.c
index 2c90fb85b..e00ab8310 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9633,7 +9633,8 @@ static gboolean attach_property_key_pressed(GtkWidget *widget,
*cancelled = TRUE;
gtk_main_quit();
}
- if (event && event->keyval == GDK_KEY_Return) {
+ if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return)) {
*cancelled = FALSE;
gtk_main_quit();
return TRUE;
diff --git a/src/editaddress.c b/src/editaddress.c
index 0f62a6432..875d5ed8a 100644
--- a/src/editaddress.c
+++ b/src/editaddress.c
@@ -1165,7 +1165,8 @@ static void edit_person_entry_email_changed (GtkWidget *entry, gpointer data)
static gboolean edit_person_entry_email_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- if (event && event->keyval == GDK_KEY_Return) {
+ if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return)) {
if (email_saving)
edit_person_email_modify(NULL);
else if (email_adding)
@@ -1405,7 +1406,8 @@ static void edit_person_entry_att_changed (GtkWidget *entry, gpointer data)
static gboolean edit_person_entry_att_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- if (event && event->keyval == GDK_KEY_Return) {
+ if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return)) {
if (attrib_saving)
edit_person_attrib_modify(NULL);
else if (attrib_adding)
diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c
index ef632f445..19d59ad8e 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -1410,7 +1410,8 @@ static gboolean replace_key_pressed(GtkWidget *widget,
if (event && event->keyval == GDK_KEY_Escape) {
gtk_widget_destroy(widget);
return TRUE;
- } else if (event && event->keyval == GDK_KEY_Return) {
+ } else if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return)) {
replace_with_supplied_word_cb(widget, gtkaspell);
return TRUE;
}
diff --git a/src/gtk/inputdialog.c b/src/gtk/inputdialog.c
index 2bad05b37..4145bcee5 100644
--- a/src/gtk/inputdialog.c
+++ b/src/gtk/inputdialog.c
@@ -510,7 +510,8 @@ static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data
if (event && event->keyval == GDK_KEY_Escape) {
ack = FALSE;
fin = TRUE;
- } else if (event && event->keyval == GDK_KEY_Return) {
+ } else if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return)) {
ack = TRUE;
fin = TRUE;
return TRUE; /* do not let Return pass - it
diff --git a/src/plugins/python/python-shell.c b/src/plugins/python/python-shell.c
index 5ea29f299..fb904cb87 100644
--- a/src/plugins/python/python-shell.c
+++ b/src/plugins/python/python-shell.c
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2008-2009 Christian Hammond
* Copyright (c) 2008-2009 David Trowbridge
+ * Copyright (C) 2021 the Claws Mail Team
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -342,25 +343,20 @@ parasite_python_shell_key_press_cb(GtkWidget *textview,
GdkEventKey *event,
GtkWidget *python_shell)
{
- if (event->keyval == GDK_KEY_Return)
+ if (event && (event->keyval == GDK_KEY_KP_Enter ||
+ event->keyval == GDK_KEY_Return))
{
parasite_python_shell_process_line(python_shell);
return TRUE;
- }
- else if (event->keyval == GDK_KEY_Up)
- {
+ } else if (event && event->keyval == GDK_KEY_Up) {
parasite_python_shell_replace_input(python_shell,
parasite_python_shell_get_history_back(python_shell));
return TRUE;
- }
- else if (event->keyval == GDK_KEY_Down)
- {
+ } else if (event && event->keyval == GDK_KEY_Down) {
parasite_python_shell_replace_input(python_shell,
parasite_python_shell_get_history_forward(python_shell));
return TRUE;
- }
- else if (event->string != NULL)
- {
+ } else if (event && event->string != NULL) {
ParasitePythonShellPrivate *priv =
PARASITE_PYTHON_SHELL_GET_PRIVATE(python_shell);
GtkTextBuffer *buffer =
@@ -387,27 +383,18 @@ parasite_python_shell_key_press_cb(GtkWidget *textview,
&selection_iter);
if (cmp_start_insert == 0 && cmp_start_select == 0 &&
- (event->keyval == GDK_KEY_BackSpace ||
- event->keyval == GDK_KEY_Left))
- {
+ event && (event->keyval == GDK_KEY_BackSpace ||
+ event->keyval == GDK_KEY_Left)) {
return TRUE;
}
if (cmp_start_insert <= 0 && cmp_start_select <= 0)
- {
return FALSE;
- }
else if (cmp_start_insert > 0 && cmp_start_select > 0)
- {
gtk_text_buffer_place_cursor(buffer, &start_iter);
- }
else if (cmp_insert_select < 0)
- {
gtk_text_buffer_move_mark(buffer, insert_mark, &start_iter);
- }
else if (cmp_insert_select > 0)
- {
gtk_text_buffer_move_mark(buffer, selection_mark, &start_iter);
- }
}
return FALSE;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list