annotate admin/notes/commits @ 109581:06384b3caebf

Add ability to put Gtk+ tool bar on the left/right/bottom or top. Default top. * lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) (menu-bar-showhide-tool-bar-menu-customize-disable) (menu-bar-showhide-tool-bar-menu-customize-enable-right) (menu-bar-showhide-tool-bar-menu-customize-enable-top) (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, make a menu for Options => toolbar that can move it. * src/frame.c (Qtool_bar_position): New variable. (make_frame): Set tool_bar_position to Qtop. (frame_parms): Add tool-bar-position. (x_report_frame_params): Store tool_bar_position. (x_set_fringe_width): Reset wm size hint after fringe changes. * src/frame.h (struct frame): Add tool_bar_position. (Qbottom): Declare. * src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro. (xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth. (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. (xg_create_frame_widgets): Create a hobox for placing widgets vertically. Use gtk_box_pack_start. (xg_height_or_width_changed): Renamed from xg_height_changed. (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. (xg_update_frame_menubar, free_frame_menubar): Change to xg_height_or_width_changed. (xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar size correctly. Remove hardcoded 4, instead use handlebox size - toolbar size. (xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar size correctly. Use handlebox size + toolbar size as additional size. (xg_pack_tool_bar): POS is a new parameter. Set orientation of tool bar based on pos. Only make handlebox_widget if NULL. Check if tool bar goes to vbox or hbox depending on pos. (xg_update_tool_bar_sizes): New function. (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar height, call xg_update_tool_bar_sizes instead. (free_frame_tool_bar): Remove from hbox or vbox depending on toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero. (xg_change_toolbar_position): New function. * src/gtkutil.h (xg_change_toolbar_position): Declare. * src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT and FRAME_TOOLBAR_LEFT_WIDTH. * src/xfns.c (x_set_tool_bar_position): New function. (xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT. (x_frame_parm_handlers): Add x_set_tool_bar_position. (syms_of_xfns): if USE_GTK, provide move-toolbar. * src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth. * src/xterm.h (struct x_output): Add toolbar_top_height, toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove toolbar_height. if USE_GTK: Add hbox_widget and toolbar_in_hbox. (FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT) (FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros. (FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
author Jan D. <jan.h.d@swipnet.se>
date Thu, 29 Jul 2010 18:49:59 +0200
parents 36d0fedf13ca
children 4e1df9366cdd a5eeeb631d8a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
106868
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
1 HOW TO COMMIT CHANGES TO EMACS
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
2
107181
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
3 Most of these points are from:
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
4
106868
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
5 http://lists.gnu.org/archive/html/emacs-devel/2009-03/msg00555.html
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
6 From: Miles Bader
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
7 Subject: commit style redux
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
8 Date: Tue, 31 Mar 2009 12:21:20 +0900
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
9
107181
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
10 (0) Each commit should correspond to a single change (whether spread
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
11 over multiple files or not). Do not mix different changes in the
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
12 same commit (eg adding a feature in one file, fixing a bug in
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
13 another should be two commits, not one).
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
14
106868
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
15 (1) Commit all changed files at once with a single log message (which
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
16 in CVS will result in an identical log message for all committed
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
17 files), not one-by-one. This is pretty easy using vc-dir now.
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
18
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
19 (2) Make the log message describe the entire changeset, perhaps
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
20 including relevant changelog entiries (I often don't bother with
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
21 the latter if it's a trivial sort of change).
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
22
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
23 Many modern source-control systems vaguely distinguish the first
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
24 line of the log message to use as a short summary for abbreviated
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
25 history listing (in arch this was explicitly called the summary,
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
26 but many other systems have a similar concept). So it's nice if
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
27 you can format the log entry like:
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
28
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
29 SHORTISH ONE-LINE SUMMARY
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
30
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
31 MULTIPLE-LINE DETAILED DESCRIPTION POSSIBLY INCLUDING (OR
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
32 CONSISTING OF) CHANGELOG ENTRIES
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
33
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
34 [Even with CVS this style is useful, because web CVS browsing
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
35 interfaces often include the first N words of the log message of
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
36 the most recent commit as a short "most recent change"
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
37 description.]
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
38
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
39 (3) Don't phrase log messages assuming the filename is known, because
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
40 in non-file-oriented systems (everything modern other than CVS),
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
41 the log listing tends to be treated as global information, and the
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
42 connection with specific files is less explicit.
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
43
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
44 For instance, currently I often see log messages like "Regenerate";
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
45 for modern source-control systems with a global log, it's better to
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
46 have something like "Regenerate configure".
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
47
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
48
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
49 Followup discussion:
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
50 http://lists.gnu.org/archive/html/emacs-devel/2010-01/msg00897.html
107181
36d0fedf13ca * commits: Mention not to mix changes in any given commit.
Glenn Morris <rgm@gnu.org>
parents: 106868
diff changeset
51 http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00401.html
106868
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
52
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
53
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
54 PREVIOUS GUIDELINES FOR CVS
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
55
a3ab0fab30ae Update with Miles's advice on how to commit.
Glenn Morris <rgm@gnu.org>
parents: 106866
diff changeset
56 For historical interest only, here is the old-style advice for CVS logs:
92045
eeb9265e0ea5 New file.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01208.html
eeb9265e0ea5 New file.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
58
eeb9265e0ea5 New file.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59 From: Eli Zaretskii
eeb9265e0ea5 New file.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 Subject: Re: Log messages in CVS
eeb9265e0ea5 New file.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 Date: Sat, 29 Dec 2007 16:06:29 +0200