[gnus git] branch master updated: m0-7-63-g7c1ea6e =2= * eww.el (eww-convert-widgets): Make widgets from non-tabular layouts work, too. ; Allow toggling checkboxes.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 7c1ea6e40433e6c1ff4273ba58e87e9b5f152cc5 (commit)
via 9fde8eb8963868bcf47e2df81165f97267910552 (commit)
from 91c762b26aeb17dfd2c5b8330745a66bb4b285b9 (commit)
- Log -----------------------------------------------------------------
commit 7c1ea6e40433e6c1ff4273ba58e87e9b5f152cc5
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Jun 11 18:09:32 2013 +0200
* eww.el (eww-convert-widgets): Make widgets from non-tabular layouts work, too.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 29f678c..cafd18a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-11 Lars Magne Ingebrigtsen <[email protected]>
+
+ * eww.el (eww-convert-widgets): Make widgets from non-tabular layouts
+ work, too.
+
2013-06-10 Albert Krewinkel <[email protected]>
* sieve-manage.el (sieve-manage-open): work with STARTTLS: shorten
diff --git a/lisp/eww.el b/lisp/eww.el
index cf3f62b..7f48fce 100644
--- a/lisp/eww.el
+++ b/lisp/eww.el
@@ -223,7 +223,8 @@
(when shr-final-table-render
(nconc eww-form (list widget)))
(apply 'widget-create widget))
- (put-text-property start (point) 'eww-widget widget)))
+ (put-text-property start (point) 'eww-widget widget)
+ (insert " ")))
(defun eww-click-radio (widget &rest ignore)
(let ((form (plist-get (cdr widget) :eww-form))
@@ -300,12 +301,17 @@
(defun eww-convert-widgets ()
(let ((start (point-min))
widget)
+ ;; Some widgets come from different buffers (rendered for tables),
+ ;; so we need to nix out the list of widgets and recreate them.
+ (setq widget-field-list nil
+ widget-field-new nil)
(while (setq start (next-single-property-change start 'eww-widget))
(setq widget (get-text-property start 'eww-widget))
(goto-char start)
(let ((end (next-single-property-change start 'eww-widget)))
(dolist (overlay (overlays-in start end))
- (when (plist-get (overlay-properties overlay) 'button)
+ (when (or (plist-get (overlay-properties overlay) 'button)
+ (plist-get (overlay-properties overlay) 'field))
(delete-overlay overlay)))
(delete-region start end))
(apply 'widget-create widget))
commit 9fde8eb8963868bcf47e2df81165f97267910552
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Jun 11 17:44:44 2013 +0200
Allow toggling checkboxes.
diff --git a/lisp/eww.el b/lisp/eww.el
index ca7b8c0..cf3f62b 100644
--- a/lisp/eww.el
+++ b/lisp/eww.el
@@ -201,6 +201,7 @@
:notify 'eww-click-radio
:name (cdr (assq :name cont))
:checkbox-value (cdr (assq :value cont))
+ :checkbox-type type
:eww-form eww-form
(cdr (assq :checked cont))))
((equal type "hidden")
@@ -227,6 +228,7 @@
(defun eww-click-radio (widget &rest ignore)
(let ((form (plist-get (cdr widget) :eww-form))
(name (plist-get (cdr widget) :name)))
+ (when (equal (plist-get (cdr widget) :type) "radio")
(if (widget-value widget)
;; Switch all the other radio buttons off.
(dolist (overlay (overlays-in (point-min) (point-max)))
@@ -235,7 +237,7 @@
(equal name (plist-get (cdr field) :name)))
(unless (eq field widget)
(widget-value-set field nil)))))
- (widget-value-set widget t))
+ (widget-value-set widget t)))
(eww-fix-widget-keymap)))
(defun eww-submit (widget &rest ignore)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 5 +++++
lisp/eww.el | 30 +++++++++++++++++++-----------
2 files changed, 24 insertions(+), 11 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project