[gnome-system-tools] Initial patch fixing some issues when building with -DGSEAL_ENABLE



commit 3477c4a6ade2a01ffd3eddbedac489485b6dc9ed
Author: Andre Klapper <a9016009 gmx de>
Date:   Thu Mar 11 23:27:27 2010 +0100

    Initial patch fixing some issues when building with -DGSEAL_ENABLE

 configure.in                     |    2 +-
 src/common/gst-dialog.c          |   20 ++++++++++----------
 src/common/gst-platform-dialog.c |    2 +-
 src/network/callbacks.c          |    8 ++++----
 src/network/connection.c         |   16 ++++++++--------
 src/network/locations-combo.c    |    2 +-
 6 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/configure.in b/configure.in
index db2e163..ed231bc 100644
--- a/configure.in
+++ b/configure.in
@@ -30,7 +30,7 @@ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 
 STB_REQUIRED=2.9.4
 LIBOOBS_REQUIRED=2.29.91
-GTK_REQUIRED=2.16
+GTK_REQUIRED=2.19.7
 GLIB_REQUIRED=2.15.2
 GCONF_REQUIRED=2.2.0
 DBUS_REQUIRED=0.32
diff --git a/src/common/gst-dialog.c b/src/common/gst-dialog.c
index a9d00ca..8fd3397 100644
--- a/src/common/gst-dialog.c
+++ b/src/common/gst-dialog.c
@@ -217,7 +217,7 @@ gst_dialog_constructor (GType                  type,
 		priv->child = gst_dialog_get_widget (dialog, priv->widget_name);
 		toplevel = gtk_widget_get_toplevel (priv->child);
 
-		if (GTK_WIDGET_TOPLEVEL (priv->child)) {
+		if (gtk_widget_is_toplevel (priv->child)) {
 			g_critical ("The widget \"%s\" should not be a toplevel widget in the .ui file\n"
 				    "You just need to add the widget inside a GtkWindow so that it can be deparented.", priv->widget_name);
 
@@ -226,8 +226,8 @@ gst_dialog_constructor (GType                  type,
 		}
 
 		g_object_ref (priv->child);
-		gtk_container_remove (GTK_CONTAINER (priv->child->parent), priv->child);
-		gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), priv->child);
+		gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (priv->child)), priv->child);
+		gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), priv->child);
 
 		gtk_widget_destroy (toplevel);
 	}
@@ -320,7 +320,7 @@ gst_dialog_response (GtkDialog *dialog,
 	switch (response) {
 	case GTK_RESPONSE_CLOSE:
 	case GTK_RESPONSE_DELETE_EVENT:
-		if (GTK_WIDGET_SENSITIVE (dialog)) {
+		if (gtk_widget_get_sensitive (GTK_WIDGET (dialog))) {
 			gtk_widget_hide (GTK_WIDGET (dialog));
 			gst_tool_close (priv->tool);
 		}
@@ -416,10 +416,10 @@ gst_dialog_set_cursor (GstDialog     *dialog,
 {
 	GdkCursor *cursor;
 
-	g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
+	g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (dialog)));
 
 	cursor = gdk_cursor_new (GDK_WATCH);
-	gdk_window_set_cursor (GTK_WIDGET (dialog)->window, cursor);
+	gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog)), cursor);
 	gdk_cursor_unref (cursor);
 }
 
@@ -433,7 +433,7 @@ gst_dialog_freeze (GstDialog *dialog)
 	priv = GST_DIALOG_GET_PRIVATE (dialog);
 
 	if (priv->frozen == 0) {
-		if (GTK_WIDGET (dialog)->window)
+		if (gtk_widget_get_window (GTK_WIDGET (dialog)))
 			gst_dialog_set_cursor (dialog, GDK_WATCH);
 
 		gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
@@ -456,8 +456,8 @@ gst_dialog_thaw (GstDialog *dialog)
 	priv->frozen--;
 
 	if (priv->frozen == 0) {
-		if (GTK_WIDGET (dialog)->window)
-			gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+		if (gtk_widget_get_window (GTK_WIDGET (dialog)))
+			gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog)), NULL);
 
 		gtk_widget_set_sensitive (GTK_WIDGET (dialog), TRUE);
 	}
