unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5736@debbugs.gnu.org, Tim Landscheidt <tim@tim-landscheidt.de>
Subject: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Sun, 21 Mar 2010 08:35:38 +0100	[thread overview]
Message-ID: <4BA5CC4A.7080307@swipnet.se> (raw)
In-Reply-To: <jwvsk7uai5z.fsf-monnier+emacs@gnu.org>

Stefan Monnier skrev:
>> It is easy to fix, but as 23.2 is approaching, I guess the Emacs maintainers
>> must give their Ok.
> 
> I'd need to see the patch first,
> 


=== modified file 'doc/emacs/ChangeLog'
--- doc/emacs/ChangeLog	2010-03-06 19:02:49 +0000
+++ doc/emacs/ChangeLog	2010-03-20 12:35:25 +0000
@@ -1,3 +1,10 @@
+2010-03-20  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xresources.texi (Table of Resources): Clarify toolBar number
+	for Gtk+.
+
+	* frames.texi (Menu Bars): menuBarLines => menuBar (bug#5736).
+
  2010-03-06  Chong Yidong  <cyd@stupidchicken.com>

  	* custom.texi (Init Examples): Add xref to Locals.

=== modified file 'doc/emacs/frames.texi'
--- doc/emacs/frames.texi	2010-03-02 22:56:36 +0000
+++ doc/emacs/frames.texi	2010-03-20 12:23:03 +0000
@@ -957,7 +957,7 @@
  With no argument, this command toggles Menu Bar mode, a
  minor mode.  With an argument, the command turns Menu Bar mode on if the
  argument is positive, off if the argument is not positive.  You can use
-the X resource @samp{menuBarLines} to control the initial setting of
+the X resource @samp{menuBar} to control the initial setting of
  Menu Bar mode.  @xref{Resources}.

  @kindex C-Mouse-3 @r{(when menu bar is disabled)}

=== modified file 'doc/emacs/xresources.texi'
--- doc/emacs/xresources.texi	2010-01-13 08:35:10 +0000
+++ doc/emacs/xresources.texi	2010-03-20 12:34:59 +0000
@@ -307,12 +307,14 @@
  @item @code{toolBar} (class @code{ToolBar})
  @cindex tool bar
  Number of lines to reserve for the tool bar.  A zero value suppresses
-the tool bar.  If the value is non-zero and
-@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
-will be changed automatically so that all tool bar items are visible.
+the tool bar.  For the Emacs tool bar (i.e. not Gtk+), if the value is
+non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's
+size will be changed automatically so that all tool bar items are visible.
    If the value of @code{auto-resize-tool-bars} is @code{grow-only},
  the tool bar expands automatically, but does not contract automatically.
  To contract the tool bar, you must redraw the frame by entering @kbd{C-l}.
+For the Gtk+ tool bar, any non-zero value means on and
+@code{auto-resize-tool-bars} has no effect.

  @item @code{useXIM} (class @code{UseXIM})
  @cindex XIM

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2010-03-20 03:37:39 +0000
+++ src/ChangeLog	2010-03-20 12:39:51 +0000
@@ -1,3 +1,11 @@
+2010-03-20  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).
+
+	* xfns.c (Fx_create_frame): Make menuBar a RES_TYPE_BOOLEAN_NUMBER.
+
+	* dispextern.h (resource_types): RES_TYPE_BOOLEAN_NUMBER is new.
+
  2010-03-20  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

  	* xfns.c (Fx_create_frame) [USE_LUCID]: Add BLOCK_INPUT around

=== modified file 'src/dispextern.h'
--- src/dispextern.h	2010-02-19 13:57:53 +0000
+++ src/dispextern.h	2010-03-20 12:35:41 +0000
@@ -3122,7 +3122,8 @@
    RES_TYPE_FLOAT,
    RES_TYPE_BOOLEAN,
    RES_TYPE_STRING,
-  RES_TYPE_SYMBOL
+  RES_TYPE_SYMBOL,
+  RES_TYPE_BOOLEAN_NUMBER
  };

  extern Lisp_Object x_get_arg P_ ((Display_Info *, Lisp_Object,

=== modified file 'src/frame.c'
--- src/frame.c	2010-01-29 19:02:02 +0000
+++ src/frame.c	2010-03-20 12:29:04 +0000
@@ -4005,6 +4005,13 @@
  	    case RES_TYPE_NUMBER:
  	      return make_number (atoi (SDATA (tem)));

+	    case RES_TYPE_BOOLEAN_NUMBER:
+	      if (!strcmp (SDATA (tem), "on")
+		  || !strcmp (SDATA (tem), "true"))
+		return make_number (1);
+	      return make_number (atoi (SDATA (tem)));
+              break;
+
  	    case RES_TYPE_FLOAT:
  	      return make_float (atof (SDATA (tem)));


=== modified file 'src/xfns.c'
--- src/xfns.c	2010-03-20 03:37:39 +0000
+++ src/xfns.c	2010-03-20 12:29:12 +0000
@@ -3418,7 +3418,7 @@
    init_frame_faces (f);

    x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1),
-		       "menuBar", "MenuBar", RES_TYPE_NUMBER);
+		       "menuBar", "MenuBar", RES_TYPE_BOOLEAN_NUMBER);
    x_default_parameter (f, parms, Qtool_bar_lines, make_number (1),
  		       "toolBar", "ToolBar", RES_TYPE_NUMBER);
    x_default_parameter (f, parms, Qbuffer_predicate, Qnil,



	Jan D.






  reply	other threads:[~2010-03-21  7:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 15:49 bug#5736: 23.1; Xresource menuBar does not work as advertized Tim Landscheidt
2010-03-20 12:42 ` Jan Djärv
2010-03-20 19:48   ` Stefan Monnier
2010-03-21  7:35     ` Jan Djärv [this message]
2010-03-22  1:45       ` Stefan Monnier
2010-03-22  7:31         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA5CC4A.7080307@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=5736@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tim@tim-landscheidt.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).