gnome setup: Allow use of arrow keys in plugin list

This commit is contained in:
Hylke Bons 2013-10-11 16:06:11 +02:00
parent b8df54527a
commit b1d8cccd1c

View file

@ -159,7 +159,7 @@ namespace SparkleShare {
}
tree_view.AppendColumn (service_column);
scrolled_window.AddWithViewport (tree_view);
scrolled_window.Add (tree_view);
Entry address_entry = new Entry () {
Text = Controller.PreviousAddress,
@ -188,14 +188,12 @@ namespace SparkleShare {
};
// Select the first plugin by default
TreeSelection default_selection = tree_view.Selection;
TreePath default_path = new TreePath ("" + Controller.SelectedPluginIndex);
default_selection.SelectPath (default_path);
tree_view.Model.Foreach (new TreeModelForeachFunc (delegate (ITreeModel model,
TreePath path, TreeIter iter) {
tree_view.Model.Foreach (new TreeModelForeachFunc (
delegate (ITreeModel model, TreePath path, TreeIter iter) {
string address;
try {
@ -217,13 +215,13 @@ namespace SparkleShare {
if (plugin.Path != null)
path_entry.Sensitive = false;
// TODO: Scroll to the selection
return true;
} else {
return false;
}
}));
}
));
layout_address.PackStart (new Label () {
Markup = "<b>" + "Address" + "</b>",
@ -287,7 +285,6 @@ namespace SparkleShare {
tree_view.CursorChanged += delegate (object sender, EventArgs e) {
Controller.SelectedPluginChanged (tree_view.SelectedRow);
// TODO: Scroll to selected row when using arrow keys
};
address_entry.Changed += delegate {