aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan D2010-09-17 11:04:35 +0200
committerJan D2010-09-17 11:04:35 +0200
commitfb0cf781a1e22c3e9198811f57b72a023b865969 (patch)
tree58038f4b3f2546e7b39fd89f0089e42f57a5206f /src
parent1a9dc3b588164a97382127f51f1dda9e74abcf3d (diff)
downloademacs-fb0cf781a1e22c3e9198811f57b72a023b865969.tar.gz
emacs-fb0cf781a1e22c3e9198811f57b72a023b865969.zip
Expose tool-bar pixel width to lisp and use it for speedbar (Bug#7048)
* dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width in calculating new frame position. Add more space between new and parent on the left. * frame.c (Ftool_bar_pixel_width): New function to expose tool bar's pixel width to Lisp.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/frame.c23
2 files changed, 31 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8aaa9255ab5..71a1caa38e8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-09-17 Stephen Berman <stephen.berman@gmx.net>
2
3 * frame.c (Ftool_bar_pixel_width): New function to expose tool
4 bar's pixel width to Lisp (Bug#7048).
5
6 2010-09-14 Juanma Barranquero <lekktu@gmail.com>
7
8 * cmds.c (syms_of_cmds) <post-self-insert-hook>: Fix typos in docstring.
12010-09-17 Jan Djärv <jan.h.d@swipnet.se> 92010-09-17 Jan Djärv <jan.h.d@swipnet.se>
2 10
3 * gtkutil.c (xg_pack_tool_bar): Call gtk_handle_box_set_handle_position 11 * gtkutil.c (xg_pack_tool_bar): Call gtk_handle_box_set_handle_position
diff --git a/src/frame.c b/src/frame.c
index 93a6e898c9b..eb37d723991 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2649,6 +2649,28 @@ If FRAME is omitted, the selected frame is used. */)
2649#endif 2649#endif
2650 return make_number (FRAME_COLS (f)); 2650 return make_number (FRAME_COLS (f));
2651} 2651}
2652
2653DEFUN ("tool-bar-pixel-width", Ftool_bar_pixel_width,
2654 Stool_bar_pixel_width, 0, 1, 0,
2655 doc: /* Return width in pixels of FRAME's tool bar.
2656The result is greater than zero only when the tool bar is on the left
2657or right side of FRAME. If FRAME is omitted, the selected frame is
2658used. */)
2659 (Lisp_Object frame)
2660{
2661 struct frame *f;
2662
2663 if (NILP (frame))
2664 frame = selected_frame;
2665 CHECK_FRAME (frame);
2666 f = XFRAME (frame);
2667
2668#ifdef FRAME_TOOLBAR_WIDTH
2669 if (FRAME_WINDOW_P (f))
2670 return make_number (FRAME_TOOLBAR_WIDTH (f));
2671#endif
2672 return 0;
2673}
2652 2674
2653DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, 2675DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0,
2654 doc: /* Specify that the frame FRAME has LINES lines. 2676 doc: /* Specify that the frame FRAME has LINES lines.
@@ -4596,6 +4618,7 @@ automatically. See also `mouse-autoselect-window'. */);
4596 defsubr (&Sframe_char_width); 4618 defsubr (&Sframe_char_width);
4597 defsubr (&Sframe_pixel_height); 4619 defsubr (&Sframe_pixel_height);
4598 defsubr (&Sframe_pixel_width); 4620 defsubr (&Sframe_pixel_width);
4621 defsubr (&Stool_bar_pixel_width);
4599 defsubr (&Sset_frame_height); 4622 defsubr (&Sset_frame_height);
4600 defsubr (&Sset_frame_width); 4623 defsubr (&Sset_frame_width);
4601 defsubr (&Sset_frame_size); 4624 defsubr (&Sset_frame_size);