Mercurial > pidgin
changeset 32443:16925948a003
Use accessor functions where available.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 04 Jan 2012 02:34:24 +0000 |
parents | fb8447f6649c |
children | 8436fb68930e |
files | pidgin/gtkwebview.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkwebview.c Wed Jan 04 02:30:11 2012 +0000 +++ b/pidgin/gtkwebview.c Wed Jan 04 02:34:24 2012 +0000 @@ -235,7 +235,11 @@ g_return_val_if_fail(priv->scroll_time != NULL, FALSE); adj = priv->vadj; +#if GTK_CHECK_VERSION(2,14,0) + max_val = gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj); +#else max_val = adj->upper - adj->page_size; +#endif scroll_val = gtk_adjustment_get_value(adj) + ((max_val - gtk_adjustment_get_value(adj)) / 3); @@ -260,9 +264,17 @@ { GtkWebViewPriv *priv = data; GtkAdjustment *adj = priv->vadj; + gdouble max_val; + if (adj) { - gtk_adjustment_set_value(adj, adj->upper - adj->page_size); +#if GTK_CHECK_VERSION(2,14,0) + max_val = gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj); +#else + max_val = adj->upper - adj->page_size; +#endif + gtk_adjustment_set_value(adj, max_val); } + priv->scroll_src = 0; return FALSE; }