@@ -549,7 +549,7 @@ gst_dialog_require_authentication_for_widget (GstDialog *xd, GtkWidget *w)
 	priv = GST_DIALOG_GET_PRIVATE (xd);
 	policy = g_new0 (GstWidgetPolicy, 1);
 
-	policy->was_sensitive = GTK_WIDGET_SENSITIVE (w);
+	policy->was_sensitive = gtk_widget_get_sensitive (w);
 
 	g_object_set_qdata_full (G_OBJECT (w), widget_policy_quark,
 				 policy, (GDestroyNotify) g_free);
diff --git a/src/common/gst-platform-dialog.c b/src/common/gst-platform-dialog.c
index 8fd8797..7c56a1d 100644
--- a/src/common/gst-platform-dialog.c
+++ b/src/common/gst-platform-dialog.c
@@ -204,7 +204,7 @@ gst_platform_dialog_init (GstPlatformDialog *dialog)
 	gtk_box_pack_start (GTK_BOX (box), scrolled_window, TRUE, TRUE, 0);
 	gtk_widget_show_all (box);
 
-	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), box);
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), box);
 
 	priv->cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
 	priv->ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
diff --git a/src/network/callbacks.c b/src/network/callbacks.c
index b5552c6..a3c91e3 100644
--- a/src/network/callbacks.c
+++ b/src/network/callbacks.c
@@ -275,12 +275,12 @@ on_detect_modem_clicked (GtkWidget *widget, gpointer data)
   dialog = network_tool->dialog;
 
   /* give some feedback to let know the user that the tool is busy */
-  gtk_entry_set_text (GTK_ENTRY (GTK_BIN (GTK_COMBO_BOX (dialog->serial_port))->child), "");
+  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (GTK_COMBO_BOX (dialog->serial_port)))), "");
   gtk_widget_set_sensitive (dialog->serial_port, FALSE);
   gtk_widget_set_sensitive (dialog->detect_modem, FALSE);
 
   cursor = gdk_cursor_new (GDK_WATCH);
-  gdk_window_set_cursor (GTK_WIDGET (dialog->dialog)->window, cursor);
+  gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog->dialog)), cursor);
   gdk_cursor_unref (cursor);
 
   dev = connection_detect_modem ();
@@ -288,7 +288,7 @@ on_detect_modem_clicked (GtkWidget *widget, gpointer data)
   /* remove the user feedback */
   gtk_widget_set_sensitive (dialog->detect_modem, TRUE);
   gtk_widget_set_sensitive (dialog->serial_port, TRUE);
-  gdk_window_set_cursor (GTK_WIDGET (dialog->dialog)->window, NULL);
+  gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog->dialog)), NULL);
 
   if (!dev || !*dev)
     {
@@ -306,7 +306,7 @@ on_detect_modem_clicked (GtkWidget *widget, gpointer data)
       gtk_widget_destroy (d);
     }
   else
-    gtk_entry_set_text (GTK_ENTRY (GTK_BIN (GTK_COMBO_BOX (dialog->serial_port))->child), dev);
+    gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (GTK_COMBO_BOX (dialog->serial_port)))), dev);
 
   g_free (dev);
 }
diff --git a/src/network/connection.c b/src/network/connection.c
index 3193c13..35940d1 100644
--- a/src/network/connection.c
+++ b/src/network/connection.c
@@ -140,7 +140,7 @@ connection_essids_combo_init (GtkComboBoxEntry *combo)
   /* reuse text cell renderer for the essid */
   gtk_combo_box_entry_set_text_column (combo, 1);
 
-  g_signal_connect (GTK_BIN (combo)->child, "changed",
+  g_signal_connect (gtk_bin_get_child (GTK_BIN (combo)), "changed",
 		    G_CALLBACK (on_dialog_changed), tool);
 }
 
@@ -314,7 +314,7 @@ wireless_dialog_prepare (GstConnectionDialog *dialog)
 		NULL);
 
   connection_combo_set_value (GTK_COMBO_BOX (dialog->key_type_combo), key_type);
