예제 #1
0
        public DebugPluginActionGroup(DebugPlugin plugin) : base("DebugPluginActions")
        {
            Add(entries);

            this.plugin = plugin;

            this["ShowDebugWindow"].Activated += ShowDebugWindow_Activated;
        }
예제 #2
0
        public DebugWindow(DebugPlugin plugin) :
            base(Assembly.GetAssembly(typeof(DebugWindow)), "debugplugin.glade", "DebugWindow")
        {
            this.plugin = plugin;

            trafficTreeView.Selection.Changed += SelectionChanged;

            trafficTreeView.AppendColumn("", new CellRendererText(), new TreeCellDataFunc(IconFunc));
            trafficTreeView.AppendColumn("To/From", new CellRendererText(), new TreeCellDataFunc(ToFromFunc));
            trafficTreeView.AppendColumn("Type", new CellRendererText(), new TreeCellDataFunc(TypeFunc));

            store = new ListStore(typeof(MessageInfo));

            filter             = new TreeModelFilter(store, null);
            filter.VisibleFunc = filter_VisibleFunc;

            trafficTreeView.Model = filter;

            var networkStore = new ListStore(typeof(string), typeof(Network));

            networkStore.AppendValues("All Networks", null);
            networkComboBox.Model  = networkStore;
            networkComboBox.Active = 0;

            foreach (Network network in Core.Networks)
            {
                Core_NetworkAdded(network);
            }

            Core.NetworkAdded   += Core_NetworkAdded;
            Core.NetworkRemoved += Core_NetworkRemoved;

            ReloadMessages();

            enableTrafficLogCheckButton.Active = true;
            plugin.EnableTrafficLog            = true;

            ((ToolItem)base.GetWidget("toolbutton2")).Expand = true;

            messageSenderToComboBox.Clear();
            messageSenderToComboBox.Model = new ListStore(typeof(string), typeof(Network), typeof(Node));
            var textCell = new CellRendererText();

            messageSenderToComboBox.PackStart(textCell, true);
            messageSenderToComboBox.AddAttribute(textCell, "markup", 0);
        }