From: NeilBrown Date: Wed, 7 Jun 2023 22:03:58 +0000 (+1000) Subject: Change "Mouse-Activate:" to simply "Activate:" X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=0d139e80272dd0bc13b4d6191cd9e2aa1dc8fda9;p=edlib.git Change "Mouse-Activate:" to simply "Activate:" I want to activate buttons with the keyboard, so change the command to drop the "Mouse-" prefix. Signed-off-by: NeilBrown --- diff --git a/DOC/Developer/06-rendering.md b/DOC/Developer/06-rendering.md index 780b3747..f51c2ed5 100644 --- a/DOC/Developer/06-rendering.md +++ b/DOC/Developer/06-rendering.md @@ -205,7 +205,7 @@ document, rather than on its content. (1) or release (2) or motion (3). If it was "release" then "render-lines" will check if the attribute "active-tag" appears in the markup for that location. If it does then a message is sent to the - stack with a key formed from "Mouse-Activate:" followed by the value + stack with a key formed from "Activate:" followed by the value of "active-tag". "mark" will be a mark at the location, "str1" will be the tag, and "str2" will be all attributes active at that location. diff --git a/DOC/TODO.md b/DOC/TODO.md index 653c355b..f40c93be 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -9,10 +9,13 @@ the file. ### Trivial += [ ] :Cx-< and :Cx-> to shift view left and right and disable wrap - [ ] Unify edlib_timing and pane_too_long ?? - [X] If an email part doesn't end with newline, last character is swallowed. - [X] What is rule for doc:content? Does the mark move and get passed down, or is it copied and left unchanged? +- [ ] notmuch: When moving among messages, always move cursor to search + pane ### Small @@ -445,6 +448,7 @@ Module features ### Notmuch - overview +- [ ] When moving among messages, always move cursor to search pane - [ ] 'other' notmuch search doesn't show older messages sometimes - [ ] split notmuch into two databases, last 6 months and the rest. - [ ] script to move messages every week - but not deleted messages @@ -543,7 +547,7 @@ Module features to leave it confused. - [ ] maybe hide signature, unless small - [ ] When click on first char in tagged range, I don't see the tag and - don't get a Mouse-Activate event. + don't get a Activate event. - [ ] line wrap in header should not appear as space?? - [ ] handle all Unicode newline chars. - [ ] Auto-hide depending on type - with extensible table @@ -730,8 +734,8 @@ Module features ### lib-url -- [ ] command to mark-up all URLs in a document -- [ ] handlers for that markup. xdg-open for links, maybe signal +- [X] command to mark-up all URLs in a document +- [X] handlers for that markup. xdg-open for links, maybe signal register email client for mailto: links. - [ ] easy way for K:Enter on a link to do just like mouse-click - [ ] email: urls should not be followed unless they are visible. diff --git a/DOC/render-control b/DOC/render-control index deb95a54..14dfff69 100644 --- a/DOC/render-control +++ b/DOC/render-control @@ -133,7 +133,7 @@ Standard attributes are: attribute. active-tag:$tag If a mouse-click happens on text with this attribute, - Mouse-Activate:$tag is called with: + Activate:$tag is called with: ->mark being a new mark at the location ->str being $tag ->str2 being all attributes active at the location diff --git a/python/lib-url.py b/python/lib-url.py index 5ec98c49..1fc272e6 100644 --- a/python/lib-url.py +++ b/python/lib-url.py @@ -9,7 +9,7 @@ # # "render:url-view" is an overlay pane which: # - responds to map-attr for render:url, adding the active-tag attr -# - handles Mouse-Activate:url to also activate the url +# - handles Activate:url to also activate the url import edlib @@ -73,7 +73,7 @@ class url_view(edlib.Pane): return 1 def handle_click(self, key, focus, mark, str2, **a): - "handle:Mouse-Activate:url" + "handle:Activate:url" a = str2.split(',') tag="" for w in a: diff --git a/python/module-notmuch.py b/python/module-notmuch.py index a422aece..1d268b9b 100644 --- a/python/module-notmuch.py +++ b/python/module-notmuch.py @@ -3369,15 +3369,15 @@ class notmuch_message_view(edlib.Pane): return 1 def handle_toggle_hide(self, key, focus, mark, **a): - "handle-list/Mouse-Activate:email-hide/email:select:hide" + "handle-list/Activate:email-hide/email:select:hide" return self.handle_vis(focus, mark, "hide") def handle_toggle_full(self, key, focus, mark, **a): - "handle-list/Mouse-Activate:email-full/email:select:full" + "handle-list/Activate:email-full/email:select:full" return self.handle_vis(focus, mark, "full") def handle_toggle_extras(self, key, focus, mark, **a): - "handle-list/Mouse-Activate:email-extras/email:select:extras/doc:char-X" + "handle-list/Activate:email-extras/email:select:extras/doc:char-X" if not mark: # a mark at the first "sep" part will identify the headers mark = edlib.Mark(focus) @@ -3415,7 +3415,7 @@ class notmuch_message_view(edlib.Pane): return 1 def handle_save(self, key, focus, mark, **a): - "handle-list/Mouse-Activate:email-save/email:select:save" + "handle-list/Activate:email-save/email:select:save" file = focus.call("doc:get-attr", "multipart-prev:email:filename", mark, ret='str') if not file: @@ -3433,7 +3433,7 @@ class notmuch_message_view(edlib.Pane): return 1 def handle_external(self, key, focus, mark, **a): - "handle-list/Mouse-Activate:email-external view/email:select:external view" + "handle-list/Activate:email-external view/email:select:external view" type = focus.call("doc:get-attr", "multipart-prev:email:content-type", mark, ret='str') prefix = focus.call("doc:get-attr", "multipart-prev:email:prefix", mark, ret='str') ext = focus.call("doc:get-attr", "multipart-prev:email:ext", mark, ret='str') diff --git a/render-lines.c b/render-lines.c index b334a3bc..4209b02d 100644 --- a/render-lines.c +++ b/render-lines.c @@ -1393,7 +1393,7 @@ DEF_CMD(render_lines_set_cursor) tag = get_active_tag(xyattr); if (tag) { char *c = NULL; - asprintf(&c, "Mouse-Activate:%s", tag); + asprintf(&c, "Activate:%s", tag); if (c) call(c, focus, 0, m2, tag, 0, ci->mark, xyattr);