ungana

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

commit b29814745c6b480018add6eaf24a4a5f8e75d6a2
parent 1c8d062cf16c3e2d03c6c69b8373a00dd324fe74
Author: lash <dev@holbrook.no>
Date:   Tue, 16 Sep 2025 01:19:26 +0100

Downgrade mimetypes requirement to 3.8

Diffstat:
Mungana/gui/event.py | 6+++++-
Mungana/gui/win.py | 5+++--
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ungana/gui/event.py b/ungana/gui/event.py @@ -16,8 +16,12 @@ class EventWindow(Gtk.Window): super().__init__(*args, **kwargs) self.cal = None + self.win_inner = Gtk.ScrolledWindow() + self.win_inner.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.ALWAYS) + self.set_child(self.win_inner) + self.box_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - self.set_child(self.box_main) + self.win_inner.set_child(self.box_main) title = Gtk.Label(label="UUID") self.box_main.append(title) diff --git a/ungana/gui/win.py b/ungana/gui/win.py @@ -172,11 +172,12 @@ class MainWindow(Gtk.ApplicationWindow): logg.debug("processing {}".format(cfg.get('BASE_DATAPATH'))) for (r, d, files) in os.walk(cfg.get('BASE_DATAPATH')): for f in files: - t = mimetypes.guess_file_type(f) + t = mimetypes.guess_type(f) + logg.debug("checking file {} type {}".format(f, t[0])) if t[0] != 'text/calendar': continue fp = os.path.join(r, f) - logg.debug("processing: {}".format(fp)) + logg.info("processing: {}".format(fp)) # TODO: accommodate this load use-case in internal icalendar module cal = icalendar.Calendar.from_ical(Path(fp).read_bytes()) for ev in cal.events: