コード例 #1
0
        //Gtk.CheckButton uiCountersCheck;

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

            vbox.Spacing = 6;

            var generalSectionLabel = new Gtk.Label("<b>" + GettextCatalog.GetString("General") + "</b>");

            generalSectionLabel.UseMarkup = true;
            generalSectionLabel.Xalign    = 0;
            vbox.PackStart(generalSectionLabel, false, false, 0);

            var outputDirectoryHBox = new Gtk.HBox();

            outputDirectoryHBox.BorderWidth = 10;
            outputDirectoryHBox.Spacing     = 6;
            var outputDirectoryLabel = new Gtk.Label(GettextCatalog.GetString("Output directory:"));

            outputDirectoryLabel.Xalign = 0;
            outputDirectoryHBox.PackStart(outputDirectoryLabel, false, false, 0);
            folderEntry.Path = Options.OutputPath.Value;
            outputDirectoryHBox.PackStart(folderEntry, true, true, 0);

            vbox.PackStart(outputDirectoryHBox, false, false, 0);

            //if (Options.HasMemoryLeakFeature) {
            //	uiCountersCheck = new Gtk.CheckButton (GettextCatalog.GetString ("Show UI Widget counters in the toolbar"));
            //	uiCountersCheck.Active = Options.ShowUICounters.Value;

            //	vbox.PackStart (uiCountersCheck, false, false, 0);
            //}

            vbox.ShowAll();
            return(vbox);
        }
