1 # This file is part of Email-Reminder.
3 # Email-Reminder is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License as
5 # published by the Free Software Foundation; either version 3 of the
6 # License, or (at your option) any later version.
8 # Email-Reminder is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with Email-Reminder; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 package EmailReminder
::WeeklyStore
;
24 use Glib
::Object
::Subclass
26 interfaces
=> [ Gtk2
::TreeModel
:: ],
29 use EmailReminder
::EventStore
;
30 use EmailReminder
::WeeklyEvent
;
32 use base
qw(EmailReminder::EventStore);
42 $self->{TYPE
} = EmailReminder
::WeeklyEvent
->get_type();
43 $self->{NB_COLUMNS
} = EmailReminder
::WeeklyEvent
->get_nb_fields();
45 $self->EmailReminder::EventStore
::init
();
51 my ($self, $event, $col) = @_;
53 if ($col == $NAME_INDEX) {
54 return $event->get_name();
56 elsif ($col == $DAY_INDEX) {
57 return $event->get_day();
60 return $self->EmailReminder::EventStore
::get_event_column
($event, $col);
66 my ($self, $event, $col, $new_value) = @_;
68 if ($col == $NAME_INDEX) {
69 $event->set_name($new_value);
71 elsif ($col == $DAY_INDEX) {
72 $event->set_day($new_value);
75 $self->EmailReminder::EventStore
::set_event_column
($event, $col, $new_value);