Esempio n. 1
0
        void CreateControl()
        {
//            control = new HPaned ();

//            store = new Gtk.ListStore (typeof (Gdk.Pixbuf), // image - type
//                typeof (bool),       // read?
//                typeof (Task));       // read? -- use Pango weight

//            Gtk.TreeModelFilterVisibleFunc filterFunct = new Gtk.TreeModelFilterVisibleFunc();
            filter = new Gtk.TreeModelFilter(store, null);
//            filter.VisibleFunc = filterFunct;
//
            sort = new Gtk.TreeModelSort(filter);
//            sort.SetSortFunc (VisibleColumns.Type, SeverityIterSort);
//            sort.SetSortFunc (VisibleColumns.Project, ProjectIterSort);
//            sort.SetSortFunc (VisibleColumns.File, FileIterSort);
//
            view           = new PadTreeView(sort);
            view.RulesHint = true;
//            view.DoPopupMenu = (evnt) => IdeApp.CommandService.ShowContextMenu (view, evnt, CreateMenu ());
//            AddColumns ();
//            LoadColumnsVisibility ();
//            view.Columns[VisibleColumns.Type].SortColumnId = VisibleColumns.Type;
//            view.Columns[VisibleColumns.Project].SortColumnId = VisibleColumns.Project;
//            view.Columns[VisibleColumns.File].SortColumnId = VisibleColumns.File;

            sw            = new CompactScrolledWindow();
            sw.ShadowType = Gtk.ShadowType.None;
            sw.Add(view);
//            TaskService.Errors.TasksRemoved      += DispatchService.GuiDispatch<TaskEventHandler> (ShowResults);
//            TaskService.Errors.TasksAdded        += DispatchService.GuiDispatch<TaskEventHandler> (TaskAdded);
//            TaskService.Errors.TasksChanged      += DispatchService.GuiDispatch<TaskEventHandler> (TaskChanged);
//            TaskService.Errors.CurrentLocationTaskChanged += HandleTaskServiceErrorsCurrentLocationTaskChanged;
//
//            IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpen;
//            IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed;

//            view.RowActivated += new Gtk.RowActivatedHandler (OnRowActivated);

            iconWarning = sw.RenderIcon(Stock.Warning, Gtk.IconSize.Menu, "");
            iconError   = sw.RenderIcon(Stock.Error, Gtk.IconSize.Menu, "");
            iconInfo    = sw.RenderIcon(Gtk.Stock.DialogInfo, Gtk.IconSize.Menu, "");

//            control.Add1 (sw);
//
//            outputView = new LogView ();
//            control.Add2 (outputView);

            Control.ShowAll();

//            control.SizeAllocated += HandleControlSizeAllocated;

//            bool outputVisible = PropertyService.Get<bool> (outputViewVisiblePropertyName, false);
//            if (outputVisible) {
//                outputView.Visible = true;
//                logBtn.Active = true;
//            } else {
//                outputView.Hide ();
//            }
//
//            sw.SizeAllocated += HandleSwSizeAllocated;



//            control.FocusChain = new Gtk.Widget [] { sw };
        }