-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix menu launcher position and widget icons #17
Conversation
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.
&>
is a bashism.
kde-settings-qubes.spec.in
Outdated
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: | ||
touch --no-create %{_kde4_iconsdir}/breeze &> /dev/null ||: | ||
|
||
%posttrans | ||
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: | ||
gtk-update-icon-cache %{_kde4_iconsdir}/breeze &> /dev/null ||: | ||
update-desktop-database -q &> /dev/null ||: | ||
|
||
%postun | ||
if [ $1 -eq 0 ] ; then | ||
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: | ||
touch --no-create %{_kde4_iconsdir}/breeze &> /dev/null ||: | ||
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: | ||
gtk-update-icon-cache %{_kde4_iconsdir}/breeze &> /dev/null ||: | ||
update-desktop-database -q &> /dev/null ||: | ||
fi |
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.
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: | |
touch --no-create %{_kde4_iconsdir}/breeze &> /dev/null ||: | |
%posttrans | |
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/breeze &> /dev/null ||: | |
update-desktop-database -q &> /dev/null ||: | |
%postun | |
if [ $1 -eq 0 ] ; then | |
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: | |
touch --no-create %{_kde4_iconsdir}/breeze &> /dev/null ||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/breeze &> /dev/null ||: | |
update-desktop-database -q &> /dev/null ||: | |
fi | |
touch --no-create %{_kde4_iconsdir}/hicolor > /dev/null 2>&1 ||: | |
touch --no-create %{_kde4_iconsdir}/breeze > /dev/null 2>&1 ||: | |
%posttrans | |
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor > /dev/null 2>&1 ||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/breeze > /dev/null 2>&1 ||: | |
update-desktop-database -q > /dev/null 2>&1 ||: | |
%postun | |
if [ $1 -eq 0 ] ; then | |
touch --no-create %{_kde4_iconsdir}/hicolor > /dev/null 2>&1||: | |
touch --no-create %{_kde4_iconsdir}/breeze > /dev/null 2>&1 ||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor > /dev/null 2>&1||: | |
gtk-update-icon-cache %{_kde4_iconsdir}/breeze > /dev/null 2>&1 ||: | |
update-desktop-database -q > /dev/null 2>&1 ||: | |
fi |
&>
is a bashism
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.
Well, this is from the official Fedora packaging guidelines... But changing it makes sense anyway.
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.2&build=2023080409-4.2&flavor=pull-requests New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.2&build=2023071104-4.2&flavor=update
Failed tests13 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/77326#dependencies 17 fixed
Unstable tests
|
e44680b
to
545a098
Compare
Apparently there is no other API method than settings AppletOrder directly. This may require restarting panel after applying the change - it seems like changing it on the live panel doesn't work. Furthermore, on initial start the AppletOrder may be not set yet, in that case get initial value from widgetIds property. QubesOS/qubes-issues#8159
KDE stores list of updates already applied, by name. Since 10-qubes.js was changed, rename it so the new version is applied too. QubesOS/qubes-issues#8159
Otherwise GTK will be confused about older cache and icons won't work in GTK-based widgets. Related to QubesOS/qubes-issues#2968
Besides being unused, it overrides panels() function. While it isn't used in this script, it isn't clear (to me) what scope does it have, and it might be relevant to other scripts.
kde-settings-qubes.spec.in
Outdated
%triggerin -- plasma-desktop | ||
default_layout="/usr/share/plasma/layout-templates/org.kde.plasma.desktop.defaultPanel/contents/layout.js" | ||
if ! grep -q qubesMenu "$default_layout"; then | ||
cp -a "$default_layout" "$default_layout.qubes-orig" | ||
sed -i \ | ||
-e "s#.*org.kde.plasma.kickoff.*#var qubesMenu = panel.addWidget('org.kde.plasma.quicklaunch')\nqubesMenu.currentConfigGroup = ['General']\nqubesMenu.writeConfig('launcherUrls', ['file:///usr/share/applications/open-qubes-app-menu.desktop'])#" \ | ||
-e "s/^kickoff/qubesMenu/" \ | ||
"$default_layout" | ||
fi |
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.
Using sed
on a JavaScript file??? On the one hand this is a disgusting hack, but on the other hand the proper way to do this would be to use a JavaScript parser and I don’t know of one that is suitable for this.
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.
This is an alternative to shipping own copy of the whole file, not to a full parser. I could use a patch, but honestly, it doesn't matter that much in this place.
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.
A patch would make it much easier to understand what is going on here. That said I think shipping the full file would be best, especially for R4.2 users who are still getting dom0 updates from Fedora.
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.
still getting dom0 updates from Fedora.
That's exactly the reason why I do not want to ship the whole file - I only want to replace the menu, while keeping upstream layout of the rest of the panel.
The layout update script is running too early on the first KDE startup, and default widgets are not there yet. This ends up in menu launcher remaining on the right, instead of the left. QubesOS/qubes-issues#8159
QubesOS/qubes-issues#8159
QubesOS/qubes-issues#2968