[gnome-calendar] quick-add-popover: only focus entry if popover is visible



commit 0b0dee101a1e7f9f32e67cb7217fb0b295ca258b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Mar 14 21:51:37 2017 -0300

    quick-add-popover: only focus entry if popover is visible
    
    Otherwise, we end up with a warning and many keybindings won't
    work anymore.

 src/gcal-quick-add-popover.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-quick-add-popover.c b/src/gcal-quick-add-popover.c
index 9170722..7c7e574 100644
--- a/src/gcal-quick-add-popover.c
+++ b/src/gcal-quick-add-popover.c
@@ -205,7 +205,8 @@ select_row (GcalQuickAddPopover *self,
   gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "events");
 
   /* Focus back the event Entry */
-  gtk_entry_grab_focus_without_selecting (GTK_ENTRY (self->summary_entry));
+  if (gtk_widget_get_visible (GTK_WIDGET (self)))
+    gtk_entry_grab_focus_without_selecting (GTK_ENTRY (self->summary_entry));
 
   g_clear_object (&circle_pixbuf);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]