ungana

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README

commit ec67ff9a3b45b867fca835ad0f4894437eeed58c
parent 4832ea6bbc323415941c74f6fb725819c496fbb1
Author: Carlosokumu <carlosokumu254@gmail.com>
Date:   Thu, 25 Sep 2025 22:21:20 +0300

add entry start date and duration

Diffstat:
Mungana/gui/event.py | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ungana/gui/event.py b/ungana/gui/event.py @@ -85,11 +85,13 @@ class EventWindow(Gtk.Window): title = Gtk.Label(label="Start") self.box_main.append(title) entry = Gtk.Entry(placeholder_text="YYYY-MM-DD HH:MM") + self.entry_start = entry self.box_main.append(entry) title = Gtk.Label(label="Duration") self.box_main.append(title) entry = Gtk.Entry(placeholder_text="") + self.entry_duration = entry self.box_main.append(entry) title = Gtk.Label(label="Banner") @@ -228,6 +230,12 @@ class EventWindow(Gtk.Window): self.entry_domain.set_text(domain) + start = ICalHelper.extract_datetime(ev, "DTSTART") + self.entry_start.set_text(str(start)) + + duration = ICalHelper.extract_duration(ev) + self.entry_duration.set_text(str(duration)) + location = ICalHelper.extract_ical_field(ev, "LOCATION") self.entry_location.set_text(str(location)) @@ -246,9 +254,9 @@ class EventWindow(Gtk.Window): for i in range(self.entry_class_model.get_n_items())] try: - index = ical_classes.index(cls) + index = ical_classes.index(cls) except ValueError: - index = 0 + index = 0 self.entry_class.set_selected(index)