[gnome-utils] Fix some issues when compiling with -DGSEAL_ENABLE. See bug #612485.



commit b8a2803bb164315e22bd8189f77cb1c1f482ecc6
Author: Andre Klapper <a9016009 gmx de>
Date:   Mon May 3 18:04:44 2010 +0200

    Fix some issues when compiling with -DGSEAL_ENABLE. See bug #612485.

 baobab/src/baobab-remote-connect-dialog.c |   26 +++++++++++++-------------
 baobab/src/baobab-utils.c                 |    2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/baobab/src/baobab-remote-connect-dialog.c b/baobab/src/baobab-remote-connect-dialog.c
index 2cb467a..d7d5fc2 100644
--- a/baobab/src/baobab-remote-connect-dialog.c
+++ b/baobab/src/baobab-remote-connect-dialog.c
@@ -279,12 +279,12 @@ connect_to_server (BaobabRemoteConnectDialog *dialog, GtkWindow *app)
 			g_free (t);
 		}
 
-		if (dialog->details->port_entry->parent != NULL) {
+		if (gtk_widget_get_parent (dialog->details->port_entry) != NULL) {
 			free_port = TRUE;
 			port = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->port_entry), 0, -1);
 		}
 		folder = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->folder_entry), 0, -1);
-		if (dialog->details->user_entry->parent != NULL) {
+		if (gtk_widget_get_parent (dialog->details->user_entry) != NULL) {
 			free_user = TRUE;
 			
 			t = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->user_entry), 0, -1);
@@ -293,7 +293,7 @@ connect_to_server (BaobabRemoteConnectDialog *dialog, GtkWindow *app)
 
 			g_free (t);
 		}
-		if (dialog->details->domain_entry->parent != NULL) {
+		if (gtk_widget_get_parent (dialog->details->domain_entry) != NULL) {
 			free_domain = TRUE;
 
 			domain = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->domain_entry), 0, -1);
@@ -403,31 +403,31 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
 	g_assert (index < G_N_ELEMENTS (methods) && index >= 0);
 	meth = &(methods[index]);
 
-	if (dialog->details->uri_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->uri_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->uri_entry);
 	}
-	if (dialog->details->server_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->server_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->server_entry);
 	}
-	if (dialog->details->share_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->share_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->share_entry);
 	}
-	if (dialog->details->port_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->port_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->port_entry);
 	}
-	if (dialog->details->folder_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->folder_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->folder_entry);
 	}
-	if (dialog->details->user_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->user_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->user_entry);
 	}
-	if (dialog->details->domain_entry->parent != NULL) {
+	if (gtk_widget_get_parent (dialog->details->domain_entry) != NULL) {
 		gtk_container_remove (GTK_CONTAINER (dialog->details->table),
 				      dialog->details->domain_entry);
 	}
@@ -620,7 +620,7 @@ port_insert_text (GtkEditable *editable,
 		if (!g_ascii_isdigit (new_text[pos])) {
 			GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (editable));
 			if (toplevel != NULL) {
-				gdk_window_beep (toplevel->window);
+				gdk_window_beep (gtk_widget_get_window (toplevel));
 			}
 		    g_signal_stop_emission_by_name (editable, "insert_text");
 		    return;
@@ -645,12 +645,12 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog)
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Connect to Server"));
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
 	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);
 	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
 	vbox = gtk_vbox_new (FALSE, 6);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
 			    vbox, FALSE, TRUE, 0);
 	gtk_widget_show (vbox);
 			    
diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c
index 7624f8f..2857c5c 100644
--- a/baobab/src/baobab-utils.c
+++ b/baobab/src/baobab-utils.c
@@ -279,7 +279,7 @@ messageyesno (const gchar *primary_msg,
 	                                          "%s", secondary_msg);
 
 	button = gtk_button_new_with_mnemonic (ok_button);
-	GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+	gtk_widget_set_can_default (button, TRUE);
 	gtk_widget_show (button);
 	
 	gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);



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