コード例 #2
0
        public override Control CreatePanelWidget()
        {
            var vbox = new Gtk.VBox();

            vbox.Spacing = 6;

            var generalSectionLabel = new Gtk.Label("<b>" + GettextCatalog.GetString("General") + "</b>");

            generalSectionLabel.UseMarkup = true;
            generalSectionLabel.Xalign    = 0;
            vbox.PackStart(generalSectionLabel, false, false, 0);

            var outputDirectoryHBox = new Gtk.HBox();

            outputDirectoryHBox.BorderWidth = 10;
            outputDirectoryHBox.Spacing     = 6;
            var outputDirectoryLabel = new Gtk.Label(GettextCatalog.GetString("Output directory:"));

            outputDirectoryLabel.Xalign = 0;
            outputDirectoryHBox.PackStart(outputDirectoryLabel, false, false, 0);
            folderEntry.Path = Options.OutputPath.Value;
            outputDirectoryHBox.PackStart(folderEntry, true, true, 0);

            vbox.PackStart(outputDirectoryHBox, false, false, 0);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #3
0
        /// <summary>
        /// Builds the login page.
        /// </summary>
        /// <returns>The login page, as a Gtk.VBox</returns>
        Gtk.VBox BuildLoginPage()
        {
            var toret   = new Gtk.VBox();
            var hbLogin = new Gtk.HBox();
            var hbUsr   = new Gtk.HBox();
            var hbPsw   = new Gtk.HBox();
            var edUsr   = new Gtk.Entry();
            var edPsw   = new Gtk.Entry();
            var lblUsr  = new Gtk.Label("User");
            var lblPsw  = new Gtk.Label("Password");

            this.BtLogin = new Gtk.Button("Login");
            hbLogin.PackEnd(BtLogin, false, false, 5);

            hbUsr.PackStart(lblUsr, false, false, 5);
            hbUsr.PackStart(edUsr, true, true, 5);

            hbPsw.PackStart(lblPsw, false, false, 5);
            hbPsw.PackStart(edPsw, true, true, 5);

            toret.PackStart(hbUsr, false, true, 5);
            toret.PackStart(hbPsw, false, true, 5);
            toret.PackStart(hbLogin, false, false, 10);

            toret.ShowAll();
            return(toret);
        }
コード例 #4
0
        public PasswordEntry()
        {
            autoReset = new AutoResetEvent(false);
            Title     = Catalog.GetString("Please enter the password");
            Gtk.VBox pwbox = new Gtk.VBox(false, 6);

            pwbox.PackStart(new Gtk.Label(Catalog.GetString("Please enter the password:"******"";
            pwbox.PackStart(pw);

            pw2 = new Gtk.Entry();
            // set password style:
            pw2.InvisibleChar = '*';
            pw2.Visibility    = false;
            pw2.Text          = "";
            pwbox.PackStart(pw2);

            pw.Changed  += PasswordChanged;
            pw2.Changed += PasswordChanged;

            match_label        = new Gtk.Label();
            match_label.Markup = Catalog.GetString(AddinPreferences.MATCH_TEXT);
            pwbox.PackStart(match_label);


            Gtk.Button button = (Gtk.Button)AddButton(Gtk.Stock.Ok, Gtk.ResponseType.Ok);
            button.CanDefault = true;
            //button.Show();
            pwbox.PackStart(button);
            //this.VBox.PackStart(button);

            Gtk.AccelGroup accel_group = new Gtk.AccelGroup();
            AddAccelGroup(accel_group);

            button.AddAccelerator("activate",
                                  accel_group,
                                  (uint)Gdk.Key.Escape,
                                  0,
                                  0);

            AddActionWidget(button, Gtk.ResponseType.Ok);
            DefaultResponse = Gtk.ResponseType.Ok;

            accel_group.AccelActivate += OnAction;
            Response += OnResponse;

            DeleteEvent += new Gtk.DeleteEventHandler(PasswordEntry_DeleteEvent);

            pwbox.ShowAll();
            this.VBox.PackStart(pwbox);

            // show() must happen on ui thread
            Gtk.Application.Invoke(RunInUiThread);
        }
コード例 #5
0
        Gtk.Widget IOptionsPanel.CreatePanelWidget()
        {
            Gtk.VBox cbox      = new Gtk.VBox(false, 6);
            Gtk.HBox combosBox = new Gtk.HBox(false, 6);
            cbox.PackStart(combosBox, false, false, 0);
            combosBox.PackStart(new Gtk.Label(GettextCatalog.GetString("Configuration:")), false, false, 0);
            configCombo = Gtk.ComboBox.NewText();
            combosBox.PackStart(configCombo, false, false, 0);
            combosBox.PackStart(new Gtk.Label(GettextCatalog.GetString("Platform:")), false, false, 0);
            platformCombo = Gtk.ComboBox.NewText();
            combosBox.PackStart(platformCombo, false, false, 0);
            cbox.PackStart(new Gtk.HSeparator(), false, false, 0);
            cbox.ShowAll();

            cbox.Hidden += OnPageHidden;
            cbox.Shown  += OnPageShown;

            lastConfigSelection   = -1;
            lastPlatformSelection = -1;

            FillConfigurations();
            UpdateSelection();

            configCombo.Changed   += OnConfigChanged;
            platformCombo.Changed += OnConfigChanged;

            bool oldMixed = allowMixedConfigurations;

            Gtk.Widget child = CreatePanelWidget();

            //HACK: work around bug 469427 - broken themes match on widget names
            if (child.Name.IndexOf("Panel") > 0)
            {
                child.Name = child.Name.Replace("Panel", "_");
            }

            cbox.PackStart(child, true, true, 0);

            if (allowMixedConfigurations != oldMixed)
            {
                // If mixed mode has changed, update the configuration list
                FillConfigurations();
                UpdateSelection();
            }
            widgetCreated = true;
            panelWidget   = child;

            if (currentConfigs.Count > 0)
            {
                panelWidget.Sensitive = true;
                LoadConfigData();
            }
            else
            {
                panelWidget.Sensitive = false;
            }

            return(cbox);
        }
コード例 #6
0
        public void createGui()
        {
            basedir_section = new Section("cuesheets-basedir", "CueSheet Music Directory:", 20);
            source_page.Add(basedir_section);

            string dir = _source.getCueSheetDir();

            Gtk.Label             lbl = new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn = new Gtk.FileChooserButton("CueSheet Music Directory:", Gtk.FileChooserAction.SelectFolder);
            if (dir != null)
            {
                btn.SelectFilename(dir);
            }
            Gtk.HBox box = new Gtk.HBox();
            box.Add(lbl);
            box.Add(btn);
            box.ShowAll();
            btn.CurrentFolderChanged += delegate(object sender, EventArgs args) {
                string dir1 = btn.Filename;
                Hyena.Log.Information("Folder changed to = " + dir1);
            };
            btn.FileSet += delegate(object sender, EventArgs args) {
                string dir1 = btn.Filename;
                Hyena.Log.Information("Base directory changed to = " + dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine(_source);

            Gtk.VBox vb = new Gtk.VBox();
            vb.PackStart(box, false, false, 0);

            Gtk.Image  icn_about = new Gtk.Image(Gtk.Stock.About, Gtk.IconSize.Button);
            Gtk.Button about     = new Gtk.Button(icn_about);
            about.Clicked += new EventHandler(handleAbout);
            Gtk.HBox  hb     = new Gtk.HBox();
            Gtk.Label _about = new Gtk.Label("About the CueSheet extension");
            hb.PackEnd(about, false, false, 0);
            hb.PackEnd(_about, false, false, 5);
            vb.PackStart(hb, false, false, 0);
            Gtk.HBox   hb1      = new Gtk.HBox();
            Gtk.Label  _info    = new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image  icn_info = new Gtk.Image(Gtk.Stock.Info, Gtk.IconSize.Button);
            Gtk.Button btn_info = new Gtk.Button(icn_info);
            btn_info.Clicked += new EventHandler(handleInfo);
            hb1.PackEnd(btn_info, false, false, 0);
            hb1.PackEnd(_info, false, false, 5);
            vb.PackStart(hb1, false, false, 0);

            Gtk.HBox hbX = new Gtk.HBox();
            vb.PackEnd(hbX, true, true, 0);

            vb.ShowAll();

            source_page.DisplayWidget = vb;
        }
コード例 #7
0
ファイル: PreviewPopup.cs プロジェクト: f-spot/f-spot-xplat
        public PreviewPopup(SelectionCollectionGridView view) : base(Gtk.WindowType.Toplevel)
        {
            var vbox = new Gtk.VBox();

            Add(vbox);
            AddEvents((int)(EventMask.PointerMotionMask |
                            EventMask.KeyReleaseMask |
                            EventMask.ButtonPressMask));

            Decorated       = false;
            SkipTaskbarHint = true;
            SkipPagerHint   = true;
            SetPosition(Gtk.WindowPosition.None);

            KeyReleaseEvent  += HandleKeyRelease;
            ButtonPressEvent += HandleButtonPress;
            Destroyed        += HandleDestroyed;

            this.view = view;
            view.MotionNotifyEvent += HandleIconViewMotion;
            view.KeyPressEvent     += HandleIconViewKeyPress;
            view.KeyReleaseEvent   += HandleKeyRelease;
            view.DestroyEvent      += HandleIconViewDestroy;

            BorderWidth = 6;

            hist = new Histogram {
                RedColorHint        = 127,
                GreenColorHint      = 127,
                BlueColorHint       = 127,
                BackgroundColorHint = 0xff
            };

            image = new Gtk.Image {
                CanFocus = false
            };


            label = new Gtk.Label(string.Empty)
            {
                CanFocus = false
            };
            label.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            label.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            vbox.PackStart(image, true, true, 0);
            vbox.PackStart(label, true, false, 0);
            vbox.ShowAll();
        }
コード例 #8
0
        public override Gtk.Widget CreatePanelWidget ()
        {
            Gtk.VBox box = new Gtk.VBox ();
            box.Spacing = 6;

            Gtk.HBox labelBox = new Gtk.HBox ();

            Gtk.Label label = CreateLabel ("Android studio executable location:");

            labelBox.PackStart (label, false, false, 0);

            entry = new FileEntry ();
            entry.Path = AddInPreferences.AndroidStudioLocation;


            Gtk.HBox sdkVersions = new Gtk.HBox ();
            Gtk.Label minSdkLabel = CreateLabel ("Min SDK version:");
            MinSdkEntry = new Gtk.Entry (AddInPreferences.MinSdkVersion);
            Gtk.Label targetSdkLabel = CreateLabel ("Target/Compile SDK version:");
            TargetSdkEntry = new Gtk.Entry (AddInPreferences.CompileSdkVersion);


            sdkVersions.PackStart (minSdkLabel, false, false, 0);
            sdkVersions.PackStart (MinSdkEntry, true, false, 0);
            sdkVersions.PackStart (targetSdkLabel, false, false, 0);
            sdkVersions.PackStart (TargetSdkEntry, true, false, 0);


            Gtk.HBox otherVersions = new Gtk.HBox ();
            Gtk.Label supportVersionLabel = CreateLabel ("Support library versions:");
            SupportVersionEntry = new Gtk.Entry (AddInPreferences.SupportVersion);
            Gtk.Label buildToolsVersionLabel = CreateLabel ("Build tools version:");
            BuildToolsVersionEntry = new Gtk.Entry (AddInPreferences.BuildToolsVersion);


            otherVersions.PackStart (supportVersionLabel, false, false, 0);
            otherVersions.PackStart (SupportVersionEntry, true, false, 0);
            otherVersions.PackStart (buildToolsVersionLabel, false, false, 0);
            otherVersions.PackStart (BuildToolsVersionEntry, true, false, 0);

            box.PackStart (labelBox, false, false, 0);
            box.PackStart (entry, false, false, 0);
            box.PackStart (sdkVersions, false, false, 0);
            box.PackStart (otherVersions, false, false, 0);
            box.ShowAll ();
            return box;

        }
コード例 #9
0
        public override void Initialize(OptionsDialog dialog, object dataObject)
        {
            base.Initialize(dialog, dataObject);

            config = (RunConfigInfo)dataObject;
            editor = RunConfigurationService.CreateEditorForConfiguration(config.EditedConfig);

            box         = new Gtk.VBox();
            box.Spacing = 12;
            userConf    = new Gtk.CheckButton(GettextCatalog.GetString("User-specific configuration"));
            box.PackEnd(userConf, false, false, 0);
            box.PackEnd(new Gtk.HSeparator(), false, false, 0);
            box.ShowAll();

            editor.Changed += Editor_Changed;
        }
コード例 #10
0
        protected override void Initialize(IPadWindow window)
        {
            base.Initialize(window);

            _content = new Gtk.VBox();

            var page = new PreviewerView();

            var pageContainer = page.CreateContainer();

            pageContainer.SetSizeRequest(800, 480);

            _content.PackStart(pageContainer, true, true, 0);

            _content.ShowAll();
        }
コード例 #11
0
        public PreviewPopup(IconView view) : base(Gtk.WindowType.Toplevel)
        {
            Gtk.VBox vbox = new Gtk.VBox();
            this.Add(vbox);
            this.AddEvents((int)(Gdk.EventMask.PointerMotionMask |
                                 Gdk.EventMask.KeyReleaseMask |
                                 Gdk.EventMask.ButtonPressMask));

            this.Decorated       = false;
            this.SkipTaskbarHint = true;
            this.SkipPagerHint   = true;
            this.SetPosition(Gtk.WindowPosition.None);

            this.KeyReleaseEvent  += HandleKeyRelease;
            this.ButtonPressEvent += HandleButtonPress;
            this.Destroyed        += HandleDestroyed;

            this.view = view;
            view.MotionNotifyEvent += HandleIconViewMotion;
            view.KeyPressEvent     += HandleIconViewKeyPress;
            view.KeyReleaseEvent   += HandleKeyRelease;
            view.DestroyEvent      += HandleIconViewDestroy;

            this.BorderWidth = 6;

            hist           = new FSpot.Histogram();
            hist.Color [0] = 127;
            hist.Color [1] = 127;
            hist.Color [2] = 127;
            hist.Color [3] = 0xff;

            image          = new Gtk.Image();
            image.CanFocus = false;


            label          = new Gtk.Label(String.Empty);
            label.CanFocus = false;
            label.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            label.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            this.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            this.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            vbox.PackStart(image, true, true, 0);
            vbox.PackStart(label, true, false, 0);
            vbox.ShowAll();
        }
コード例 #12
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox ();
            var hbox = new Gtk.HBox ();
            var label = new Gtk.Label (GettextCatalog.GetString ("DNX Runtime Version:"));
            label.Xalign = 0;
            hbox.PackStart (label, false, false, 5);

            dnxRuntimeVersionComboBox = Gtk.ComboBox.NewText ();
            hbox.PackStart (dnxRuntimeVersionComboBox, true, true, 5);

            PopulateOptionsPanel ();

            vbox.PackStart (hbox);
            vbox.ShowAll ();
            return vbox;
        }
コード例 #13
0
        void HandleSendButtonClicked(object sender, EventArgs e)
        {
            string email = mailEntry.Text;

            if (!ValidateEmail(email))
            {
                mailWarningLabel.Show();
                mailEntry.GrabFocus();
                return;
            }
            mailWarningLabel.Hide();

            if (textEntry.Buffer.Text.Length == 0)
            {
                bodyWarningLabel.Show();
                textEntry.GrabFocus();
                return;
            }

            FeedbackService.SendFeedback(email, textEntry.Buffer.Text);

            mainFrame.Remove(mainBox);
            mainBox.Destroy();

            Gtk.VBox box = new Gtk.VBox(false, 18);
            box.PackStart(new Gtk.Label(), true, true, 0); // Filler
            string txt = "<big>" + GettextCatalog.GetString("Thank you for your feedback!") + "</big>";

            Gtk.Label lab = new Gtk.Label();
            lab.Markup = txt;
            box.PackStart(lab, false, false, 0);

            lab = new Gtk.Label(GettextCatalog.GetString("Feedbacks sent: {0}", FeedbackService.FeedbacksSent));
            box.PackStart(lab, false, false, 0);

            box.PackStart(new Gtk.Label(), true, true, 0); // Filler
            box.ShowAll();

            mainFrame.Add(box);
            GLib.Timeout.Add(1000, delegate
            {
                Close();
                return(false);
            });
            sent = true;
        }
コード例 #14
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox ();
            var hbox = new Gtk.HBox ();
            var label = new Gtk.Label (GettextCatalog.GetString ("DNX Output Verbosity:"));
            label.Xalign = 0;
            hbox.PackStart (label, false, false, 5);

            logLevelsComboBox = Gtk.ComboBox.NewText ();
            hbox.PackStart (logLevelsComboBox, true, true, 5);

            AddLogLevelsToComboBox ();

            vbox.PackStart (hbox, false, false, 0);
            vbox.ShowAll ();
            return vbox;
        }
コード例 #15
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox  = new Gtk.VBox();
            var hbox  = new Gtk.HBox();
            var label = new Gtk.Label(GettextCatalog.GetString("DNX Runtime Version:"));

            label.Xalign = 0;
            hbox.PackStart(label, false, false, 5);

            dnxRuntimeVersionComboBox = Gtk.ComboBox.NewText();
            hbox.PackStart(dnxRuntimeVersionComboBox, true, true, 5);

            PopulateOptionsPanel();

            vbox.PackStart(hbox);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #16
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox  = new Gtk.VBox();
            var hbox  = new Gtk.HBox();
            var label = new Gtk.Label(GettextCatalog.GetString("DNX Output Verbosity:"));

            label.Xalign = 0;
            hbox.PackStart(label, false, false, 5);

            logLevelsComboBox = Gtk.ComboBox.NewText();
            hbox.PackStart(logLevelsComboBox, true, true, 5);

            AddLogLevelsToComboBox();

            vbox.PackStart(hbox, false, false, 0);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #17
0
        /// <summary>
        /// Builds the notebook page.
        /// </summary>
        /// <returns>The notebook page, as a Gtk.VBox.</returns>
        Gtk.VBox BuildNotebookPage()
        {
            var lblButton1 = new Gtk.Label("Page 1");
            var lblButton2 = new Gtk.Label("Page 2");

            this.NbNotebook = new Gtk.Notebook();
            this.NbNotebook.AppendPage(lblButton1, new Gtk.Label("Tab 1"));
            this.NbNotebook.AppendPage(lblButton2, new Gtk.Label("Tab 2"));

            this.NbNotebook.ShowAll();
            this.NbNotebook.TabPos = Gtk.PositionType.Right;

            var toret = new Gtk.VBox(true, 5);

            toret.PackStart(this.NbNotebook);
            toret.ShowAll();

            return(toret);
        }
コード例 #18
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox();

            vbox.Spacing = 6;

            var restoreSectionLabel = new Gtk.Label(GetBoldMarkup("DNX Restore"));

            restoreSectionLabel.UseMarkup = true;
            restoreSectionLabel.Xalign    = 0;
            vbox.PackStart(restoreSectionLabel, false, false, 0);

            restoreCheckBox             = new Gtk.CheckButton(GettextCatalog.GetString("Automatically restore dependencies."));
            restoreCheckBox.Active      = originalRestoreDependenciesSetting;
            restoreCheckBox.BorderWidth = 10;
            vbox.PackStart(restoreCheckBox, false, false, 0);

            var outputSectionLabel = new Gtk.Label(GetBoldMarkup("DNX Output"));

            outputSectionLabel.UseMarkup = true;
            outputSectionLabel.Xalign    = 0;
            vbox.PackStart(outputSectionLabel, false, false, 0);

            var outputVerbosityHBox = new Gtk.HBox();

            outputVerbosityHBox.BorderWidth = 10;
            outputVerbosityHBox.Spacing     = 6;
            var outputVerbosityLabel = new Gtk.Label(GettextCatalog.GetString("Verbosity:"));

            outputVerbosityLabel.Xalign = 0;
            outputVerbosityHBox.PackStart(outputVerbosityLabel, false, false, 0);

            logLevelsComboBox = Gtk.ComboBox.NewText();
            outputVerbosityHBox.PackStart(logLevelsComboBox, true, true, 0);

            AddLogLevelsToComboBox();

            vbox.PackStart(outputVerbosityHBox, false, false, 0);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #19
0
ファイル: MainWindow.cs プロジェクト: alfredodev/mono-tools
		public MainWindow () : base (Catalog.GetString ("Mono Visual Profiler"))
		{
			history = History.Load ();
			history.LogFiles.Changed += UpdateRecentLogs;
			history.Configs.Changed += UpdateRepeatSessions;
			DefaultSize = new Gdk.Size (800, 600);
			Gtk.Box box = new Gtk.VBox (false, 0);
			Gtk.UIManager uim = BuildUIManager ();
 			box.PackStart (uim.GetWidget ("/Menubar"), false, false, 0);
 			box.PackStart (uim.GetWidget ("/Toolbar"), false, false, 0);
			UpdateRecentLogs (null, null);
			UpdateRepeatSessions (null, null);
			content_area = new Gtk.VBox (false, 0);
			content_area.Show ();
			box.PackStart (content_area, true, true, 0);
			StartPage start_page = new StartPage (history);
			start_page.Activated += OnStartPageActivated;
			start_page.Show ();
			View = start_page;
			box.ShowAll ();
			Add (box);
		}
コード例 #20
0
        public override Control CreatePanelWidget()
        {
            var vbox = new Gtk.VBox();

            vbox.Spacing = 6;

            var restoreSectionLabel = new Gtk.Label(GetBoldMarkup(GettextCatalog.GetString("Run Custom Tool")));

            restoreSectionLabel.UseMarkup = true;
            restoreSectionLabel.Xalign    = 0;
            vbox.PackStart(restoreSectionLabel, false, false, 0);

            runCustomToolOnBuildCheckButton             = new Gtk.CheckButton(GettextCatalog.GetString("Run custom tools on build"));
            runCustomToolOnBuildCheckButton.TooltipText = GettextCatalog.GetString("Custom tools will be run when the project or solution is built.");
            runCustomToolOnBuildCheckButton.Active      = CustomToolServiceExtensions.RunCustomToolOnBuildEnabled.Value;
            runCustomToolOnBuildCheckButton.BorderWidth = 10;
            vbox.PackStart(runCustomToolOnBuildCheckButton, false, false, 0);

            vbox.ShowAll();

            return(vbox);
        }
コード例 #21
0
        public override Control CreatePanelWidget()
        {
            var vbox = new Gtk.VBox {
                Spacing = 6
            };

            AddSection(vbox, "Debugging");

            AddCheckProperty(vbox, "Always use this executable.", _alwaysUseExe, Settings.AlwaysUseConfiguredExecutable);
            AddFileProperty(vbox, "Godot executable:", _godotExeFile, Settings.GodotExecutablePath);

            AddSection(vbox, "Code completion");

            AddCheckProperty(vbox, "Provide node path completions.", _provideNodePathCompletion, Settings.ProvideNodePathCompletions);
            AddCheckProperty(vbox, "Provide input action completions.", _provideInputActionCompletion, Settings.ProvideInputActionCompletions);
            AddCheckProperty(vbox, "Provide resource path completions.", _provideResourcePathCompletion, Settings.ProvideResourcePathCompletions);
            AddCheckProperty(vbox, "Provide scene path completions.", _provideScenePathCompletion, Settings.ProvideScenePathCompletions);
            AddCheckProperty(vbox, "Provide signal name completions.", _provideSignalNameCompletion, Settings.ProvideSignalNameCompletions);

            vbox.ShowAll();

            return(vbox);
        }
コード例 #22
0
        public MainWindow() : base(Catalog.GetString("Mono Visual Profiler"))
        {
            history = History.Load();
            history.LogFiles.Changed += UpdateRecentLogs;
            history.Configs.Changed  += UpdateRepeatSessions;
            DefaultSize = new Gdk.Size(800, 600);
            Gtk.Box       box = new Gtk.VBox(false, 0);
            Gtk.UIManager uim = BuildUIManager();
            box.PackStart(uim.GetWidget("/Menubar"), false, false, 0);
            box.PackStart(uim.GetWidget("/Toolbar"), false, false, 0);
            UpdateRecentLogs(null, null);
            UpdateRepeatSessions(null, null);
            content_area = new Gtk.VBox(false, 0);
            content_area.Show();
            box.PackStart(content_area, true, true, 0);
            StartPage start_page = new StartPage(history);

            start_page.Activated += OnStartPageActivated;
            start_page.Show();
            View = start_page;
            box.ShowAll();
            Add(box);
        }
コード例 #23
0
		public override Control CreatePanelWidget()
		{
			var vbox = new Gtk.VBox();
			vbox.Spacing = 6;

			var generalSectionLabel = new Gtk.Label("<b>" + GettextCatalog.GetString("General") + "</b>");
			generalSectionLabel.UseMarkup = true;
			generalSectionLabel.Xalign = 0;
			vbox.PackStart(generalSectionLabel, false, false, 0);

			var outputDirectoryHBox = new Gtk.HBox();
			outputDirectoryHBox.BorderWidth = 10;
			outputDirectoryHBox.Spacing = 6;
			var outputDirectoryLabel = new Gtk.Label(GettextCatalog.GetString("Output directory:"));
			outputDirectoryLabel.Xalign = 0;
			outputDirectoryHBox.PackStart(outputDirectoryLabel, false, false, 0);
			folderEntry.Path = Options.OutputPath.Value;
			outputDirectoryHBox.PackStart(folderEntry, true, true, 0);

			vbox.PackStart(outputDirectoryHBox, false, false, 0);
			vbox.ShowAll();
			return vbox;
		}
コード例 #24
0
        public void createGui()
        {
            basedir_section=new Section("cuesheets-basedir","CueSheet Music Directory:",20);
            source_page.Add (basedir_section);

            string dir=_source.getCueSheetDir();
            Gtk.Label lbl=new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn=new Gtk.FileChooserButton("CueSheet Music Directory:",Gtk.FileChooserAction.SelectFolder);
            if (dir!=null) {
                btn.SelectFilename (dir);
            }
            Gtk.HBox box=new Gtk.HBox();
            box.Add (lbl);
            box.Add (btn);
            box.ShowAll ();
            btn.CurrentFolderChanged+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Folder changed to = "+dir1);
            };
            btn.FileSet+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Base directory changed to = "+dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine (_source);

            Gtk.VBox vb=new Gtk.VBox();
            vb.PackStart (box,false,false,0);

            Gtk.Image icn_about=new Gtk.Image(Gtk.Stock.About,Gtk.IconSize.Button);
            Gtk.Button about=new Gtk.Button(icn_about);
            about.Clicked+=new EventHandler(handleAbout);
            Gtk.HBox hb=new Gtk.HBox();
            Gtk.Label _about=new Gtk.Label("About the CueSheet extension");
            hb.PackEnd (about,false,false,0);
            hb.PackEnd (_about,false,false,5);
            vb.PackStart (hb,false,false,0);
            Gtk.HBox hb1=new Gtk.HBox();
            Gtk.Label _info=new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image icn_info=new Gtk.Image(Gtk.Stock.Info,Gtk.IconSize.Button);
            Gtk.Button btn_info=new Gtk.Button(icn_info);
            btn_info.Clicked+=new EventHandler(handleInfo);
            hb1.PackEnd(btn_info,false,false,0);
            hb1.PackEnd(_info,false,false,5);
            vb.PackStart (hb1,false,false,0);

            Gtk.HBox hbX=new Gtk.HBox();
            vb.PackEnd (hbX,true,true,0);

            vb.ShowAll ();

            source_page.DisplayWidget = vb;
        }
コード例 #25
0
        public override void ApplyConfig(UserConfig config)
        {
            Trace.Call(config);

            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            base.ApplyConfig(config);

            // topic
            _TopicTextView.ApplyConfig(config);
            // predict and set useful topic heigth
            Pango.Layout layout = _TopicTextView.CreatePangoLayout("Test Topic");
            int          lineWidth, lineHeigth;

            layout.GetPixelSize(out lineWidth, out lineHeigth);
            // use 2 lines + a bit extra as the topic heigth
            int bestHeigth = (lineHeigth * 2) + 5;

            _TopicTextView.HeightRequest       = bestHeigth;
            _TopicScrolledWindow.HeightRequest = bestHeigth;

            string topic_pos = (string)config["Interface/Notebook/Channel/TopicPosition"];

            if (_TopicScrolledWindow.IsAncestor(_OutputVBox))
            {
                _OutputVBox.Remove(_TopicScrolledWindow);
            }
            if (OutputScrolledWindow.IsAncestor(_OutputVBox))
            {
                _OutputVBox.Remove(OutputScrolledWindow);
            }
            if (topic_pos == "top")
            {
                _OutputVBox.PackStart(_TopicScrolledWindow, false, false, 2);
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
            }
            else if (topic_pos == "bottom")
            {
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
                _OutputVBox.PackStart(_TopicScrolledWindow, false, false, 2);
            }
            else if (topic_pos == "none")
            {
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
            }
            else
            {
#if LOG4NET
                _Logger.Error("ApplyConfig(): unsupported value in Interface/Notebook/Channel/TopicPosition: " + topic_pos);
#endif
            }
            _OutputVBox.ShowAll();

            // person list
            if (ThemeSettings.BackgroundColor == null)
            {
                _PersonTreeView.ModifyBase(Gtk.StateType.Normal);
            }
            else
            {
                _PersonTreeView.ModifyBase(Gtk.StateType.Normal, ThemeSettings.BackgroundColor.Value);
            }
            if (ThemeSettings.ForegroundColor == null)
            {
                _PersonTreeView.ModifyText(Gtk.StateType.Normal);
            }
            else
            {
                _PersonTreeView.ModifyText(Gtk.StateType.Normal, ThemeSettings.ForegroundColor.Value);
            }
            _PersonTreeView.ModifyFont(ThemeSettings.FontDescription);

            string userlist_pos = (string)config["Interface/Notebook/Channel/UserListPosition"];
            if (_PersonTreeViewFrame.IsAncestor(_OutputHPaned))
            {
                _OutputHPaned.Remove(_PersonTreeViewFrame);
            }
            if (_OutputVBox.IsAncestor(_OutputHPaned))
            {
                _OutputHPaned.Remove(_OutputVBox);
            }
            if (userlist_pos == "left")
            {
                _OutputHPaned.Pack1(_PersonTreeViewFrame, false, false);
                _OutputHPaned.Pack2(_OutputVBox, true, true);
            }
            else if (userlist_pos == "right")
            {
                _OutputHPaned.Pack1(_OutputVBox, true, true);
                _OutputHPaned.Pack2(_PersonTreeViewFrame, false, false);
            }
            else if (userlist_pos == "none")
            {
                _OutputHPaned.Pack1(_OutputVBox, true, true);
            }
            else
            {
#if LOG4NET
                _Logger.Error("ApplyConfig(): unsupported value in Interface/Notebook/Channel/UserListPosition: " + userlist_pos);
#endif
            }
            _OutputHPaned.ShowAll();

            NickColors = (bool)config["Interface/Notebook/Channel/NickColors"];
        }
コード例 #26
0
        public FeedbackDialog(int x, int y) : base(Gtk.WindowType.Toplevel)
        {
            SetDefaultSize(350, 200);
            if (x == -1 && y == -1)
            {
                int ww, wh;
                IdeApp.Workbench.RootWindow.GdkWindow.GetSize(out ww, out wh);
                IdeApp.Workbench.RootWindow.GdkWindow.GetOrigin(out x, out y);
                x = ww / 2 - 350 / 2;
                y = wh / 2 - 200 / 2;
                Move(x, y);
            }
            else
            {
                Move(x - 350, y - 200);
            }

            mainFrame = new Gtk.Frame();

            mainBox                = new Gtk.VBox();
            mainBox.BorderWidth    = 12;
            mainBox.Spacing        = 6;
            headerBox              = new Gtk.HBox();
            mailEntry              = new EntryWithEmptyMessage();
            mailEntry.EmptyMessage = GettextCatalog.GetString("email address");
            Decorated              = false;
            mainFrame.ShadowType   = Gtk.ShadowType.Out;

            // Header

            headerBox.Spacing = 6;
            mailLabel         = new Gtk.Label();
            headerBox.PackStart(mailLabel, false, false, 0);
            Gtk.Button changeButton = new Gtk.Button("(Change)");
            changeButton.Relief = Gtk.ReliefStyle.None;
            headerBox.PackStart(changeButton, false, false, 0);
            changeButton.Clicked += HandleChangeButtonClicked;
            mainBox.PackStart(headerBox, false, false, 0);
            mainBox.PackStart(mailEntry, false, false, 0);
            mailWarningLabel        = new Gtk.Label(GettextCatalog.GetString("Please enter a valid e-mail address"));
            mailWarningLabel.Xalign = 0;
            mainBox.PackStart(mailWarningLabel, false, false, 0);

            // Body

            textEntry = new TextViewWithEmptyMessage();
            textEntry.EmptyMessage = GettextCatalog.GetString(
                "Tell us how we can make {0} better.",
                BrandingService.SuiteName
                );
            textEntry.AcceptsTab   = false;
            textEntry.WrapMode     = Gtk.WrapMode.Word;
            textEntry.WidthRequest = 300;
            var sw = new Gtk.ScrolledWindow();

            sw.ShadowType       = Gtk.ShadowType.In;
            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;
            sw.Add(textEntry);
            mainBox.PackStart(sw, true, true, 0);
            bodyWarningLabel        = new Gtk.Label(GettextCatalog.GetString("Please enter some feedback"));
            bodyWarningLabel.Xalign = 0;
            mainBox.PackStart(bodyWarningLabel, false, false, 0);

            // Bottom

            Gtk.HBox  bottomBox  = new Gtk.HBox(false, 6);
            Gtk.Label countLabel = new Gtk.Label();
            countLabel.Xalign = 0;
            bottomBox.PackStart(countLabel, false, false, 0);

            Gtk.Button sendButton = new Gtk.Button(GettextCatalog.GetString("Send Feedback"));
            sendButton.Clicked += HandleSendButtonClicked;
            bottomBox.PackEnd(sendButton, false, false, 0);
            mainBox.PackStart(bottomBox, false, false, 0);

            // Init

            mainBox.ShowAll();

            mailWarningLabel.Hide();
            bodyWarningLabel.Hide();

            string mail = FeedbackService.ReporterEMail;

            if (string.IsNullOrEmpty(mail))
            {
                mail = AuthorInformation.Default.Email;
            }

            if (string.IsNullOrEmpty(mail))
            {
                headerBox.Hide();
                mailEntry.GrabFocus();
            }
            else
            {
                mailEntry.Text = mail;
                mailEntry.Hide();
                mailLabel.Text = GettextCatalog.GetString("From: {0}", mail);
                textEntry.GrabFocus();
            }
            if (FeedbackService.FeedbacksSent > 0)
            {
                countLabel.Text = GettextCatalog.GetString("Your feedbacks: {0}", FeedbackService.FeedbacksSent);
            }
            else
            {
                countLabel.Hide();
            }

            mainFrame.Show();
            mainFrame.Add(mainBox);
            Add(mainFrame);
        }
コード例 #27
0
ファイル: PreferencesDialog.cs プロジェクト: oluc/tomboy
		public Gtk.Widget MakeSyncPane ()
		{
			Gtk.VBox vbox = new Gtk.VBox (false, 0);
			vbox.Spacing = 4;
			vbox.BorderWidth = 8;

			Gtk.HBox hbox = new Gtk.HBox (false, 4);

			Gtk.Label label = new Gtk.Label (Catalog.GetString ("Ser_vice:"));
			label.Xalign = 0;
			label.Show ();
			hbox.PackStart (label, false, false, 0);

			// Populate the store with all the available SyncServiceAddins
			syncAddinStore = new Gtk.ListStore (typeof (SyncServiceAddin));
			syncAddinIters = new Dictionary<string,Gtk.TreeIter> ();
			SyncServiceAddin [] addins = Tomboy.DefaultNoteManager.AddinManager.GetSyncServiceAddins ();
			Array.Sort (addins, CompareSyncAddinsByName);
			foreach (SyncServiceAddin addin in addins) {
				Gtk.TreeIter iter = syncAddinStore.Append ();
				syncAddinStore.SetValue (iter, 0, addin);
				syncAddinIters [addin.Id] = iter;
			}

			syncAddinCombo = new Gtk.ComboBox (syncAddinStore);
			label.MnemonicWidget = syncAddinCombo;
			Gtk.CellRendererText crt = new Gtk.CellRendererText ();
			syncAddinCombo.PackStart (crt, true);
			syncAddinCombo.SetCellDataFunc (crt,
			                                new Gtk.CellLayoutDataFunc (ComboBoxTextDataFunc));

			// Read from Preferences which service is configured and select it
			// by default.  Otherwise, just select the first one in the list.
			string addin_id = Preferences.Get (
			                          Preferences.SYNC_SELECTED_SERVICE_ADDIN) as String;

			Gtk.TreeIter active_iter;
			if (addin_id != null && syncAddinIters.ContainsKey (addin_id)) {
				active_iter = syncAddinIters [addin_id];
				syncAddinCombo.SetActiveIter (active_iter);
			} else {
				if (syncAddinStore.GetIterFirst (out active_iter) == true) {
					syncAddinCombo.SetActiveIter (active_iter);
				}
			}

			syncAddinCombo.Changed += OnSyncAddinComboChanged;

			syncAddinCombo.Show ();
			hbox.PackStart (syncAddinCombo, true, true, 0);

			hbox.Show ();
			vbox.PackStart (hbox, false, false, 0);

			// Get the preferences GUI for the Sync Addin
			if (active_iter.Stamp != Gtk.TreeIter.Zero.Stamp)
				selectedSyncAddin = syncAddinStore.GetValue (active_iter, 0) as SyncServiceAddin;

			if (selectedSyncAddin != null)
				syncAddinPrefsWidget = selectedSyncAddin.CreatePreferencesControl (OnSyncAddinPrefsChanged);
			if (syncAddinPrefsWidget == null) {
				Gtk.Label l = new Gtk.Label (Catalog.GetString ("Not configurable"));
				l.Yalign = 0.5f;
				l.Yalign = 0.5f;
				syncAddinPrefsWidget = l;
			}
			if (syncAddinPrefsWidget != null && addin_id != null &&
			                syncAddinIters.ContainsKey (addin_id) && selectedSyncAddin.IsConfigured)
				syncAddinPrefsWidget.Sensitive = false;

			syncAddinPrefsWidget.Show ();
			syncAddinPrefsContainer = new Gtk.VBox (false, 0);
			syncAddinPrefsContainer.PackStart (syncAddinPrefsWidget, false, false, 0);
			syncAddinPrefsContainer.Show ();
			vbox.PackStart (syncAddinPrefsContainer, true, true, 10);

			// Autosync preference
			int timeout = (int) Preferences.Get (Preferences.SYNC_AUTOSYNC_TIMEOUT);
			if (timeout > 0 && timeout < 5) {
				timeout = 5;
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT, 5);
			}
			Gtk.HBox autosyncBox = new Gtk.HBox (false, 5);
			// Translators: This is and the next string go together.
			// Together they look like "Automatically Sync in Background Every [_] Minutes",
			// where "[_]" is a GtkSpinButton.
			autosyncCheck =
				new Gtk.CheckButton (Catalog.GetString ("Automaticall_y Sync in Background Every"));
			autosyncSpinner = new Gtk.SpinButton (5, 1000, 1);
			autosyncSpinner.Value = timeout >= 5 ? timeout : 10;
			Gtk.Label autosyncExtraText =
				// Translators: See above comment for details on
				// this string.
				new Gtk.Label (Catalog.GetString ("Minutes"));
			autosyncCheck.Active = autosyncSpinner.Sensitive = timeout >= 5;
			EventHandler updateTimeoutPref = (o, e) => {
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT,
				                 autosyncCheck.Active ? (int) autosyncSpinner.Value : -1);
			};
			autosyncCheck.Toggled += (o, e) => {
				autosyncSpinner.Sensitive = autosyncCheck.Active;
				updateTimeoutPref (o, e);
			};
			autosyncSpinner.ValueChanged += updateTimeoutPref;

			autosyncBox.PackStart (autosyncCheck);
			autosyncBox.PackStart (autosyncSpinner);
			autosyncBox.PackStart (autosyncExtraText);
			vbox.PackStart (autosyncBox, false, true, 0);

			Gtk.HButtonBox bbox = new Gtk.HButtonBox ();
			bbox.Spacing = 4;
			bbox.LayoutStyle = Gtk.ButtonBoxStyle.End;

			// "Advanced..." button to bring up extra sync config dialog
			Gtk.Button advancedConfigButton = new Gtk.Button (Catalog.GetString ("_Advanced..."));
			advancedConfigButton.Clicked += OnAdvancedSyncConfigButton;
			advancedConfigButton.Show ();
			bbox.PackStart (advancedConfigButton, false, false, 0);
			bbox.SetChildSecondary (advancedConfigButton, true);

			resetSyncAddinButton = new Gtk.Button (Gtk.Stock.Clear);
			resetSyncAddinButton.Clicked += OnResetSyncAddinButton;
			resetSyncAddinButton.Sensitive =
			        (selectedSyncAddin != null &&
			         addin_id == selectedSyncAddin.Id &&
			         selectedSyncAddin.IsConfigured);
			resetSyncAddinButton.Show ();
			bbox.PackStart (resetSyncAddinButton, false, false, 0);

			// TODO: Tabbing should go directly from sync prefs widget to here
			// TODO: Consider connecting to "Enter" pressed in sync prefs widget
			saveSyncAddinButton = new Gtk.Button (Gtk.Stock.Save);
			saveSyncAddinButton.Clicked += OnSaveSyncAddinButton;
			saveSyncAddinButton.Sensitive =
			        (selectedSyncAddin != null &&
			         (addin_id != selectedSyncAddin.Id || !selectedSyncAddin.IsConfigured));
			saveSyncAddinButton.Show ();
			bbox.PackStart (saveSyncAddinButton, false, false, 0);

			syncAddinCombo.Sensitive =
			        (selectedSyncAddin == null ||
			         addin_id != selectedSyncAddin.Id ||
			         !selectedSyncAddin.IsConfigured);

			bbox.Show ();
			vbox.PackStart (bbox, false, false, 0);

			vbox.ShowAll ();
			return vbox;
		}
コード例 #28
0
ファイル: PreferencesDialog.cs プロジェクト: oluc/tomboy
		void OnAddinPrefsButton (object sender, EventArgs args)
		{
			Gtk.Dialog dialog = null;
			Mono.Addins.Addin addin =
			        addin_tree.ActiveAddinData as Mono.Addins.Addin;

			if (addin == null)
				return;

			if (addin_prefs_dialogs.ContainsKey (addin.Id) == false) {
				// A preference dialog isn't open already so create a new one
				Gtk.Image icon =
				        new Gtk.Image (Gtk.Stock.Preferences, Gtk.IconSize.Dialog);
				Gtk.Label caption = new Gtk.Label ();
				caption.Markup = string.Format (
				                         "<span size='large' weight='bold'>{0} {1}</span>",
				                         addin.Name, addin.Version);
				caption.Xalign = 0;
				caption.UseMarkup = true;
				caption.UseUnderline = false;

				Gtk.Widget pref_widget =
				        addin_manager.CreateAddinPreferenceWidget (addin);

				if (pref_widget == null)
					pref_widget = new Gtk.Label (Catalog.GetString ("Not Implemented"));

				Gtk.HBox hbox = new Gtk.HBox (false, 6);
				Gtk.VBox vbox = new Gtk.VBox (false, 6);
				vbox.BorderWidth = 6;

				hbox.PackStart (icon, false, false, 0);
				hbox.PackStart (caption, true, true, 0);
				vbox.PackStart (hbox, false, false, 0);

				vbox.PackStart (pref_widget, true, true, 0);
				vbox.ShowAll ();

				dialog = new Gtk.Dialog (
				        string.Format (Catalog.GetString ("{0} Preferences"),
				                       addin.Name),
				        this,
				        Gtk.DialogFlags.DestroyWithParent | Gtk.DialogFlags.NoSeparator,
				        Gtk.Stock.Close, Gtk.ResponseType.Close);

				dialog.VBox.PackStart (vbox, true, true, 0);
				dialog.DeleteEvent += AddinPrefDialogDeleted;
				dialog.Response += AddinPrefDialogResponse;

				// Store this dialog off in the dictionary so it can be
				// presented again if the user clicks on the preferences button
				// again before closing the preferences dialog.
				dialog.Data ["AddinId"] = addin.Id;
				addin_prefs_dialogs [addin.Id] = dialog;
			} else {
				// It's already opened so just present it again
				dialog = addin_prefs_dialogs [addin.Id];
			}

			dialog.Present ();
		}
コード例 #29
0
        public CueSheetsView(CueSheetsSource ms)
        {
            MySource = ms;

            basedir = MySource.getCueSheetDir();

            store = new CS_TrackListModel();
            view  = new CS_TrackListView(this);

            {
                ColumnController colc = view.ColumnController;
                int i, N;
                for (i = 0, N = colc.Count; i < N; i++)
                {
                    CS_Column col = (CS_Column)colc[i];
                    col.WidthChanged += delegate(object sender, EventArgs args) {
                        Hyena.Log.Information("set-column-sizes=" + _set_column_sizes);
                        if (_set_column_sizes <= 0)
                        {
                            _set_column_sizes = 0;
                            MySource.setColumnWidth(col.id(), MySource.getSheet().id(), col.Width);
                        }
                        else
                        {
                            _set_column_sizes -= 1;
                        }
                    };
                }
            }

            view.SetModel(store);
            this.setColumnSizes(null);

            Hyena.Log.Information("New albumlist");
            aview  = new CS_AlbumListView(this);
            aaview = new CS_ArtistListView();
            ccview = new CS_ComposerListView();
            gview  = new CS_GenreListView();
            try {
                plsview = new CS_PlayListsView(this);
            } catch (System.Exception ex) {
                Hyena.Log.Error(ex.ToString());
            }

            Hyena.Log.Information("init models");
            aview.SetModel(MySource.getAlbumModel());
            aaview.SetModel(MySource.getArtistModel());
            gview.SetModel(MySource.getGenreModel());
            ccview.SetModel(MySource.getComposerModel());
            plsview.SetModel(MySource.getPlayListsModel());

            plsadmin = new CS_PlayListAdmin(plsview, MySource.getPlayListsModel(), MySource.getPlayListCollection());

            MySource.getGenreModel();
            Hyena.Log.Information("model albumlist");
            Hyena.Log.Information("albumlist initialized");

            aview.RowActivated      += new Hyena.Data.Gui.RowActivatedHandler <AlbumInfo>(EvtRowActivated);
            aview.Selection.Changed += HandleAviewSelectionChanged;
            gview.RowActivated      += new Hyena.Data.Gui.RowActivatedHandler <CS_GenreInfo>(EvtGenreActivated);
            aaview.RowActivated     += new Hyena.Data.Gui.RowActivatedHandler <ArtistInfo>(EvtArtistActivated);
            ccview.RowActivated     += new Hyena.Data.Gui.RowActivatedHandler <CS_ComposerInfo>(EvtComposerActivated);
            plsview.RowActivated    += new Hyena.Data.Gui.RowActivatedHandler <CS_PlayList>(EvtPlayListActivated);
            view.RowActivated       += new RowActivatedHandler <CueSheetEntry>(EvtTrackRowActivated);

            bar = new Gtk.Toolbar();
            if (basedir == null)
            {
                Hyena.Log.Information("basedir=" + basedir);
                Gtk.Label lbl = new Gtk.Label();
                lbl.Markup = "<b>You need to configure the CueSheets music directory first, using the right mouse button on the extension</b>";
                bar.Add(lbl);
            }
            filling = new Gtk.Label();
            bar.Add(filling);

            ascroll = new Gtk.ScrolledWindow();
            ascroll.Add(aview);
            aascroll = new Gtk.ScrolledWindow();
            aascroll.Add(aaview);
            tscroll = new Gtk.ScrolledWindow();
            tscroll.Add(view);
            gscroll = new Gtk.ScrolledWindow();
            gscroll.Add(gview);
            ccscroll = new Gtk.ScrolledWindow();
            ccscroll.Add(ccview);

            bool view_artist = true;

            Gtk.VBox   vac = new Gtk.VBox();
            Gtk.Button vab = new Gtk.Button("Artists");
            vab.Clicked += delegate(object sender, EventArgs args) {
                if (view_artist)
                {
                    view_artist = false;
                    vab.Label   = "Composers";
                    vac.Remove(aascroll);
                    vac.PackEnd(ccscroll);
                    ccscroll.ShowAll();
                }
                else
                {
                    view_artist = true;
                    vab.Label   = "Artists";
                    vac.Remove(ccscroll);
                    vac.PackEnd(aascroll);
                    aascroll.ShowAll();
                }
            };
            vac.PackStart(vab, false, false, 0);
            vac.PackEnd(aascroll);

            hb = new Gtk.HPaned();
            hb.Add(gscroll);
            hb.Add(vac);
            hb1 = new Gtk.HPaned();
            hb1.Add(hb);
            hb1.Add(ascroll);

            vp = new Gtk.VPaned();
            vp.Add(hb1);
            vp.Add(tscroll);

            Gtk.HPaned hppls = new Gtk.HPaned();
            hppls.Add1(vp);
            hppls.Add2(plsadmin);
            hbpls = hppls;

            {
                int hb_pls, hb_p, hb1_p, vp_p;
                MySource.getPositions(out hb_pls, out hb_p, out hb1_p, out vp_p);
                hppls.Position = hb_pls;
                hb.Position    = hb_p;
                hb1.Position   = hb1_p;
                vp.Position    = vp_p;
            }


            box = new Gtk.VBox();
            box.PackStart(bar, false, true, 0);
            box.PackStart(hppls);
            box.ShowAll();

            GLib.Timeout.Add((uint)1000, (GLib.TimeoutHandler)GardDividers);
            GLib.Timeout.Add((uint)timeout, (GLib.TimeoutHandler)PositionDisplay);

            fill();
        }
コード例 #30
0
        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox ();
            vbox.Spacing = 6;

            var restoreSectionLabel = new Gtk.Label (GetBoldMarkup ("DNX Restore"));
            restoreSectionLabel.UseMarkup = true;
            restoreSectionLabel.Xalign = 0;
            vbox.PackStart (restoreSectionLabel, false, false, 0);

            restoreCheckBox = new Gtk.CheckButton (GettextCatalog.GetString ("Automatically restore dependencies."));
            restoreCheckBox.Active = originalRestoreDependenciesSetting;
            restoreCheckBox.BorderWidth = 10;
            vbox.PackStart (restoreCheckBox, false, false, 0);

            var outputSectionLabel = new Gtk.Label (GetBoldMarkup ("DNX Output"));
            outputSectionLabel.UseMarkup = true;
            outputSectionLabel.Xalign = 0;
            vbox.PackStart (outputSectionLabel, false, false, 0);

            var outputVerbosityHBox = new Gtk.HBox ();
            outputVerbosityHBox.BorderWidth = 10;
            outputVerbosityHBox.Spacing = 6;
            var outputVerbosityLabel = new Gtk.Label (GettextCatalog.GetString ("Verbosity:"));
            outputVerbosityLabel.Xalign = 0;
            outputVerbosityHBox.PackStart (outputVerbosityLabel, false, false, 0);

            logLevelsComboBox = Gtk.ComboBox.NewText ();
            outputVerbosityHBox.PackStart (logLevelsComboBox, true, true, 0);

            AddLogLevelsToComboBox ();

            vbox.PackStart (outputVerbosityHBox, false, false, 0);
            vbox.ShowAll ();
            return vbox;
        }
