lomiri.lomiri-calendar-app: init at 1.1.2 (#366949)

authored by Sandro and committed by GitHub bbea96f5 9956bc4b

+2160
+1
nixos/modules/services/desktop-managers/lomiri.nix
··· 86 86 libusermetrics 87 87 lomiri 88 88 lomiri-calculator-app 89 + lomiri-calendar-app 89 90 lomiri-camera-app 90 91 lomiri-clock-app 91 92 lomiri-content-hub
+1
nixos/tests/all-tests.nix
··· 564 564 #logstash = handleTest ./logstash.nix {}; 565 565 lomiri = discoverTests (import ./lomiri.nix); 566 566 lomiri-calculator-app = runTest ./lomiri-calculator-app.nix; 567 + lomiri-calendar-app = runTest ./lomiri-calendar-app.nix; 567 568 lomiri-camera-app = runTest ./lomiri-camera-app.nix; 568 569 lomiri-clock-app = runTest ./lomiri-clock-app.nix; 569 570 lomiri-docviewer-app = runTest ./lomiri-docviewer-app.nix;
+79
nixos/tests/lomiri-calendar-app.nix
··· 1 + { pkgs, lib, ... }: 2 + { 3 + name = "lomiri-calendar-app-standalone"; 4 + meta = { 5 + maintainers = lib.teams.lomiri.members; 6 + # This needs a Linux VM 7 + platforms = lib.platforms.linux; 8 + }; 9 + 10 + nodes.machine = 11 + { config, pkgs, ... }: 12 + { 13 + imports = [ ./common/x11.nix ]; 14 + 15 + services.xserver.enable = true; 16 + 17 + environment = { 18 + systemPackages = 19 + with pkgs; 20 + [ 21 + xdotool # mouse movement 22 + ] 23 + ++ (with pkgs.lomiri; [ 24 + suru-icon-theme 25 + lomiri-calendar-app 26 + ]); 27 + variables = { 28 + UITK_ICON_THEME = "suru"; 29 + }; 30 + }; 31 + 32 + i18n.supportedLocales = [ "all" ]; 33 + 34 + fonts.packages = with pkgs; [ 35 + # Intended font & helps with OCR 36 + ubuntu-classic 37 + ]; 38 + }; 39 + 40 + enableOCR = true; 41 + 42 + testScript = '' 43 + machine.wait_for_x() 44 + 45 + with subtest("lomiri calendar launches"): 46 + machine.succeed("lomiri-calendar-app >&2 &") 47 + machine.wait_for_text(r"(January|February|March|April|May|June|July|August|September|October|November|December)") 48 + machine.screenshot("lomiri-calendar") 49 + 50 + with subtest("lomiri calendar works"): 51 + # Switch to Agenda tab, less busy 52 + machine.succeed("xdotool mousemove 300 50 click 1") 53 + 54 + # Still on main page 55 + machine.succeed("xdotool mousemove 500 650 click 1") 56 + machine.wait_for_text(r"(Date|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|All day|Name|Details|More)") 57 + machine.screenshot("lomiri-calendar_newevent") 58 + 59 + # On New Event page 60 + machine.succeed("xdotool mousemove 500 230 click 1") 61 + machine.send_chars("foobar") 62 + machine.sleep(2) # make sure they're actually in there 63 + machine.succeed("xdotool mousemove 780 40 click 1") 64 + machine.wait_for_text("Agenda") 65 + machine.screenshot("lomiri-calendar_eventadded") 66 + 67 + # Back on main page 68 + # Event was created, does it have the correct name? 69 + machine.wait_for_text("foobar") 70 + machine.screenshot("lomiri-calendar_works") 71 + 72 + machine.succeed("pkill -f lomiri-calendar-app") 73 + 74 + with subtest("lomiri calendar localisation works"): 75 + machine.succeed("env LANG=de_DE.UTF-8 lomiri-calendar-app >&2 &") 76 + machine.wait_for_text(r"(Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|Sonntag)") 77 + machine.screenshot("lomiri-calendar_localised") 78 + ''; 79 + }
+120
pkgs/applications/system/timed/default.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gitUpdater, 6 + testers, 7 + libiodata, 8 + pcre-cpp, 9 + pkg-config, 10 + qmake, 11 + qtbase, 12 + sailfish-access-control, 13 + tzdata, 14 + wrapQtAppsHook, 15 + }: 16 + 17 + stdenv.mkDerivation (finalAttrs: { 18 + pname = "timed"; 19 + version = "3.6.23"; 20 + 21 + outputs = [ 22 + "out" 23 + "lib" 24 + "dev" 25 + ]; 26 + 27 + src = fetchFromGitHub { 28 + owner = "sailfishos"; 29 + repo = "timed"; 30 + tag = finalAttrs.version; 31 + hash = "sha256-EJ0xxAkrISQfylBneYAEOINRvMUTWWw4E5GKjbq67aU="; 32 + }; 33 + 34 + postPatch = '' 35 + substituteInPlace src/{lib/lib,voland/voland}.pro \ 36 + --replace-fail '$$[QT_INSTALL_LIBS]' "$lib/lib" \ 37 + --replace-fail '/usr/include' "$dev/include" \ 38 + --replace-fail '$$[QT_INSTALL_DATA]' "$dev" 39 + 40 + substituteInPlace src/server/server.pro \ 41 + --replace-fail '/usr/bin' "$out/bin" \ 42 + --replace-fail '/etc' "$out/etc" \ 43 + --replace-fail '/usr/lib' "$out/lib" 44 + 45 + substituteInPlace tests/tests.pro \ 46 + --replace-fail '/opt' "$dev/opt" \ 47 + 48 + substituteInPlace tests/ut_networktime/ut_networktime.pro \ 49 + --replace-fail '/opt' "$dev/opt" \ 50 + --replace-fail '/etc' "$dev/etc" 51 + 52 + substituteInPlace tests/tst_events/tst_events.pro \ 53 + --replace-fail '/opt' "$dev/opt" 54 + 55 + substituteInPlace tools/timedclient/timedclient.pro \ 56 + --replace-fail '/usr/bin' "$out/bin" 57 + 58 + substituteInPlace \ 59 + src/lib/aliases.cpp \ 60 + src/server/settings.cpp \ 61 + --replace-fail '/usr/share/zoneinfo' '${tzdata}/share/zoneinfo' 62 + ''; 63 + 64 + # QMake doesn't handle this well 65 + strictDeps = false; 66 + 67 + nativeBuildInputs = [ 68 + pkg-config 69 + qmake 70 + wrapQtAppsHook 71 + ]; 72 + 73 + buildInputs = [ 74 + libiodata 75 + pcre-cpp 76 + sailfish-access-control 77 + ]; 78 + 79 + # Do all configuring now, not during build 80 + postConfigure = '' 81 + make qmake_all 82 + ''; 83 + 84 + env = { 85 + TIMED_VERSION = "${finalAttrs.version}"; 86 + 87 + # Other subprojects expect library to already be present 88 + NIX_CFLAGS_COMPILE = "-isystem ${placeholder "dev"}/include"; 89 + NIX_LDFLAGS = "-L${placeholder "out"}/lib"; 90 + }; 91 + 92 + preBuild = '' 93 + pushd src/lib 94 + make ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} 95 + make install 96 + popd 97 + ''; 98 + 99 + passthru = { 100 + updateScript = gitUpdater { }; 101 + tests.pkg-config = testers.hasPkgConfigModules { 102 + package = finalAttrs.finalPackage; 103 + # Version fields exclude patch-level 104 + }; 105 + }; 106 + 107 + meta = { 108 + description = "Time daemon managing system time, time zone and settings"; 109 + homepage = "https://github.com/sailfishos/timed"; 110 + changelog = "https://github.com/sailfishos/timed/releases/tag/${finalAttrs.version}"; 111 + license = lib.licenses.lgpl21Only; 112 + mainProgram = "timed"; 113 + maintainers = lib.teams.lomiri.members; 114 + platforms = lib.platforms.linux; 115 + pkgConfigModules = [ 116 + "timed-qt${lib.versions.major qtbase.version}" 117 + "timed-voland-qt${lib.versions.major qtbase.version}" 118 + ]; 119 + }; 120 + })
+130
pkgs/by-name/bu/buteo-syncfw/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gitUpdater, 6 + testers, 7 + dbus, 8 + doxygen, 9 + glib, 10 + libsForQt5, 11 + pkg-config, 12 + wrapGAppsHook3, 13 + }: 14 + 15 + stdenv.mkDerivation (finalAttrs: { 16 + pname = "buteo-syncfw"; 17 + version = "0.11.8"; 18 + 19 + outputs = [ 20 + "out" 21 + "dev" 22 + "doc" 23 + ]; 24 + 25 + src = fetchFromGitHub { 26 + owner = "sailfishos"; 27 + repo = "buteo-syncfw"; 28 + tag = finalAttrs.version; 29 + hash = "sha256-QQ2NG+zeKZbmZRdJgEQpx3Y/C+3j91ltC+5CRaf6qBY="; 30 + }; 31 + 32 + postPatch = '' 33 + # Wildcard breaks file installation (tries to run ~ "install source/* target/*") 34 + substituteInPlace doc/doc.pri \ 35 + --replace-fail 'htmldocs.files = $${PWD}/html/*' 'htmldocs.files = $${PWD}/html' \ 36 + --replace-fail '/usr/share/doc' "$doc/share/doc" 37 + 38 + substituteInPlace declarative/declarative.pro \ 39 + --replace-fail '$$[QT_INSTALL_QML]' "$out/${libsForQt5.qtbase.qtQmlPrefix}" 40 + 41 + substituteInPlace libbuteosyncfw/libbuteosyncfw.pro \ 42 + --replace-fail '$$[QT_INSTALL_LIBS]' "$out/lib" \ 43 + --replace-fail '/usr/include' "$dev/include" 44 + 45 + substituteInPlace msyncd/msyncd-app.pro \ 46 + --replace-fail '/usr/bin' "$out/bin" \ 47 + --replace-fail '/usr/lib/systemd' "$out/lib/systemd" \ 48 + --replace-fail '/etc' "$out/etc" \ 49 + --replace-fail '/usr/share' "$out/share" 50 + 51 + substituteInPlace oopp-runner/oopp-runner.pro \ 52 + --replace-fail '/usr/libexec' "$out/libexec" 53 + 54 + # We don't have invoked (mapplauncherd) 55 + substituteInPlace msyncd/bin/msyncd.service \ 56 + --replace-fail 'ExecStart=/usr/bin/invoker -G -o -s --type=qt5 /usr/bin/msyncd' "ExecStart=$out/bin/msyncd" 57 + 58 + substituteInPlace msyncd/com.meego.msyncd.service \ 59 + --replace-fail 'Exec=/usr/bin/msyncd' "Exec=$out/bin/msyncd" 60 + 61 + # Tests expect to get installed, require excessive patching 62 + substituteInPlace buteo-sync.pro \ 63 + --replace-fail 'unittests \' '\' \ 64 + --replace-fail 'unittests.depends' '# unittests.depends' 65 + ''; 66 + 67 + # QMake doesn't handle strictDeps well 68 + strictDeps = false; 69 + 70 + nativeBuildInputs = 71 + [ 72 + doxygen 73 + glib 74 + pkg-config 75 + wrapGAppsHook3 76 + ] 77 + ++ (with libsForQt5; [ 78 + qmake 79 + wrapQtAppsHook 80 + ]); 81 + 82 + buildInputs = 83 + [ 84 + dbus 85 + ] 86 + ++ (with libsForQt5; [ 87 + accounts-qt 88 + qtdeclarative 89 + signond 90 + ]); 91 + 92 + dontWrapGApps = true; 93 + 94 + # Do all configuring now, not during build 95 + postConfigure = '' 96 + make qmake_all 97 + ''; 98 + 99 + # Tests expect to get installed, require excessive patching & managing 100 + doCheck = false; 101 + 102 + postInstall = '' 103 + glib-compile-schemas $out/share/glib-2.0/schemas 104 + ''; 105 + 106 + preFixup = '' 107 + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") 108 + ''; 109 + 110 + passthru = { 111 + updateScript = gitUpdater { }; 112 + tests.pkg-config = testers.hasPkgConfigModules { 113 + package = finalAttrs.finalPackage; 114 + # Version is hardcoded to 1.0.0 115 + }; 116 + }; 117 + 118 + meta = { 119 + description = "Buteo Synchronization Framework"; 120 + homepage = "https://github.com/sailfishos/buteo-syncfw"; 121 + changelog = "https://github.com/sailfishos/buteo-syncfw/releases/tag/${finalAttrs.version}"; 122 + license = lib.licenses.lgpl21Only; 123 + mainProgram = "msyncd"; 124 + maintainers = lib.teams.lomiri.members; 125 + platforms = lib.platforms.linux; 126 + pkgConfigModules = [ 127 + "buteosyncfw5" 128 + ]; 129 + }; 130 + })
+125
pkgs/by-name/mk/mkcal/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gitUpdater, 6 + testers, 7 + cmake, 8 + doxygen, 9 + extra-cmake-modules, 10 + graphviz, 11 + libsForQt5, 12 + perl, 13 + pkg-config, 14 + tzdata, 15 + }: 16 + 17 + stdenv.mkDerivation (finalAttrs: { 18 + pname = "mkcal"; 19 + version = "0.7.26"; 20 + 21 + src = fetchFromGitHub { 22 + owner = "sailfishos"; 23 + repo = "mkcal"; 24 + tag = finalAttrs.version; 25 + hash = "sha256-myOSzxzZmuOU7MShPfUOsHJilw9B6jh3W1S3P5dhcvs="; 26 + }; 27 + 28 + outputs = [ 29 + "out" 30 + "dev" 31 + "doc" 32 + ]; 33 + 34 + postPatch = '' 35 + substituteInPlace doc/CMakeLists.txt \ 36 + --replace-fail 'COMMAND ''${DOXYGEN}' 'WORKING_DIRECTORY ''${CMAKE_SOURCE_DIR} COMMAND ''${DOXYGEN}' 37 + 38 + # Dynamic menus are broken in docs 39 + sed -i doc/libmkcal.cfg -e '1i HTML_DYNAMIC_MENUS = NO' 40 + ''; 41 + 42 + strictDeps = true; 43 + 44 + nativeBuildInputs = 45 + [ 46 + cmake 47 + doxygen 48 + graphviz 49 + perl 50 + pkg-config 51 + ] 52 + ++ (with libsForQt5; [ 53 + wrapQtAppsHook 54 + ]); 55 + 56 + buildInputs = 57 + [ 58 + extra-cmake-modules 59 + ] 60 + ++ (with libsForQt5; [ 61 + kcalendarcore 62 + qtbase 63 + qtpim 64 + timed 65 + ]); 66 + 67 + nativeCheckInputs = [ 68 + tzdata 69 + ]; 70 + 71 + cmakeFlags = [ 72 + (lib.cmakeBool "BUILD_PLUGINS" false) 73 + (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck) 74 + (lib.cmakeBool "INSTALL_TESTS" false) 75 + (lib.cmakeBool "BUILD_DOCUMENTATION" true) 76 + (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" ( 77 + lib.concatStringsSep ";" [ 78 + # Exclude tests 79 + "-E" 80 + (lib.strings.escapeShellArg "(${ 81 + lib.concatStringsSep "|" [ 82 + # Test expects to be passed a real, already existing database to test migrations. We don't have one 83 + "tst_perf" 84 + 85 + # 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone 86 + # Other half are x-1/x on lists of alarms/events 87 + "tst_storage" 88 + ] 89 + })") 90 + ] 91 + )) 92 + ]; 93 + 94 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 95 + 96 + # Parallelism breaks tests 97 + enableParallelChecking = false; 98 + 99 + preCheck = '' 100 + export HOME=$TMP 101 + export QT_QPA_PLATFORM=minimal 102 + export QT_PLUGIN_PATH=${lib.getBin libsForQt5.qtbase}/${libsForQt5.qtbase.qtPluginPrefix} 103 + ''; 104 + 105 + passthru = { 106 + updateScript = gitUpdater { }; 107 + tests.pkg-config = testers.hasPkgConfigModules { 108 + package = finalAttrs.finalPackage; 109 + # version field doesn't exactly match current version 110 + }; 111 + }; 112 + 113 + meta = { 114 + description = "Mobile version of the original KCAL from KDE"; 115 + homepage = "https://github.com/sailfishos/mkcal"; 116 + changelog = "https://github.com/sailfishos/mkcal/releases/tag/${finalAttrs.version}"; 117 + license = lib.licenses.lgpl2Plus; 118 + mainProgram = "mkcaltool"; 119 + maintainers = lib.teams.lomiri.members; 120 + platforms = lib.platforms.linux; 121 + pkgConfigModules = [ 122 + "libmkcal-qt5" 123 + ]; 124 + }; 125 + })
+91
pkgs/by-name/qt/qtorganizer-mkcal/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + unstableGitUpdater, 6 + cmake, 7 + extra-cmake-modules, 8 + libsForQt5, 9 + mkcal, 10 + pkg-config, 11 + tzdata, 12 + }: 13 + 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "qtorganizer-mkcal"; 16 + version = "0-unstable-2025-02-14"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "dcaliste"; 20 + repo = "qtorganizer-mkcal"; 21 + rev = "3090565d70ecdfaad2cba57d5a895fa69afd024a"; 22 + hash = "sha256-ZNAcqjkVf9efP+WWTDr2YFZT+eZdIJAfX45Gm0+Y81A="; 23 + }; 24 + 25 + postPatch = '' 26 + substituteInPlace src/CMakeLists.txt \ 27 + --replace-fail 'DESTINATION ''${CMAKE_INSTALL_LIBDIR}/qt5/plugins' 'DESTINATION ''${CMAKE_INSTALL_PREFIX}/${libsForQt5.qtbase.qtPluginPrefix}' 28 + ''; 29 + 30 + strictDeps = true; 31 + 32 + nativeBuildInputs = [ 33 + cmake 34 + pkg-config 35 + ]; 36 + 37 + buildInputs = 38 + [ 39 + extra-cmake-modules 40 + mkcal 41 + ] 42 + ++ (with libsForQt5; [ 43 + kcalendarcore 44 + qtbase 45 + qtpim 46 + ]); 47 + 48 + nativeCheckInputs = [ 49 + tzdata 50 + ]; 51 + 52 + dontWrapQtApps = true; 53 + 54 + cmakeFlags = [ 55 + (lib.cmakeBool "INSTALL_TESTS" false) 56 + ]; 57 + 58 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 59 + 60 + preCheck = 61 + let 62 + listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix; 63 + in 64 + '' 65 + export QT_QPA_PLATFORM=minimal 66 + export QT_PLUGIN_PATH=${ 67 + listToQtVar libsForQt5.qtbase.qtPluginPrefix ( 68 + with libsForQt5; 69 + [ 70 + qtbase 71 + qtpim 72 + ] 73 + ) 74 + } 75 + 76 + # Wants to load the just-built plugin, doesn't try to set up the build dir / environment for that 77 + mkdir -p $TMP/fake-install/organizer 78 + cp ./src/libqtorganizer_mkcal.so $TMP/fake-install/organizer 79 + export QT_PLUGIN_PATH=$TMP/fake-install:$QT_PLUGIN_PATH 80 + ''; 81 + 82 + passthru.updateScript = unstableGitUpdater { }; 83 + 84 + meta = { 85 + description = "QtOrganizer plugin using sqlite via mKCal"; 86 + homepage = "https://github.com/dcaliste/qtorganizer-mkcal"; 87 + license = lib.licenses.bsd3; 88 + maintainers = lib.teams.lomiri.members; 89 + platforms = lib.platforms.linux; 90 + }; 91 + })
+83
pkgs/by-name/sa/sailfish-access-control/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gitUpdater, 6 + testers, 7 + glib, 8 + libsForQt5, 9 + pkg-config, 10 + qt6Packages, 11 + }: 12 + 13 + stdenv.mkDerivation (finalAttrs: { 14 + pname = "sailfish-access-control"; 15 + version = "0.0.12"; 16 + 17 + outputs = [ 18 + "out" 19 + "dev" 20 + ]; 21 + 22 + src = fetchFromGitHub { 23 + owner = "sailfishos"; 24 + repo = "sailfish-access-control"; 25 + tag = finalAttrs.version; 26 + hash = "sha256-3gZUz6MZ/dZ1ntPmU89vEoLJ3zPE6Tax/YHw7/MwNCI="; 27 + }; 28 + 29 + # sourceRoot breaks patches 30 + preConfigure = '' 31 + cd glib 32 + ''; 33 + 34 + strictDeps = true; 35 + 36 + nativeBuildInputs = [ 37 + pkg-config 38 + ]; 39 + 40 + buildInputs = [ 41 + glib 42 + ]; 43 + 44 + makeFlags = [ 45 + "VERSION=${finalAttrs.version}" 46 + ]; 47 + 48 + installFlags = [ 49 + "ROOT=" 50 + "PREFIX=${placeholder "out"}" 51 + "INCDIR=${placeholder "dev"}/include/sailfishaccesscontrol" 52 + ]; 53 + 54 + passthru = { 55 + updateScript = gitUpdater { }; 56 + tests = { 57 + pkg-config = testers.hasPkgConfigModules { 58 + package = finalAttrs.finalPackage; 59 + versionCheck = true; 60 + }; 61 + qt5 = libsForQt5.sailfish-access-control-plugin; 62 + qt6 = qt6Packages.sailfish-access-control-plugin; 63 + }; 64 + }; 65 + 66 + meta = { 67 + description = "Thin wrapper on top of pwd.h and grp.h of glibc"; 68 + longDescription = '' 69 + This package provides a thin wrapper library on top of the getuid, getpwuid, getgrouplist, and friends. 70 + Checking whether a user belongs to a group should be done via this Sailfish Access Control library. 71 + 72 + This will make it easier to fix for instance rerentrancy issues. 73 + ''; 74 + homepage = "https://github.com/sailfishos/sailfish-access-control"; 75 + changelog = "https://github.com/sailfishos/sailfish-access-control/releases/tag/${finalAttrs.version}"; 76 + license = lib.licenses.lgpl2Plus; 77 + maintainers = lib.teams.lomiri.members; 78 + platforms = lib.platforms.linux; 79 + pkgConfigModules = [ 80 + "sailfishaccesscontrol" 81 + ]; 82 + }; 83 + })
+73
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch
··· 1 + From 0658ff459aa200dfe3561646f5e73cd8715a1d0f Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Wed, 12 Jun 2024 09:24:05 +0200 4 + Subject: [PATCH] Migrate to new QtContact sqlite backend fixes: 5 + https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/issues/221 6 + 7 + --- 8 + src/qml/ContactChoicePopup.qml | 34 ++++------------------------------ 9 + 1 file changed, 4 insertions(+), 30 deletions(-) 10 + 11 + diff --git a/src/qml/ContactChoicePopup.qml b/src/qml/ContactChoicePopup.qml 12 + index f514c23b..59fe545d 100644 13 + --- a/src/qml/ContactChoicePopup.qml 14 + +++ b/src/qml/ContactChoicePopup.qml 15 + @@ -20,6 +20,7 @@ import Lomiri.Components 1.3 16 + import Lomiri.Components.Popups 1.3 17 + import Lomiri.Components.ListItems 1.3 18 + import Lomiri.Components.Themes.Ambiance 1.3 19 + +import Lomiri.Contacts 0.1 20 + import QtOrganizer 5.0 21 + import QtContacts 5.0 22 + 23 + @@ -38,36 +39,9 @@ Popover { 24 + visible: contactModel.contacts.length === 0 25 + } 26 + 27 + - UnionFilter { 28 + - id: filter 29 + - 30 + - property string searchString: "" 31 + - 32 + - filters: [ 33 + - DetailFilter{ 34 + - detail: ContactDetail.Name 35 + - field: Name.FirstName 36 + - matchFlags: Filter.MatchContains 37 + - value: filter.searchString 38 + - }, 39 + - DetailFilter{ 40 + - detail: ContactDetail.Name 41 + - field: Name.LastName 42 + - matchFlags: Filter.MatchContains 43 + - value: filter.searchString 44 + - }, 45 + - DetailFilter{ 46 + - detail: ContactDetail.DisplayLabel 47 + - field: DisplayLabel.Label 48 + - matchFlags: Filter.MatchContains 49 + - value: filter.searchString 50 + - } 51 + - ] 52 + - } 53 + - 54 + - ContactModel { 55 + + ContactListModel { 56 + id: contactModel 57 + - manager: "galera" 58 + + manager: ContactManager.manager() 59 + filter: filter 60 + autoUpdate: true 61 + } 62 + @@ -78,7 +52,7 @@ Popover { 63 + interval: 500 64 + repeat: false 65 + onTriggered: { 66 + - filter.searchString = searchBox.text 67 + + contactModel.filterTerm = searchBox.text 68 + } 69 + } 70 + 71 + -- 72 + GitLab 73 +
+301
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch
··· 1 + From fe4c377c08ecc7fa09e0a9407c17afcb63325822 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Tue, 29 Oct 2024 16:11:47 +0100 4 + Subject: [PATCH] EDS -> mkCal Initial commit 5 + 6 + --- 7 + debian/control | 7 ++++--- 8 + src/qml/AgendaView.qml | 2 +- 9 + src/qml/CalendarChoicePopup.qml | 24 +++++++++++++++--------- 10 + src/qml/EventActions.qml | 23 +++++++++++++++++------ 11 + src/qml/EventDetails.qml | 2 +- 12 + src/qml/EventListModel.qml | 21 +++++++++------------ 13 + src/qml/ExportPageCommon.qml | 2 +- 14 + src/qml/TimeLineBaseComponent.qml | 2 +- 15 + src/qml/calendar.qml | 2 +- 16 + 9 files changed, 50 insertions(+), 35 deletions(-) 17 + 18 + diff --git a/debian/control b/debian/control 19 + index 1f4fe4d5..5f8a603f 100644 20 + --- a/debian/control 21 + +++ b/debian/control 22 + @@ -11,6 +11,8 @@ Build-Depends: cmake, 23 + qml-module-qtquick2, 24 + qml-module-qttest, 25 + qml-module-lomiri-components, 26 + + qml-module-buteo-profiles, 27 + + qt5-default, 28 + qtdeclarative5-dev, 29 + qtdeclarative5-dev-tools, 30 + Standards-Version: 4.7.0 31 + @@ -29,10 +31,9 @@ Depends: ${misc:Depends}, 32 + qml-module-lomiri-components, 33 + qml-module-lomiri-onlineaccounts-client, 34 + qml-module-sso-onlineaccounts, 35 + - qtcontact5-galera, 36 + - qml-module-lomiri-syncmonitor | qml-module-lomiri-syncmonitor0.1, 37 + - qtorganizer5-eds, 38 + + qml-module-buteo-profiles, 39 + ubuntu-mobile-icons | suru-icon-theme, 40 + + qtorganizer-mkcal, 41 + Description: Calendar application 42 + The Calendar application devices lets you organise your life your way by 43 + month, week or daily diary. 44 + diff --git a/src/qml/AgendaView.qml b/src/qml/AgendaView.qml 45 + index 08d7bd21..5996cbee 100644 46 + --- a/src/qml/AgendaView.qml 47 + +++ b/src/qml/AgendaView.qml 48 + @@ -35,7 +35,7 @@ PageWithBottomEdge { 49 + 50 + function hasEnabledCalendars() { 51 + var enabled_calendars = eventListModel.getCollections().filter( function( item ) { 52 + - return item.extendedMetaData( "collection-selected" ); 53 + + return item.extendedMetaData( "visible" ); 54 + } ); 55 + 56 + return !!enabled_calendars.length; 57 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 58 + index 39416e5c..5d29ef86 100644 59 + --- a/src/qml/CalendarChoicePopup.qml 60 + +++ b/src/qml/CalendarChoicePopup.qml 61 + @@ -20,7 +20,8 @@ import QtQuick 2.4 62 + import QtOrganizer 5.0 63 + import Lomiri.Components 1.3 64 + import Lomiri.Content 1.3 65 + -import Lomiri.SyncMonitor 0.1 66 + +//import Lomiri.SyncMonitor 0.1 67 + +import Buteo 0.1 68 + import Lomiri.Components.Popups 1.3 69 + import SSO.OnlineAccounts 0.1 70 + 71 + @@ -59,17 +60,22 @@ Page { 72 + // TRANSLATORS: Please translate this string to 15 characters only. 73 + // Currently ,there is no way we can increase width of action menu currently. 74 + text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing") 75 + - onTriggered: syncMonitor.sync(["calendar"]) 76 + - enabled: (syncMonitor.state !== "syncing") 77 + + onTriggered: buteoSync.startSyncByCategory("calendar") 78 + + enabled: (!buteoSync.synchronizing) 79 + visible: !networkError 80 + } 81 + flickable: flickable 82 + } 83 + 84 + - SyncMonitor { 85 + - id: syncMonitor 86 + + ButeoSync { 87 + + id: buteoSync 88 + } 89 + 90 + + 91 + + // SyncMonitor { 92 + + // id: syncMonitor 93 + + // } 94 + + 95 + Flickable { 96 + id: flickable 97 + 98 + @@ -162,10 +168,10 @@ Page { 99 + id: checkBox 100 + objectName: "checkBox" 101 + SlotsLayout.position: SlotsLayout.Last 102 + - checked: modelData.extendedMetaData("collection-selected") 103 + + checked: modelData.extendedMetaData("visible") 104 + enabled: !calendarChoicePage.isInEditMode 105 + onCheckedChanged: { 106 + - if (!checkBox.checked && modelData.extendedMetaData("collection-readonly") === false) { 107 + + if (!checkBox.checked && modelData.extendedMetaData("readOnly") === false) { 108 + var collections = calendarChoicePage.model.getWritableAndSelectedCollections(); 109 + if (collections.length == 1) { 110 + PopupUtils.open(singleWritableDialogComponent); 111 + @@ -174,8 +180,8 @@ Page { 112 + } 113 + } 114 + 115 + - if (modelData.extendedMetaData("collection-selected") !== checkBox.checked) { 116 + - modelData.setExtendedMetaData("collection-selected",checkBox.checked) 117 + + if (modelData.extendedMetaData("visible") !== checkBox.checked) { 118 + + modelData.setExtendedMetaData("visible",checkBox.checked) 119 + var collection = calendarChoicePage.model.collection(modelData.collectionId); 120 + calendarChoicePage.model.saveCollection(collection); 121 + } 122 + diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml 123 + index 30617065..d583eb1a 100644 124 + --- a/src/qml/EventActions.qml 125 + +++ b/src/qml/EventActions.qml 126 + @@ -18,7 +18,8 @@ 127 + 128 + import QtQuick 2.4 129 + import Lomiri.Components 1.3 130 + -import Lomiri.SyncMonitor 0.1 131 + +//import Lomiri.SyncMonitor 0.1 132 + +import Buteo.Profiles 0.1 133 + import Lomiri.Components.Popups 1.3 134 + import Qt.labs.settings 1.0 135 + 136 + @@ -29,7 +30,7 @@ Item { 137 + property alias syncCalendarAction: _syncCalendarAction 138 + property alias settingsAction: _settingsAction 139 + property Settings settings 140 + - readonly property bool syncInProgress: (syncMonitor.state !== "") && (syncMonitor.state === "syncing") 141 + + readonly property bool syncInProgress: buteoSync.synchronizing 142 + 143 + onSyncInProgressChanged: { 144 + 145 + @@ -77,11 +78,20 @@ Item { 146 + // TRANSLATORS: Please translate this string to 15 characters only. 147 + // Currently ,there is no way we can increase width of action menu currently. 148 + text: i18n.tr("Sync") 149 + - onTriggered: syncMonitor.sync(["calendar"]) 150 + - enabled: syncMonitor.enabledServices ? syncMonitor.serviceIsEnabled("calendar") : false 151 + - visible: syncMonitor.enabledServices ? true : false 152 + + onTriggered: buteoSync.synchronize() 153 + + enabled: buteoSync.profiles.length > 0 ? true: false 154 + + visible: buteoSync.serviceAvailable ? true : false 155 + } 156 + 157 + + SyncManager { 158 + + id: buteoSync 159 + + filterHidden: true 160 + + filterBy.key: "category" 161 + + filterBy.value: "calendar" 162 + + } 163 + + 164 + + 165 + +/* 166 + SyncMonitor { 167 + id: syncMonitor 168 + onSyncError: { 169 + @@ -94,6 +104,7 @@ Item { 170 + } 171 + } 172 + } 173 + + */ 174 + 175 + Action{ 176 + id: _showCalendarAction 177 + @@ -125,7 +136,7 @@ Item { 178 + target: _syncCalendarAction 179 + iconSource: "../assets/sync-cancel.svg" 180 + text: i18n.tr("Syncing") 181 + - onTriggered: syncMonitor.cancel(["calendar"]) 182 + + //onTriggered: syncMonitor.cancel(["calendar"]) 183 + } 184 + }, 185 + State { 186 + diff --git a/src/qml/EventDetails.qml b/src/qml/EventDetails.qml 187 + index e8b5dcfb..63377c5d 100644 188 + --- a/src/qml/EventDetails.qml 189 + +++ b/src/qml/EventDetails.qml 190 + @@ -49,7 +49,7 @@ Page { 191 + text: i18n.tr("Edit"); 192 + objectName: "edit" 193 + iconName: "edit"; 194 + - enabled: !collection.extendedMetaData("collection-readonly") 195 + + enabled: !collection.extendedMetaData("readOnly") 196 + shortcut: "Ctrl+E" 197 + onTriggered: { 198 + if( event.itemType === Type.EventOccurrence ) { 199 + diff --git a/src/qml/EventListModel.qml b/src/qml/EventListModel.qml 200 + index 7e3b28af..8e9c958a 100644 201 + --- a/src/qml/EventListModel.qml 202 + +++ b/src/qml/EventListModel.qml 203 + @@ -22,7 +22,7 @@ import "dateExt.js" as DateExt 204 + 205 + OrganizerModel { 206 + id: eventModel 207 + - manager:"eds" 208 + + manager:"mkcal" 209 + 210 + readonly property bool appIsActive: (Qt.application.state === Qt.ApplicationActive) 211 + property bool active: false 212 + @@ -84,7 +84,7 @@ OrganizerModel { 213 + if (!collection) 214 + return false 215 + 216 + - return collection.extendedMetaData("collection-readonly") === true || 217 + + return collection.extendedMetaData("readOnly") === true || 218 + collection.extendedMetaData("collection-sync-readonly") === true 219 + } 220 + 221 + @@ -93,14 +93,12 @@ OrganizerModel { 222 + var collections = eventModel.collections; 223 + for(var i = 0 ; i < collections.length ; ++i) { 224 + var cal = collections[i]; 225 + - if( cal.extendedMetaData("collection-type") === "Calendar" ) { 226 + - // Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd 227 + - if (cal.name === "QtContactBirthdays") { 228 + - cal.name = i18n.tr("Birthdays & Anniversaries") 229 + - } 230 + - 231 + - cals.push(cal); 232 + + // Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd 233 + + if (cal.name === "QtContactBirthdays") { 234 + + cal.name = i18n.tr("Birthdays & Anniversaries") 235 + } 236 + + 237 + + cals.push(cal); 238 + } 239 + cals.sort(eventModel._sortCollections) 240 + return cals; 241 + @@ -111,8 +109,7 @@ OrganizerModel { 242 + var collections = eventModel.collections; 243 + for(var i = 0 ; i < collections.length ; ++i) { 244 + var cal = collections[i]; 245 + - if( cal.extendedMetaData("collection-type") === "Calendar" && 246 + - cal.extendedMetaData("collection-selected") === true && 247 + + if( cal.extendedMetaData("visible") === true && 248 + !collectionIsReadOnly(cal)) { 249 + cals.push(cal); 250 + } 251 + @@ -128,7 +125,7 @@ OrganizerModel { 252 + var firstSelectedCollection = null 253 + for(var i = 0 ; i < cals.length ; ++i) { 254 + var cal = cals[i] 255 + - if (cal.extendedMetaData("collection-selected") === true) { 256 + + if (cal.extendedMetaData("visible") === true) { 257 + if (!firstSelectedCollection) { 258 + firstSelectedCollection = cal 259 + } 260 + diff --git a/src/qml/ExportPageCommon.qml b/src/qml/ExportPageCommon.qml 261 + index 0a1f2f34..88310560 100644 262 + --- a/src/qml/ExportPageCommon.qml 263 + +++ b/src/qml/ExportPageCommon.qml 264 + @@ -151,7 +151,7 @@ Page { 265 + 266 + OrganizerModel{ 267 + id: organizerExporter 268 + - manager:"eds" 269 + + manager:"mkcal" 270 + autoUpdate: true 271 + 272 + onItemCountChanged: { 273 + diff --git a/src/qml/TimeLineBaseComponent.qml b/src/qml/TimeLineBaseComponent.qml 274 + index 519300df..7e8a364b 100644 275 + --- a/src/qml/TimeLineBaseComponent.qml 276 + +++ b/src/qml/TimeLineBaseComponent.qml 277 + @@ -193,7 +193,7 @@ Item { 278 + id: mainModel 279 + objectName: "timeLineBaseEventListModel:" + root.objectName 280 + 281 + - manager:"eds" 282 + + manager:"mkcal" 283 + startPeriod: startDay.midnight().utcEarliest(); 284 + endPeriod: type == ViewType.ViewTypeWeek ? startDay.addDays(6).endOfDay().utcLatest(): startDay.endOfDay().utcLatest() 285 + 286 + diff --git a/src/qml/calendar.qml b/src/qml/calendar.qml 287 + index 6238a0f5..2b6e6cfd 100644 288 + --- a/src/qml/calendar.qml 289 + +++ b/src/qml/calendar.qml 290 + @@ -251,7 +251,7 @@ MainView { 291 + var collections = eventModel.getCollections(); 292 + for(var i=0; i < collections.length ; ++i) { 293 + var collection = collections[i] 294 + - if(collection.extendedMetaData("collection-selected") === true) { 295 + + if(collection.extendedMetaData("visible") === true) { 296 + collectionIds.push(collection.collectionId); 297 + } 298 + } 299 + -- 300 + GitLab 301 +
+48
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch
··· 1 + From 95218b057d1c9ed571e1abc41f0377c6a087ca37 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Mon, 4 Nov 2024 16:52:56 +0100 4 + Subject: [PATCH] fix, allDay events not shown. mkCal store allDay event with 5 + the same dateStart and dateEnd. Make it work with that setup 6 + 7 + --- 8 + src/qml/AllDayEventComponent.qml | 18 ++++++++++-------- 9 + 1 file changed, 10 insertions(+), 8 deletions(-) 10 + 11 + diff --git a/src/qml/AllDayEventComponent.qml b/src/qml/AllDayEventComponent.qml 12 + index ba5a67aa..d3364c37 100644 13 + --- a/src/qml/AllDayEventComponent.qml 14 + +++ b/src/qml/AllDayEventComponent.qml 15 + @@ -37,20 +37,22 @@ Row { 16 + height: units.gu(5) 17 + 18 + function getAllDayEvents(startDate, endDate) { 19 + - var map = {}; 20 + - var items = model.itemsByTimePeriod(startDate,endDate); 21 + - for(var i = 0 ; i < items.length ; ++i) { 22 + - var event = items[(i)]; 23 + + let map = {}; 24 + + const events = model.itemsByTimePeriod(startDate,endDate); 25 + + events.forEach( event => { 26 + if( event && event.allDay ) { 27 + - for(var d = event.startDateTime; d < event.endDateTime; d = d.addDays(1)) { 28 + - var key = Qt.formatDateTime(d, "dd-MMM-yyyy"); 29 + - if( !(key in map)) { 30 + + let currentDate = event.startDateTime 31 + + while (currentDate <= event.endDateTime) { 32 + + const key = Qt.formatDateTime(currentDate, "dd-MMM-yyyy"); 33 + + if (!map[key]) { 34 + map[key] = []; 35 + } 36 + map[key].push(event); 37 + + 38 + + currentDate = currentDate.addDays(1); 39 + } 40 + } 41 + - } 42 + + }) 43 + return map; 44 + } 45 + 46 + -- 47 + GitLab 48 +
+97
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch
··· 1 + From 06750cc6f042cbcf4fa5e2fdd5a6eb29aff0d1b3 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Mon, 4 Nov 2024 16:54:13 +0100 4 + Subject: [PATCH] Use ButeoSync profiles for sync management 5 + 6 + --- 7 + src/qml/CalendarChoicePopup.qml | 20 +++++++++----------- 8 + src/qml/EventActions.qml | 7 ++++--- 9 + 2 files changed, 13 insertions(+), 14 deletions(-) 10 + 11 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 12 + index 5d29ef86..8fa1e4b2 100644 13 + --- a/src/qml/CalendarChoicePopup.qml 14 + +++ b/src/qml/CalendarChoicePopup.qml 15 + @@ -20,8 +20,7 @@ import QtQuick 2.4 16 + import QtOrganizer 5.0 17 + import Lomiri.Components 1.3 18 + import Lomiri.Content 1.3 19 + -//import Lomiri.SyncMonitor 0.1 20 + -import Buteo 0.1 21 + +import Buteo.Profiles 0.1 22 + import Lomiri.Components.Popups 1.3 23 + import SSO.OnlineAccounts 0.1 24 + 25 + @@ -31,6 +30,7 @@ Page { 26 + objectName: "calendarchoicepopup" 27 + 28 + property var model 29 + + readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing 30 + signal collectionUpdated() 31 + 32 + function accountFromId(accountId) 33 + @@ -60,22 +60,20 @@ Page { 34 + // TRANSLATORS: Please translate this string to 15 characters only. 35 + // Currently ,there is no way we can increase width of action menu currently. 36 + text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing") 37 + - onTriggered: buteoSync.startSyncByCategory("calendar") 38 + - enabled: (!buteoSync.synchronizing) 39 + - visible: !networkError 40 + + onTriggered: buteoSync.synchronize() 41 + + enabled: calendarChoicePage.canSynchronize 42 + + visible: buteoSync.serviceAvailable 43 + } 44 + flickable: flickable 45 + } 46 + 47 + - ButeoSync { 48 + + SyncManager { 49 + id: buteoSync 50 + + filterHidden: true 51 + + filterBy.key: "category" 52 + + filterBy.value: "calendar" 53 + } 54 + 55 + - 56 + - // SyncMonitor { 57 + - // id: syncMonitor 58 + - // } 59 + - 60 + Flickable { 61 + id: flickable 62 + 63 + diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml 64 + index d583eb1a..d46e8e25 100644 65 + --- a/src/qml/EventActions.qml 66 + +++ b/src/qml/EventActions.qml 67 + @@ -18,7 +18,6 @@ 68 + 69 + import QtQuick 2.4 70 + import Lomiri.Components 1.3 71 + -//import Lomiri.SyncMonitor 0.1 72 + import Buteo.Profiles 0.1 73 + import Lomiri.Components.Popups 1.3 74 + import Qt.labs.settings 1.0 75 + @@ -31,6 +30,8 @@ Item { 76 + property alias settingsAction: _settingsAction 77 + property Settings settings 78 + readonly property bool syncInProgress: buteoSync.synchronizing 79 + + readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing 80 + + 81 + 82 + onSyncInProgressChanged: { 83 + 84 + @@ -79,8 +80,8 @@ Item { 85 + // Currently ,there is no way we can increase width of action menu currently. 86 + text: i18n.tr("Sync") 87 + onTriggered: buteoSync.synchronize() 88 + - enabled: buteoSync.profiles.length > 0 ? true: false 89 + - visible: buteoSync.serviceAvailable ? true : false 90 + + enabled: actionPool.canSynchronize 91 + + visible: buteoSync.serviceAvailable 92 + } 93 + 94 + SyncManager { 95 + -- 96 + GitLab 97 +
+283
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch
··· 1 + From 7c9419ecb95c7973f7db7dbab8f988d4b40a1c00 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Tue, 26 Nov 2024 16:51:59 +0100 4 + Subject: [PATCH] Add EDS to mkCal calendar migration 5 + 6 + --- 7 + CMakeLists.txt | 5 + 8 + clickable.yaml | 2 +- 9 + debian/control | 3 +- 10 + .../lomiri-calendar-app-migrate-eds2mkcal.sh | 13 ++ 11 + debian/lomiri-calendar-app.install | 3 +- 12 + debian/lomiri-calendar-app.migrations | 1 + 13 + debian/rules | 4 +- 14 + ics_importer/CMakeLists.txt | 20 +++ 15 + ics_importer/ics_importer.cpp | 122 ++++++++++++++++++ 16 + 9 files changed, 168 insertions(+), 5 deletions(-) 17 + create mode 100644 debian/lomiri-calendar-app-migrate-eds2mkcal.sh 18 + create mode 100644 ics_importer/CMakeLists.txt 19 + create mode 100644 ics_importer/ics_importer.cpp 20 + 21 + diff --git a/CMakeLists.txt b/CMakeLists.txt 22 + index 547f6550..c49d718b 100644 23 + --- a/CMakeLists.txt 24 + +++ b/CMakeLists.txt 25 + @@ -12,6 +12,7 @@ find_package(Qt5Quick REQUIRED) 26 + 27 + option(INSTALL_TESTS "Install the tests on make install" on) 28 + option(CLICK_MODE "Installs to a contained location" on) 29 + +option(ENABLE_EDS_IMPORTER "Build eds2mkcal importer tool" off) 30 + 31 + # Standard install paths 32 + include(GNUInstallDirs) 33 + @@ -96,3 +97,7 @@ install(FILES ${APPLICATION_FILE} DESTINATION ${APPLICATION_DIR}) 34 + add_subdirectory(src) 35 + add_subdirectory(po) 36 + add_subdirectory(tests) 37 + +if(ENABLE_EDS_IMPORTER) 38 + + add_subdirectory(ics_importer) 39 + +endif(ENABLE_EDS_IMPORTER) 40 + + 41 + diff --git a/clickable.yaml b/clickable.yaml 42 + index 486f4bf6..c1eaf346 100644 43 + --- a/clickable.yaml 44 + +++ b/clickable.yaml 45 + @@ -4,5 +4,5 @@ framework: ubuntu-sdk-20.04 46 + build_args: "-DCLICK_MODE=ON" 47 + kill: 'lomiri-calendar-app' 48 + dependencies_host: 49 + - - qtorganizer5-eds 50 + + - qtorganizer5-mkcal 51 + ignore_review_errors: true 52 + diff --git a/debian/control b/debian/control 53 + index 5f8a603f..9bce332f 100644 54 + --- a/debian/control 55 + +++ b/debian/control 56 + @@ -12,9 +12,10 @@ Build-Depends: cmake, 57 + qml-module-qttest, 58 + qml-module-lomiri-components, 59 + qml-module-buteo-profiles, 60 + - qt5-default, 61 + + qtbase5-dev, 62 + qtdeclarative5-dev, 63 + qtdeclarative5-dev-tools, 64 + + qtpim5-dev 65 + Standards-Version: 4.7.0 66 + Homepage: https://gitlab.com/ubports/development/apps/lomiri-calendar-app 67 + Vcs-Git: https://gitlab.com/ubports/development/apps/lomiri-calendar-app.git 68 + diff --git a/debian/lomiri-calendar-app-migrate-eds2mkcal.sh b/debian/lomiri-calendar-app-migrate-eds2mkcal.sh 69 + new file mode 100644 70 + index 00000000..339e0fff 71 + --- /dev/null 72 + +++ b/debian/lomiri-calendar-app-migrate-eds2mkcal.sh 73 + @@ -0,0 +1,13 @@ 74 + +#! /bin/sh 75 + + 76 + +set -e 77 + + 78 + +# Exit if we already migrated 79 + +[ -f "$HOME/.local/share/evolution/calendar/system/migrated_to_mkcal" ] && exit 0 80 + + 81 + +# Exit if there is no ICS file 82 + +[ -f "$HOME/.local/share/evolution/calendar/system/calendar.ics" ] || exit 0 83 + + 84 + +/usr/bin/lomiri-calendar-eds2mkcal-importer "$HOME/.local/share/evolution/calendar/system/calendar.ics" 85 + + 86 + +echo $? > "$HOME/.local/share/evolution/calendar/system/migrated_to_mkcal" 87 + \ No newline at end of file 88 + diff --git a/debian/lomiri-calendar-app.install b/debian/lomiri-calendar-app.install 89 + index 315c7b75..151885bf 100644 90 + --- a/debian/lomiri-calendar-app.install 91 + +++ b/debian/lomiri-calendar-app.install 92 + @@ -1,3 +1,4 @@ 93 + -usr/bin/* 94 + +usr/bin/lomiri-calendar-app 95 + +usr/bin/lomiri-calendar-eds2mkcal-importer 96 + usr/lib/lomiri-push-service/* 97 + usr/share/* 98 + diff --git a/debian/lomiri-calendar-app.migrations b/debian/lomiri-calendar-app.migrations 99 + index c232792d..338d4454 100644 100 + --- a/debian/lomiri-calendar-app.migrations 101 + +++ b/debian/lomiri-calendar-app.migrations 102 + @@ -1 +1,2 @@ 103 + debian/lomiri-calendar-app-name-change.sh 104 + +debian/lomiri-calendar-app-migrate-eds2mkcal.sh 105 + diff --git a/debian/rules b/debian/rules 106 + index ca2b30fc..cce09bd4 100755 107 + --- a/debian/rules 108 + +++ b/debian/rules 109 + @@ -2,7 +2,7 @@ 110 + # -*- makefile -*- 111 + 112 + # Uncomment this to turn on verbose mode. 113 + -#export DH_VERBOSE=1 114 + +export DH_VERBOSE=1 115 + 116 + PROJECT_DH_OPTIONS = 117 + ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) 118 + @@ -16,7 +16,7 @@ override_dh_missing: 119 + dh_missing --fail-missing 120 + 121 + override_dh_auto_configure: 122 + - dh_auto_configure -- -DCLICK_MODE=OFF 123 + + dh_auto_configure -- -DCLICK_MODE=OFF -DENABLE_EDS_IMPORTER=ON 124 + 125 + override_dh_auto_test: 126 + # unit tests are failing, may be out of sync with the codebase since 127 + diff --git a/ics_importer/CMakeLists.txt b/ics_importer/CMakeLists.txt 128 + new file mode 100644 129 + index 00000000..ee52c860 130 + --- /dev/null 131 + +++ b/ics_importer/CMakeLists.txt 132 + @@ -0,0 +1,20 @@ 133 + +project(ICSImporter VERSION 1.0 LANGUAGES CXX) 134 + + 135 + +cmake_minimum_required(VERSION 3.14) 136 + + 137 + +find_package(Qt5 REQUIRED COMPONENTS Core Organizer Versit VersitOrganizer) 138 + + 139 + +add_executable(lomiri-calendar-eds2mkcal-importer ics_importer.cpp) 140 + + 141 + +target_link_libraries(lomiri-calendar-eds2mkcal-importer 142 + + Qt5::Core 143 + + Qt5::Organizer 144 + + Qt5::Versit 145 + + Qt5::VersitOrganizer 146 + +) 147 + + 148 + +install(TARGETS lomiri-calendar-eds2mkcal-importer 149 + + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 150 + +) 151 + + 152 + + 153 + diff --git a/ics_importer/ics_importer.cpp b/ics_importer/ics_importer.cpp 154 + new file mode 100644 155 + index 00000000..3d409d47 156 + --- /dev/null 157 + +++ b/ics_importer/ics_importer.cpp 158 + @@ -0,0 +1,122 @@ 159 + +#include <QCoreApplication> 160 + +#include <QDebug> 161 + +#include <QFile> 162 + +#include <QTextStream> 163 + +#include <QtOrganizer/QOrganizerManager> 164 + +#include <QtOrganizer/QOrganizerEvent> 165 + +#include <QtOrganizer/QOrganizerItem> 166 + +#include <QtOrganizer/QOrganizerItemFetchRequest> 167 + +#include <QtVersit/QVersitReader> 168 + +#include <QVersitOrganizerImporter> 169 + + 170 + +using namespace QtOrganizer; 171 + +using namespace QtVersit; 172 + + 173 + +bool importICS(const QString& filePath, const QString& collectionId) { 174 + + QFile file(filePath); 175 + + 176 + + if (!file.exists()) { 177 + + qWarning() << "File does not exist:" << filePath; 178 + + return false; 179 + + } 180 + + 181 + + if (!file.open(QIODevice::ReadOnly)) { 182 + + qWarning() << "Failed to open file:" << filePath; 183 + + return false; 184 + + } 185 + + 186 + + // Read the .ics file content 187 + + QVersitReader reader; 188 + + reader.setDevice(&file); 189 + + bool result = reader.startReading(); 190 + + reader.waitForFinished(); 191 + + if(!result) 192 + + { 193 + + qCritical()<<"ics reading failed"; 194 + + return false; 195 + + } 196 + + 197 + + QList<QVersitDocument> documents = reader.results(); 198 + + 199 + + 200 + + if (!QOrganizerManager::availableManagers().contains("mkcal")) { 201 + + qWarning() << "Could not found mkcal backend for QtPim"; 202 + + return false; 203 + + } 204 + + QOrganizerManager manager("mkcal"); 205 + + QOrganizerCollectionId targetCollectionId = manager.defaultCollectionId(); 206 + + if (!collectionId.isEmpty()) { 207 + + 208 + + QList<QOrganizerCollection> collections = manager.collections(); 209 + + bool exist = false; 210 + + for (const QOrganizerCollection& col: collections) { 211 + + if (col.id().localId() == collectionId) { 212 + + exist = true; 213 + + targetCollectionId = col.id(); 214 + + break; 215 + + } 216 + + } 217 + + if (!exist) { 218 + + qWarning() << "Could not found collection with id" << collectionId; 219 + + return false; 220 + + } 221 + + } 222 + + 223 + + qDebug() << "targeted collection Id:" << targetCollectionId.localId(); 224 + + 225 + + //Import the .ics data into QOrganizer 226 + + QtVersitOrganizer::QVersitOrganizerImporter importer; 227 + + 228 + + for (const QVersitDocument& document: documents) { 229 + + bool ok = importer.importDocument(document); 230 + + 231 + + if (!ok) { 232 + + qWarning() << "Failed to import document" << importer.errorMap(); 233 + + } else { 234 + + 235 + + QList<QOrganizerItem> importedItems = importer.items(); 236 + + QList<QOrganizerItem> batch; 237 + + const int batchSize = 200; 238 + + 239 + + qDebug() << "Import events into collection" << targetCollectionId; 240 + + 241 + + for (int i = 0; i < importedItems.size(); ++i) { 242 + + QOrganizerItem& item = importedItems[i]; 243 + + item.setCollectionId(targetCollectionId); 244 + + batch.append(item); 245 + + 246 + + if (batch.size() == batchSize || i == importedItems.size() - 1) { 247 + + if (!manager.saveItems(&batch)) { 248 + + qWarning() << "Failed to save batch. Error:" << manager.error(); 249 + + } else { 250 + + qDebug() << "Batch of" << batch.size() << "items saved successfully."; 251 + + } 252 + + 253 + + batch.clear(); 254 + + } 255 + + } 256 + + } 257 + + } 258 + + 259 + + qDebug() << "ICS import completed."; 260 + + return true; 261 + +} 262 + + 263 + +int main(int argc, char *argv[]) { 264 + + QCoreApplication app(argc, argv); 265 + + 266 + + if (argc < 2) { 267 + + qCritical() << "Usage: importer <path_to_ics_file> [collection_id]"; 268 + + return EXIT_FAILURE; 269 + + } 270 + + 271 + + QString filePath = argv[1]; 272 + + QString collection; 273 + + if (argc == 3) { 274 + + collection = argv[2]; 275 + + } 276 + + 277 + + bool ok = importICS(filePath, collection); 278 + + 279 + + return ok ? EXIT_SUCCESS : EXIT_FAILURE; 280 + +} 281 + -- 282 + GitLab 283 +
+26
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1105-lomiri-calendar-app-Support-caldav-service.patch
··· 1 + From 83541449e953f15c34f53dce657a94f189f597d3 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Thu, 28 Nov 2024 09:30:59 +0100 4 + Subject: [PATCH] Support caldav service. ( Needed by buteo caldav plugin) 5 + 6 + --- 7 + lomiri-calendar-app.application | 3 +++ 8 + 1 file changed, 3 insertions(+) 9 + 10 + diff --git a/lomiri-calendar-app.application b/lomiri-calendar-app.application 11 + index f0781b77..684c14b6 100644 12 + --- a/lomiri-calendar-app.application 13 + +++ b/lomiri-calendar-app.application 14 + @@ -7,6 +7,9 @@ 15 + <service-type id="calendar"> 16 + <description>Syncronize your calendar</description> 17 + </service-type> 18 + + <service-type id="caldav"> 19 + + <description>Syncronize your calendar</description> 20 + + </service-type> 21 + </service-types> 22 + 23 + </application> 24 + -- 25 + GitLab 26 +
+48
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch
··· 1 + From fa1e0406e256ce66d399e1e0f0b18974b15704fe Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Wed, 11 Dec 2024 17:17:08 +0100 4 + Subject: [PATCH] Clean up sync-monitor usage 5 + 6 + --- 7 + src/qml/EventActions.qml | 18 +----------------- 8 + 1 file changed, 1 insertion(+), 17 deletions(-) 9 + 10 + diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml 11 + index d46e8e25..63e50fb9 100644 12 + --- a/src/qml/EventActions.qml 13 + +++ b/src/qml/EventActions.qml 14 + @@ -91,22 +91,6 @@ Item { 15 + filterBy.value: "calendar" 16 + } 17 + 18 + - 19 + -/* 20 + - SyncMonitor { 21 + - id: syncMonitor 22 + - onSyncError: { 23 + - console.log('SyncError:', account, service, error) 24 + - if (error != "canceled") { 25 + - 26 + - syncErrorData.account = account 27 + - syncErrorData.error = error 28 + - syncErrorData.service = service 29 + - } 30 + - } 31 + - } 32 + - */ 33 + - 34 + Action{ 35 + id: _showCalendarAction 36 + objectName: "calendarsbutton" 37 + @@ -170,7 +154,7 @@ Item { 38 + Button { 39 + text: i18n.tr("Retry sync") 40 + onClicked: { 41 + - syncMonitor.sync(["calendar"]) 42 + + buteoSync.synchronize() 43 + PopupUtils.close(dialogue) 44 + } 45 + } 46 + -- 47 + GitLab 48 +
+26
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1107-lomiri-calendar-app-Use-account-supported-metadata.patch
··· 1 + From 25c7d5e53cc4576a6e6a0ba91fc5ff9f288cf626 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Wed, 11 Dec 2024 17:18:06 +0100 4 + Subject: [PATCH] Use "account" supported metadata instead of eds metadata 5 + "collection-account-id" 6 + 7 + --- 8 + src/qml/CalendarChoicePopup.qml | 2 +- 9 + 1 file changed, 1 insertion(+), 1 deletion(-) 10 + 11 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 12 + index 8fa1e4b2..02d2c717 100644 13 + --- a/src/qml/CalendarChoicePopup.qml 14 + +++ b/src/qml/CalendarChoicePopup.qml 15 + @@ -155,7 +155,7 @@ Page { 16 + 17 + Account { 18 + id: delegateAccount 19 + - objectHandle: calendarChoicePage.accountFromId(modelData.extendedMetaData("collection-account-id")) 20 + + objectHandle: calendarChoicePage.accountFromId(modelData.extendedMetaData("account")) 21 + } 22 + 23 + title.text: modelData.name 24 + -- 25 + GitLab 26 +
+32
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1108-lomiri-calendar-app-Add-support-for-google-calendars.patch
··· 1 + From b6369a317d8c5e3c654071382092dca18f543e8f Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Fri, 20 Dec 2024 10:28:32 +0100 4 + Subject: [PATCH] Add support for google-calendars 5 + 6 + --- 7 + lomiri-calendar-app.application | 7 +++++-- 8 + 1 file changed, 5 insertions(+), 2 deletions(-) 9 + 10 + diff --git a/lomiri-calendar-app.application b/lomiri-calendar-app.application 11 + index 684c14b6..37d1e0ef 100644 12 + --- a/lomiri-calendar-app.application 13 + +++ b/lomiri-calendar-app.application 14 + @@ -5,10 +5,13 @@ 15 + 16 + <service-types> 17 + <service-type id="calendar"> 18 + - <description>Syncronize your calendar</description> 19 + + <description>Synchronize your calendar</description> 20 + </service-type> 21 + <service-type id="caldav"> 22 + - <description>Syncronize your calendar</description> 23 + + <description>Synchronize your calendar</description> 24 + + </service-type> 25 + + <service-type id="google-calendars"> 26 + + <description>Synchronize your calendar</description> 27 + </service-type> 28 + </service-types> 29 + 30 + -- 31 + GitLab 32 +
+24
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch
··· 1 + From 097472be88b64284a90361bee7493e3bb0067f18 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Tue, 7 Jan 2025 10:34:57 +0100 4 + Subject: [PATCH] Do not retrieve disabled profiles 5 + 6 + --- 7 + src/qml/CalendarChoicePopup.qml | 1 + 8 + 1 file changed, 1 insertion(+) 9 + 10 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 11 + index 02d2c717..42bf6462 100644 12 + --- a/src/qml/CalendarChoicePopup.qml 13 + +++ b/src/qml/CalendarChoicePopup.qml 14 + @@ -69,6 +69,7 @@ Page { 15 + 16 + SyncManager { 17 + id: buteoSync 18 + + filterDisabled: true 19 + filterHidden: true 20 + filterBy.key: "category" 21 + filterBy.value: "calendar" 22 + -- 23 + GitLab 24 +
+77
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch
··· 1 + From d2477ad5cfbdfff39f20c0659c4915a53019572a Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Tue, 7 Jan 2025 10:40:00 +0100 4 + Subject: [PATCH] Auto sync on first account creation 5 + 6 + --- 7 + src/qml/CalendarChoicePopup.qml | 17 +++++++++++++++++ 8 + src/qml/OnlineAccountsHelper.qml | 11 +++++++++++ 9 + 2 files changed, 28 insertions(+) 10 + 11 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 12 + index 42bf6462..a0367138 100644 13 + --- a/src/qml/CalendarChoicePopup.qml 14 + +++ b/src/qml/CalendarChoicePopup.qml 15 + @@ -67,6 +67,18 @@ Page { 16 + flickable: flickable 17 + } 18 + 19 + + Timer { 20 + + id: contactFirstSyncTimer 21 + + 22 + + interval: 500 23 + + repeat: false 24 + + onTriggered: { 25 + + if (calendarChoicePage.canSynchronize) { 26 + + buteoSync.synchronize() 27 + + } 28 + + } 29 + + } 30 + + 31 + SyncManager { 32 + id: buteoSync 33 + filterDisabled: true 34 + @@ -399,6 +411,11 @@ Page { 35 + anchors.fill: parent 36 + asynchronous: true 37 + source: sourceFile 38 + + 39 + + Connections { 40 + + target: onlineAccountHelper.item ? onlineAccountHelper.item : null 41 + + onFinished: contactFirstSyncTimer.restart() 42 + + } 43 + } 44 + 45 + Component { 46 + diff --git a/src/qml/OnlineAccountsHelper.qml b/src/qml/OnlineAccountsHelper.qml 47 + index 3a6b4b16..6d07bad7 100644 48 + --- a/src/qml/OnlineAccountsHelper.qml 49 + +++ b/src/qml/OnlineAccountsHelper.qml 50 + @@ -24,6 +24,8 @@ Item { 51 + id: root 52 + 53 + property var dialogInstance: null 54 + + signal finished() 55 + + signal canceled() 56 + 57 + function run(){ 58 + if (!root.dialogInstance) { 59 + @@ -86,6 +88,15 @@ Item { 60 + providerId: "google" 61 + onFinished: { 62 + PopupUtils.close(root.dialogInstance) 63 + + if (reply != null && reply.errorName !== undefined) { 64 + + if (reply.errorName === "com.lomiri.OnlineAccountsUi.UserCanceled") { 65 + + root.canceled() 66 + + } else { 67 + + root.finished() 68 + + } 69 + + } else { 70 + + root.finished() 71 + + } 72 + } 73 + } 74 + } 75 + -- 76 + GitLab 77 +
+64
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch
··· 1 + From 9b4412fa12df1452bc987149e8497e50d58e76f0 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Fri, 10 Jan 2025 17:45:39 +0100 4 + Subject: [PATCH] Display sync button only if profiles are enabled and set 5 + 6 + --- 7 + src/qml/CalendarChoicePopup.qml | 5 +++-- 8 + src/qml/EventActions.qml | 6 ++++-- 9 + 2 files changed, 7 insertions(+), 4 deletions(-) 10 + 11 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 12 + index a0367138..3964c3c1 100644 13 + --- a/src/qml/CalendarChoicePopup.qml 14 + +++ b/src/qml/CalendarChoicePopup.qml 15 + @@ -30,7 +30,8 @@ Page { 16 + objectName: "calendarchoicepopup" 17 + 18 + property var model 19 + - readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing 20 + + readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0 21 + + readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing 22 + signal collectionUpdated() 23 + 24 + function accountFromId(accountId) 25 + @@ -62,7 +63,7 @@ Page { 26 + text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing") 27 + onTriggered: buteoSync.synchronize() 28 + enabled: calendarChoicePage.canSynchronize 29 + - visible: buteoSync.serviceAvailable 30 + + visible: calendarChoicePage.syncAvailable 31 + } 32 + flickable: flickable 33 + } 34 + diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml 35 + index 63e50fb9..579981d5 100644 36 + --- a/src/qml/EventActions.qml 37 + +++ b/src/qml/EventActions.qml 38 + @@ -30,7 +30,8 @@ Item { 39 + property alias settingsAction: _settingsAction 40 + property Settings settings 41 + readonly property bool syncInProgress: buteoSync.synchronizing 42 + - readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing 43 + + readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0 44 + + readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing 45 + 46 + 47 + onSyncInProgressChanged: { 48 + @@ -81,11 +82,12 @@ Item { 49 + text: i18n.tr("Sync") 50 + onTriggered: buteoSync.synchronize() 51 + enabled: actionPool.canSynchronize 52 + - visible: buteoSync.serviceAvailable 53 + + visible: actionPool.syncAvailable 54 + } 55 + 56 + SyncManager { 57 + id: buteoSync 58 + + filterDisabled: true 59 + filterHidden: true 60 + filterBy.key: "category" 61 + filterBy.value: "calendar" 62 + -- 63 + GitLab 64 +
+46
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch
··· 1 + From 2e8411528eddb5e3e76edef417ed96ce1ed82466 Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Mon, 27 Jan 2025 22:26:52 +0100 4 + Subject: [PATCH] Don't show alarms Collection 5 + 6 + --- 7 + src/qml/EventListModel.qml | 9 +++++++-- 8 + 1 file changed, 7 insertions(+), 2 deletions(-) 9 + 10 + diff --git a/src/qml/EventListModel.qml b/src/qml/EventListModel.qml 11 + index 8e9c958a..b40d84a6 100644 12 + --- a/src/qml/EventListModel.qml 13 + +++ b/src/qml/EventListModel.qml 14 + @@ -93,6 +93,11 @@ OrganizerModel { 15 + var collections = eventModel.collections; 16 + for(var i = 0 ; i < collections.length ; ++i) { 17 + var cal = collections[i]; 18 + + // don't show Alarms collection 19 + + if (cal.name === "Alarms") { 20 + + continue 21 + + } 22 + + 23 + // Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd 24 + if (cal.name === "QtContactBirthdays") { 25 + cal.name = i18n.tr("Birthdays & Anniversaries") 26 + @@ -106,15 +111,15 @@ OrganizerModel { 27 + 28 + function getWritableAndSelectedCollections(){ 29 + var cals = []; 30 + - var collections = eventModel.collections; 31 + + var collections = getCollections(); 32 + for(var i = 0 ; i < collections.length ; ++i) { 33 + var cal = collections[i]; 34 + + 35 + if( cal.extendedMetaData("visible") === true && 36 + !collectionIsReadOnly(cal)) { 37 + cals.push(cal); 38 + } 39 + } 40 + - cals.sort(eventModel._sortCollections); 41 + return cals 42 + } 43 + 44 + -- 45 + GitLab 46 +
+25
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch
··· 1 + From fcca1e0fa792e69b6780017db4afc34ea83ea28a Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Mon, 27 Jan 2025 22:40:56 +0100 4 + Subject: [PATCH] eds->mkcal : Allow to open up directly an event 5 + 6 + --- 7 + src/qml/calendar.qml | 2 +- 8 + 1 file changed, 1 insertion(+), 1 deletion(-) 9 + 10 + diff --git a/src/qml/calendar.qml b/src/qml/calendar.qml 11 + index 2b6e6cfd..fef622c4 100644 12 + --- a/src/qml/calendar.qml 13 + +++ b/src/qml/calendar.qml 14 + @@ -797,7 +797,7 @@ MainView { 15 + } 16 + } // End of else if (starttime) 17 + else if (tabs.eventId !== "") { 18 + - var prefix = "qtorganizer:eds::"; 19 + + var prefix = "qtorganizer:mkcal::"; 20 + if (tabs.eventId.indexOf(prefix) < 0) 21 + tabs.eventId = prefix + tabs.eventId; 22 + 23 + -- 24 + GitLab 25 +
+39
pkgs/desktops/lomiri/applications/lomiri-calendar-app/1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch
··· 1 + From 54a2d60a5c1c4be00a9696d587d933c771ee7b4b Mon Sep 17 00:00:00 2001 2 + From: Lionel Duboeuf <lduboeuf@ouvaton.org> 3 + Date: Thu, 13 Feb 2025 10:58:14 +0100 4 + Subject: [PATCH] Adjust SyncManager filters 5 + 6 + --- 7 + src/qml/CalendarChoicePopup.qml | 2 +- 8 + src/qml/EventActions.qml | 2 +- 9 + 2 files changed, 2 insertions(+), 2 deletions(-) 10 + 11 + diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml 12 + index 3964c3c1..aa2dfdb4 100644 13 + --- a/src/qml/CalendarChoicePopup.qml 14 + +++ b/src/qml/CalendarChoicePopup.qml 15 + @@ -83,7 +83,7 @@ Page { 16 + SyncManager { 17 + id: buteoSync 18 + filterDisabled: true 19 + - filterHidden: true 20 + + filterHidden: false 21 + filterBy.key: "category" 22 + filterBy.value: "calendar" 23 + } 24 + diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml 25 + index 579981d5..eb79da45 100644 26 + --- a/src/qml/EventActions.qml 27 + +++ b/src/qml/EventActions.qml 28 + @@ -88,7 +88,7 @@ Item { 29 + SyncManager { 30 + id: buteoSync 31 + filterDisabled: true 32 + - filterHidden: true 33 + + filterHidden: false 34 + filterBy.key: "category" 35 + filterBy.value: "calendar" 36 + } 37 + -- 38 + GitLab 39 +
+158
pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + fetchpatch, 6 + gitUpdater, 7 + nixosTests, 8 + accounts-qml-module, 9 + buteo-syncfw, 10 + cmake, 11 + gettext, 12 + lomiri-content-hub, 13 + lomiri-indicator-network, 14 + lomiri-ui-toolkit, 15 + qtbase, 16 + qtdeclarative, 17 + qtorganizer-mkcal, 18 + qtpim, 19 + wrapQtAppsHook, 20 + }: 21 + 22 + stdenv.mkDerivation (finalAttrs: { 23 + pname = "lomiri-calendar-app"; 24 + version = "1.1.2"; 25 + 26 + src = fetchFromGitLab { 27 + owner = "ubports"; 28 + repo = "development/apps/lomiri-calendar-app"; 29 + tag = "v${finalAttrs.version}"; 30 + hash = "sha256-NjpzzMuez7Abq1mIBz5N/H55GpkDrnXohPx2U6ThADY="; 31 + }; 32 + 33 + patches = [ 34 + # Needed for MR 260 changes 35 + (fetchpatch { 36 + name = "0001-lomiri-calendar-app-Remove-deprecated-tabs.patch"; 37 + url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/12c9d3b8a5643790334e664e6b3d2c8f9b600e83.patch"; 38 + hash = "sha256-tvY5inNkNrSvfuD05RpmI3a2tFEOwNPCRgRn0RZB4DA="; 39 + }) 40 + (fetchpatch { 41 + name = "0002-lomiri-calendar-app-Ensure-PageStack-is-initialized.patch"; 42 + url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/deef3605b31c4c41f5c67311f1ff1ee02bd3b39a.patch"; 43 + hash = "sha256-FusFYFnpEEJKchInLZ5vE08SnKbwmlnUYh85cQE+JbM="; 44 + }) 45 + 46 + # Fixes localisation for us 47 + (fetchpatch { 48 + name = "0101-lomiri-calendar-app-bindtextdomain.patch"; 49 + url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/c4c296e7f308af491558f1b7964542e4d638cb47.patch"; 50 + hash = "sha256-GLEJlr4EMY6ugP2UVvpyVIZkBnkArn0XoSB5aqGEpm4="; 51 + }) 52 + 53 + # Switch to future contacts backend 54 + # Remove when https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/merge_requests/239 merged & in release 55 + ./1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch 56 + 57 + # Switch to future calendar backend 58 + # Remove when https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/merge_requests/260 merged & in release 59 + ./1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch 60 + ./1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch 61 + ./1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch 62 + ./1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch 63 + ./1105-lomiri-calendar-app-Support-caldav-service.patch 64 + ./1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch 65 + ./1107-lomiri-calendar-app-Use-account-supported-metadata.patch 66 + ./1108-lomiri-calendar-app-Add-support-for-google-calendars.patch 67 + ./1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch 68 + ./1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch 69 + ./1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch 70 + ./1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch 71 + ./1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch 72 + ./1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch 73 + ]; 74 + 75 + postPatch = 76 + '' 77 + substituteInPlace CMakeLists.txt \ 78 + --replace-fail 'QT_IMPORTS_DIR "lib/''${ARCH_TRIPLET}"' 'QT_IMPORTS_DIR "${qtbase.qtQmlPrefix}"' 79 + 80 + # Outdated paths 81 + substituteInPlace tests/unittests/tst_{calendar_canvas,date,event_bubble,event_list_model}.qml \ 82 + --replace-fail '../../qml' '../../src/qml' 83 + '' 84 + + lib.optionalString (!finalAttrs.finalPackage.doCheck) '' 85 + substituteInPlace CMakeLists.txt \ 86 + --replace-fail 'add_subdirectory(tests)' '# add_subdirectory(tests)' 87 + ''; 88 + 89 + strictDeps = true; 90 + 91 + nativeBuildInputs = [ 92 + cmake 93 + gettext 94 + wrapQtAppsHook 95 + ]; 96 + 97 + buildInputs = [ 98 + qtbase 99 + qtdeclarative 100 + 101 + # QML & Qt plugins 102 + accounts-qml-module 103 + buteo-syncfw 104 + lomiri-content-hub 105 + lomiri-indicator-network 106 + lomiri-ui-toolkit 107 + qtpim 108 + qtorganizer-mkcal 109 + ]; 110 + 111 + cmakeFlags = [ 112 + (lib.cmakeBool "CLICK_MODE" false) 113 + (lib.cmakeBool "INSTALL_TESTS" false) 114 + ]; 115 + 116 + # Not workiing yet 117 + doCheck = false; 118 + 119 + enableParallelChecking = false; 120 + 121 + preCheck = 122 + let 123 + listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix; 124 + in 125 + '' 126 + export HOME=$TMP 127 + export QT_PLUGIN_PATH=${ 128 + listToQtVar qtbase.qtPluginPrefix [ 129 + qtbase 130 + qtorganizer-mkcal 131 + ] 132 + } 133 + export QML2_IMPORT_PATH=${ 134 + listToQtVar qtbase.qtQmlPrefix ( 135 + [ 136 + lomiri-ui-toolkit 137 + qtpim 138 + ] 139 + ++ lomiri-ui-toolkit.propagatedBuildInputs 140 + ) 141 + } 142 + ''; 143 + 144 + passthru = { 145 + tests.vm = nixosTests.lomiri-calendar-app; 146 + updateScript = gitUpdater { rev-prefix = "v"; }; 147 + }; 148 + 149 + meta = { 150 + description = "Default Calendar application for Ubuntu Touch devices"; 151 + homepage = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app"; 152 + changelog = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/blob/v${finalAttrs.version}/ChangeLog"; 153 + license = with lib.licenses; [ gpl3Only ]; 154 + mainProgram = "lomiri-calendar-app"; 155 + maintainers = lib.teams.lomiri.members; 156 + platforms = lib.platforms.linux; 157 + }; 158 + })
+1
pkgs/desktops/lomiri/default.nix
··· 15 15 #### Core Apps 16 16 lomiri = callPackage ./applications/lomiri { }; 17 17 lomiri-calculator-app = callPackage ./applications/lomiri-calculator-app { }; 18 + lomiri-calendar-app = callPackage ./applications/lomiri-calendar-app { }; 18 19 lomiri-camera-app = callPackage ./applications/lomiri-camera-app { }; 19 20 lomiri-clock-app = callPackage ./applications/lomiri-clock-app { }; 20 21 lomiri-docviewer-app = callPackage ./applications/lomiri-docviewer-app { };
+87
pkgs/development/libraries/libiodata/default.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + gitUpdater, 7 + bison, 8 + flex, 9 + qmake, 10 + pkg-config, 11 + libxcrypt, 12 + }: 13 + 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "libiodata"; 16 + version = "0.19.14"; 17 + 18 + outputs = [ 19 + "out" 20 + "dev" 21 + ]; 22 + 23 + src = fetchFromGitHub { 24 + owner = "sailfishos"; 25 + repo = "libiodata"; 26 + tag = finalAttrs.version; 27 + hash = "sha256-hhcPKZtg9PEE6rrEfRJ/e4E5xMyButH0Rm0eM3iHPh8="; 28 + }; 29 + 30 + patches = [ 31 + # Remove when version > 0.19.14 32 + (fetchpatch { 33 + name = "0001-libiodata-Fix-dependencies-between-sub-projects.patch"; 34 + url = "https://github.com/sailfishos/libiodata/commit/85517a9f2103e461cbb69dc195335df73b7a8b7e.patch"; 35 + hash = "sha256-qrRZ1Af5uBJvEoRHifgUSeVHFC5RATDsL3374CmoUDc="; 36 + }) 37 + ]; 38 + 39 + postPatch = '' 40 + substituteInPlace root.pro \ 41 + --replace-fail '$$[QT_HOST_DATA]' "$dev" 42 + 43 + substituteInPlace src/src.pro \ 44 + --replace-fail '$$[QT_INSTALL_LIBS]' "$out/lib" \ 45 + --replace-fail '/usr/include' "$dev/include" 46 + 47 + substituteInPlace tests/tests.pro \ 48 + --replace-fail '/usr/bin' "$dev/bin" \ 49 + --replace-fail '/usr/share' "$dev/share" 50 + 51 + substituteInPlace type-to-cxx/type-to-cxx.pro \ 52 + --replace-fail '/usr/bin' "$dev/bin" 53 + ''; 54 + 55 + # QMake doesn't handle strictDeps well 56 + strictDeps = false; 57 + 58 + nativeBuildInputs = [ 59 + bison 60 + flex 61 + pkg-config 62 + qmake 63 + ]; 64 + 65 + buildInputs = [ 66 + libxcrypt 67 + ]; 68 + 69 + dontWrapQtApps = true; 70 + 71 + postConfigure = '' 72 + make qmake_all 73 + ''; 74 + 75 + env.IODATA_VERSION = "${finalAttrs.version}"; 76 + 77 + passthru.updateScript = gitUpdater { }; 78 + 79 + meta = { 80 + description = "Library for reading and writing simple structured data"; 81 + homepage = "https://github.com/sailfishos/libiodata"; 82 + changelog = "https://github.com/sailfishos/libiodata/releases/tag/${finalAttrs.version}"; 83 + license = lib.licenses.lgpl21Only; 84 + maintainers = lib.teams.lomiri.members; 85 + platforms = lib.platforms.linux; 86 + }; 87 + })
+5
pkgs/development/libraries/qt-5/5.15/default.nix
··· 125 125 url = "https://github.com/qt/qtpim/commit/114615812dcf9398c957b0833e860befe15f840f.patch"; 126 126 hash = "sha256-yZ1qs8y5DSq8FDXRPyuSPRIzjEUTWAhpVide/b+xaLQ="; 127 127 }) 128 + # Provide interface for accessing all extended metadata from collections 129 + (fetchpatch { 130 + url = "https://github.com/qt/qtpim/commit/5bdfb9127b3f6c9863def0578c7a8734a5156ea9.patch"; 131 + hash = "sha256-asJNa8tcdtovVE579FjZg1CHeCmvRJ8otQeSrEdrXdQ="; 132 + }) 128 133 # Accessors should be const 129 134 (fetchpatch { 130 135 url = "https://github.com/qt/qtpim/commit/a2bf7cdf05c264b5dd2560f799760b5508f154e4.patch";
+57
pkgs/development/libraries/sailfish-access-control-plugin/default.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + pkg-config, 5 + qmake, 6 + qtbase, 7 + qtdeclarative, 8 + sailfish-access-control, 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "sailfish-access-control-plugin"; 13 + inherit (sailfish-access-control) version src patches; 14 + 15 + postPatch = '' 16 + substituteInPlace qt/qt.pro \ 17 + --replace-fail '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}' 18 + ''; 19 + 20 + # QMake doesn't handle strictDeps well 21 + strictDeps = false; 22 + 23 + nativeBuildInputs = [ 24 + pkg-config 25 + qmake 26 + qtdeclarative # qmlplugindump 27 + ]; 28 + 29 + buildInputs = [ 30 + qtdeclarative 31 + sailfish-access-control 32 + ]; 33 + 34 + # Qt plugin 35 + dontWrapQtApps = true; 36 + 37 + # sourceRoot breaks patches 38 + preConfigure = '' 39 + cd qt 40 + ''; 41 + 42 + # Do all configuring now, not during build 43 + postConfigure = '' 44 + make qmake_all 45 + ''; 46 + 47 + meta = { 48 + description = "QML interface for sailfish-access-control"; 49 + inherit (sailfish-access-control.meta) 50 + homepage 51 + changelog 52 + license 53 + maintainers 54 + platforms 55 + ; 56 + }; 57 + })
+6
pkgs/top-level/qt5-packages.nix
··· 151 151 152 152 libdbusmenu = callPackage ../development/libraries/libdbusmenu-qt/qt-5.5.nix { }; 153 153 154 + libiodata = callPackage ../development/libraries/libiodata { }; 155 + 154 156 liblastfm = callPackage ../development/libraries/liblastfm { }; 155 157 156 158 libopenshot = callPackage ../development/libraries/libopenshot { ··· 269 271 270 272 rlottie-qml = callPackage ../development/libraries/rlottie-qml { }; 271 273 274 + sailfish-access-control-plugin = callPackage ../development/libraries/sailfish-access-control-plugin { }; 275 + 272 276 sierra-breeze-enhanced = callPackage ../data/themes/kwin-decorations/sierra-breeze-enhanced { useQt5 = true; }; 273 277 274 278 soqt = callPackage ../development/libraries/soqt { }; ··· 284 288 signond = callPackage ../development/libraries/signond {}; 285 289 286 290 soundkonverter = callPackage ../applications/audio/soundkonverter {}; 291 + 292 + timed = callPackage ../applications/system/timed { }; 287 293 288 294 xp-pen-deco-01-v2-driver = callPackage ../os-specific/linux/xp-pen-drivers/deco-01-v2 { }; 289 295
+7
pkgs/top-level/qt6-packages.nix
··· 54 54 55 55 futuresql = callPackage ../development/libraries/futuresql { }; 56 56 kquickimageedit = callPackage ../development/libraries/kquickimageedit { }; 57 + 58 + libiodata = callPackage ../development/libraries/libiodata { }; 59 + 57 60 libqaccessibilityclient = callPackage ../development/libraries/libqaccessibilityclient { }; 58 61 59 62 libqglviewer = callPackage ../development/libraries/libqglviewer { }; ··· 113 116 suffix = "qt6"; 114 117 }; 115 118 119 + sailfish-access-control-plugin = callPackage ../development/libraries/sailfish-access-control-plugin { }; 120 + 116 121 # Not a library, but we do want it to be built for every qt version there 117 122 # is, to allow users to choose the right build if needed. 118 123 sddm = kdePackages.callPackage ../applications/display-managers/sddm {}; ··· 120 125 sierra-breeze-enhanced = kdePackages.callPackage ../data/themes/kwin-decorations/sierra-breeze-enhanced { }; 121 126 122 127 signond = callPackage ../development/libraries/signond {}; 128 + 129 + timed = callPackage ../applications/system/timed { }; 123 130 124 131 waylib = callPackage ../development/libraries/waylib { }; 125 132