-  gtk_entry_set_text (GTK_ENTRY (GTK_BIN (dialog->essid)->child), (essid) ? essid : "");
+  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (dialog->essid))), (essid) ? essid : "");
   gtk_entry_set_text (GTK_ENTRY (dialog->wep_key), (key) ? key : "");
 
 #ifdef HAVE_LIBIW_H
@@ -337,7 +337,7 @@ wireless_dialog_save (GstConnectionDialog *dialog)
 
   key_type = connection_combo_get_value (GTK_COMBO_BOX (dialog->key_type_combo));
   g_object_set (G_OBJECT (dialog->iface),
-		"essid",   get_entry_text (GTK_BIN (dialog->essid)->child),
+		"essid",   get_entry_text (gtk_bin_get_child (GTK_BIN (dialog->essid))),
 		"key", get_entry_text (dialog->wep_key),
 		"key-type", key_type,
 		NULL);
@@ -347,7 +347,7 @@ wireless_dialog_save (GstConnectionDialog *dialog)
 static gboolean
 wireless_dialog_check_fields (GstConnectionDialog *dialog)
 {
-  return (get_entry_text (GTK_BIN (dialog->essid)->child) != NULL);
+  return (get_entry_text (gtk_bin_get_child (GTK_BIN (dialog->essid))) != NULL);
 }
 
 static void
@@ -436,7 +436,7 @@ ppp_dialog_prepare (GstConnectionDialog *dialog)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->peerdns), peerdns);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->persist), persist);
 
-  gtk_entry_set_text (GTK_ENTRY (GTK_BIN (dialog->serial_port)->child),
+  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (dialog->serial_port))),
                       (serial_port) ? serial_port : "");
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->volume), volume);
@@ -479,7 +479,7 @@ ppp_dialog_save (GstConnectionDialog *dialog)
                 "default-gateway", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->default_gw)),
                 "use-peer-dns", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->peerdns)),
                 "persistent",   gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->persist)),
-                "serial-port",  get_entry_text (GTK_BIN (dialog->serial_port)->child),
+                "serial-port",  get_entry_text (gtk_bin_get_child (GTK_BIN (dialog->serial_port))),
                 "volume",       gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->volume)),
                 "dial-type",    gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->dial_type)),
 		"apn",          get_entry_text (dialog->apn),
@@ -509,7 +509,7 @@ ppp_dialog_check_fields (GstConnectionDialog *dialog)
   if (strcmp (connection_type, "modem") == 0)
     valid = (get_entry_text (dialog->login) &&
 	     get_entry_text (dialog->phone_number) &&
-	     get_entry_text (GTK_BIN (dialog->serial_port)->child));
+	     get_entry_text (gtk_bin_get_child (GTK_BIN (dialog->serial_port))));
   else if (strcmp (connection_type, "isdn") == 0)
     valid = (get_entry_text (dialog->login) &&
 	     get_entry_text (dialog->phone_number));
@@ -518,7 +518,7 @@ ppp_dialog_check_fields (GstConnectionDialog *dialog)
 	     gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->pppoe_interface_combo)) != -1);
   else if (strcmp (connection_type, "gprs") == 0)
     valid = (get_entry_text (dialog->apn) &&
-	     get_entry_text (GTK_BIN (dialog->serial_port)->child));
+	     get_entry_text (gtk_bin_get_child (GTK_BIN (dialog->serial_port))));
 
   g_free (connection_type);
 
diff --git a/src/network/locations-combo.c b/src/network/locations-combo.c
index 87f9ad6..05ce848 100644
--- a/src/network/locations-combo.c
+++ b/src/network/locations-combo.c
@@ -381,7 +381,7 @@ on_save_button_clicked (GtkWidget *widget, gpointer data)
       gtk_box_pack_start (GTK_BOX (hbox), priv->location_entry, TRUE, TRUE, 0);
 
       gtk_widget_show_all (hbox);
-      gtk_container_add (GTK_CONTAINER (GTK_DIALOG (priv->save_dialog)->vbox), hbox);
+      gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (priv->save_dialog))), hbox);
     }
 
   model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->combo));



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