diff options
| author | Gerd Moellmann | 2000-11-22 16:31:28 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-22 16:31:28 +0000 |
| commit | 7464726e4170cafaa77acdcb3d7c403ef5788cc0 (patch) | |
| tree | 7753494dbaaa1a675a957e45b454d4165db79b84 /src | |
| parent | 8daf1204a073c519806190127474cd5e22c1ee9f (diff) | |
| download | emacs-7464726e4170cafaa77acdcb3d7c403ef5788cc0.tar.gz emacs-7464726e4170cafaa77acdcb3d7c403ef5788cc0.zip | |
(update_tool_bar, build_desired_tool_bar_string): Change
references to mambers deleted from struct frame to use the new
ones.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 2eb9933a2f2..f24c4cc3248 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7025,9 +7025,8 @@ update_tool_bar (f, save_match_data) | |||
| 7025 | } | 7025 | } |
| 7026 | 7026 | ||
| 7027 | /* Build desired tool-bar items from keymaps. */ | 7027 | /* Build desired tool-bar items from keymaps. */ |
| 7028 | f->desired_tool_bar_items | 7028 | f->tool_bar_items |
| 7029 | = tool_bar_items (f->desired_tool_bar_items, | 7029 | = tool_bar_items (f->tool_bar_items, &f->n_tool_bar_items); |
| 7030 | &f->n_desired_tool_bar_items); | ||
| 7031 | 7030 | ||
| 7032 | /* Redisplay the tool-bar in case we changed it. */ | 7031 | /* Redisplay the tool-bar in case we changed it. */ |
| 7033 | w->update_mode_line = Qt; | 7032 | w->update_mode_line = Qt; |
| @@ -7040,7 +7039,7 @@ update_tool_bar (f, save_match_data) | |||
| 7040 | 7039 | ||
| 7041 | 7040 | ||
| 7042 | /* Set F->desired_tool_bar_string to a Lisp string representing frame | 7041 | /* Set F->desired_tool_bar_string to a Lisp string representing frame |
| 7043 | F's desired tool-bar contents. F->desired_tool_bar_items must have | 7042 | F's desired tool-bar contents. F->tool_bar_items must have |
| 7044 | been set up previously by calling prepare_menu_bars. */ | 7043 | been set up previously by calling prepare_menu_bars. */ |
| 7045 | 7044 | ||
| 7046 | static void | 7045 | static void |
| @@ -7064,7 +7063,7 @@ build_desired_tool_bar_string (f) | |||
| 7064 | 7063 | ||
| 7065 | /* Each image in the string we build is preceded by a space, | 7064 | /* Each image in the string we build is preceded by a space, |
| 7066 | and there is a space at the end. */ | 7065 | and there is a space at the end. */ |
| 7067 | size_needed = f->n_desired_tool_bar_items + 1; | 7066 | size_needed = f->n_tool_bar_items + 1; |
| 7068 | 7067 | ||
| 7069 | /* Reuse f->desired_tool_bar_string, if possible. */ | 7068 | /* Reuse f->desired_tool_bar_string, if possible. */ |
| 7070 | if (size < size_needed) | 7069 | if (size < size_needed) |
| @@ -7081,12 +7080,10 @@ build_desired_tool_bar_string (f) | |||
| 7081 | put a `menu_item' property on tool-bar items with a value that | 7080 | put a `menu_item' property on tool-bar items with a value that |
| 7082 | is the index of the item in F's tool-bar item vector. */ | 7081 | is the index of the item in F's tool-bar item vector. */ |
| 7083 | for (i = 0, string_idx = 0; | 7082 | for (i = 0, string_idx = 0; |
| 7084 | i < f->n_desired_tool_bar_items; | 7083 | i < f->n_tool_bar_items; |
| 7085 | ++i, string_idx += 1) | 7084 | ++i, string_idx += 1) |
| 7086 | { | 7085 | { |
| 7087 | #define PROP(IDX) \ | 7086 | #define PROP(IDX) AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX)) |
| 7088 | (XVECTOR (f->desired_tool_bar_items) \ | ||
| 7089 | ->contents[i * TOOL_BAR_ITEM_NSLOTS + (IDX)]) | ||
| 7090 | 7087 | ||
| 7091 | int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); | 7088 | int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); |
| 7092 | int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); | 7089 | int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); |
| @@ -7367,7 +7364,7 @@ redisplay_tool_bar (f) | |||
| 7367 | 7364 | ||
| 7368 | /* Get information about the tool-bar item which is displayed in GLYPH | 7365 | /* Get information about the tool-bar item which is displayed in GLYPH |
| 7369 | on frame F. Return in *PROP_IDX the index where tool-bar item | 7366 | on frame F. Return in *PROP_IDX the index where tool-bar item |
| 7370 | properties start in F->current_tool_bar_items. Value is zero if | 7367 | properties start in F->tool_bar_items. Value is zero if |
| 7371 | GLYPH doesn't display a tool-bar item. */ | 7368 | GLYPH doesn't display a tool-bar item. */ |
| 7372 | 7369 | ||
| 7373 | int | 7370 | int |
| @@ -7381,7 +7378,7 @@ tool_bar_item_info (f, glyph, prop_idx) | |||
| 7381 | 7378 | ||
| 7382 | /* Get the text property `menu-item' at pos. The value of that | 7379 | /* Get the text property `menu-item' at pos. The value of that |
| 7383 | property is the start index of this item's properties in | 7380 | property is the start index of this item's properties in |
| 7384 | F->current_tool_bar_items. */ | 7381 | F->tool_bar_items. */ |
| 7385 | prop = Fget_text_property (make_number (glyph->charpos), | 7382 | prop = Fget_text_property (make_number (glyph->charpos), |
| 7386 | Qmenu_item, f->current_tool_bar_string); | 7383 | Qmenu_item, f->current_tool_bar_string); |
| 7387 | if (INTEGERP (prop)) | 7384 | if (INTEGERP (prop)) |