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
dia: 2017-06-22 → 2020-04-07 #84555
dia: 2017-06-22 → 2020-04-07 #84555
Conversation
and reorder the attributes
418ca5c
to
8dbce49
Compare
@veprbl pushed a new revision, re-adding gtk-mac-integration-gtk2 and merging https://gitlab.gnome.org/GNOME/dia/-/merge_requests/68. Does that fix it for you? |
@jtojnar Thank you for implementing the fix. It does what needs to be done, but misses some of the libraries:
Regarding the rendering issues, I don't see much change. I've played with a window a bit more, I've noticed it blanks the window on resize, but depending on the size of the window three different things can happen. If the window is "smaller", it will render window as black (which macOS seems to screenshot as transparent color): If it is "bigger" it actually renders the proper grey background and able to render most of the icons: And, finally, excessively small windows will be black, but will turn to white garbled texture on mouse hover (see my first screenshot for example). Most buts get redrawn on mouse hover, so this is almost usable. |
zlib | ||
cairo | ||
] ++ stdenv.lib.optionals stdenv.isDarwin [ | ||
gtk-mac-integration-gtk2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like this is used:
# grep -ri gtk_mac src/
# grep -ri gtk-mac src/
#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect it to be somehow magically linked. Is it not listed in nix-store --query --tree
or nix why-depends
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# nix-store --query --tree /nix/store/qflajk99al4hk1893gz6z2m996x6l930-dia-0.97.3.20170622 | grep mac
+---/nix/store/brvfal9n3wi562r98q1rgicxcjlyh7i1-gtk-mac-integration-2.0.8
| +---/nix/store/brvfal9n3wi562r98q1rgicxcjlyh7i1-gtk-mac-integration-2.0.8 [...]
# nix-store --query --tree /nix/store/jaq7jss0hmlglpsjb4w7bjgp9g7y5rpx-dia-unstable-2020-04-07 | grep mac
#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I can still grep GtkosxApplication
in the source code. Looks like HAVE_MAC_INTEGRATION
was not ported to Meson.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the latest change help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtojnar The build is now failing with
../app/interface.c:1060:34: error: use of undeclared identifier 'dia_app_icon'
gdk_pixbuf_new_from_inline (-1, dia_app_icon, FALSE, NULL));
^
1 error generated.
After applying
diff --git a/app/interface.c b/app/interface.c
--- a/app/interface.c
+++ b/app/interface.c
@@ -1057,7 +1057,7 @@ _create_mac_integration (GtkWidget *menubar)
gtk_widget_hide (menubar); /* not working, it's shown elsewhere */
/* setup the dock icon */
gtkosx_application_set_dock_icon_pixbuf (theOsxApp,
- gdk_pixbuf_new_from_inline (-1, dia_app_icon, FALSE, NULL));
+ pixbuf_from_resource ("/org/gnome/Dia/icons/org.gnome.Dia.png"));
}
/* Don't quit without asking to save files first */
g_signal_connect (theOsxApp, "NSApplicationBlockTermination",
I get it to compile and run. I now get a proper dia icon in the dock and system-wide menu works again. There is no improvement with rendering.
Just tested 2889df2a66e, it starts up fine. edit: no dylibs in $out/lib/dia anymore |
Just checking: Your shipping this as unstable/testing/devel right? |
@ZanderBrown Yup, we use |
@veprbl Would you be willing to bisect the graphical glitches? Should take roughly eight steps. (You would run |
* Upgrade three years old git snapshot to a fresh one * Switches to Meson * Drops GNOME 2 dependencies
@jtojnar
What I learned was that there is a "good" version of dia that is able to be built with this (or a similar) meson-based expression, which is close enough to what you propose in this PR. edit: updated bisect result after fixing more irrelevant failures
|
Yeah, unfortunately, it is not easy to automate it. At best you will be able to keep ${if builtins.pathExists "${src}/meson.build" then null else "dontUseMesonConfigure"} = true;
${if builtins.pathExists "${src}/meson.build" then null else "dontUseNinjaBuild"} = true;
${if builtins.pathExists "${src}/meson.build" then null else "dontUseNinjaInstall"} = true; With 8 steps, it is also feasible, if annoying, to run the bisection manually. |
@jtojnar I think you got me wrong. The breakage happened after meson was introduced. I am now trying to bisect the crash to learn how to fix it and, maybe, narrow down the search. |
I guess, this has to do with new cairo renderer in dia. |
Most likely, interestingly Windows & X11 haven't had an issue like that with rendering the canvas However as of a few days ago line/arrow chooser in the properties dialogue do, except that code hasn't changed in months It seems when rendering goes wrong in gtk2 it goes really wrong |
The question is do we ship this, or wait for a fix (possibly GTK 3 port)? |
@jtojnar I would suggest we pin dia to a latest pre-cairo version for darwin. I can prepare a change for that. |
This exact version? I'd say no, even as an unstable package that's way too broken Of course I'm interested what's going on, especially as it's almost certainly my fault. Might try a VM at somepoint |
@ZanderBrown Let me know if there is anything I can try to help debugging this. |
Okay, since it does not really improve that much and it is far from the worst gnome2 library usage offender 😿, we will table this PR for now. |
What is it using? if it's libgnomeui there is a configure flag for that |
|
Ah well until we figure out the cairo issue libart_lgpl is sticking around, for libgnomeui just |
I marked this as stale due to inactivity. → More info |
Any updates on this? |
Superseded by #209587 |
Motivation for this change
Getting rid of GNOME 2 package set #39976
cc @viric
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)