コード例 #31
0
        Control IOptionsPanel.CreatePanelWidget()
        {
            Gtk.VBox cbox      = new Gtk.VBox(false, 6);
            Gtk.HBox combosBox = new Gtk.HBox(false, 6)
            {
                Name = "panelWidgetCombosBox"
            };
            cbox.PackStart(combosBox, false, false, 0);
            var configurationLabel = new Gtk.Label(GettextCatalog.GetString("Configuration:"));

            combosBox.PackStart(configurationLabel, false, false, 0);
            configListStore = new Gtk.ListStore(typeof(string), typeof(string));
            configCombo     = new Gtk.ComboBox(configListStore)
            {
                Name = "panelWidgetConfigurationCombo"
            };
            SemanticModelAttribute modelAttr = new SemanticModelAttribute("configListStore__DisplayName", "configListStore__ConfigName");

            TypeDescriptor.AddAttributes(configListStore, modelAttr);
            var cell = new Gtk.CellRendererText();

            configCombo.PackStart(cell, true);
            configCombo.AddAttribute(cell, "text", 0);
            combosBox.PackStart(configCombo, false, false, 0);
            var platformLabel = new Gtk.Label(GettextCatalog.GetString("Platform:"));

            combosBox.PackStart(platformLabel, false, false, 0);
            platformCombo      = Gtk.ComboBox.NewText();
            platformCombo.Name = "panelWidgetPlatformCombo";
            combosBox.PackStart(platformCombo, false, false, 0);
            cbox.PackStart(new Gtk.HSeparator(), false, false, 0);
            cbox.ShowAll();

            configCombo.SetCommonAccessibilityAttributes(
                configCombo.Name,
                configurationLabel,
                GettextCatalog.GetString("Select a configuration"));

            platformCombo.SetCommonAccessibilityAttributes(
                platformCombo.Name,
                platformLabel,
                GettextCatalog.GetString("Select a platform"));

            cbox.Hidden += OnPageHidden;
            cbox.Shown  += OnPageShown;

            lastConfigSelection   = -1;
            lastPlatformSelection = -1;

            FillConfigurations();
            UpdateSelection();

            configCombo.Changed   += OnConfigChanged;
            platformCombo.Changed += OnConfigChanged;

            bool oldMixed = allowMixedConfigurations;

            Gtk.Widget child = CreatePanelWidget();

            //HACK: work around bug 469427 - broken themes match on widget names
            if (child.Name.IndexOf("Panel") > 0)
            {
                child.Name = child.Name.Replace("Panel", "_");
            }

            cbox.PackStart(child, true, true, 0);

            if (allowMixedConfigurations != oldMixed)
            {
                // If mixed mode has changed, update the configuration list
                FillConfigurations();
                UpdateSelection();
            }
            widgetCreated = true;
            panelWidget   = child;

            if (currentConfigs.Count > 0)
            {
                panelWidget.Sensitive = true;
                LoadConfigData();
            }
            else
            {
                panelWidget.Sensitive = false;
            }

            return(cbox);
        }
