[gnome-settings-daemon] Compile with -DGSEAL_ENABLE. Fixes bug 612588.



commit 12bb2a2442e9f6fed2c59fe2e8bb7503cb4ac07c
Author: Andre Klapper <a9016009 gmx de>
Date:   Mon Apr 12 22:35:56 2010 +0200

    Compile with -DGSEAL_ENABLE. Fixes bug 612588.

 .../a11y-keyboard/gsd-a11y-preferences-dialog.c    |    2 +-
 plugins/common/gsd-osd-window.c                    |    7 ++++-
 plugins/housekeeping/gsd-ldsm-dialog.c             |    4 +-
 plugins/housekeeping/gsd-ldsm-trash-empty.c        |    6 ++--
 plugins/mouse/gsd-locate-pointer.c                 |    4 ++-
 plugins/xrandr/gsd-xrandr-manager.c                |   24 ++++++++++---------
 6 files changed, 27 insertions(+), 20 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
index d731dd3..f3f60dc 100644
--- a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
+++ b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
@@ -907,7 +907,7 @@ gsd_a11y_preferences_dialog_init (GsdA11yPreferencesDialog *dialog)
 
                 widget = GTK_WIDGET (gtk_builder_get_object (builder,
                                                              "main_box"));
-                gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+                gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
                                    widget);
                 gtk_container_set_border_width (GTK_CONTAINER (widget), 12);
                 setup_dialog (dialog, builder);
diff --git a/plugins/common/gsd-osd-window.c b/plugins/common/gsd-osd-window.c
index c442bbc..91b9826 100644
--- a/plugins/common/gsd-osd-window.c
+++ b/plugins/common/gsd-osd-window.c
@@ -309,9 +309,12 @@ static void
 expose_when_not_composited (GtkWidget *widget, GdkEventExpose *event)
 {
 	GsdOsdWindow *window;
+	GtkAllocation allocation;
 
 	window = GSD_OSD_WINDOW (widget);
 
+	gtk_widget_get_allocation (widget, &allocation);
+
 	gtk_paint_shadow (gtk_widget_get_style (widget),
 			  gtk_widget_get_window (widget),
 			  gtk_widget_get_state (widget),
@@ -321,8 +324,8 @@ expose_when_not_composited (GtkWidget *widget, GdkEventExpose *event)
 			  NULL, /* NULL detail -> themes should use the GsdOsdWindow widget name, probably */
 			  0,
 			  0,
-			  widget->allocation.width,
-			  widget->allocation.height);
+			  allocation.width,
+			  allocation.height);
 }
 
 static gboolean
diff --git a/plugins/housekeeping/gsd-ldsm-dialog.c b/plugins/housekeeping/gsd-ldsm-dialog.c
index fbab022..b0e40ad 100644
--- a/plugins/housekeeping/gsd-ldsm-dialog.c
+++ b/plugins/housekeeping/gsd-ldsm-dialog.c
@@ -254,8 +254,8 @@ gsd_ldsm_dialog_init (GsdLdsmDialog *dialog)
         gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 						
         /* Set up the action area */
-        gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
-        gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
+        gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 6);
+        gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 5);
 	
         gtk_widget_show_all (hbox);
 }
diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.c b/plugins/housekeeping/gsd-ldsm-trash-empty.c
index 18f5b90..c875f15 100644
--- a/plugins/housekeeping/gsd-ldsm-trash-empty.c
+++ b/plugins/housekeeping/gsd-ldsm-trash-empty.c
@@ -268,7 +268,7 @@ trash_empty_start ()
         gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR (progressbar), 0.1);
         gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar), _("Preparing to empty trash..."));
 
-        gtk_box_pack_start (GTK_BOX (GTK_DIALOG (trash_empty_dialog)->vbox), vbox1, TRUE, TRUE, 0);
+        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (trash_empty_dialog))), vbox1, TRUE, TRUE, 0);
         gtk_box_pack_start (GTK_BOX (vbox1), label1, TRUE, TRUE, 0);
         gtk_box_pack_start (GTK_BOX (hbox), label3, FALSE, TRUE, 0);
         gtk_box_pack_start (GTK_BOX (hbox), location_label, TRUE, TRUE, 0);
@@ -283,7 +283,7 @@ trash_empty_start ()
         gtk_widget_show (hbox);
         gtk_widget_show (location_label);
 
