commit 6baca8fd4d37698e09ca0a4bf055a3a4182ebbe0
parent 60828d279640158b6f99b9a719fb5d3654809f2f
Author: Carlosokumu <carlosokumu254@gmail.com>
Date: Wed, 24 Sep 2025 22:13:45 +0300
add missing ical fields
Diffstat:
1 file changed, 61 insertions(+), 0 deletions(-)
diff --git a/ungana/gui/event.py b/ungana/gui/event.py
@@ -2,6 +2,9 @@ import logging
import zoneinfo
import gi
+
+from ungana.ical.ical_helper import ICalHelper
+from ungana.ical.ical_manager import ICalManager
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, Gio
@@ -50,6 +53,19 @@ class EventWindow(Gtk.Window):
entry.set_wrap_mode(Gtk.WrapMode.WORD_CHAR)
self.box_main.append(entry)
+ title = Gtk.Label(label="Location")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_location = entry
+ self.box_main.append(entry)
+
+
+ title = Gtk.Label(label="Contact")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_contact = entry
+ self.box_main.append(entry)
+
title = Gtk.Label(label="Time zone")
self.box_main.append(title)
entry = Gtk.DropDown()
@@ -126,6 +142,31 @@ class EventWindow(Gtk.Window):
entry = Gtk.Entry(placeholder_text="http://")
self.box_main.append(entry)
+
+ title = Gtk.Label(label="Organizer")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_organizer = entry
+ self.box_main.append(entry)
+
+ title = Gtk.Label(label="Categories")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_categories = entry
+ self.box_main.append(entry)
+
+ title = Gtk.Label(label="Class")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_class = entry
+ self.box_main.append(entry)
+
+ title = Gtk.Label(label="Status")
+ self.box_main.append(title)
+ entry = Gtk.Entry()
+ self.entry_status = entry
+ self.box_main.append(entry)
+
self.status = Gtk.Statusbar()
self.box_main.append(self.status)
@@ -163,6 +204,26 @@ class EventWindow(Gtk.Window):
self.entry_uuid.set_text(uid)
self.entry_domain.set_text(domain)
+
+ location = ICalHelper.extract_ical_field(ev, "LOCATION")
+ self.entry_location.set_text(str(location))
+
+ contact = ICalHelper.extract_ical_field(ev, "CONTACT")
+ self.entry_contact.set_text(str(contact))
+
+ organizer = ICalHelper.extract_ical_field(ev,"ORGANIZER")
+ self.entry_organizer.set_text(str(organizer))
+
+
+ categories = ICalHelper.extract_ical_field(ev,"CATEGORIES")
+ self.entry_categories.set_text(str(categories))
+
+ cls = ICalHelper.extract_ical_field(ev,"CLASS")
+ self.entry_class.set_text(str(cls))
+
+ status = ICalHelper.extract_ical_field(ev,"STATUS")
+ self.entry_status.set_text(str(status))
+
v = ev.get('geo')
if v.latitude:
self.entry_geo_lat.set_text(str(v.latitude))