diff options
Diffstat (limited to 'capplet')
-rw-r--r-- | capplet/anjal-settings-main.c | 2 | ||||
-rw-r--r-- | capplet/settings/mail-account-view.c | 4 | ||||
-rw-r--r-- | capplet/settings/mail-capplet-shell.c | 6 | ||||
-rw-r--r-- | capplet/settings/mail-decoration.c | 20 | ||||
-rw-r--r-- | capplet/settings/mail-settings-view.c | 4 |
5 files changed, 27 insertions, 9 deletions
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c index 6352f020bd..aa090e36fd 100644 --- a/capplet/anjal-settings-main.c +++ b/capplet/anjal-settings-main.c @@ -91,7 +91,7 @@ mail_message_received_cb (UniqueApp *app G_GNUC_UNUSED, //mail_shell_set_cmdline_args ((MailShell *)window, args); //mail_shell_handle_cmdline ((MailShell *)window); g_free (url); - gdk_window_raise (((GtkWidget *)window)->window); + gdk_window_raise (gtk_widget_get_window (GTK_WIDGET (window))); gtk_window_deiconify (window); gtk_window_present (window); diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index e97abdc6dc..8c488af5b4 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -636,7 +636,9 @@ static gboolean mav_btn_expose (GtkWidget *w, GdkEventExpose *event, MailAccountView *mfv) { GdkPixbuf *img = g_object_get_data ((GObject *)w, "pbuf"); - cairo_t *cr = gdk_cairo_create (w->window); + cairo_t *cr; + + cr = gdk_cairo_create (gtk_widget_get_window (w)); cairo_save (cr); gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4); cairo_paint(cr); diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c index da22b9d0d5..3c5803b89a 100644 --- a/capplet/settings/mail-capplet-shell.c +++ b/capplet/settings/mail-capplet-shell.c @@ -267,7 +267,11 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean gint mail_capplet_shell_toolbar_height (MailCappletShell *shell) { - return shell->priv->top_bar->allocation.height; + GtkAllocation allocation; + + gtk_widget_get_allocation (shell->priv->top_bar, &allocation); + + return allocation.height; } MailCappletShell * diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c index 056283dabe..d3cddc9b28 100644 --- a/capplet/settings/mail-decoration.c +++ b/capplet/settings/mail-decoration.c @@ -86,7 +86,7 @@ md_translate_position (GdkWindow *w, double ex, double ey, gint *x, gint *y, Gtk *x = (gint)ex; *y = (gint)ey; - while (w && w != window->window) { + while (w && w != gtk_widget_get_window (window)) { gint cx, cy, cw, ch, cd; gdk_window_get_geometry (w, &cx, &cy, &cw, &ch, &cd); *x += cx; @@ -110,19 +110,28 @@ in_left (MailDecoration *md, double x) static gboolean in_bottom (MailDecoration *md, double y) { - return y >= ((GtkWidget *)md->window)->allocation.height - md->priv->resize_width; + GtkAllocation allocation; + + gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation); + + return y >= allocation.height - md->priv->resize_width; } static gboolean in_right (MailDecoration *md, double x) { - return x >= ((GtkWidget *)md->window)->allocation.width - md->priv->resize_width; + GtkAllocation allocation; + + gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation); + + return x >= allocation.width - md->priv->resize_width; } static void set_cursor (MailDecoration *md, GdkWindowEdge edge) { - gdk_window_set_cursor (((GtkWidget *)md->window)->window, md->priv->cursors[edge]); + gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (md->window)), + md->priv->cursors[edge]); md->priv->default_cursor = FALSE; } @@ -131,7 +140,8 @@ reset_cursor (MailDecoration *md) { if (!md->priv->default_cursor) { md->priv->default_cursor = TRUE; - gdk_window_set_cursor (((GtkWidget *)md->window)->window, NULL); + gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (md->window)), + NULL); } } diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c index 3a9864ae23..ee5858c893 100644 --- a/capplet/settings/mail-settings-view.c +++ b/capplet/settings/mail-settings-view.c @@ -227,7 +227,9 @@ static gboolean msv_btn_expose (GtkWidget *w, GdkEventExpose *event, MailSettingsView *mfv) { GdkPixbuf *img = g_object_get_data ((GObject *)w, "pbuf"); - cairo_t *cr = gdk_cairo_create (w->window); + cairo_t *cr; + + cr = gdk_cairo_create (gtk_widget_get_window (w)); cairo_save (cr); gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4); cairo_paint(cr); |