quick-add-popover: only focus entry if popover is visible

Otherwise, we end up with a warning and many keybindings won't
work anymore.
This commit is contained in:
Georges Basile Stavracas Neto
2017-03-14 21:51:37 -03:00
parent 39d871d2ef
commit 0b0dee101a
+2 -1
View File
@@ -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);
}