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