[metacity/cowbell] moved stuff out to cowbell_get_edge_sizes



commit e3bbac3bfd0e07f579fec805571aacdbab30511b
Author: Thomas Thurman <tthurman gnome org>
Date:   Mon Oct 19 09:48:11 2009 -0400

    moved stuff out to cowbell_get_edge_sizes

 src/ui/theme.c |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 3e84ed0..d0c37eb 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -571,6 +571,19 @@ meta_theme_draw_frame_with_style (MetaTheme              *theme,
   cairo_destroy (cr);
 }
 
+static void
+cowbell_get_edge_sizes (int *top,
+                        int *bottom,
+                        int *left,
+                        int *right)
+{
+  *top = SILLY_BORDER_SIZE;
+  *bottom = SILLY_BORDER_SIZE;
+  *left = SILLY_BORDER_SIZE;
+  *right = SILLY_BORDER_SIZE;
+}
+
+
 void
 meta_theme_get_frame_borders (MetaTheme         *theme,
                               MetaFrameType      type,
@@ -582,10 +595,10 @@ meta_theme_get_frame_borders (MetaTheme         *theme,
                               int               *right_width)
 {
   /* stub */
-  *top_height = SILLY_BORDER_SIZE;
-  *bottom_height = SILLY_BORDER_SIZE;
-  *left_width = SILLY_BORDER_SIZE;
-  *right_width = SILLY_BORDER_SIZE;
+  cowbell_get_edge_sizes (top_height,
+                          bottom_height,
+                          left_width,
+                          right_width);
 }
 
 #define MAX_MIDDLE_BACKGROUNDS (MAX_BUTTONS_PER_CORNER - 2)
@@ -619,10 +632,10 @@ meta_theme_calc_geometry (MetaTheme              *theme,
   int i;
 
   /* stub */
-  fgeom->left_width = SILLY_BORDER_SIZE;
-  fgeom->right_width = SILLY_BORDER_SIZE;
-  fgeom->top_height = SILLY_BORDER_SIZE;
-  fgeom->bottom_height = SILLY_BORDER_SIZE;
+  cowbell_get_edge_sizes (&(fgeom->top_height),
+                          &(fgeom->bottom_height),
+                          &(fgeom->left_width),
+                          &(fgeom->right_width));
 
   fgeom->width = 40+client_width;
   fgeom->height = 40+client_height;



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