Beispiel #1
0
        public Messages()
        {
            this.Build();

             Clear();

             textview1.PopulatePopup += (object o, PopulatePopupArgs args) =>
             {
            TaggedLocalizedImageMenuItem newitem = new TaggedLocalizedImageMenuItem("Clear");
            newitem.Image = new Image(Gdk.Pixbuf.LoadFromResource("Docking.Framework.Resources.Broom-16.png"));
            newitem.Activated += (object sender, EventArgs e) => Clear();
            newitem.ShowAll();
            args.Menu.Append(newitem);

            Localization.LocalizeMenu(args.Menu);
             };
        }
        void TextViewPopulatePopup(object o, PopulatePopupArgs args)
        {
            //ReplaceGtkIconsByOwnOnes(args.Menu);

             SeparatorMenuItem sep = new SeparatorMenuItem();
             sep.Show();
             args.Menu.Add(sep);

             TaggedLocalizedImageMenuItem newitem = new TaggedLocalizedImageMenuItem("Clear");
             newitem.Image = Docking.Tools.ResourceLoader_Docking.LoadImage("Broom-16.png");
             newitem.Activated += (object sender, EventArgs e) => Clear();
             newitem.ShowAll();

             args.Menu.Add(newitem);

             Localization.LocalizeMenu(args.Menu);
        }