コード例 #32
0
ファイル: GroupChatView.cs プロジェクト: jamesaxl/smuxi
        public override void ApplyConfig(UserConfig config)
        {
            Trace.Call(config);

            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            base.ApplyConfig(config);

            // topic
            _TopicTextView.ApplyConfig(config);
            string topic_pos = (string)config["Interface/Notebook/Channel/TopicPosition"];

            if (_TopicScrolledWindow.IsAncestor(_OutputVBox))
            {
                _OutputVBox.Remove(_TopicScrolledWindow);
            }
            if (OutputScrolledWindow.IsAncestor(_OutputVBox))
            {
                _OutputVBox.Remove(OutputScrolledWindow);
            }
            if (topic_pos == "top")
            {
                _OutputVBox.PackStart(_TopicScrolledWindow, false, false, 2);
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
            }
            else if (topic_pos == "bottom")
            {
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
                _OutputVBox.PackStart(_TopicScrolledWindow, false, false, 2);
            }
            else if (topic_pos == "none")
            {
                _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
            }
            else
            {
#if LOG4NET
                _Logger.Error("ApplyConfig(): unsupported value in Interface/Notebook/Channel/TopicPosition: " + topic_pos);
#endif
            }
            _OutputVBox.ShowAll();

            // person list
            if (ThemeSettings.BackgroundColor == null)
            {
                _PersonTreeView.ModifyBase(Gtk.StateType.Normal);
            }
            else
            {
                _PersonTreeView.ModifyBase(Gtk.StateType.Normal, ThemeSettings.BackgroundColor.Value);
            }
            if (ThemeSettings.ForegroundColor == null)
            {
                _PersonTreeView.ModifyText(Gtk.StateType.Normal);
            }
            else
            {
                _PersonTreeView.ModifyText(Gtk.StateType.Normal, ThemeSettings.ForegroundColor.Value);
            }
            _PersonTreeView.ModifyFont(ThemeSettings.FontDescription);

            string userlist_pos = (string)config["Interface/Notebook/Channel/UserListPosition"];
            if (userlist_pos == "left")
            {
                userlist_pos = "right";
            }
            if (_PersonTreeViewFrame.IsAncestor(_OutputHPaned))
            {
                _OutputHPaned.Remove(_PersonTreeViewFrame);
            }
            if (_OutputVBox.IsAncestor(_OutputHPaned))
            {
                _OutputHPaned.Remove(_OutputVBox);
            }
            if (userlist_pos == "left")
            {
                _OutputHPaned.Pack1(_PersonTreeViewFrame, false, true);
                _OutputHPaned.Pack2(_OutputVBox, true, true);
            }
            else if (userlist_pos == "right")
            {
                _OutputHPaned.Pack1(_OutputVBox, true, true);
                _OutputHPaned.Pack2(_PersonTreeViewFrame, false, true);
            }
            else if (userlist_pos == "none")
            {
                _OutputHPaned.Pack1(_OutputVBox, true, true);
            }
            else
            {
#if LOG4NET
                _Logger.Error("ApplyConfig(): unsupported value in Interface/Notebook/Channel/UserListPosition: " + userlist_pos);
#endif
            }
            _OutputHPaned.ShowAll();

            NickColors = (bool)config["Interface/Notebook/Channel/NickColors"];
        }
