diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-06-21 00:27:06 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-07-10 20:13:24 +0800 |
commit | 7deb4ea20b08eab10473f2620c90f6b896d5af10 (patch) | |
tree | 0658af67eae180a741bd65a3e92ffe92e8faf497 | |
parent | fb43069972c8eccefcf1beb28251d1ed23c4a20c (diff) | |
download | gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar.gz gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar.bz2 gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar.lz gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar.xz gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.tar.zst gsoc2013-empathy-7deb4ea20b08eab10473f2620c90f6b896d5af10.zip |
Use accessor functions instead direct access (Fixes #586476)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | libempathy-gtk/empathy-avatar-chooser.c | 10 | ||||
-rw-r--r-- | libempathy-gtk/empathy-avatar-image.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-cell-renderer-expander.c | 38 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat-text-view.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 31 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-status-preset-dialog.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-video-widget.c | 6 | ||||
-rw-r--r-- | megaphone/src/megaphone-applet.c | 2 | ||||
-rw-r--r-- | src/empathy-call-window-fullscreen.c | 6 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 6 | ||||
-rw-r--r-- | src/empathy-debug-dialog.c | 4 | ||||
-rw-r--r-- | src/empathy-sidebar.c | 2 | ||||
-rw-r--r-- | src/empathy.c | 2 | ||||
-rw-r--r-- | src/ephy-spinner.c | 4 |
17 files changed, 83 insertions, 56 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index 83475b565..af96885e4 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -786,24 +786,24 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget, gchar *target_type; gboolean handled = FALSE; - target_type = gdk_atom_name (selection_data->target); + target_type = gdk_atom_name (gtk_selection_data_get_target (selection_data)); if (!strcmp (target_type, URI_LIST_TYPE)) { GFile *file; GFileInputStream *input_stream; gchar *nl; gchar *data = NULL; - nl = strstr (selection_data->data, "\r\n"); + nl = strstr (gtk_selection_data_get_data (selection_data), "\r\n"); if (nl) { gchar *uri; - uri = g_strndup (selection_data->data, - nl - (gchar *) selection_data->data); + uri = g_strndup (gtk_selection_data_get_data (selection_data), + nl - (gchar *) gtk_selection_data_get_data (selection_data)); file = g_file_new_for_uri (uri); g_free (uri); } else { - file = g_file_new_for_uri (selection_data->data); + file = g_file_new_for_uri (gtk_selection_data_get_data (selection_data)); } input_stream = g_file_read (file, NULL, NULL); diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c index d430c0fa6..f7898e1bd 100644 --- a/libempathy-gtk/empathy-avatar-image.c +++ b/libempathy-gtk/empathy-avatar-image.c @@ -232,7 +232,7 @@ avatar_image_button_press_event (GtkWidget *widget, GdkEventButton *event) gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf); g_object_unref (pixbuf); - gdk_window_get_origin (priv->image->window, &x, &y); + gdk_window_get_origin (gtk_widget_get_window (priv->image), &x, &y); x = x - (popup_width - width) / 2; y = y - (popup_height - height) / 2; diff --git a/libempathy-gtk/empathy-cell-renderer-expander.c b/libempathy-gtk/empathy-cell-renderer-expander.c index 6fb7cfded..bd5c89f19 100644 --- a/libempathy-gtk/empathy-cell-renderer-expander.c +++ b/libempathy-gtk/empathy-cell-renderer-expander.c @@ -101,9 +101,11 @@ empathy_cell_renderer_expander_init (EmpathyCellRendererExpander *expander) priv->activatable = TRUE; priv->animation_node = NULL; - GTK_CELL_RENDERER (expander)->xpad = 2; - GTK_CELL_RENDERER (expander)->ypad = 2; - GTK_CELL_RENDERER (expander)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE; + g_object_set (expander, + "xpad", 2, + "ypad", 2, + "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, + NULL); } static void @@ -252,18 +254,27 @@ empathy_cell_renderer_expander_get_size (GtkCellRenderer *cell, { EmpathyCellRendererExpander *expander; EmpathyCellRendererExpanderPriv *priv; + gfloat xalign, yalign; + guint xpad, ypad; expander = (EmpathyCellRendererExpander *) cell; priv = GET_PRIV (expander); + g_object_get (cell, + "xalign", &xalign, + "yalign", &yalign, + "xpad", &xpad, + "ypad", &ypad, + NULL); + if (cell_area) { if (x_offset) { - *x_offset = cell->xalign * (cell_area->width - (priv->expander_size + (2 * cell->xpad))); + *x_offset = xalign * (cell_area->width - (priv->expander_size + (2 * xpad))); *x_offset = MAX (*x_offset, 0); } if (y_offset) { - *y_offset = cell->yalign * (cell_area->height - (priv->expander_size + (2 * cell->ypad))); + *y_offset = yalign * (cell_area->height - (priv->expander_size + (2 * ypad))); *y_offset = MAX (*y_offset, 0); } } else { @@ -275,10 +286,10 @@ empathy_cell_renderer_expander_get_size (GtkCellRenderer *cell, } if (width) - *width = cell->xpad * 2 + priv->expander_size; + *width = xpad * 2 + priv->expander_size; if (height) - *height = cell->ypad * 2 + priv->expander_size; + *height = ypad * 2 + priv->expander_size; } static void @@ -294,6 +305,8 @@ empathy_cell_renderer_expander_render (GtkCellRenderer *cell, EmpathyCellRendererExpanderPriv *priv; GtkExpanderStyle expander_style; gint x_offset, y_offset; + guint xpad, ypad; + expander = (EmpathyCellRendererExpander *) cell; priv = GET_PRIV (expander); @@ -319,14 +332,19 @@ empathy_cell_renderer_expander_render (GtkCellRenderer *cell, &x_offset, &y_offset, NULL, NULL); - gtk_paint_expander (widget->style, + g_object_get (cell, + "xpad", &xpad, + "ypad", &ypad, + NULL); + + gtk_paint_expander (gtk_widget_get_style (widget), window, GTK_STATE_NORMAL, expose_area, widget, "treeview", - cell_area->x + x_offset + cell->xpad + priv->expander_size / 2, - cell_area->y + y_offset + cell->ypad + priv->expander_size / 2, + cell_area->x + x_offset + xpad + priv->expander_size / 2, + cell_area->y + y_offset + ypad + priv->expander_size / 2, expander_style); } diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index abe1fc1f3..d7ebda647 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -495,7 +495,9 @@ chat_text_view_size_allocate (GtkWidget *widget, GtkAdjustment *adj; adj = GTK_TEXT_VIEW (widget)->vadjustment; - gtk_adjustment_set_value (adj, adj->upper - adj->page_size); + gtk_adjustment_set_value (adj, + gtk_adjustment_get_upper (adj) - + gtk_adjustment_get_page_size (adj)); } } @@ -652,7 +654,7 @@ chat_text_view_scroll_cb (EmpathyChatTextView *view) priv = GET_PRIV (view); adj = GTK_TEXT_VIEW (view)->vadjustment; - max_val = adj->upper - adj->page_size; + max_val = gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj); g_return_val_if_fail (priv->scroll_time != NULL, FALSE); diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 1729e5305..a8ca745e2 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -748,13 +748,14 @@ chat_input_key_press_event_cb (GtkWidget *widget, if (!(event->state & GDK_CONTROL_MASK) && event->keyval == GDK_Page_Up) { adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (text_view_sw)); - gtk_adjustment_set_value (adj, adj->value - adj->page_size); + gtk_adjustment_set_value (adj, gtk_adjustment_get_value (adj) - gtk_adjustment_get_page_size (adj)); return TRUE; } if ((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK && event->keyval == GDK_Page_Down) { adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (text_view_sw)); - val = MIN (adj->value + adj->page_size, adj->upper - adj->page_size); + val = MIN (gtk_adjustment_get_value (adj) + gtk_adjustment_get_page_size (adj), + gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj)); gtk_adjustment_set_value (adj, val); return TRUE; } @@ -1478,15 +1479,18 @@ chat_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkBin *bin = GTK_BIN (widget); + GtkWidget *child; - requisition->width = GTK_CONTAINER (widget)->border_width * 2; - requisition->height = GTK_CONTAINER (widget)->border_width * 2; + requisition->width = gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2; + requisition->height = gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2; - if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) + child = gtk_bin_get_child (bin); + + if (child && GTK_WIDGET_VISIBLE (child)) { GtkRequisition child_requisition; - gtk_widget_size_request (bin->child, &child_requisition); + gtk_widget_size_request (child, &child_requisition); requisition->width += child_requisition.width; requisition->height += child_requisition.height; @@ -1499,17 +1503,20 @@ chat_size_allocate (GtkWidget *widget, { GtkBin *bin = GTK_BIN (widget); GtkAllocation child_allocation; + GtkWidget *child; widget->allocation = *allocation; - if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) + child = gtk_bin_get_child (bin); + + if (child && GTK_WIDGET_VISIBLE (child)) { - child_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width; - child_allocation.y = allocation->y + GTK_CONTAINER (widget)->border_width; - child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0); - child_allocation.height = MAX (allocation->height - GTK_CONTAINER (widget)->border_width * 2, 0); + child_allocation.x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (widget)); + child_allocation.y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (widget)); + child_allocation.width = MAX (allocation->width - gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2, 0); + child_allocation.height = MAX (allocation->height - gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2, 0); - gtk_widget_size_allocate (bin->child, &child_allocation); + gtk_widget_size_allocate (child, &child_allocation); } } diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index ef100a3b7..d271cdd28 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -193,7 +193,7 @@ empathy_contact_information_dialog_show (EmpathyContact *contact, EMPATHY_CONTACT_WIDGET_SHOW_LOCATION | EMPATHY_CONTACT_WIDGET_EDIT_NONE); gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), contact_widget, TRUE, TRUE, 0); gtk_widget_show (contact_widget); @@ -252,7 +252,7 @@ empathy_contact_edit_dialog_show (EmpathyContact *contact, EMPATHY_CONTACT_WIDGET_EDIT_ALIAS | EMPATHY_CONTACT_WIDGET_EDIT_GROUPS); gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), contact_widget, TRUE, TRUE, 0); gtk_widget_show (contact_widget); @@ -304,7 +304,7 @@ empathy_contact_personal_dialog_show (GtkWindow *parent) EMPATHY_CONTACT_WIDGET_EDIT_ALIAS | EMPATHY_CONTACT_WIDGET_EDIT_AVATAR); gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (personal_dialog)->vbox), + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (personal_dialog))), contact_widget, TRUE, TRUE, 0); empathy_contact_widget_set_account_filter (contact_widget, @@ -407,7 +407,7 @@ empathy_new_contact_dialog_show (GtkWindow *parent) EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT | EMPATHY_CONTACT_WIDGET_EDIT_ID | EMPATHY_CONTACT_WIDGET_EDIT_GROUPS); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), contact_widget, TRUE, TRUE, 0); empathy_contact_widget_set_account_filter (contact_widget, diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index f7b506e7c..9cebe1daa 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -292,7 +292,7 @@ contact_list_view_drag_data_received (GtkWidget *view, goto OUT; } - id = (const gchar*) selection->data; + id = (const gchar*) gtk_selection_data_get_data (selection); DEBUG ("Received %s%s drag & drop contact from roster with id:'%s'", context->action == GDK_ACTION_MOVE ? "move" : "", context->action == GDK_ACTION_COPY ? "copy" : "", @@ -851,7 +851,7 @@ contact_list_view_expander_cell_data_func (GtkTreeViewColumn *column, gboolean row_expanded; path = gtk_tree_model_get_path (model, iter); - row_expanded = gtk_tree_view_row_expanded (GTK_TREE_VIEW (column->tree_view), path); + row_expanded = gtk_tree_view_row_expanded (GTK_TREE_VIEW (gtk_tree_view_column_get_tree_view (column)), path); gtk_tree_path_free (path); g_object_set (cell, diff --git a/libempathy-gtk/empathy-status-preset-dialog.c b/libempathy-gtk/empathy-status-preset-dialog.c index 7ac13ad38..802d116e7 100644 --- a/libempathy-gtk/empathy-status-preset-dialog.c +++ b/libempathy-gtk/empathy-status-preset-dialog.c @@ -559,8 +559,8 @@ empathy_status_preset_dialog_init (EmpathyStatusPresetDialog *self) status_preset_dialog_setup_presets_treeview (self); status_preset_dialog_setup_add_combobox (self); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (self)->vbox), toplevel_vbox, - TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), + toplevel_vbox, TRUE, TRUE, 0); g_object_unref (gui); } diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index baa6d21de..e91ac6291 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -1250,7 +1250,7 @@ empathy_window_get_is_visible (GtkWindow *window) g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE); - gdk_window = GTK_WIDGET (window)->window; + gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); if (!gdk_window) { return FALSE; } @@ -1272,7 +1272,7 @@ empathy_window_iconify (GtkWindow *window, GtkStatusIcon *status_icon) GdkWindow *gdk_window; gtk_status_icon_get_geometry (status_icon, NULL, &icon_location, NULL); - gdk_window = GTK_WIDGET (window)->window; + gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); dpy = gdk_x11_drawable_get_xdisplay (gdk_window); data[0] = icon_location.x; diff --git a/libempathy-gtk/empathy-video-widget.c b/libempathy-gtk/empathy-video-widget.c index 79f27814f..0f62496de 100644 --- a/libempathy-gtk/empathy-video-widget.c +++ b/libempathy-gtk/empathy-video-widget.c @@ -403,7 +403,7 @@ empathy_video_widget_sync_message_cb (GstBus *bus, GstMessage *message, { g_assert (GTK_WIDGET_REALIZED (GTK_WIDGET (self))); gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (priv->overlay), - GDK_WINDOW_XID (GTK_WIDGET (self)->window)); + GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (self)))); } } @@ -418,13 +418,13 @@ empathy_video_widget_expose_event (GtkWidget *widget, GdkEventExpose *event) if (priv->overlay == NULL) { - gdk_window_clear_area (widget->window, 0, 0, + gdk_window_clear_area (gtk_widget_get_window (widget), 0, 0, widget->allocation.width, widget->allocation.height); return TRUE; } gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (priv->overlay), - GDK_WINDOW_XID (widget->window)); + GDK_WINDOW_XID (gtk_widget_get_window (widget))); gst_x_overlay_expose (GST_X_OVERLAY (priv->overlay)); diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c index 2e4fb1e72..132e8b74f 100644 --- a/megaphone/src/megaphone-applet.c +++ b/megaphone/src/megaphone-applet.c @@ -282,7 +282,7 @@ megaphone_applet_show_preferences (MegaphoneApplet *applet) gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 500); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (contact_list)); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), scroll); + gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scroll); gtk_widget_show (scroll); g_object_set_data (G_OBJECT (dialog), "contact-list", contact_list); diff --git a/src/empathy-call-window-fullscreen.c b/src/empathy-call-window-fullscreen.c index 33f4085b3..e1c3d7a39 100644 --- a/src/empathy-call-window-fullscreen.c +++ b/src/empathy-call-window-fullscreen.c @@ -71,11 +71,11 @@ empathy_call_window_fullscreen_set_cursor_visible ( if (priv->video_widget != NULL && !show_cursor) { - gdk_window_set_cursor (priv->video_widget->window, + gdk_window_set_cursor (gtk_widget_get_window (priv->video_widget), gdk_cursor_new (GDK_BLANK_CURSOR)); } else - gdk_window_set_cursor (priv->video_widget->window, NULL); + gdk_window_set_cursor (gtk_widget_get_window (priv->video_widget), NULL); } static void @@ -130,7 +130,7 @@ empathy_call_window_fullscreen_show_popup (EmpathyCallWindowFullscreen *self) screen = gtk_window_get_screen (GTK_WINDOW (priv->parent_window)); gdk_screen_get_monitor_geometry (screen, gdk_screen_get_monitor_at_window (screen, - GTK_WIDGET (priv->parent_window)->window), + gtk_widget_get_window (GTK_WIDGET (priv->parent_window))), &fullscreen_rect); /* Getting the popup window sizes */ diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index f9d0b924a..7bc64bb08 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -176,7 +176,7 @@ chat_tab_style_set_cb (GtkWidget *hbox, "chat-window-tab-close-button"); context = gtk_widget_get_pango_context (hbox); - metrics = pango_context_get_metrics (context, hbox->style->font_desc, + metrics = pango_context_get_metrics (context, gtk_widget_get_style (hbox)->font_desc, pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_char_width (metrics); pango_font_metrics_unref (metrics); @@ -1242,7 +1242,7 @@ chat_window_drag_data_received (GtkWidget *widget, const gchar *account_id; const gchar *contact_id; - id = (const gchar*) selection->data; + id = (const gchar*) gtk_selection_data_get_data (selection); account_manager = empathy_account_manager_dup_singleton (); DEBUG ("DND contact from roster with id:'%s'", id); @@ -1299,7 +1299,7 @@ chat_window_drag_data_received (GtkWidget *widget, DEBUG ("DND tab"); - chat = (void *) selection->data; + chat = (void *) gtk_selection_data_get_data (selection); old_window = chat_window_find_chat (*chat); if (old_window) { diff --git a/src/empathy-debug-dialog.c b/src/empathy-debug-dialog.c index cd0d925f9..9d047bab1 100644 --- a/src/empathy-debug-dialog.c +++ b/src/empathy-debug-dialog.c @@ -212,7 +212,7 @@ debug_dialog_set_toolbar_sensitivity (EmpathyDebugDialog *debug_dialog, gboolean sensitive) { EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog); - GtkWidget *vbox = GTK_DIALOG (debug_dialog)->vbox; + GtkWidget *vbox = gtk_dialog_get_content_area (GTK_DIALOG (debug_dialog)); gtk_widget_set_sensitive (GTK_WIDGET (priv->save_button), sensitive); gtk_widget_set_sensitive (GTK_WIDGET (priv->copy_button), sensitive); @@ -948,7 +948,7 @@ debug_dialog_constructor (GType type, gtk_window_set_title (GTK_WINDOW (object), _("Debug Window")); gtk_window_set_default_size (GTK_WINDOW (object), 800, 400); - vbox = GTK_DIALOG (object)->vbox; + vbox = gtk_dialog_get_content_area (GTK_DIALOG (object)); toolbar = gtk_toolbar_new (); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH_HORIZ); diff --git a/src/empathy-sidebar.c b/src/empathy-sidebar.c index 7b70229e2..85a38267a 100644 --- a/src/empathy-sidebar.c +++ b/src/empathy-sidebar.c @@ -243,7 +243,7 @@ empathy_sidebar_menu_position_under (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; diff --git a/src/empathy.c b/src/empathy.c index 40626b532..aef361052 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -357,7 +357,7 @@ on_bacon_message_received (const char *message, gtk_widget_realize (GTK_WIDGET (window)); } - startup_timestamp = gdk_x11_get_server_time (window->window); + startup_timestamp = gdk_x11_get_server_time (gtk_widget_get_window (window)); } gtk_window_present_with_time (GTK_WINDOW (window), startup_timestamp); diff --git a/src/ephy-spinner.c b/src/ephy-spinner.c index 30ffa57c1..e7285bc0d 100644 --- a/src/ephy-spinner.c +++ b/src/ephy-spinner.c @@ -666,8 +666,8 @@ ephy_spinner_expose (GtkWidget *widget, return FALSE; } - gc = gdk_gc_new (widget->window); - gdk_draw_pixbuf (widget->window, gc, pixbuf, + gc = gdk_gc_new (gtk_widget_get_window (widget)); + gdk_draw_pixbuf (gtk_widget_get_window (widget), gc, pixbuf, dest.x - x_offset - widget->allocation.x, dest.y - y_offset - widget->allocation.y, dest.x, dest.y, |