private void connectionList_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args) { TreePath path; if (connectionList.GetPathAtPos((int)args.Event.X, (int)args.Event.Y, out path)) { connectionList.Selection.SelectPath(path); } else { connectionList.Selection.UnselectAll(); } if (args.Event.Button == 3) { ConnectionMenu menu = new ConnectionMenu(connectionList); menu.Popup(GetSelectedConnection()); } }
private void connectionList_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args) { TreePath path; if (connectionList.GetPathAtPos ((int)args.Event.X, (int)args.Event.Y, out path)) connectionList.Selection.SelectPath (path); else connectionList.Selection.UnselectAll (); if (args.Event.Button == 3) { ConnectionMenu menu = new ConnectionMenu (connectionList); menu.Popup (GetSelectedConnection ()); } }