コード例 #33
0
ファイル: FeedbackDialog.cs プロジェクト: zenek-y/monodevelop
		public FeedbackDialog (int x, int y): base (Gtk.WindowType.Toplevel)
		{
			SetDefaultSize (350, 200);
			if (x == -1 && y == -1) {
				int ww, wh;
				IdeApp.Workbench.RootWindow.GdkWindow.GetSize (out ww, out wh);
				IdeApp.Workbench.RootWindow.GdkWindow.GetOrigin (out x, out y);
				x = ww / 2 - 350 / 2;
				y = wh / 2 - 200 / 2;
				Move (x, y);
			} else
				Move (x - 350, y - 200);

			mainFrame = new Gtk.Frame ();
			
			mainBox = new Gtk.VBox ();
			mainBox.BorderWidth = 12;
			mainBox.Spacing = 6;
			headerBox = new Gtk.HBox ();
			mailEntry = new EntryWithEmptyMessage ();
			mailEntry.EmptyMessage = GettextCatalog.GetString ("email address");
			Decorated = false;
			mainFrame.ShadowType = Gtk.ShadowType.Out;
			
			// Header
			
			headerBox.Spacing = 6;
			mailLabel = new Gtk.Label ();
			headerBox.PackStart (mailLabel, false, false, 0);
			Gtk.Button changeButton = new Gtk.Button ("(Change)");
			changeButton.Relief = Gtk.ReliefStyle.None;
			headerBox.PackStart (changeButton, false, false, 0);
			changeButton.Clicked += HandleChangeButtonClicked;
			mainBox.PackStart (headerBox, false, false, 0);
			mainBox.PackStart (mailEntry, false, false, 0);
			mailWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter a valid e-mail address"));
			mailWarningLabel.Xalign = 0;
			mainBox.PackStart (mailWarningLabel, false, false, 0);
			
			// Body
			
			textEntry = new TextViewWithEmptyMessage ();
			textEntry.EmptyMessage = GettextCatalog.GetString (
				"Tell us how we can make {0} better.",
				BrandingService.SuiteName
			);
			textEntry.AcceptsTab = false;
			textEntry.WrapMode = Gtk.WrapMode.Word;
			textEntry.WidthRequest = 300;
			var sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = Gtk.ShadowType.In;
			sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.HscrollbarPolicy = Gtk.PolicyType.Never;
			sw.Add (textEntry);
			mainBox.PackStart (sw, true, true, 0);
			bodyWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter some feedback"));
			bodyWarningLabel.Xalign = 0;
			mainBox.PackStart (bodyWarningLabel, false, false, 0);
			
			// Bottom
			
			Gtk.HBox bottomBox = new Gtk.HBox (false, 6);
			Gtk.Label countLabel = new Gtk.Label ();
			countLabel.Xalign = 0;
			bottomBox.PackStart (countLabel, false, false, 0);
			
			Gtk.Button sendButton = new Gtk.Button (GettextCatalog.GetString ("Send Feedback"));
			sendButton.Clicked += HandleSendButtonClicked;
			bottomBox.PackEnd (sendButton, false, false, 0);
			mainBox.PackStart (bottomBox, false, false, 0);
			
			// Init
			
			mainBox.ShowAll ();
			
			mailWarningLabel.Hide ();
			bodyWarningLabel.Hide ();
			
			string mail = FeedbackService.ReporterEMail;
			if (string.IsNullOrEmpty (mail))
				mail = AuthorInformation.Default.Email;
			
			if (string.IsNullOrEmpty (mail)) {
				headerBox.Hide ();
				mailEntry.GrabFocus ();
			}
			else {
				mailEntry.Text = mail;
				mailEntry.Hide ();
				mailLabel.Text = GettextCatalog.GetString ("From: {0}", mail);
				textEntry.GrabFocus ();
			}
			if (FeedbackService.FeedbacksSent > 0)
				countLabel.Text = GettextCatalog.GetString ("Your feedbacks: {0}", FeedbackService.FeedbacksSent);
			else
				countLabel.Hide ();
			
			mainFrame.Show ();
			mainFrame.Add (mainBox);
			Add (mainFrame);
		}
