From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#1036: [PATCH] * xterm.c (gtk-scroll-bar-adjust-thumb-portion): New variable to determine whether gtk scroll bar thumb size should be adjusted or not. * gtkutil.c (gtk-scroll-bar-adjust-thumb-portion): Use variable. Date: Sun, 2 Dec 2012 21:51:35 +0100 Message-ID: <04F1E5FA-1248-419D-BF2D-CC695CF48C35@swipnet.se> References: <08F7728F-7C66-4679-B905-E548DDA0E0FA@Freenet.DE> <878v9geh6t.fsf@topper.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354481568 7286 80.91.229.3 (2 Dec 2012 20:52:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2012 20:52:48 +0000 (UTC) Cc: 1036@debbugs.gnu.org To: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 02 21:53:01 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TfGX5-00064k-DD for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2012 21:52:59 +0100 Original-Received: from localhost ([::1]:39908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfGWt-0004II-Nz for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2012 15:52:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfGWr-0004IC-Eb for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 15:52:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfGWq-0001Wb-1u for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 15:52:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfGWp-0001WV-UY for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 15:52:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TfGZ3-00010D-WF for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 15:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Dec 2012 20:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 1036-submit@debbugs.gnu.org id=B1036.13544816433783 (code B ref 1036); Sun, 02 Dec 2012 20:55:01 +0000 Original-Received: (at 1036) by debbugs.gnu.org; 2 Dec 2012 20:54:03 +0000 Original-Received: from localhost ([127.0.0.1]:50472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfGY6-0000yy-Kj for submit@debbugs.gnu.org; Sun, 02 Dec 2012 15:54:03 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]:63050) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfGY3-0000yV-1p for 1036@debbugs.gnu.org; Sun, 02 Dec 2012 15:54:01 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id BD7DE92D5 for <1036@debbugs.gnu.org>; Sun, 2 Dec 2012 21:51:37 +0100 (CET) Original-Received: (qmail 158 invoked by uid 89); 2 Dec 2012 20:51:37 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 2 Dec 2012 20:51:37 -0000 Original-Received: from anon-189-33.vpn.ipredator.se (anon-189-33.vpn.ipredator.se [93.182.189.33]) by coolsville.localdomain (Postfix) with ESMTPSA id A4C0B7FA05E; Sun, 2 Dec 2012 21:51:36 +0100 (CET) In-Reply-To: <878v9geh6t.fsf@topper.koldfront.dk> X-Mailer: Apple Mail (2.1499) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67805 Archived-At: Hello. If we are to provide a user option for this, we should do it for all = toolkits. Anyway, the code to do this has always been trivial, its more a policy = thing. Jan D. =20 2 dec 2012 kl. 14:07 skrev asjo@koldfront.dk (Adam Sj=F8gren): > Seeing that there is no correct solution in sight, maybe it would be > possible to solve the problem like this. >=20 > Summary of problem and links to discussions in the previous decade, = see > here: http://koldfront.dk/archive/2012/05/27-181826.html >=20 > --- > src/ChangeLog | 7 +++++++ > src/gtkutil.c | 18 +++++++++++------- > src/xterm.c | 10 ++++++++++ > 3 files changed, 28 insertions(+), 7 deletions(-) >=20 > diff --git a/src/ChangeLog b/src/ChangeLog > index 80b9b1e..b95cf17 100644 > --- a/src/ChangeLog > +++ b/src/ChangeLog > @@ -1,3 +1,10 @@ > +2012-12-02 Adam Sj=F8gren > + > + * xterm.c (gtk-scroll-bar-adjust-thumb-portion): New variable to > + determine whether gtk scroll bar thumb size should be adjusted = or > + not (Bug#1036). > + * gtkutil.c (gtk-scroll-bar-adjust-thumb-portion): Use variable. > + > 2012-12-01 Paul Eggert >=20 > * xterm.c (x_draw_image_relief): Remove unused locals = (Bug#10500). > diff --git a/src/gtkutil.c b/src/gtkutil.c > index 4367b53..5259fe7 100644 > --- a/src/gtkutil.c > +++ b/src/gtkutil.c > @@ -3765,13 +3765,17 @@ xg_set_toolkit_scroll_bar_thumb (struct = scroll_bar *bar, >=20 > adj =3D gtk_range_get_adjustment (GTK_RANGE (wscroll)); >=20 > - /* We do the same as for MOTIF in xterm.c, assume 30 chars per = line > - rather than the real portion value. This makes the thumb = less likely > - to resize and that looks better. */ > - portion =3D WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; > - /* When the thumb is at the bottom, position =3D=3D whole. > - So we need to increase `whole' to make space for the thumb. = */ > - whole +=3D portion; > + if (gtk_scroll_bar_adjust_thumb_portion_p) > + { > + /* We do the same as for MOTIF in xterm.c, use 30 chars per > + line rather than the real portion value. This makes the > + thumb less likely to resize and that looks better. */ > + portion =3D WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * = 30; > + > + /* When the thumb is at the bottom, position =3D=3D whole. > + So we need to increase `whole' to make space for the = thumb. */ > + whole +=3D portion; > + } >=20 > if (whole <=3D 0) > top =3D 0, shown =3D 1; > diff --git a/src/xterm.c b/src/xterm.c > index bbcff8c..64f069d 100644 > --- a/src/xterm.c > +++ b/src/xterm.c > @@ -10791,6 +10791,16 @@ With MS Windows or Nextstep, the value is t. = */); > Vx_toolkit_scroll_bars =3D Qnil; > #endif >=20 > +#ifdef USE_GTK > + DEFVAR_BOOL ("gtk-scroll-bar-adjust-thumb-portion", > + gtk_scroll_bar_adjust_thumb_portion_p, > + doc: /* Non-nil means adjust the thumb in the > +gtk scroll bar to be less likely to resize which looks better. > +Set to nil if you want the thumb to fill the whole scroll bar > +when the entire buffer is visible. */); > + gtk_scroll_bar_adjust_thumb_portion_p =3D 1; > +#endif > + > staticpro (&last_mouse_motion_frame); > last_mouse_motion_frame =3D Qnil; >=20 > --=20 > 1.7.10.4 >=20 > --=20 > "It's beautiful! And I certainly hope Adam = Sj=F8gren > my parents hate this album!" = asjo@koldfront.dk >=20 >=20