[gnome-panel] notification-area: don't connect to change_background signal



commit 9c6d738c8ce82772cbd67bbad970001383323ce6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jul 27 00:33:48 2016 +0300

    notification-area: don't connect to change_background signal
    
    It is emitted only for out-of-process applets.

 applets/notification_area/main.c    |   13 -------------
 applets/notification_area/na-tray.c |   31 -------------------------------
 applets/notification_area/na-tray.h |    1 -
 3 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 1d9a683..f807846 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -137,18 +137,6 @@ na_tray_applet_style_updated (GtkWidget *widget)
 }
 
 static void
-na_tray_applet_change_background (PanelApplet     *panel_applet,
-                                  cairo_pattern_t *pattern)
-{
-  NaTrayApplet *applet = NA_TRAY_APPLET (panel_applet);
-
-  if (!applet->priv->tray)
-    return;
-
-  na_tray_force_redraw (applet->priv->tray);
-}
-
-static void
 na_tray_applet_change_orient (PanelApplet       *panel_applet,
                               PanelAppletOrient  orient)
 {
@@ -170,7 +158,6 @@ na_tray_applet_class_init (NaTrayAppletClass *class)
   widget_class->realize = na_tray_applet_realize;
   widget_class->unrealize = na_tray_applet_unrealize;
   widget_class->style_updated = na_tray_applet_style_updated;
-  applet_class->change_background = na_tray_applet_change_background;
   applet_class->change_orient = na_tray_applet_change_orient;
 
   gtk_widget_class_install_style_property (
diff --git a/applets/notification_area/na-tray.c b/applets/notification_area/na-tray.c
index 96e8f8a..6fbee6b 100644
--- a/applets/notification_area/na-tray.c
+++ b/applets/notification_area/na-tray.c
@@ -47,8 +47,6 @@ struct _NaTrayPrivate
 
   GtkWidget *box;
 
-  guint idle_redraw_id;
-
   GtkOrientation orientation;
 };
 
@@ -668,12 +666,6 @@ na_tray_dispose (GObject *object)
 
   priv->trays_screen = NULL;
 
-  if (priv->idle_redraw_id != 0)
-    {
-      g_source_remove (priv->idle_redraw_id);
-      priv->idle_redraw_id = 0;
-    }
-
   G_OBJECT_CLASS (na_tray_parent_class)->dispose (object);
 }
 
@@ -797,18 +789,6 @@ na_tray_get_orientation (NaTray *tray)
   return tray->priv->orientation;
 }
 
-static gboolean
-idle_redraw_cb (NaTray *tray)
-{
-  NaTrayPrivate *priv = tray->priv;
-
-  gtk_container_foreach (GTK_CONTAINER (priv->box), (GtkCallback)na_tray_child_force_redraw, tray);
-  
-  priv->idle_redraw_id = 0;
-
-  return FALSE;
-}
-
 void
 na_tray_set_padding (NaTray *tray,
                      gint    padding)
@@ -841,14 +821,3 @@ na_tray_set_colors (NaTray   *tray,
   if (get_tray (priv->trays_screen) == tray)
     na_tray_manager_set_colors (priv->trays_screen->tray_manager, fg, error, warning, success);
 }
-
-void
-na_tray_force_redraw (NaTray *tray)
-{
-  NaTrayPrivate *priv = tray->priv;
-
-  /* Force the icons to redraw their backgrounds.
-   */
-  if (priv->idle_redraw_id == 0)
-    priv->idle_redraw_id = g_idle_add ((GSourceFunc) idle_redraw_cb, tray);
-}
diff --git a/applets/notification_area/na-tray.h b/applets/notification_area/na-tray.h
index f06bfc6..c7bc443 100644
--- a/applets/notification_area/na-tray.h
+++ b/applets/notification_area/na-tray.h
@@ -67,7 +67,6 @@ void            na_tray_set_colors      (NaTray        *tray,
                                         GdkRGBA       *error,
                                         GdkRGBA       *warning,
                                         GdkRGBA       *success);
-void           na_tray_force_redraw    (NaTray        *tray);
 
 G_END_DECLS
 


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