emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: toolbars?


From: William M. Perry
Subject: Re: toolbars?
Date: 03 Oct 2000 08:39:22 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (GTK)

Dave Love <address@hidden> writes:

> >>>>> "WMP" == William M Perry <address@hidden> writes:
> 
>  WMP> So, I wanted to get toolbars working in Emacs/W3 
> 
> [Does the current CVS source actually work properly in Emacs 21?  I
> can't remember exactly what I tried and had trouble with.]

Local files work... I am going to spend some time early this morning trying
to figure out what is wrong with HTTP.

>  WMP> BUT the global toolbar is still drawn, 
> 
> In a mode with the `mode-class' property `special', only part of it
> should be drawn (which perhaps needs refining).

There appears to be no way to say 'use my toolbar exclusively', which seems
a bit lacking.  I was thinking along the lines of the attached patch.  It
only puts the global keymap on the list of possible toolbars if the mode
keymap (or minor modes - that isn't quite what I intended :) does not
define one.

>  WMP> How do I nuke the old toolbar?  I could find no other packages
>  WMP> that use the toolbar support yet.
> 
> I haven't been able to attend to it since Gerd made a bug fix to allow
> what I was intending to do -- use indirection of the [tool-bar] keymap
> binding through a function, so that you can override it locally.
> 
> We've only paid much attention to the tool bar quite recently since we
> didn't have icons we could use before.

Understandable.  Did you guys start using the gnome pixmaps?

-bp

Index: keyboard.c
===================================================================
RCS file: /cvs/emacs/src/keyboard.c,v
retrieving revision 1.574
diff -c -w -r1.574 keyboard.c
*** keyboard.c  2000/09/29 12:41:40     1.574
--- keyboard.c  2000/10/03 13:37:22
***************
*** 6888,6895 ****
--- 6888,6917 ----
        maps[nmaps++] = get_local_map (PT, current_buffer, local_map);
      }
  
+   /* Loop thru and check if there are mode-specific toolbars before we
+      put the global map on there.  */
+   {
+     int ntoolbars_found = 0;
+ 
+     for (i = nmaps - 1; i >= 0; --i)
+       {
+       if (!NILP (maps[i]))
+         {
+           Lisp_Object keymap;
+ 
+           keymap = get_keyelt (access_keymap (maps[i], Qtool_bar, 1, 1), 0);
+ 
+           if (!NILP (Fkeymapp (keymap)))
+             {
+               ntoolbars_found++;
+             }
+         }
+       }
+ 
      /* Add global keymap at the end.  */
+     if (!ntoolbars_found)
        maps[nmaps++] = current_global_map;
+   }
  
    /* Process maps in reverse order and look up in each map the prefix
       key `tool-bar'.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]