private void OnInsertNetworkRightMenu(object sender, PopupMenu menu) { NetworkViewer networkViewer = sender as NetworkViewer; foreach (TreePath treePath in networkViewer.SelectedItems) { UserInfo userInfo = networkViewer.Store.GetUserInfo(treePath); ExtMenuItem menuItem = new ExtMenuItem("Talk", "TalkBubble", userInfo); menu.AddItem(menuItem, new EventHandler(OnTalkRightMenu)); } }
// ============================================ // PRIVATE (Methods) Event Handlers // ============================================ private void OnImageClick(object o, ButtonPressEventArgs args) { if (args.Event.Button == 3) { PopupMenu menu = new PopupMenu(); menu.AddImageItem(Gtk.Stock.Quit, new EventHandler(OnAppQuit)); menu.ShowAll(); menu.Popup(); } }