pidgin: 3285bfc9: Use accessor functions where available.
qulogic at pidgin.im
qulogic at pidgin.im
Wed Jan 4 02:08:23 EST 2012
----------------------------------------------------------------------
Revision: 3285bfc9e53f04a3172d68d3eb3c6c73a2f3ca6d
Parent: 04973fff4d298f00a85aba6601491e8dc0511c22
Author: qulogic at pidgin.im
Date: 01/03/12 21:34:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3285bfc9e53f04a3172d68d3eb3c6c73a2f3ca6d
Changelog:
Use accessor functions where available.
Changes against parent 04973fff4d298f00a85aba6601491e8dc0511c22
patched pidgin/gtkwebview.c
-------------- next part --------------
============================================================
--- pidgin/gtkwebview.c 1f9c217c0aa558453b994b9ddabdf81c4fb28204
+++ pidgin/gtkwebview.c aebe8d3ac38d08b856a32360366592574b622e0e
@@ -235,7 +235,11 @@ smooth_scroll_cb(gpointer data)
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 @@ scroll_idle_cb(gpointer data)
{
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;
}
More information about the Commits
mailing list