I want to use a color Chooser dialog in my app - https://github.com/satya164/gtk-theme-config
I cannot find any documentation about a ColorChooserDialog in vala. Currently I'm using color button to choose color. But I get following deprecation warnings while compiling, I'm using Vala 0.16.1 and GTK3.6 (The warnings don't show up in GTK3.4). I cannot find a sample on using ColorChooser dialog. If anyone can help me implement the ColorChooserDialog, I'll be really grateful.
valac --pkg gtk+-3.0 -X -lm gtk-theme-config.vala -o gtk-theme-config
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_set_values’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1013:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1016:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1019:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1022:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1025:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_selected_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1499:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_panelbg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1519:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_panelfg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1536:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_menubg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1553:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_menufg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1570:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
Upgrade your Vala to the latest 0.17.x release (or ignore the warnings for now--they're not doing any harm).