Package: yarssr
Version: 0.2.2-7
Followup-For: Bug #570263
Hello,
included patch fixes the feature by not unmarking the new items when feeds
are updated - in both cases of automatical and manual update. So the only way
to get rid of new messages would now be by explicitelly clicking on the
"Unmark new" menuitem. To make this a bit more flexible, I also added the
"Umark new" menuitem to each feed.
I was also having problems with some RSS not updating (or not picking up all
their items) as mentioned in bug #336667. This turns out to be another feature
of yarssr when each item in a feed was supposed to be uniquely identified by
its link, which is not the case in some RSS feeds (see e.g. the kernel RSS:
http://www.kernel.org/kdist/rss.xml where all items are pointing to the base
http://www.kernel.org link). So the yarssr code was modified to identify each
feed-item by its link and title. See again the attached patch.
Best regards,
Pavel
-- System Information:
Debian Release: wheezy/sid
APT prefers squeeze
APT policy: (950, 'squeeze'), (950, 'sid'), (840,
'testing-proposed-updates'), (840, 'testing'), (740, 'unstable'), (738,
'experimental'), (540, 'proposed-updates'), (540, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39-2-amd64-ipnp-n22a-4 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages yarssr depends on:
ii libgnome2-perl 1.042-2+b1 Perl interface to the GNOME librar
ii libgnome2-vfs-perl 1.081-2 Perl interface to the 2.x series o
ii libgnomevfs2-extra 1:2.24.4-1 GNOME Virtual File System (extra m
ii libgtk2-gladexml-perl 1.007-1+b1 Perl interface to use user interfa
ii libgtk2-perl 2:1.223-1+b1 Perl interface to the 2.x series o
ii libgtk2-trayicon-perl 0.06-1+b1 Perl interface to fill the system
ii libxml-rss-perl 1.49-1 Perl module for managing RSS (RDF
ii perl 5.12.3-7+b1 Larry Wall's Practical Extraction
yarssr recommends no packages.
yarssr suggests no packages.
-- no debconf information
--- yarssr-0.2.2.orig/lib/Yarssr/Parser.pm 2005-03-19 03:52:35.000000000
+0100
+++ yarssr-0.2.2.new/lib/Yarssr/Parser.pm 2011-07-12 10:10:47.000000000
+0200
@@ -54,6 +54,7 @@
my $article = Yarssr::Item->new(
url => $link,
title => $item->{'title'},
+ id => $link."___".$item->{'title'},
);
push @items, $article;
}
@@ -82,6 +83,7 @@
my $article = Yarssr::Item->new(
title => $title,
url => $link,
+ id => $link."___".$item->{'title'},
);
push @items,$article;
}
--- yarssr-0.2.2.orig/lib/Yarssr/Item.pm 2005-03-19 03:52:35.000000000
+0100
+++ yarssr-0.2.2.new/lib/Yarssr/Item.pm 2011-07-12 10:08:50.000000000 +0200
@@ -18,7 +18,7 @@
bless $self,$class;
}
-foreach my $field (qw(title url status parent)) {
+foreach my $field (qw(title url status parent id)) {
*{"get_$field"} = sub {
my $self = shift;
return $self->{$field};
--- yarssr-0.2.2.orig/lib/Yarssr/Config.pm 2005-03-19 03:52:35.000000000
+0100
+++ yarssr-0.2.2.new/lib/Yarssr/Config.pm 2011-07-12 10:08:28.000000000
+0200
@@ -186,6 +186,7 @@
my $item = Yarssr::Item->new(
title => $_->{'title'},
url => $_->{'link'},
+ id => $_->{'link'}."___".$_->{'title'},
parent => $feed,
);
$item->set_status($read);
--- yarssr-0.2.2.orig/lib/Yarssr/Feed.pm 2005-03-19 03:52:35.000000000
+0100
+++ yarssr-0.2.2.new/lib/Yarssr/Feed.pm 2011-07-12 10:14:19.000000000 +0200
@@ -137,11 +137,11 @@
my @items;
# Set new items as unread
- for ($self->get_items_array) {
- $_->set_status(2) if $_->get_status > 2;
- }
+ #for ($self->get_items_array) {
+ # $_->set_status(2) if $_->get_status > 2;
+ #}
- $self->reset_newitems();
+ #$self->reset_newitems();
$self->enable if ($self->get_enabled == 3);
my $content = Yarssr::Fetcher->fetch_feed($self);
@@ -155,7 +155,7 @@
for my $item (reverse @items) {
Yarssr::GUI->gui_update;
- unless ($self->get_item_by_url($item->get_url)) {
+ unless ($self->get_item_by_id($item->get_id)) {
$self->unshift_item($item);
$item->set_parent($self);
}
@@ -173,11 +173,11 @@
return $self->{status};
}
-sub get_item_by_url {
+sub get_item_by_id {
my $self = shift;
- my $url = shift;
+ my $id = shift;
for (@{$self->{'items'}}) {
- return $_ if $_->get_url eq $url;
+ return $_ if $_->get_id eq $id;
}
return 0;
}
--- yarssr-0.2.2.orig/lib/Yarssr/GUI.pm 2005-03-19 03:52:35.000000000 +0100
+++ yarssr-0.2.2.new/lib/Yarssr/GUI.pm 2011-07-12 10:47:11.000000000 +0200
@@ -517,6 +517,15 @@
set_icon_inactive();
});
$feed->get_menu->append($update);
+ my $unmark = Gtk2::ImageMenuItem->new(_("Unmark new"));
+ $unmark->set_image(Gtk2::Image->new_from_stock('gtk-clear','menu'));
+ $unmark->signal_connect('activate',sub{
+ set_icon_active();
+ Yarssr->clear_newitems_in_feed($feed);
+ redraw_menu();
+ set_icon_inactive();
+ });
+ $feed->get_menu->append($unmark);
$feed->get_menu->show_all;
}
--- yarssr-0.2.2.orig/lib/Yarssr.pm 2005-03-19 03:52:35.000000000 +0100
+++ yarssr-0.2.2.new/lib/Yarssr.pm 2011-07-12 10:47:51.000000000 +0200
@@ -153,6 +153,12 @@
}
}
+sub clear_newitems_in_feed {
+ my (undef,$feed) = @_;
+ $feed->clear_newitems;
+ $feed->reset_newitems;
+}
+
sub _ {
my $str = shift;
my %params = @_;