Exemplo n.º 1
0
        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());
            }
        }
Exemplo n.º 2
0
        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 ());
            }
        }