[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/gtkutil.c
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/src/gtkutil.c |
Date: |
Mon, 17 Mar 2003 18:17:39 -0500 |
Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.20 emacs/src/gtkutil.c:1.21
*** emacs/src/gtkutil.c:1.20 Mon Mar 17 18:03:53 2003
--- emacs/src/gtkutil.c Mon Mar 17 18:17:32 2003
***************
*** 2625,2630 ****
--- 2625,2631 ----
gdouble shown;
gdouble top;
int size, value;
+ int new_upper, new_step;
adj = gtk_range_get_adjustment (GTK_RANGE (wscroll));
***************
*** 2652,2672 ****
value = min (value, whole - size);
value = max (value, XG_SB_MIN);
- adj->page_size = (int)size;
-
/* gtk_range_set_value invokes the callback. Set
ignore_gtk_scrollbar to make the callback do nothing */
xg_ignore_gtk_scrollbar = 1;
! gtk_range_set_range (GTK_RANGE (wscroll), adj->lower, max (whole,
size));
! /* Assume all lines are of equal size. */
! /* Assume a page increment is about 95% of the page size */
! gtk_range_set_increments (GTK_RANGE (wscroll),
! portion / max (1, FRAME_HEIGHT (f)),
! (int) (0.95*adj->page_size));
- gtk_range_set_value (GTK_RANGE (wscroll), (gdouble)value);
xg_ignore_gtk_scrollbar = 0;
/* Make GTK draw the new thumb. We are not using a pure GTK event
--- 2653,2685 ----
value = min (value, whole - size);
value = max (value, XG_SB_MIN);
/* gtk_range_set_value invokes the callback. Set
ignore_gtk_scrollbar to make the callback do nothing */
xg_ignore_gtk_scrollbar = 1;
! new_upper = max (whole, size);
! new_step = portion / max (1, FRAME_HEIGHT (f));
!
! if ((int) adj->page_size != size
! || (int) adj->upper != new_upper
! || (int) adj->step_increment != new_step)
! {
! adj->page_size = (int) size;
!
! gtk_range_set_range (GTK_RANGE (wscroll), adj->lower,
! (gdouble) new_upper);
!
! /* Assume all lines are of equal size. */
! /* Assume a page increment is about 95% of the page size */
! gtk_range_set_increments (GTK_RANGE (wscroll),
! portion / max (1, FRAME_HEIGHT (f)),
! (int) (0.95*adj->page_size));
!
! }
! if ((int) gtk_range_get_value (GTK_RANGE (wscroll)) != value)
! gtk_range_set_value (GTK_RANGE (wscroll), (gdouble)value);
xg_ignore_gtk_scrollbar = 0;
/* Make GTK draw the new thumb. We are not using a pure GTK event
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/08
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/09
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Kim F. Storm, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/14
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/14
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/17
- [Emacs-diffs] Changes to emacs/src/gtkutil.c,
Jan Djärv <=
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/18
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/22
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/22
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/26
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/28