Skip to content

Commit 7276d59

Browse files
authored
SourceDialog: use Gtk.ComboboxText (#899)
1 parent 8fdd02c commit 7276d59

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/SourceDialog/SourceDialog.vala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Maya.View.SourceDialog : Granite.Dialog {
2929
private Gee.Collection<PlacementWidget> backend_widgets;
3030
private Gee.HashMap<string, bool> widgets_checked;
3131
private Gtk.Button create_button;
32-
private Gtk.ComboBox type_combobox;
32+
private Gtk.ComboBoxText type_combobox;
3333
private Gtk.ListStore list_store;
3434
private Gtk.CheckButton is_default_check;
3535
private E.Source source = null;
@@ -75,12 +75,10 @@ public class Maya.View.SourceDialog : Granite.Dialog {
7575

7676
list_store = new Gtk.ListStore (2, typeof (string), typeof (Backend));
7777

78-
var renderer = new Gtk.CellRendererText ();
79-
80-
type_combobox = new Gtk.ComboBox.with_model (list_store);
81-
type_combobox.hexpand = true;
82-
type_combobox.pack_start (renderer, true);
83-
type_combobox.add_attribute (renderer, "text", 0);
78+
type_combobox = new Gtk.ComboBoxText () {
79+
hexpand = true,
80+
model = list_store
81+
};
8482

8583
type_combobox.changed.connect (() => {
8684
GLib.Value backend;

0 commit comments

Comments
 (0)