コード例 #34
0
ファイル: FeedbackDialog.cs プロジェクト: zenek-y/monodevelop
		void HandleSendButtonClicked (object sender, EventArgs e)
		{
			string email = mailEntry.Text;
			
			if (!ValidateEmail (email)) {
				mailWarningLabel.Show ();
				mailEntry.GrabFocus ();
				return;
			}
			mailWarningLabel.Hide ();
			
			if (textEntry.Buffer.Text.Length == 0) {
				bodyWarningLabel.Show ();
				textEntry.GrabFocus ();
				return;
			}
			
			FeedbackService.SendFeedback (email, textEntry.Buffer.Text);
			
			mainFrame.Remove (mainBox);
			mainBox.Destroy ();
			
			Gtk.VBox box = new Gtk.VBox (false, 18);
			box.PackStart (new Gtk.Label (), true, true, 0); // Filler
			string txt = "<big>" + GettextCatalog.GetString ("Thank you for your feedback!") + "</big>";
			Gtk.Label lab = new Gtk.Label ();
			lab.Markup = txt;
			box.PackStart (lab, false, false, 0);
			
			lab = new Gtk.Label (GettextCatalog.GetString ("Feedbacks sent: {0}", FeedbackService.FeedbacksSent));
			box.PackStart (lab, false, false, 0);
			
			box.PackStart (new Gtk.Label (), true, true, 0); // Filler
			box.ShowAll ();

			mainFrame.Add (box);
			GLib.Timeout.Add (1000, delegate {
				Close ();
				return false;
			});
			sent = true;
		}
