public override Control CreatePanelWidget()
        {
            var vbox = new VBox();

            vbox.Spacing = 6;

            featuresListStore           = new ListStore(featureNameDataField, featureEnabledDataField, featureDataField);
            featuresListView            = new ListView();
            featuresListView.DataSource = featuresListStore;

            var cellView = new TextCellView();

            cellView.TextField = featureNameDataField;
            var column = new ListViewColumn("Feature", cellView);

            featuresListView.Columns.Add(column);

            var featuresComboBoxDataSource = new List <string> ();
            var checkBoxCellView           = new CheckBoxCellView();

            checkBoxCellView.Editable    = true;
            checkBoxCellView.ActiveField = featureEnabledDataField;
            checkBoxCellView.Toggled    += FeatureEnabledCheckBoxToggled;
            column = new ListViewColumn("Enabled", checkBoxCellView);
            featuresListView.Columns.Add(column);

            vbox.PackStart(featuresListView, true, true);

            var restartLabel = new Label();

            restartLabel.Text          = GettextCatalog.GetString("Some features may require a restart of {0}", BrandingService.ApplicationName);
            restartLabel.TextAlignment = Alignment.Start;
            vbox.PackStart(restartLabel);

            var restartButtonHBox = new HBox();

            vbox.PackStart(restartButtonHBox, false, false);

            restartButton       = new Button();
            restartButton.Label = GettextCatalog.GetString("Restart {0}", BrandingService.ApplicationName);
            restartButtonHBox.PackStart(restartButton, false, false);

            restartButton.Clicked += RestartButtonClicked;

            AddFeatures();

            widget = vbox.ToGtkWidget();
            return(widget);
        }
Example #2
0
        public override Control CreatePanelWidget()
        {
            var vbox = new VBox();

            vbox.Spacing = 6;

            var sectionLabel = new Label();

            sectionLabel.Markup        = GetBoldMarkup("Tasks");
            sectionLabel.TextAlignment = Alignment.Start;
            vbox.PackStart(sectionLabel, false, false);

            automaticallyrunTasksCheckBox        = new CheckBox(GettextCatalog.GetString("Automatically run tasks."));
            automaticallyrunTasksCheckBox.Active = originalRunTasksSetting;
            vbox.PackStart(automaticallyrunTasksCheckBox, false, false);

            return(vbox.ToGtkWidget());
        }