[gnome-utils] Some more fixes for building with -DGSEAL_ENABLE



commit 5d1d27c85479442facbe52b9615c766a941703a3
Author: Andre Klapper <a9016009 gmx de>
Date:   Mon May 3 21:26:46 2010 +0200

    Some more fixes for building with -DGSEAL_ENABLE

 gnome-dictionary/libgdict/gdict-database-chooser.c |   14 +++++++-------
 gnome-dictionary/libgdict/gdict-defbox.c           |    4 ++--
 gnome-dictionary/libgdict/gdict-source-chooser.c   |    2 +-
 gnome-dictionary/libgdict/gdict-speller.c          |   12 ++++++------
 gnome-dictionary/libgdict/gdict-strategy-chooser.c |   14 +++++++-------
 gnome-dictionary/libgdict/gdict-utils.c            |    4 ++--
 gnome-dictionary/src/gdict-app.c                   |    4 ++--
 gnome-dictionary/src/gdict-common.c                |    4 ++--
 gnome-dictionary/src/gdict-pref-dialog.c           |    4 ++--
 gnome-dictionary/src/gdict-sidebar.c               |    2 +-
 10 files changed, 32 insertions(+), 32 deletions(-)
---
diff --git a/gnome-dictionary/libgdict/gdict-database-chooser.c b/gnome-dictionary/libgdict/gdict-database-chooser.c
index 5dfac95..475b150 100644
--- a/gnome-dictionary/libgdict/gdict-database-chooser.c
+++ b/gnome-dictionary/libgdict/gdict-database-chooser.c
@@ -715,8 +715,8 @@ lookup_start_cb (GdictContext *context,
   if (!priv->busy_cursor)
     priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, priv->busy_cursor);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), priv->busy_cursor);
 
   priv->is_searching = TRUE;
 }
@@ -728,8 +728,8 @@ lookup_end_cb (GdictContext *context,
   GdictDatabaseChooser *chooser = GDICT_DATABASE_CHOOSER (user_data);
   GdictDatabaseChooserPrivate *priv = chooser->priv;
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), NULL);
 
   priv->is_searching = FALSE;
 }
@@ -773,8 +773,8 @@ error_cb (GdictContext *context,
 {
   GdictDatabaseChooser *chooser = GDICT_DATABASE_CHOOSER (user_data);
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), NULL);
 
   chooser->priv->is_searching = FALSE;
   chooser->priv->results = 0;
@@ -1132,7 +1132,7 @@ gdict_database_chooser_add_button (GdictDatabaseChooser *chooser,
 
   button = gtk_button_new_from_stock (button_text);
 
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, TRUE);
 
   gtk_widget_show (button);
 
diff --git a/gnome-dictionary/libgdict/gdict-defbox.c b/gnome-dictionary/libgdict/gdict-defbox.c
index 07a1c24..72ce543 100644
--- a/gnome-dictionary/libgdict/gdict-defbox.c
+++ b/gnome-dictionary/libgdict/gdict-defbox.c
@@ -1590,7 +1590,7 @@ defbox_motion_notify_cb (GtkWidget      *text_view,
 
   set_cursor_if_appropriate (defbox, GTK_TEXT_VIEW (text_view), bx, by);
 
-  gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
+  gdk_window_get_pointer (gtk_widget_get_window (text_view), NULL, NULL, NULL);
 
   return FALSE;
 }
@@ -1603,7 +1603,7 @@ defbox_visibility_notify_cb (GtkWidget          *text_view,
   gint wx, wy;
   gint bx, by;
 
-  gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
+  gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL);
 
   gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
                                          GTK_TEXT_WINDOW_WIDGET,
diff --git a/gnome-dictionary/libgdict/gdict-source-chooser.c b/gnome-dictionary/libgdict/gdict-source-chooser.c
index dea235c..ab640f8 100644
--- a/gnome-dictionary/libgdict/gdict-source-chooser.c
+++ b/gnome-dictionary/libgdict/gdict-source-chooser.c
@@ -906,7 +906,7 @@ gdict_source_chooser_add_button (GdictSourceChooser *chooser,
 
   button = gtk_button_new_from_stock (button_text);
 
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, TRUE);
 
   gtk_widget_show (button);
 
diff --git a/gnome-dictionary/libgdict/gdict-speller.c b/gnome-dictionary/libgdict/gdict-speller.c
index 5eabd09..7611e47 100644
--- a/gnome-dictionary/libgdict/gdict-speller.c
+++ b/gnome-dictionary/libgdict/gdict-speller.c
@@ -633,8 +633,8 @@ lookup_start_cb (GdictContext *context,
   if (!priv->busy_cursor)
     priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
 
-  if (GTK_WIDGET (speller)->window)
-    gdk_window_set_cursor (GTK_WIDGET (speller)->window, priv->busy_cursor);
+  if (gtk_widget_get_window (GTK_WIDGET (speller)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (speller)), priv->busy_cursor);
 
   priv->is_searching = TRUE;
 }
@@ -646,8 +646,8 @@ lookup_end_cb (GdictContext *context,
   GdictSpeller *speller = GDICT_SPELLER (user_data);
   GdictSpellerPrivate *priv = speller->priv;
 
-  if (GTK_WIDGET (speller)->window)
-    gdk_window_set_cursor (GTK_WIDGET (speller)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (speller)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (speller)), NULL);
 
   g_free (priv->word);
   priv->word = NULL;
@@ -691,8 +691,8 @@ error_cb (GdictContext *context,
 
   gdict_speller_clear (speller);
 
-  if (GTK_WIDGET (speller)->window)
-    gdk_window_set_cursor (GTK_WIDGET (speller)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (speller)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (speller)), NULL);
   
   g_free (priv->word);
   priv->word = NULL;
