Skip to content

Commit

Permalink
setup: Fix compilation error with Vala 0.36
Browse files Browse the repository at this point in the history
Fixes Issue#4.
  • Loading branch information
ueno committed Jun 7, 2017
1 parent 9dfb757 commit f7516ae
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/setup.vala
Expand Up @@ -402,7 +402,11 @@ class SetupDialog : Gtk.Dialog {
} catch (Error e) {
warning ("can't write shortcut: %s", e.message);
}
#if VALA_0_36
model.remove (ref iter);
#else
model.remove (iter);
#endif
}
}

Expand Down Expand Up @@ -439,7 +443,11 @@ class SetupDialog : Gtk.Dialog {
continue;
keymap.set (old_event, null);
}
#if VALA_0_36
((Gtk.ListStore)model).remove (ref iter);
#else
((Gtk.ListStore)model).remove (iter);
#endif
}
}
try {
Expand Down Expand Up @@ -524,8 +532,13 @@ class SetupDialog : Gtk.Dialog {
var rows = selection.get_selected_rows (out model);
foreach (var row in rows) {
Gtk.TreeIter iter;
if (model.get_iter (out iter, row))
if (model.get_iter (out iter, row)) {
#if VALA_0_36
((Gtk.ListStore)model).remove (ref iter);
#else
((Gtk.ListStore)model).remove (iter);
#endif
}
}
save_dictionaries ("system_dictionaries");
}
Expand Down

0 comments on commit f7516ae

Please sign in to comment.