Commit dba0634a authored by Ulf Jasper's avatar Ulf Jasper

newsticker: Clean up newsticker--group-manage-orphan-feeds

2011-10-30  Ulf Jasper  <ulf.jasper@web.de>

	* net/newst-treeview.el: Remove "Time-stamp".
	(newsticker--group-manage-orphan-feeds): Do not call
	newsticker--treeview-tree-update.
	(newsticker-treeview-update, newsticker-treeview): Call
	newsticker--treeview-tree-update if necessary.

2011-10-30  Ulf Jasper  <ulf.jasper@web.de>

	* automated/newsticker-tests.el
	(newsticker--group-manage-orphan-feeds): Removed fsetting of
	newsticker--treeview-tree-update.
parent 3d8daefe
2011-10-30 Ulf Jasper <ulf.jasper@web.de>
* net/newst-treeview.el: Remove "Time-stamp".
(newsticker--group-manage-orphan-feeds): Do not call
newsticker--treeview-tree-update.
(newsticker-treeview-update, newsticker-treeview): Call
newsticker--treeview-tree-update if necessary.
2011-10-30 Martin Rudalics <rudalics@gmx.at>
* window.el (window-iso-combination-p, window-iso-combined-p)
......
......@@ -7,7 +7,6 @@
;; URL: http://www.nongnu.org/newsticker
;; Created: 2007
;; Keywords: News, RSS, Atom
;; Time-stamp: "13. Mai 2011, 20:56:49 (ulf)"
;; Package: newsticker
;; ======================================================================
......@@ -1193,7 +1192,8 @@ Arguments IGNORE are ignored."
Note: does not update the layout."
(interactive)
(let ((cur-item (newsticker--treeview-get-selected-item)))
(newsticker--group-manage-orphan-feeds)
(if (newsticker--group-manage-orphan-feeds)
(newsticker--treeview-tree-update))
(newsticker--treeview-list-update t)
(newsticker--treeview-item-update)
(newsticker--treeview-tree-update-tags)
......@@ -1811,7 +1811,8 @@ Update teeview afterwards unless NO-UPDATE is non-nil."
(defun newsticker--group-manage-orphan-feeds ()
"Put unmanaged feeds into `newsticker-groups'.
Remove obsolete feeds as well."
Remove obsolete feeds as well.
Return t if groups have changed, nil otherwise."
(unless newsticker-groups
(setq newsticker-groups '("Feeds")))
(let ((new-feed nil)
......@@ -1823,10 +1824,9 @@ Remove obsolete feeds as well."
(append newsticker-url-list-defaults newsticker-url-list))
(setq newsticker-groups
(newsticker--group-remove-obsolete-feeds newsticker-groups))
(if (or new-feed
(not (= grouped-feeds
(newsticker--count-grouped-feeds newsticker-groups))))
(newsticker--treeview-tree-update))))
(or new-feed
(not (= grouped-feeds
(newsticker--count-grouped-feeds newsticker-groups))))))
;; ======================================================================
;;; Modes
......@@ -2036,7 +2036,8 @@ POS gives the position where EVENT occurred."
(newsticker--treeview-frame-init)
(newsticker--treeview-window-init)
(newsticker--treeview-buffer-init)
(newsticker--group-manage-orphan-feeds)
(if (newsticker--group-manage-orphan-feeds)
(newsticker--treeview-tree-update))
(newsticker--treeview-set-current-node newsticker--treeview-feed-tree)
(newsticker-start t) ;; will start only if not running
(newsticker-treeview-update)
......
2011-10-30 Ulf Jasper <ulf.jasper@web.de>
* automated/newsticker-tests.el
(newsticker--group-manage-orphan-feeds): Removed fsetting of
newsticker--treeview-tree-update.
2011-10-29 Ulf Jasper <ulf.jasper@web.de>
* automated/newsticker-tests.el
......
......@@ -138,14 +138,8 @@ Apply to INPUT and compare with EXPECTED."
Signals an error if something goes wrong."
(let ((newsticker-groups '("Feeds"))
(newsticker-url-list-defaults nil)
(newsticker-url-list '(("feed1") ("feed2") ("feed3")))
t-nttvtu)
;; prevent updating the treeview as it does not exist during fully
;; automated tests
(fset 't-nttvtu (symbol-function 'newsticker--treeview-tree-update))
(fset 'newsticker--treeview-tree-update (lambda() nil))
(newsticker-url-list '(("feed1") ("feed2") ("feed3"))))
(newsticker--group-manage-orphan-feeds)
(fset 'newsticker--treeview-tree-update (symbol-function 't-nttvtu))
(should (equal '("Feeds" "feed3" "feed2" "feed1")
newsticker-groups))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment