Problem
Gtk.DropDown is a replacement for Gtk.ComboBox and Gtk.ComboBoxText, but you need complicated work to bind its selection with a GSettings keys.
Proposal
Introduce a wrapper widget of Gtk.DropDown with easier integration with GSettings, something like this:
var settings = new Settings ("io.github.yourname.yourapp");
var dropdown = new Granite.DropDown ();
dropdown.append ("option-1", _("Option 1"));
dropdown.append ("option-2", _("Option 2"));
dropdown.append ("option-3", _("Option 3"));
dropdown.bind_selected (settings, "keyname", SettingsBindFlags.DEFAULT);
Prior Art (Optional)
I've done similar things before: https://github.com/ryonakano/ryokucha/blob/main/lib/DropDownText.vala
Problem
Gtk.DropDown is a replacement for Gtk.ComboBox and Gtk.ComboBoxText, but you need complicated work to bind its selection with a GSettings keys.
Proposal
Introduce a wrapper widget of Gtk.DropDown with easier integration with GSettings, something like this:
Prior Art (Optional)
I've done similar things before: https://github.com/ryonakano/ryokucha/blob/main/lib/DropDownText.vala