[empathy: 9/18] Factor out empathy_call_window_darken_preview_rectangle



commit c0a10ef3094f82a9d0532e942b0b27d7f34f0201
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Wed Aug 10 10:16:40 2011 +0100

    Factor out empathy_call_window_darken_preview_rectangle
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656268

 src/empathy-call-window.c |   37 +++++++++++++++++--------------------
 1 files changed, 17 insertions(+), 20 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index c8dc182..feb16a3 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -726,31 +726,28 @@ empathy_call_window_highlight_preview_rectangle (EmpathyCallWindow *self,
 }
 
 static void
-empathy_call_window_darken_preview_rectangles (EmpathyCallWindow *self)
+empathy_call_window_darken_preview_rectangle (EmpathyCallWindow *self,
+    ClutterActor *rectangle)
 {
-  clutter_rectangle_set_border_width (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle1), 1);
-  clutter_rectangle_set_border_color (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle1),
+  clutter_rectangle_set_border_width (CLUTTER_RECTANGLE (rectangle), 1);
+  clutter_rectangle_set_border_color (CLUTTER_RECTANGLE (rectangle),
       CLUTTER_COLOR_Black);
+}
 
-  clutter_rectangle_set_border_width (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle2), 1);
-  clutter_rectangle_set_border_color (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle2),
-      CLUTTER_COLOR_Black);
+static void
+empathy_call_window_darken_preview_rectangles (EmpathyCallWindow *self)
+{
+  empathy_call_window_darken_preview_rectangle (self,
+      self->priv->preview_rectangle1);
 
-  clutter_rectangle_set_border_width (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle3), 1);
-  clutter_rectangle_set_border_color (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle3),
-      CLUTTER_COLOR_Black);
+  empathy_call_window_darken_preview_rectangle (self,
+      self->priv->preview_rectangle2);
 
-  clutter_rectangle_set_border_width (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle4), 1);
-  clutter_rectangle_set_border_color (
-      CLUTTER_RECTANGLE (self->priv->preview_rectangle4),
-      CLUTTER_COLOR_Black);
+  empathy_call_window_darken_preview_rectangle (self,
+      self->priv->preview_rectangle3);
+
+  empathy_call_window_darken_preview_rectangle (self,
+      self->priv->preview_rectangle4);
 }
 
 static void



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