[libgd/wip/ernestask/gtk4: 1/4] notification: remove visibility_notify_event override



commit c3dbe3e6f5d0739da09b2cfeddf9573c2a3a0437
Author: Ernestas Kulik <ernestask gnome org>
Date:   Sun Mar 11 10:10:04 2018 +0200

    notification: remove visibility_notify_event override
    
    The event no longer exists, so the bulk of the handler is moved to the
    show/hide overrides.

 libgd/gd-notification.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libgd/gd-notification.c b/libgd/gd-notification.c
index 0e94796..150afe1 100644
--- a/libgd/gd-notification.c
+++ b/libgd/gd-notification.c
@@ -57,7 +57,6 @@ struct _GdNotificationPrivate {
   GdkWindow *bin_window;
 
   int animate_y; /* from 0 to allocation.height */
-  gboolean waiting_for_viewable;
   gboolean revealed;
   gboolean dismissed;
   gboolean sent_dismissed;
@@ -294,7 +293,9 @@ gd_notification_show (GtkWidget *widget)
 
   GTK_WIDGET_CLASS (gd_notification_parent_class)->show (widget);
   priv->revealed = TRUE;
-  priv->waiting_for_viewable = TRUE;
+
+  start_animation (notification);
+  queue_autohide (notification);
 }
 
 static void
@@ -303,9 +304,12 @@ gd_notification_hide (GtkWidget *widget)
   GdNotification *notification = GD_NOTIFICATION (widget);
   GdNotificationPrivate *priv = notification->priv;
 
+  unqueue_autohide (notification);
+
   GTK_WIDGET_CLASS (gd_notification_parent_class)->hide (widget);
   priv->revealed = FALSE;
-  priv->waiting_for_viewable = FALSE;
+
+  start_animation (notification);
 }
 
 static void
@@ -384,7 +388,6 @@ gd_notification_class_init (GdNotificationClass *klass)
   widget_class->destroy = gd_notification_destroy;
   widget_class->measure = gd_notification_measure;
   widget_class->size_allocate = gd_notification_size_allocate;
-  widget_class->visibility_notify_event = gd_notification_visibility_notify_event;
 
   container_class->add = gd_notification_add;
   container_class->forall = gd_notification_forall;


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