diff --git a/gnome-dictionary/libgdict/gdict-strategy-chooser.c b/gnome-dictionary/libgdict/gdict-strategy-chooser.c
index 93e1c4b..93df707 100644
--- a/gnome-dictionary/libgdict/gdict-strategy-chooser.c
+++ b/gnome-dictionary/libgdict/gdict-strategy-chooser.c
@@ -663,8 +663,8 @@ lookup_start_cb (GdictContext *context,
   if (!priv->busy_cursor)
     priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, priv->busy_cursor);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), priv->busy_cursor);
 
   priv->is_searching = TRUE;
 }
@@ -676,8 +676,8 @@ lookup_end_cb (GdictContext *context,
   GdictStrategyChooser *chooser = GDICT_STRATEGY_CHOOSER (user_data);
   GdictStrategyChooserPrivate *priv = chooser->priv;
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), NULL);
 
   priv->is_searching = FALSE;
 }
@@ -721,8 +721,8 @@ error_cb (GdictContext *context,
 {
   GdictStrategyChooser *chooser = GDICT_STRATEGY_CHOOSER (user_data);
 
-  if (GTK_WIDGET (chooser)->window)
-    gdk_window_set_cursor (GTK_WIDGET (chooser)->window, NULL);
+  if (gtk_widget_get_window (GTK_WIDGET (chooser)))
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), NULL);
 
   chooser->priv->is_searching = FALSE;
   chooser->priv->results = 0;
@@ -1082,7 +1082,7 @@ gdict_strategy_chooser_add_button (GdictStrategyChooser *chooser,
 
   button = gtk_button_new_from_stock (button_text);
 
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, TRUE);
 
   gtk_widget_show (button);
 
diff --git a/gnome-dictionary/libgdict/gdict-utils.c b/gnome-dictionary/libgdict/gdict-utils.c
index d6c7241..cdace3d 100644
--- a/gnome-dictionary/libgdict/gdict-utils.c
+++ b/gnome-dictionary/libgdict/gdict-utils.c
@@ -264,8 +264,8 @@ show_error_dialog (GtkWindow   *parent,
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
   					      "%s", detail);
   
-  if (parent && parent->group)
-    gtk_window_group_add_window (parent->group, GTK_WINDOW (dialog));
+  if (parent && gtk_window_get_group (parent))
+    gtk_window_group_add_window (gtk_window_get_group (parent), GTK_WINDOW (dialog));
   
   gtk_dialog_run (GTK_DIALOG (dialog));
   
diff --git a/gnome-dictionary/src/gdict-app.c b/gnome-dictionary/src/gdict-app.c
index a909418..8f989ba 100644
--- a/gnome-dictionary/src/gdict-app.c
+++ b/gnome-dictionary/src/gdict-app.c
@@ -129,8 +129,8 @@ gdict_window_created_cb (GdictWindow *parent,
   g_signal_connect (new_window, "destroy",
   		    G_CALLBACK (gdict_window_destroy_cb), app);
 
-  if (GTK_WINDOW (parent)->group)
-    gtk_window_group_add_window (GTK_WINDOW (parent)->group,
+  if (gtk_window_get_group (GTK_WINDOW (parent)))
+    gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (parent)),
 		    		 GTK_WINDOW (new_window));
   
   app->windows = g_slist_prepend (app->windows, new_window);
diff --git a/gnome-dictionary/src/gdict-common.c b/gnome-dictionary/src/gdict-common.c
index d7ba0e5..a644de6 100644
--- a/gnome-dictionary/src/gdict-common.c
+++ b/gnome-dictionary/src/gdict-common.c
@@ -164,8 +164,8 @@ gdict_show_error_dialog (GtkWindow   *parent,
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
   					      "%s", detail);
   
-  if (parent && parent->group)
-    gtk_window_group_add_window (parent->group, GTK_WINDOW (dialog));
+  if (parent && gtk_window_get_group (parent))
+    gtk_window_group_add_window (gtk_window_get_group (parent), GTK_WINDOW (dialog));
   
   gtk_dialog_run (GTK_DIALOG (dialog));
   
diff --git a/gnome-dictionary/src/gdict-pref-dialog.c b/gnome-dictionary/src/gdict-pref-dialog.c
index 009483d..667a8b0 100644
--- a/gnome-dictionary/src/gdict-pref-dialog.c
+++ b/gnome-dictionary/src/gdict-pref-dialog.c
@@ -615,7 +615,7 @@ gdict_pref_dialog_init (GdictPrefDialog *dialog)
   			       DEFAULT_MIN_HEIGHT);
     
   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_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   
   /* add buttons */
@@ -649,7 +649,7 @@ gdict_pref_dialog_init (GdictPrefDialog *dialog)
   }
 
   /* the main widget */
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
                      GTK_WIDGET (gtk_builder_get_object (dialog->builder, "preferences_root")));
 
   /* keep all the interesting widgets around */  
diff --git a/gnome-dictionary/src/gdict-sidebar.c b/gnome-dictionary/src/gdict-sidebar.c
index 67f20b1..9829149 100644
--- a/gnome-dictionary/src/gdict-sidebar.c
+++ b/gnome-dictionary/src/gdict-sidebar.c
@@ -150,7 +150,7 @@ gdict_sidebar_menu_position_function (GtkMenu  *menu,
 
   widget = GTK_WIDGET (user_data);
 
-  gdk_window_get_origin (widget->window, x, y);
+  gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
 
   *x += widget->allocation.x;
   *y += widget->allocation.y + widget->allocation.height;



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