コード例 #35
0
ファイル: PreviewPopup.cs プロジェクト: iainlane/f-spot
        public PreviewPopup(IconView view)
            : base(Gtk.WindowType.Toplevel)
        {
            Gtk.VBox vbox = new Gtk.VBox ();
            this.Add (vbox);
            this.AddEvents ((int) (Gdk.EventMask.PointerMotionMask |
                           Gdk.EventMask.KeyReleaseMask |
                           Gdk.EventMask.ButtonPressMask));

            this.Decorated = false;
            this.SkipTaskbarHint = true;
            this.SkipPagerHint = true;
            this.SetPosition (Gtk.WindowPosition.None);

            this.KeyReleaseEvent += HandleKeyRelease;
            this.ButtonPressEvent += HandleButtonPress;
            this.Destroyed += HandleDestroyed;

            this.view = view;
            view.MotionNotifyEvent += HandleIconViewMotion;
            view.KeyPressEvent += HandleIconViewKeyPress;
            view.KeyReleaseEvent += HandleKeyRelease;
            view.DestroyEvent += HandleIconViewDestroy;

            this.BorderWidth = 6;

            hist = new FSpot.Histogram ();
            hist.RedColorHint = 127;
            hist.GreenColorHint = 127;
            hist.BlueColorHint = 127;
            hist.BackgroundColorHint = 0xff;

            image = new Gtk.Image ();
            image.CanFocus = false;

            label = new Gtk.Label (String.Empty);
            label.CanFocus = false;
            label.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127));
            label.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0));

            this.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127));
            this.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0));

            vbox.PackStart (image, true, true, 0);
            vbox.PackStart (label, true, false, 0);
            vbox.ShowAll ();
        }
コード例 #36
0
        public CueSheetsView(CueSheetsSource ms)
        {
            MySource=ms;

            basedir=MySource.getCueSheetDir ();

            store = new CS_TrackListModel();
            view  = new CS_TrackListView(this);

            {
                ColumnController colc=view.ColumnController;
                int i,N;
                for(i=0,N=colc.Count;i<N;i++) {
                    CS_Column col=(CS_Column) colc[i];
                    col.WidthChanged+=delegate(object sender,EventArgs args) {
                        Hyena.Log.Information ("set-column-sizes="+_set_column_sizes);
                        if (_set_column_sizes<=0) {
                            _set_column_sizes=0;
                            MySource.setColumnWidth (col.id(),MySource.getSheet ().id (),col.Width);
                        } else {
                            _set_column_sizes-=1;
                        }
                    };
                }
            }

            view.SetModel(store);
            this.setColumnSizes(null);

            Hyena.Log.Information("New albumlist");
            aview=new CS_AlbumListView(this);
            aaview=new CS_ArtistListView();
            ccview=new CS_ComposerListView();
            gview=new CS_GenreListView();
            try {
            plsview=new CS_PlayListsView(this);
            } catch (System.Exception ex) {
                Hyena.Log.Error (ex.ToString ());
            }

            Hyena.Log.Information("init models");
            aview.SetModel (MySource.getAlbumModel ());
            aaview.SetModel (MySource.getArtistModel ());
            gview.SetModel (MySource.getGenreModel ());
            ccview.SetModel (MySource.getComposerModel());
            plsview.SetModel(MySource.getPlayListsModel());

            plsadmin=new CS_PlayListAdmin(plsview,MySource.getPlayListsModel(),MySource.getPlayListCollection());

            MySource.getGenreModel();
            Hyena.Log.Information("model albumlist");
            Hyena.Log.Information("albumlist initialized");

            aview.RowActivated+=new Hyena.Data.Gui.RowActivatedHandler<AlbumInfo>(EvtRowActivated);
            aview.Selection.Changed += HandleAviewSelectionChanged;
            gview.RowActivated+=new Hyena.Data.Gui.RowActivatedHandler<CS_GenreInfo>(EvtGenreActivated);
            aaview.RowActivated+=new Hyena.Data.Gui.RowActivatedHandler<ArtistInfo>(EvtArtistActivated);
            ccview.RowActivated+=new Hyena.Data.Gui.RowActivatedHandler<CS_ComposerInfo>(EvtComposerActivated);
            plsview.RowActivated+=new Hyena.Data.Gui.RowActivatedHandler<CS_PlayList>(EvtPlayListActivated);
            view.RowActivated+=new RowActivatedHandler<CueSheetEntry>(EvtTrackRowActivated);

            bar=new Gtk.Toolbar();
            if (basedir==null) {
                Hyena.Log.Information("basedir="+basedir);
                Gtk.Label lbl=new Gtk.Label();
                lbl.Markup="<b>You need to configure the CueSheets music directory first, using the right mouse button on the extension</b>";
                bar.Add (lbl);
            }
            filling=new Gtk.Label();
            bar.Add (filling);

            ascroll=new Gtk.ScrolledWindow();
            ascroll.Add (aview);
            aascroll=new Gtk.ScrolledWindow();
            aascroll.Add (aaview);
            tscroll=new Gtk.ScrolledWindow();
            tscroll.Add (view);
            gscroll=new Gtk.ScrolledWindow();
            gscroll.Add (gview);
            ccscroll=new Gtk.ScrolledWindow();
            ccscroll.Add(ccview);

            bool view_artist=true;
            Gtk.VBox vac=new Gtk.VBox();
            Gtk.Button vab=new Gtk.Button("Artists");
            vab.Clicked+=delegate(object sender,EventArgs args) {
                if (view_artist) {
                    view_artist=false;
                    vab.Label="Composers";
                    vac.Remove (aascroll);
                    vac.PackEnd (ccscroll);
                    ccscroll.ShowAll ();
                } else {
                    view_artist=true;
                    vab.Label="Artists";
                    vac.Remove (ccscroll);
                    vac.PackEnd (aascroll);
                    aascroll.ShowAll ();
                }
            };
            vac.PackStart (vab,false,false,0);
            vac.PackEnd (aascroll);

            hb=new Gtk.HPaned();
            hb.Add(gscroll);
            hb.Add (vac);
            hb1=new Gtk.HPaned();
            hb1.Add (hb);
            hb1.Add (ascroll);

            vp=new Gtk.VPaned();
            vp.Add (hb1);
            vp.Add (tscroll);

            Gtk.HPaned hppls=new Gtk.HPaned();
            hppls.Add1 (vp);
            hppls.Add2 (plsadmin);
            hbpls=hppls;

            {
                int hb_pls,hb_p,hb1_p,vp_p;
                MySource.getPositions (out hb_pls,out hb_p,out hb1_p,out vp_p);
                hppls.Position=hb_pls;
                hb.Position=hb_p;
                hb1.Position=hb1_p;
                vp.Position=vp_p;
            }

            box   = new Gtk.VBox();
            box.PackStart (bar,false,true,0);
            box.PackStart (hppls);
            box.ShowAll();

            GLib.Timeout.Add ((uint) 1000,(GLib.TimeoutHandler) GardDividers);
            GLib.Timeout.Add ((uint) timeout,(GLib.TimeoutHandler) PositionDisplay);

            fill ();
        }
