コード例 #1
0
        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);
            }
        }
コード例 #2
0
 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();
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 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();
         }
     }
 }
コード例 #5
0
        private void closeButton_Clicked(object o, EventArgs args)
        {
            ChatSubpageBase page = tabLabelPages[((Button)o).Parent.Parent];

            page.Close();
        }