Beispiel #1
0
        private void BuildWidgets()
        {
            Spacing = 6;

            bpm_entry               = new SpinButton(0, 9999, 1);
            bpm_entry.MaxLength     = bpm_entry.WidthChars = 4;
            bpm_entry.Digits        = 0;
            bpm_entry.Numeric       = true;
            bpm_entry.ValueChanged += OnChanged;
            bpm_entry.Output       += OnOutput;
            Add(bpm_entry);

            if (detector != null)
            {
                detect_button          = new Button(Catalog.GetString("D_etect"));
                detect_button.Clicked += OnDetectClicked;
                Add(detect_button);
            }

            Image play = new Image();

            play.IconName = "media-playback-start";;
            play.IconSize = (int)IconSize.Menu;
            Button play_button = new Button(play);

            play_button.Clicked += OnPlayClicked;
            Add(play_button);

            Button tap_button = new Button(Catalog.GetString("T_ap"));

            tap_adapter             = new BpmTapAdapter(tap_button);
            tap_adapter.BpmChanged += OnTapBpmChanged;
            Add(tap_button);

            object tooltip_host = TooltipSetter.CreateHost();

            TooltipSetter.Set(tooltip_host, detect_button,
                              Catalog.GetString("Have Banshee attempt to auto-detect the BPM of this song"));

            TooltipSetter.Set(tooltip_host, play_button, Catalog.GetString("Play this song"));

            TooltipSetter.Set(tooltip_host, tap_button,
                              Catalog.GetString("Tap this button to the beat to set the BPM for this song manually"));

            ShowAll();
        }
Beispiel #2
0
        private void BuildWidgets ()
        {
            Spacing = 6;

            bpm_entry = new SpinButton (0, 9999, 1);
            bpm_entry.MaxLength = bpm_entry.WidthChars = 4;
            bpm_entry.Digits = 0;
            bpm_entry.Numeric = true;
            bpm_entry.ValueChanged += OnChanged;
            bpm_entry.Output += OnOutput;
            Add (bpm_entry);

            if (detector != null) {
                detect_button = new Button (Catalog.GetString ("D_etect"));
                detect_button.Clicked += OnDetectClicked;
                Add (detect_button);
            }

            Image play = new Image ();
            play.IconName = "media-playback-start";;
            play.IconSize = (int)IconSize.Menu;
            Button play_button = new Button (play);
            play_button.Clicked += OnPlayClicked;
            Add (play_button);

            Button tap_button = new Button (Catalog.GetString ("T_ap"));
            tap_adapter = new BpmTapAdapter (tap_button);
            tap_adapter.BpmChanged += OnTapBpmChanged;
            Add (tap_button);

            object tooltip_host = TooltipSetter.CreateHost ();

            TooltipSetter.Set (tooltip_host, detect_button,
                Catalog.GetString ("Have Banshee attempt to auto-detect the BPM of this song"));

            TooltipSetter.Set (tooltip_host, play_button, Catalog.GetString ("Play this song"));

            TooltipSetter.Set (tooltip_host, tap_button,
                Catalog.GetString ("Tap this button to the beat to set the BPM for this song manually"));

            ShowAll ();
        }