[gnome-todo] new-task-row: Protect against reentrancy
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] new-task-row: Protect against reentrancy
- Date: Sat, 20 Jul 2019 22:15:44 +0000 (UTC)
commit 1bd77f1fa11e16147085f46234585f9e991898f0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jul 20 19:14:02 2019 -0300
new-task-row: Protect against reentrancy
We cannot grab the focus on the handler of focus
grab.
src/task-list-view/gtd-new-task-row.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/task-list-view/gtd-new-task-row.c b/src/task-list-view/gtd-new-task-row.c
index adf4869..6dc8b6b 100644
--- a/src/task-list-view/gtd-new-task-row.c
+++ b/src/task-list-view/gtd-new-task-row.c
@@ -167,11 +167,13 @@ on_entry_icon_released_cb (GtkEntry *entry,
static void
on_focus_in_cb (GtkEventControllerKey *event_controller,
+ GdkCrossingMode mode,
+ GdkNotifyType detail,
GtdNewTaskRow *self)
{
GTD_ENTRY;
- gtd_new_task_row_set_active (self, TRUE);
+ g_signal_emit (self, signals[ENTER], 0);
GTD_EXIT;
}
@@ -305,10 +307,7 @@ gtd_new_task_row_set_active (GtdNewTaskRow *self,
g_return_if_fail (GTD_IS_NEW_TASK_ROW (self));
if (active)
- {
- gtk_widget_grab_focus (GTK_WIDGET (self->entry));
- g_signal_emit (self, signals[ENTER], 0);
- }
+ gtk_widget_grab_focus (GTK_WIDGET (self->entry));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]