コード例 #37
0
ファイル: Translatable.cs プロジェクト: Kalnor/monodevelop
		public virtual void Initialize (PropertyDescriptor prop)
		{
			CheckType (prop);
			
			this.prop = prop;

			mainHBox = new Gtk.HBox (false, 6);
			PackStart (mainHBox, false, false, 0);

			if (!prop.Translatable)
				return;

			button = new Gtk.Button ();
			try {
				globe = Gdk.Pixbuf.LoadFromResource ("globe.png");
				globe_not = Gdk.Pixbuf.LoadFromResource ("globe-not.png");
			} catch (Exception e) {
				Console.WriteLine ("Error while loading pixbuf: " + e);
			}
			image = new Gtk.Image (globe);
			button.Add (image);
			button.ButtonPressEvent += ButtonPressed;
			mainHBox.PackEnd (button, false, false, 0);
			mainHBox.ShowAll ();
			
			menu = new Gtk.Menu ();

			markItem = new Gtk.CheckMenuItem ("Mark for Translation");
			markItem.Toggled += ToggleMark;
			markItem.Show ();
			menu.Add (markItem);
			
			addContextItem = new Gtk.MenuItem ("Add Translation Context Hint");
			addContextItem.Activated += AddContext;
			menu.Add (addContextItem);
			remContextItem = new Gtk.MenuItem ("Remove Translation Context Hint");
			remContextItem.Activated += RemoveContext;
			menu.Add (remContextItem);
			
			addCommentItem = new Gtk.MenuItem ("Add Comment for Translators");
			addCommentItem.Activated += AddComment;
			menu.Add (addCommentItem);
			remCommentItem = new Gtk.MenuItem ("Remove Comment for Translators");
			remCommentItem.Activated += RemoveComment;
			menu.Add (remCommentItem);
			
			contextBox = new Gtk.HBox (false, 6);
			Gtk.Label contextLabel = new Gtk.Label ("Translation context");
			contextLabel.Xalign = 0.0f;
			contextBox.PackStart (contextLabel, false, false, 0);
			contextEntry = new Gtk.Entry ();
			contextEntry.WidthChars = 8;
			contextBox.PackStart (contextEntry, true, true, 0);
			contextBox.ShowAll ();
			contextEntry.Changed += ContextChanged;

			commentBox = new Gtk.VBox (false, 3);
			Gtk.Label commentLabel = new Gtk.Label ("Comment for Translators:");
			commentLabel.Xalign = 0.0f;
			commentBox.PackStart (commentLabel, false, false, 0);
			commentText = new TextBox (3);
			commentBox.PackStart (commentText, false, false, 0);
			commentBox.ShowAll ();
			commentText.Changed += CommentChanged;
		}
コード例 #38
0
		Control IOptionsPanel.CreatePanelWidget ()
		{
			Gtk.VBox cbox = new Gtk.VBox (false, 6);
			Gtk.HBox combosBox = new Gtk.HBox (false, 6);
			cbox.PackStart (combosBox, false, false, 0);
			combosBox.PackStart (new Gtk.Label (GettextCatalog.GetString ("Configuration:")), false, false, 0);
			configListStore = new Gtk.ListStore (typeof(string), typeof(string));
			configCombo = new Gtk.ComboBox (configListStore);
			var cell = new Gtk.CellRendererText ();
			configCombo.PackStart (cell, true);
			configCombo.AddAttribute (cell, "text", 0);
			combosBox.PackStart (configCombo, false, false, 0);
			combosBox.PackStart (new Gtk.Label (GettextCatalog.GetString ("Platform:")), false, false, 0);
			platformCombo = Gtk.ComboBox.NewText ();
			combosBox.PackStart (platformCombo, false, false, 0);
			cbox.PackStart (new Gtk.HSeparator (), false, false, 0);
			cbox.ShowAll ();

			cbox.Hidden += OnPageHidden;
			cbox.Shown += OnPageShown;
			
			lastConfigSelection = -1;
			lastPlatformSelection = -1;
			
			FillConfigurations ();
			UpdateSelection ();
			
			configCombo.Changed += OnConfigChanged;
			platformCombo.Changed += OnConfigChanged;
			
			bool oldMixed = allowMixedConfigurations;
			Gtk.Widget child = CreatePanelWidget ();
			
			//HACK: work around bug 469427 - broken themes match on widget names
			if (child.Name.IndexOf ("Panel") > 0)
				child.Name = child.Name.Replace ("Panel", "_");
			
			cbox.PackStart (child, true, true, 0);
			
			if (allowMixedConfigurations != oldMixed) {
				// If mixed mode has changed, update the configuration list
				FillConfigurations ();
				UpdateSelection ();
			}
			widgetCreated = true;
			panelWidget = child;
			
			if (currentConfigs.Count > 0) {
				panelWidget.Sensitive = true;
				LoadConfigData ();
			}
			else
				panelWidget.Sensitive = false;
			
			return cbox;
		}
コード例 #39
0
        public virtual void Initialize(PropertyDescriptor prop)
        {
            CheckType(prop);

            this.prop = prop;

            mainHBox = new Gtk.HBox(false, 6);
            PackStart(mainHBox, false, false, 0);

            if (!prop.Translatable)
            {
                return;
            }

            button = new Gtk.Button();
            try {
                globe     = Gdk.Pixbuf.LoadFromResource("globe.png");
                globe_not = Gdk.Pixbuf.LoadFromResource("globe-not.png");
            } catch (Exception e) {
                Console.WriteLine("Error while loading pixbuf: " + e);
            }
            image = new Gtk.Image(globe);
            button.Add(image);
            button.ButtonPressEvent += ButtonPressed;
            mainHBox.PackEnd(button, false, false, 0);
            mainHBox.ShowAll();

            menu = new Gtk.Menu();

            markItem          = new Gtk.CheckMenuItem("Mark for Translation");
            markItem.Toggled += ToggleMark;
            markItem.Show();
            menu.Add(markItem);

            addContextItem            = new Gtk.MenuItem("Add Translation Context Hint");
            addContextItem.Activated += AddContext;
            menu.Add(addContextItem);
            remContextItem            = new Gtk.MenuItem("Remove Translation Context Hint");
            remContextItem.Activated += RemoveContext;
            menu.Add(remContextItem);

            addCommentItem            = new Gtk.MenuItem("Add Comment for Translators");
            addCommentItem.Activated += AddComment;
            menu.Add(addCommentItem);
            remCommentItem            = new Gtk.MenuItem("Remove Comment for Translators");
            remCommentItem.Activated += RemoveComment;
            menu.Add(remCommentItem);

            contextBox = new Gtk.HBox(false, 6);
            Gtk.Label contextLabel = new Gtk.Label("Translation context");
            contextLabel.Xalign = 0.0f;
            contextBox.PackStart(contextLabel, false, false, 0);
            contextEntry            = new Gtk.Entry();
            contextEntry.WidthChars = 8;
            contextBox.PackStart(contextEntry, true, true, 0);
            contextBox.ShowAll();
            contextEntry.Changed += ContextChanged;

            commentBox = new Gtk.VBox(false, 3);
            Gtk.Label commentLabel = new Gtk.Label("Comment for Translators:");
            commentLabel.Xalign = 0.0f;
            commentBox.PackStart(commentLabel, false, false, 0);
            commentText = new TextBox(3);
            commentBox.PackStart(commentText, false, false, 0);
            commentBox.ShowAll();
            commentText.Changed += CommentChanged;
        }