aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html-display.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-31 03:03:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-08 23:05:26 +0800
commit72797decc12602b181f69dba7c54df7a0d1b9326 (patch)
treeecd1314c92bc26b59647b351b2d47e446f4ed21d /mail/em-format-html-display.c
parent3ba0b61f9f447b01c3a83bfb78ee33a45d413700 (diff)
downloadgsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.gz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.bz2
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.lz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.xz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.zst
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.zip
Giant leap towards GSEAL compliance.
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r--mail/em-format-html-display.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index d32ee8dd9f..54a768ec59 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -874,13 +874,15 @@ efhd_bar_resize (EMFormatHTML *efh,
GtkAllocation *event)
{
EMFormatHTMLDisplayPrivate *priv;
+ GtkAllocation allocation;
GtkWidget *widget;
gint width;
priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh);
widget = GTK_WIDGET (efh->html);
- width = widget->allocation.width - 12;
+ gtk_widget_get_allocation (widget, &allocation);
+ width = allocation.width - 12;
if (width > 0) {
widget = priv->attachment_view;
@@ -940,11 +942,7 @@ efhd_optional_button_show (GtkWidget *widget, GtkWidget *w)
{
GtkWidget *label = g_object_get_data (G_OBJECT (widget), "text-label");
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_visible (w)) {
-#else
- if (GTK_WIDGET_VISIBLE (w)) {
-#endif
gtk_widget_hide (w);
gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("View _Unformatted"));
} else {
@@ -956,7 +954,10 @@ efhd_optional_button_show (GtkWidget *widget, GtkWidget *w)
static void
efhd_resize (GtkWidget *w, GtkAllocation *event, EMFormatHTML *efh)
{
- gtk_widget_set_size_request (w, ((GtkWidget *)efh->html)->allocation.width-48, 250);
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET (efh->html), &allocation);
+ gtk_widget_set_size_request (w, allocation.width - 48, 250);
}
/* optional render attachment button callback */
@@ -967,6 +968,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
GtkWidget *hbox, *vbox, *button, *mainbox, *scroll, *label, *img;
AtkObject *a11y;
GtkWidget *view;
+ GtkAllocation allocation;
GtkTextBuffer *buffer;
/* FIXME: handle default shown case */
@@ -1035,7 +1037,8 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_box_pack_start(GTK_BOX (vbox), scroll, TRUE, TRUE, 6);
gtk_widget_show (GTK_WIDGET(view));
- gtk_widget_set_size_request (scroll, (GTK_WIDGET (efh->html))->allocation.width - 48, 250);
+ gtk_widget_get_allocation (GTK_WIDGET (efh->html), &allocation);
+ gtk_widget_set_size_request (scroll, allocation.width - 48, 250);
g_signal_connect (scroll, "size_allocate", G_CALLBACK(efhd_resize), efh);
gtk_widget_show (scroll);