Repository navigation
Wallpaper: replace deprecated Gtk.ColorButton - #503
Merged
Merged
Conversation
ryonakano
reviewed
Nov 1, 2026
| if (finished) { | ||
| set_combo_disabled_if_necessary (); | ||
| create_solid_color_container (color_button.rgba.to_string ()); | ||
| create_solid_color_container (color_button.get_rgba ().to_string ()); |
Member
There was a problem hiding this comment.
Is there any reason for this change? Gtk.ColorDialogButton seems to have the rgba property: https://valadoc.org/gtk4/Gtk.ColorDialogButton.rgba.html
Member
Author
There was a problem hiding this comment.
There's a compiler error for some reason when using the property here
Member
There was a problem hiding this comment.
Ah yeah this seems to be another bug in Vala 😞
The RGBA can be retrieve via the return value of gtk_color_dialog_button_get_rgba() but Vala generates a C code to retrieve via the second argument:
GtkColorDialogButton* _tmp0_;
GdkRGBA _tmp1_ = {0};
(...snip...)
#line 232 "../src/Views/Wallpaper.vala"
_tmp0_ = self->priv->color_button;
#line 232 "../src/Views/Wallpaper.vala"
gtk_color_dialog_button_get_rgba (_tmp0_, &_tmp1_);resulting the compiler error.
FAILED: [code=1] src/libdesktop.so.p/meson-generated_Views_Wallpaper.c.o
cc -Isrc/libdesktop.so.p -Isrc -I../src -I. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/granite-7 -I/usr/include/gee-0.8 -I/usr/include/gio-unix-2.0 -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glycin-2 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/graphene-1.0 -I/usr/lib/x86_64-linux-gnu/graphene-1.0/include -I/usr/include/libadwaita-1 -I/usr/include/appstream -I/usr/include/switchboard-3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g '-DGETTEXT_PACKAGE="io.elementary.settings.desktop"' '-DG_LOG_DOMAIN="io.elementary.settings.desktop"' -w -fPIC -mfpmath=sse -msse -msse2 -pthread -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -MD -MQ src/libdesktop.so.p/meson-generated_Views_Wallpaper.c.o -MF src/libdesktop.so.p/meson-generated_Views_Wallpaper.c.o.d -o src/libdesktop.so.p/meson-generated_Views_Wallpaper.c.o -c src/libdesktop.so.p/Views/Wallpaper.c
../src/Views/Wallpaper.vala: In function ‘pantheon_shell_wallpaper_update_color’:
../src/Views/Wallpaper.vala:232:3: error: too many arguments to function ‘gtk_color_dialog_button_get_rgba’; expected 1, have 2
232 | create_solid_color_container (color_button.rgba.to_string ());
| ^ ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
In file included from /usr/include/gtk-4.0/gtk/gtk.h:88,
from /usr/include/switchboard-3/switchboard.h:6,
from src/desktop.h:9,
from src/libdesktop.so.p/Views/Wallpaper.c:9:
/usr/include/gtk-4.0/gtk/gtkcolordialogbutton.h:47:17: note: declared here
47 | const GdkRGBA * gtk_color_dialog_button_get_rgba (GtkColorDialogButton *self);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/Views/Wallpaper.vala: In function ‘pantheon_shell_wallpaper_load_wallpapers_co’:
../src/Views/Wallpaper.vala:333:4: error: too many arguments to function ‘gtk_color_dialog_button_get_rgba’; expected 1, have 2
333 | create_solid_color_container (color_button.rgba.to_string ());
| ^ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkcolordialogbutton.h:47:17: note: declared here
47 | const GdkRGBA * gtk_color_dialog_button_get_rgba (GtkColorDialogButton *self);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5/7] Compiling C object src/libdesktop.so.p/meson-generated_Widgets_WallpaperContainer.c.o
ninja: build stopped: subcommand failed.
ryonakano
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.