diff options
| author | Karoly Lorentey | 2004-11-06 17:52:02 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-11-06 17:52:02 +0000 |
| commit | 65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb (patch) | |
| tree | 853cf391ca1abda4f4ccd6fe8e7bb43f7c86ee08 /lwlib | |
| parent | e0bc17abe6979d607e8de4684dddb96e53c60065 (diff) | |
| parent | 392cf16dd0ee9358f8af0cd0d8048b822456bbeb (diff) | |
| download | emacs-65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb.tar.gz emacs-65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-653
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-654
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656
Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-662
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-663
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-664
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-665
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-666
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-669
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-670
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-671
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-64
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-65
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-66
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-67
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-264
Diffstat (limited to 'lwlib')
| -rw-r--r-- | lwlib/ChangeLog | 7 | ||||
| -rw-r--r-- | lwlib/xlwmenu.c | 25 |
2 files changed, 19 insertions, 13 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 923f52debdd..eb2dd13432a 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2004-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xlwmenu.c (find_first_selectable, find_next_selectable) | ||
| 4 | (find_prev_selectable): Rename parameter skip_no_call_data to | ||
| 5 | skip_titles. Recognize titles as having no call_data and no contents. | ||
| 6 | (Down, Up): Comment update. | ||
| 7 | |||
| 1 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 8 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 9 | ||
| 3 | * lwlib.h (_widget_value): Added lname and lkey. | 10 | * lwlib.h (_widget_value): Added lname and lkey. |
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 973fc6ec5d5..d4eeeaa3eb4 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c | |||
| @@ -2054,26 +2054,26 @@ Nothing (w, ev, params, num_params) | |||
| 2054 | } | 2054 | } |
| 2055 | 2055 | ||
| 2056 | static widget_value * | 2056 | static widget_value * |
| 2057 | find_first_selectable (mw, item, skip_no_call_data) | 2057 | find_first_selectable (mw, item, skip_titles) |
| 2058 | XlwMenuWidget mw; | 2058 | XlwMenuWidget mw; |
| 2059 | widget_value *item; | 2059 | widget_value *item; |
| 2060 | int skip_no_call_data; | 2060 | int skip_titles; |
| 2061 | { | 2061 | { |
| 2062 | widget_value *current = item; | 2062 | widget_value *current = item; |
| 2063 | enum menu_separator separator; | 2063 | enum menu_separator separator; |
| 2064 | 2064 | ||
| 2065 | while (lw_separator_p (current->name, &separator, 0) || !current->enabled | 2065 | while (lw_separator_p (current->name, &separator, 0) || !current->enabled |
| 2066 | || (skip_no_call_data && !current->call_data)) | 2066 | || (skip_titles && !current->call_data && !current->contents)) |
| 2067 | if (current->next) | 2067 | if (current->next) |
| 2068 | current=current->next; | 2068 | current=current->next; |
| 2069 | else | 2069 | else |
| 2070 | return NULL; | 2070 | return NULL; |
| 2071 | 2071 | ||
| 2072 | return current; | 2072 | return current; |
| 2073 | } | 2073 | } |
| 2074 | 2074 | ||
| 2075 | static widget_value * | 2075 | static widget_value * |
| 2076 | find_next_selectable (mw, item, skip_no_call_data) | 2076 | find_next_selectable (mw, item, skip_titles) |
| 2077 | XlwMenuWidget mw; | 2077 | XlwMenuWidget mw; |
| 2078 | widget_value *item; | 2078 | widget_value *item; |
| 2079 | { | 2079 | { |
| @@ -2082,7 +2082,7 @@ find_next_selectable (mw, item, skip_no_call_data) | |||
| 2082 | 2082 | ||
| 2083 | while (current->next && (current=current->next) && | 2083 | while (current->next && (current=current->next) && |
| 2084 | (lw_separator_p (current->name, &separator, 0) || !current->enabled | 2084 | (lw_separator_p (current->name, &separator, 0) || !current->enabled |
| 2085 | || (skip_no_call_data && !current->call_data))) | 2085 | || (skip_titles && !current->call_data && !current->contents))) |
| 2086 | ; | 2086 | ; |
| 2087 | 2087 | ||
| 2088 | if (current == item) | 2088 | if (current == item) |
| @@ -2093,7 +2093,8 @@ find_next_selectable (mw, item, skip_no_call_data) | |||
| 2093 | 2093 | ||
| 2094 | while (lw_separator_p (current->name, &separator, 0) | 2094 | while (lw_separator_p (current->name, &separator, 0) |
| 2095 | || !current->enabled | 2095 | || !current->enabled |
| 2096 | || (skip_no_call_data && !current->call_data)) | 2096 | || (skip_titles && !current->call_data |
| 2097 | && !current->contents)) | ||
| 2097 | { | 2098 | { |
| 2098 | if (current->next) | 2099 | if (current->next) |
| 2099 | current=current->next; | 2100 | current=current->next; |
| @@ -2108,14 +2109,14 @@ find_next_selectable (mw, item, skip_no_call_data) | |||
| 2108 | } | 2109 | } |
| 2109 | 2110 | ||
| 2110 | static widget_value * | 2111 | static widget_value * |
| 2111 | find_prev_selectable (mw, item, skip_no_call_data) | 2112 | find_prev_selectable (mw, item, skip_titles) |
| 2112 | XlwMenuWidget mw; | 2113 | XlwMenuWidget mw; |
| 2113 | widget_value *item; | 2114 | widget_value *item; |
| 2114 | { | 2115 | { |
| 2115 | widget_value *current = item; | 2116 | widget_value *current = item; |
| 2116 | widget_value *prev = item; | 2117 | widget_value *prev = item; |
| 2117 | 2118 | ||
| 2118 | while ((current=find_next_selectable (mw, current, skip_no_call_data)) | 2119 | while ((current=find_next_selectable (mw, current, skip_titles)) |
| 2119 | != item) | 2120 | != item) |
| 2120 | { | 2121 | { |
| 2121 | if (prev == current) | 2122 | if (prev == current) |
| @@ -2141,8 +2142,7 @@ Down (w, ev, params, num_params) | |||
| 2141 | if (mw->menu.old_depth == mw->menu.top_depth) | 2142 | if (mw->menu.old_depth == mw->menu.top_depth) |
| 2142 | /* When <down> in the menu-bar is pressed, display the corresponding | 2143 | /* When <down> in the menu-bar is pressed, display the corresponding |
| 2143 | sub-menu and select the first selectable menu item there. | 2144 | sub-menu and select the first selectable menu item there. |
| 2144 | If this is a popup menu, skip items with zero call data (title of | 2145 | If this is a popup menu, skip title item of the popup. */ |
| 2145 | the popup). */ | ||
| 2146 | set_new_state (mw, | 2146 | set_new_state (mw, |
| 2147 | find_first_selectable (mw, | 2147 | find_first_selectable (mw, |
| 2148 | selected_item->contents, | 2148 | selected_item->contents, |
| @@ -2174,8 +2174,7 @@ Up (w, ev, params, num_params) | |||
| 2174 | last selectable item in the list. So we select the first | 2174 | last selectable item in the list. So we select the first |
| 2175 | selectable one and find the previous selectable item. Is there | 2175 | selectable one and find the previous selectable item. Is there |
| 2176 | a better way? */ | 2176 | a better way? */ |
| 2177 | /* If this is a popup menu, skip items with zero call data (title of | 2177 | /* If this is a popup menu, skip title item of the popup. */ |
| 2178 | the popup). */ | ||
| 2179 | set_new_state (mw, | 2178 | set_new_state (mw, |
| 2180 | find_first_selectable (mw, | 2179 | find_first_selectable (mw, |
| 2181 | selected_item->contents, | 2180 | selected_item->contents, |