[gnome-bluetooth] Use accessor functions instead direct access. (GnomeBug:587418)



commit 126cea66ff77c370f7f06e6be4f3b51f17592a9c
Author: Javier Jardón <javierjc1982 gmail com>
Date:   Tue Jun 30 14:06:01 2009 +0200

    Use accessor functions instead direct access. (GnomeBug:587418)
    
    * lib/bling-spinner.c
    	(bling_spinner_expose)
    	* lib/bluetooth-chooser-button.c
    	(bluetooth_chooser_button_clicked),
    	(bluetooth_chooser_button_clicked)
    	* lib/test-deviceselection.c
    	(create_phone_dialogue), (reate_dialogue),
    	(create_wizard_dialogue), (create_props_dialogue)

 lib/bling-spinner.c            |    2 +-
 lib/bluetooth-chooser-button.c |    4 ++--
 lib/test-deviceselection.c     |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/lib/bling-spinner.c b/lib/bling-spinner.c
index d1dff38..34a41c1 100644
--- a/lib/bling-spinner.c
+++ b/lib/bling-spinner.c
@@ -171,7 +171,7 @@ bling_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
 	cairo_t *cr;
 
 	/* get cairo context */
-	cr = gdk_cairo_create (widget->window);
+	cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
 	/* set a clip region for the expose event */
 	cairo_rectangle (cr,
diff --git a/lib/bluetooth-chooser-button.c b/lib/bluetooth-chooser-button.c
index 258ce0c..ccc0650 100644
--- a/lib/bluetooth-chooser-button.c
+++ b/lib/bluetooth-chooser-button.c
@@ -201,7 +201,7 @@ bluetooth_chooser_button_clicked (GtkButton *widget)
 	gtk_window_set_default_size (GTK_WINDOW(button->dialog), 480, 400);
 
 	gtk_container_set_border_width (GTK_CONTAINER (button->dialog), 5);
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (button->dialog)->vbox), 2);
+	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (button->dialog))), 2);
 
 	/* Create the button->chooser */
 	button->chooser = bluetooth_chooser_new (NULL);
@@ -212,7 +212,7 @@ bluetooth_chooser_button_clicked (GtkButton *widget)
 		       0, button->chooser);
 	gtk_container_set_border_width (GTK_CONTAINER(button->chooser), 5);
 	gtk_widget_show (button->chooser);
-	gtk_container_add (GTK_CONTAINER(GTK_DIALOG(button->dialog)->vbox), button->chooser);
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (button->dialog))), button->chooser);
 
 	gtk_widget_show (button->dialog);
 }
diff --git a/lib/test-deviceselection.c b/lib/test-deviceselection.c
index c1159a7..0e16717 100644
--- a/lib/test-deviceselection.c
+++ b/lib/test-deviceselection.c
@@ -139,7 +139,7 @@ create_phone_dialogue (const char *bdaddr)
 			  G_CALLBACK (is_available_changed), NULL);
 	is_available_changed (G_OBJECT (button), NULL, NULL);
 	gtk_widget_show (button);
-	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), button);
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), button);
 
 	return dialog;
 }
@@ -159,7 +159,7 @@ create_dialogue (const char *title)
 	gtk_window_set_default_size(GTK_WINDOW(dialog), 480, 400);
 
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
 
 	return dialog;
 }
@@ -210,7 +210,7 @@ create_wizard_dialogue (void)
 			 G_CALLBACK(device_type_filter_selected_cb), dialog);
 	g_signal_connect(selector, "notify::device-category-filter",
 			 G_CALLBACK(device_category_filter_selected_cb), dialog);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), selector);
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG(dialog))), selector);
 	bluetooth_chooser_start_discovery (BLUETOOTH_CHOOSER (selector));
 
 	g_signal_connect (G_OBJECT (dialog), "response",
@@ -246,7 +246,7 @@ create_props_dialogue (void)
 			 G_CALLBACK(device_type_filter_selected_cb), dialog);
 	g_signal_connect(selector, "notify::device-category-filter",
 			 G_CALLBACK(device_category_filter_selected_cb), dialog);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), selector);
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG(dialog))), selector);
 
 	g_signal_connect (G_OBJECT (dialog), "response",
 			  G_CALLBACK (response_cb), selector);



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