[gtranslator] Build src/ dir with GSEAL



commit 1d2d493b479be9767c3705704518c9c51be9016c
Author: Jonh Wendell <jwendell gnome org>
Date:   Sat Aug 14 12:05:34 2010 -0300

    Build src/ dir with GSEAL

 src/gtr-context.c           |    4 ++--
 src/gtr-io-error-info-bar.c |    4 ++--
 src/gtr-utils.c             |   14 ++++++++------
 src/gtr-window.c            |    6 ++++--
 src/main.c                  |    2 +-
 5 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/src/gtr-context.c b/src/gtr-context.c
index 1c373a1..1856605 100644
--- a/src/gtr-context.c
+++ b/src/gtr-context.c
@@ -190,7 +190,7 @@ motion_notify_event (GtkWidget *text_view, GdkEventMotion *event,
 
   set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y, panel);
 
-  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;
 }
 
@@ -202,7 +202,7 @@ visibility_notify_event (GtkWidget *text_view, GdkEventVisibility *event,
 {
   gint wx, wy, 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/src/gtr-io-error-info-bar.c b/src/gtr-io-error-info-bar.c
index 7d8179e..9f756db 100644
--- a/src/gtr-io-error-info-bar.c
+++ b/src/gtr-io-error-info-bar.c
@@ -71,7 +71,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
   gtk_label_set_line_wrap (GTK_LABEL (primary_label), FALSE);
   gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
 
-  GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+  gtk_widget_set_can_focus (primary_label, TRUE);
 
   gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
 
@@ -86,7 +86,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
 
       gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
 
-      GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+      gtk_widget_set_can_focus (secondary_label, TRUE);
 
       gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
       gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
diff --git a/src/gtr-utils.c b/src/gtr-utils.c
index b34915e..cec1491 100644
--- a/src/gtr-utils.c
+++ b/src/gtr-utils.c
@@ -216,20 +216,22 @@ gtr_utils_menu_position_under_widget (GtkMenu * menu,
 {
   GtkWidget *w = GTK_WIDGET (user_data);
   GtkRequisition requisition;
+  GtkAllocation allocation;
 
-  gdk_window_get_origin (w->window, x, y);
+  gdk_window_get_origin (gtk_widget_get_window (w), x, y);
   gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+  gtk_widget_get_allocation (w, &allocation);
 
   if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL)
     {
-      *x += w->allocation.x + w->allocation.width - requisition.width;
+      *x += allocation.x + allocation.width - requisition.width;
     }
   else
     {
-      *x += w->allocation.x;
+      *x += allocation.x;
     }
 
-  *y += w->allocation.y + w->allocation.height;
+  *y += allocation.y + allocation.height;
 
   *push_in = TRUE;
 }
@@ -267,7 +269,7 @@ gtr_utils_menu_position_under_tree_view (GtkMenu * menu,
       GtkTreePath *path;
       GdkRectangle rect;
 
-      gdk_window_get_origin (GTK_WIDGET (tree)->window, x, y);
+      gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (tree)), x, y);
 
       path = gtk_tree_model_get_path (model, &iter);
       gtk_tree_view_get_cell_area (tree, path, gtk_tree_view_get_column (tree, 0),      /* FIXME 0 for RTL ? */
@@ -491,7 +493,7 @@ gtr_utils_drop_get_locations (GtkSelectionData * selection_data)
   gint i;
   GSList *locations = NULL;
 
-  uris = g_uri_list_extract_uris ((gchar *) selection_data->data);
+  uris = g_uri_list_extract_uris ((gchar *) gtk_selection_data_get_data (selection_data));
 
   for (i = 0; uris[i] != NULL; i++)
     {
diff --git a/src/gtr-window.c b/src/gtr-window.c
index 9ba3328..4ef6c81 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -1332,15 +1332,17 @@ gtr_window_cmd_edit_toolbar (GtkAction * action, GtrWindow * window)
 {
   GtkWidget *dialog;
   GtkWidget *editor;
+  GtkWidget *content_area;
 
   dialog = gtk_dialog_new_with_buttons (_("Toolbar Editor"),
                                         GTK_WINDOW (window),
                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                         GTK_STOCK_CLOSE,
                                         GTK_RESPONSE_CLOSE, NULL);
+  content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
   gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)), 5);
-  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+  gtk_box_set_spacing (GTK_BOX (content_area), 2);
   gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400);
 
@@ -1351,7 +1353,7 @@ gtr_window_cmd_edit_toolbar (GtkAction * action, GtrWindow * window)
   gtk_container_set_border_width (GTK_CONTAINER (editor), 5);
   gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5);
 
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), editor);
+  gtk_container_add (GTK_CONTAINER (content_area), editor);
 
   egg_editable_toolbar_set_edit_mode
     (EGG_EDITABLE_TOOLBAR (window->priv->toolbar), TRUE);
diff --git a/src/main.c b/src/main.c
index 3d84067..aada3d8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -152,7 +152,7 @@ unique_app_message_cb (UniqueApp *unique_app,
    * terminal. We also need to make sure that the window
    * has been realized otherwise it will not work. lame.
    */
-  if (!GTK_WIDGET_REALIZED (window))
+  if (!gtk_widget_get_realized (GTK_WIDGET (window)))
     gtk_widget_realize (GTK_WIDGET (window));
 
 #ifdef GDK_WINDOWING_X11



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