[gnome-control-center] Make build works with GSEAL



commit 91c5e26bcfea3e7fff024ca24065cf05981a9058
Author: Jonh Wendell <jwendell gnome org>
Date:   Fri Jun 25 10:31:34 2010 -0300

    Make build works with GSEAL

 capplets/appearance/appearance-font.c |    2 +-
 capplets/common/theme-thumbnail.c     |    2 +-
 panels/display/scrollarea.c           |   30 +++++++++++++++++++-----------
 shell/cc-shell-category-view.c        |    9 +++++----
 shell/gnome-control-center.c          |   13 ++++++++-----
 5 files changed, 34 insertions(+), 22 deletions(-)
---
diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c
index 7775f3d..ccf7c3f 100644
--- a/capplets/appearance/appearance-font.c
+++ b/capplets/appearance/appearance-font.c
@@ -269,7 +269,7 @@ setup_font_sample (GtkWidget   *darea,
   width = extents1.xOff + extents2.xOff + 4;
   height = ascent + descent + 2;
 
-  pixmap = gdk_pixmap_new (NULL, width, height, visual->depth);
+  pixmap = gdk_pixmap_new (NULL, width, height, gdk_visual_get_depth (visual));
 
   draw = XftDrawCreate (xdisplay, GDK_DRAWABLE_XID (pixmap), xvisual, xcolormap);
 
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index bf960cd..b7abe7b 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -112,7 +112,7 @@ draw_window_on_pixbuf (GtkWidget *widget)
   gtk_window_get_size (GTK_WINDOW (widget), &width, &height);
 
   visual = gtk_widget_get_visual (widget);
-  pixmap = gdk_pixmap_new (NULL, width, height, visual->depth);
+  pixmap = gdk_pixmap_new (NULL, width, height, gdk_visual_get_depth (visual));
   gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), gtk_widget_get_colormap (widget));
 
   window = gtk_widget_get_window (widget);
diff --git a/panels/display/scrollarea.c b/panels/display/scrollarea.c
index 6972940..518e7a8 100644
--- a/panels/display/scrollarea.c
+++ b/panels/display/scrollarea.c
@@ -500,24 +500,32 @@ setup_background_cr (GdkWindow *window,
 		     int        x_offset,
 		     int        y_offset)
 {
-    GdkWindowObject *private = (GdkWindowObject *)window;
-    
-    if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
+    GdkPixmap *pixmap;
+    GdkWindow *parent;
+    gint x, y;
+    GdkColor bg_color;
+
+    gdk_window_get_back_pixmap (window, &pixmap, NULL);
+    parent = gdk_window_get_effective_parent (window);
+    gdk_window_get_geometry (window, &x, &y, NULL, NULL, NULL);
+    gdk_window_get_background (window, &bg_color);
+
+    if (pixmap == GDK_PARENT_RELATIVE_BG && parent)
     {
-	x_offset += private->x;
-	y_offset += private->y;
+	x_offset += x;
+	y_offset += y;
 	
-	setup_background_cr (GDK_WINDOW (private->parent), cr, x_offset, y_offset);
+	setup_background_cr (parent, cr, x_offset, y_offset);
     }
-    else if (private->bg_pixmap &&
-	     private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
-	     private->bg_pixmap != GDK_NO_BG)
+    else if (pixmap &&
+	     pixmap != GDK_PARENT_RELATIVE_BG &&
+	     pixmap != GDK_NO_BG)
     {
-	gdk_cairo_set_source_pixmap (cr, private->bg_pixmap, -x_offset, -y_offset);
+	gdk_cairo_set_source_pixmap (cr, pixmap, -x_offset, -y_offset);
     }
     else
     {
-	gdk_cairo_set_source_color (cr, &private->bg_color);
+	gdk_cairo_set_source_color (cr, &bg_color);
     }
 }
 
diff --git a/shell/cc-shell-category-view.c b/shell/cc-shell-category-view.c
index 298507c..0436954 100644
--- a/shell/cc-shell-category-view.c
+++ b/shell/cc-shell-category-view.c
@@ -168,21 +168,22 @@ cc_shell_category_view_style_set (GtkWidget *widget,
                                   GtkStyle  *old_style)
 {
   CcShellCategoryViewPrivate *priv = CC_SHELL_CATEGORY_VIEW (widget)->priv;
+  GtkStyle *style = gtk_widget_get_style (widget);
 
   if (priv->header)
     {
       gtk_widget_modify_bg (priv->header, GTK_STATE_NORMAL,
-                            &widget->style->base[GTK_STATE_NORMAL]);
+                            &style->base[GTK_STATE_NORMAL]);
       gtk_widget_modify_fg (priv->header, GTK_STATE_NORMAL,
-                            &widget->style->text[GTK_STATE_NORMAL]);
+                            &style->text[GTK_STATE_NORMAL]);
     }
 
   if (priv->iconview)
     {
       gtk_widget_modify_bg (priv->iconview, GTK_STATE_NORMAL,
-                            &widget->style->base[GTK_STATE_NORMAL]);
+                            &style->base[GTK_STATE_NORMAL]);
       gtk_widget_modify_fg (priv->iconview, GTK_STATE_NORMAL,
-                            &widget->style->text[GTK_STATE_NORMAL]);
+                            &style->text[GTK_STATE_NORMAL]);
     }
 }
 
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index b37ab2d..ee5e2b7 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -867,8 +867,9 @@ static void
 gnome_control_center_init (GnomeControlCenter *self)
 {
   GError *err = NULL;
-  GtkWidget *vbox;
+  GtkWidget *vbox, *parent;
   GnomeControlCenterPrivate *priv;
+  GtkStyle *style;
 
   priv = self->priv = CONTROL_CENTER_PRIVATE (self);
 
@@ -901,10 +902,12 @@ gnome_control_center_init (GnomeControlCenter *self)
   vbox = W (priv->builder, "main-vbox");
   gtk_widget_set_size_request (vbox, 0, -1);
 
-  gtk_widget_modify_bg (vbox->parent, GTK_STATE_NORMAL,
-                        &vbox->style->base[GTK_STATE_NORMAL]);
-  gtk_widget_modify_fg (vbox->parent, GTK_STATE_NORMAL,
-                        &vbox->style->text[GTK_STATE_NORMAL]);
+  parent = gtk_widget_get_parent (vbox);
+  style = gtk_widget_get_style (vbox);
+  gtk_widget_modify_bg (parent, GTK_STATE_NORMAL,
+                        &style->base[GTK_STATE_NORMAL]);
+  gtk_widget_modify_fg (parent, GTK_STATE_NORMAL,
+                        &style->text[GTK_STATE_NORMAL]);
 
   /* load the available settings panels */
   fill_model (self);



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