-        gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (trash_empty_dialog)->vbox), 6);
+        gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (trash_empty_dialog))), 6);
         gtk_container_set_border_width (GTK_CONTAINER (vbox1), 6);
 
         gtk_dialog_add_button (GTK_DIALOG (trash_empty_dialog),
@@ -366,7 +366,7 @@ trash_empty_show_confirmation_dialog ()
 
         button = gtk_button_new_with_mnemonic (_("_Empty Trash"));
         gtk_widget_show (button);
-        GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+        gtk_widget_set_can_default (button, TRUE);
 
         gtk_dialog_add_action_widget (GTK_DIALOG (trash_empty_confirm_dialog),
                                       button, GTK_RESPONSE_YES);
diff --git a/plugins/mouse/gsd-locate-pointer.c b/plugins/mouse/gsd-locate-pointer.c
index 5488f98..bcc7912 100644
--- a/plugins/mouse/gsd-locate-pointer.c
+++ b/plugins/mouse/gsd-locate-pointer.c
@@ -58,10 +58,12 @@ locate_pointer_paint (GsdLocatePointerData *data,
   GdkColor color;
   gdouble progress, circle_progress;
   gint width, height, i;
+  GtkStyle *style;
 
   progress = data->progress;
   gdk_drawable_get_size (data->window, &width, &height);
-  color = data->widget->style->bg[GTK_STATE_SELECTED];
+  style = gtk_widget_get_style (data->widget);
+  color = style->bg[GTK_STATE_SELECTED];
 
   cairo_set_source_rgba (cr, 1., 1., 1., 0.);
   cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 9788931..c2349dd 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1484,6 +1484,7 @@ output_title_label_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gp
         GnomeOutputInfo *output;
         GdkColor color;
         cairo_t *cr;
+        GtkAllocation allocation;
 
         g_assert (GTK_IS_LABEL (widget));
 
@@ -1496,23 +1497,24 @@ output_title_label_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gp
 
         gnome_rr_labeler_get_color_for_output (priv->labeler, output, &color);
 
-        cr = gdk_cairo_create (widget->window);
+        cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
         cairo_set_source_rgb (cr, 0, 0, 0);
         cairo_set_line_width (cr, OUTPUT_TITLE_ITEM_BORDER);
+        gtk_widget_get_allocation (widget, &allocation);
         cairo_rectangle (cr,
-                         widget->allocation.x + OUTPUT_TITLE_ITEM_BORDER / 2.0,
-                         widget->allocation.y + OUTPUT_TITLE_ITEM_BORDER / 2.0,
-                         widget->allocation.width - OUTPUT_TITLE_ITEM_BORDER,
-                         widget->allocation.height - OUTPUT_TITLE_ITEM_BORDER);
+                         allocation.x + OUTPUT_TITLE_ITEM_BORDER / 2.0,
+                         allocation.y + OUTPUT_TITLE_ITEM_BORDER / 2.0,
+                         allocation.width - OUTPUT_TITLE_ITEM_BORDER,
+                         allocation.height - OUTPUT_TITLE_ITEM_BORDER);
         cairo_stroke (cr);
 
         gdk_cairo_set_source_color (cr, &color);
         cairo_rectangle (cr,
-                         widget->allocation.x + OUTPUT_TITLE_ITEM_BORDER,
-                         widget->allocation.y + OUTPUT_TITLE_ITEM_BORDER,
-                         widget->allocation.width - 2 * OUTPUT_TITLE_ITEM_BORDER,
-                         widget->allocation.height - 2 * OUTPUT_TITLE_ITEM_BORDER);
+                         allocation.x + OUTPUT_TITLE_ITEM_BORDER,
+                         allocation.y + OUTPUT_TITLE_ITEM_BORDER,
+                         allocation.width - 2 * OUTPUT_TITLE_ITEM_BORDER,
+                         allocation.height - 2 * OUTPUT_TITLE_ITEM_BORDER);
 
         cairo_fill (cr);
 
@@ -1527,7 +1529,7 @@ output_title_label_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gp
          * Yay for fucking with GTK+'s internals.
          */
 
-        widget->state = GTK_STATE_NORMAL;
+        gtk_widget_set_state (widget, GTK_STATE_NORMAL);
 
         return FALSE;
 }
@@ -1537,7 +1539,7 @@ static gboolean
 output_title_label_after_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 {
         g_assert (GTK_IS_LABEL (widget));
-        widget->state = GTK_STATE_INSENSITIVE;
+        gtk_widget_set_state (widget, GTK_STATE_INSENSITIVE);
 
         return FALSE;
 }



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