private void chatSubPage_UrgencyHintChanged(object o, EventArgs args) { urgencyHint = false; for (int x = 1; x < notebook.NPages; x++) { ChatSubpageBase page = (ChatSubpageBase)notebook.GetNthPage(x); EventBox box = (EventBox)notebook.GetTabLabel(page); Label label = (Label)((Box)box.Child).Children[0]; if (page.UrgencyHint == true) { urgencyHint = true; label.Markup = "<b>" + label.Text + "</b>"; } else { label.Text = label.Text; } } if (UrgencyHintChanged != null) { UrgencyHintChanged(this, EventArgs.Empty); } }
private void AppendPage(ChatSubpageBase w, Widget labelWidget) { notebook.AppendPage(w, labelWidget); notebook.SetTabReorderable(w, true); w.FocusGrabbed += chatSubPage_FocusGrabbed; w.UrgencyHintChanged += chatSubPage_UrgencyHintChanged; w.Destroyed += chatSubPage_Destroyed; w.Show(); }
private void notebook_SwitchPage(object o, SwitchPageArgs args) { notebook.CurrentPageWidget.GrabFocus(); for (int x = 1; x < notebook.NPages; x++) { ChatSubpageBase page = (ChatSubpageBase)notebook.GetNthPage(x); page.IsActive = (page == notebook.CurrentPageWidget); } }
void HandleTabButtonPressEvent(object o, ButtonPressEventArgs args) { if (args.Event.Button == 3) { if (tabLabelPages.ContainsKey((Widget)o)) { ChatSubpageBase page = tabLabelPages[(Widget)o]; var menu = new ChatPageMenu(page); menu.Popup(); } } }
private void closeButton_Clicked(object o, EventArgs args) { ChatSubpageBase page = tabLabelPages[((Button)o).Parent.Parent]; page.Close(); }