Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The long road to GTK4 #112

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

The long road to GTK4 #112

wants to merge 1 commit into from

Conversation

JakeStanger
Copy link
Owner

@JakeStanger JakeStanger commented Apr 21, 2023

GTK4 introduces a lot of breaking changes, mostly involving event handling. This PR will track the progress of the port. It's going to take me a while to get through it all, and this will be secondary to continuing bar development.

If you want to (attempt to) build this, you currently need to manually build/install gtk4-layer-shell and set the following env vars:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib

@yavko
Copy link
Contributor

yavko commented Feb 10, 2024

I see that nix build is failing due to graphene missing, adding it to https://github.com/JakeStanger/ironbar/blob/master/flake.nix#L114 should fix it

@JakeStanger JakeStanger force-pushed the refactor/gtk-4 branch 2 times, most recently from e4eb86d to 1a277fe Compare February 10, 2024 21:29
@JakeStanger
Copy link
Owner Author

Added, cheers

@yavko
Copy link
Contributor

yavko commented Feb 10, 2024

Lol it seems you also need to change gtk3 to gtk4, and gtk-layer-shell to gtk4-layer-shell :P

@yavko
Copy link
Contributor

yavko commented Feb 10, 2024

Also dy why format check is failing, maybe you need to run cargo fmt?

@JakeStanger
Copy link
Owner Author

Lol it seems you also need to change gtk3 to gtk4, and gtk-layer-shell to gtk4-layer-shell :P

Cool done. Should have spotted those ones lol

Also dy why format check is failing, maybe you need to run cargo fmt?

Probably. I've still got 73 compiler errors to work through before I can even start looking at runtime issues, so I'm not too worried about polishing it up yet :p

@yavko
Copy link
Contributor

yavko commented Feb 10, 2024

Lol it seems you also need to change gtk3 to gtk4, and gtk-layer-shell to gtk4-layer-shell :P

Cool done. Should have spotted those ones lol

Also dy why format check is failing, maybe you need to run cargo fmt?

Probably. I've still got 73 compiler errors to work through before I can even start looking at runtime issues, so I'm not too worried about polishing it up yet :p

ah

@yavko
Copy link
Contributor

yavko commented Feb 10, 2024

i was stupid, that was the devshell lmao, i also removed stray cuz it aint used no more

diff --git a/nix/default.nix b/nix/default2.nix
index 731e7ac..9be5772 100644
--- a/nix/default.nix
+++ b/nix/default2.nix
@@ -1,5 +1,5 @@
 {
-  gtk3,
+  gtk4,
   gdk-pixbuf,
   librsvg,
   webp-pixbuf-loader,
@@ -9,12 +9,13 @@
   shared-mime-info,
   gsettings-desktop-schemas,
   wrapGAppsHook,
-  gtk-layer-shell,
+  gtk4-layer-shell,
   gnome,
   libxkbcommon,
   openssl,
   pkg-config,
   hicolor-icon-theme,
+  graphene,
   rustPlatform,
   lib,
   version ? "git",
@@ -30,9 +31,9 @@
       path = lib.cleanSource ../.;
     };
     nativeBuildInputs = [pkg-config wrapGAppsHook gobject-introspection];
-    buildInputs = [gtk3 gdk-pixbuf glib gtk-layer-shell glib-networking shared-mime-info gnome.adwaita-icon-theme hicolor-icon-theme gsettings-desktop-schemas libxkbcommon openssl];
+    buildInputs = [gtk4 gdk-pixbuf glib gtk4-layer-shell glib-networking shared-mime-info gnome.adwaita-icon-theme hicolor-icon-theme gsettings-desktop-schemas libxkbcommon openssl graphene];
     propagatedBuildInputs = [
-      gtk3
+      gtk4
     ];
     preFixup = ''
       gappsWrapperArgs+=(
@@ -91,5 +92,4 @@ in
         buildFeatures = features;
         cargoDeps = rustPlatform.importCargoLock {lockFile = ../Cargo.lock;};
         cargoLock.lockFile = ../Cargo.lock;
-        cargoLock.outputHashes."stray-0.1.3" = "sha256-7mvsWZFmPWti9AiX67h6ZlWiVVRZRWIxq3pVaviOUtc=";
       })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants