[gnome-builder] gui: clear popover before hiding notifications button
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gui: clear popover before hiding notifications button
- Date: Fri, 30 Aug 2019 23:47:12 +0000 (UTC)
commit 8cc3e96c410c96717fe6c4440e9bb76da648acbf
Author: Christian Hergert <chergert redhat com>
Date: Fri Aug 30 16:47:10 2019 -0700
gui: clear popover before hiding notifications button
src/libide/gui/ide-notifications-button.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/gui/ide-notifications-button.c b/src/libide/gui/ide-notifications-button.c
index 4dd2c9efa..8bc4a1659 100644
--- a/src/libide/gui/ide-notifications-button.c
+++ b/src/libide/gui/ide-notifications-button.c
@@ -127,8 +127,20 @@ ide_notifications_button_notify_has_progress_cb (IdeNotificationsButton *self,
*/
if (GTK_IS_REVEALER (parent))
{
- gtk_revealer_set_reveal_child (GTK_REVEALER (parent),
- ide_notifications_get_has_progress (notifications));
+ if (ide_notifications_get_has_progress (notifications))
+ {
+ gtk_revealer_set_reveal_child (GTK_REVEALER (parent), TRUE);
+ }
+ else
+ {
+ GtkPopover *popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (self));
+
+ if (gtk_widget_get_visible (GTK_WIDGET (popover)))
+ gtk_widget_hide (GTK_WIDGET (popover));
+
+ gtk_revealer_set_reveal_child (GTK_REVEALER (parent), FALSE);
+ }
+
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]