diff --git a/pkgs/clan-app/clan_app/app.py b/pkgs/clan-app/clan_app/app.py index 2e6e9db4b..6fd3db2de 100644 --- a/pkgs/clan-app/clan_app/app.py +++ b/pkgs/clan-app/clan_app/app.py @@ -39,6 +39,8 @@ def app_run(app_opts: ClanAppOptions) -> int: webview = Webview(debug=app_opts.debug) webview.title = "Clan App" + # This seems to call the gtk api correctly but and gtk also seems to our icon, but somehow the icon is not loaded. + webview.icon = "clan-white" def cancel_task( task_id: str, *, op_key: str diff --git a/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py b/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py index 714400081..d5640fc89 100644 --- a/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py +++ b/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py @@ -88,6 +88,9 @@ class _WebviewLibrary: self.webview_set_title = self.lib.webview_set_title self.webview_set_title.argtypes = [c_void_p, c_char_p] + self.webview_set_icon = self.lib.webview_set_icon + self.webview_set_icon.argtypes = [c_void_p, c_char_p] + self.webview_set_size = self.lib.webview_set_size self.webview_set_size.argtypes = [c_void_p, c_int, c_int, c_int] diff --git a/pkgs/clan-app/clan_app/deps/webview/webview.py b/pkgs/clan-app/clan_app/deps/webview/webview.py index f47207c13..af8deab32 100644 --- a/pkgs/clan-app/clan_app/deps/webview/webview.py +++ b/pkgs/clan-app/clan_app/deps/webview/webview.py @@ -84,6 +84,15 @@ class Webview: _webview_lib.webview_set_title(self._handle, _encode_c_string(value)) self._title = value + @property + def icon(self) -> str: + return self._icon + + @icon.setter + def icon(self, value: str) -> None: + _webview_lib.webview_set_icon(self._handle, _encode_c_string(value)) + self._icon = value + def destroy(self) -> None: for name in list(self._callbacks.keys()): self.unbind(name) diff --git a/pkgs/webview-lib/default.nix b/pkgs/webview-lib/default.nix index 8aa44d3f0..afe166031 100644 --- a/pkgs/webview-lib/default.nix +++ b/pkgs/webview-lib/default.nix @@ -11,8 +11,8 @@ pkgs.clangStdenv.mkDerivation { src = pkgs.fetchFromGitHub { owner = "clan-lol"; repo = "webview"; - rev = "33374e1030c5e243dac491e6c0e84d32e895c2e5"; - sha256 = "sha256-8BgfQL0V3f2n5lq5MDwJCJo6MkVSYvJkwpKCj2tBRz8="; + rev = "7d24f0192765b7e08f2d712fae90c046d08f318e"; + hash = "sha256-yokVI9tFiEEU5M/S2xAeJOghqqiCvTelLo8WLKQZsSY="; }; outputs = [ @@ -20,6 +20,12 @@ pkgs.clangStdenv.mkDerivation { "dev" ]; + enableParallelBuilding = true; + + cmakeFlags = [ + "-DWEBVIEW_BUILD_TESTS=OFF" + ]; + # Dependencies used during the build process, if any nativeBuildInputs = with pkgs; [ gnumake