Esempio n. 1
0
        void FillToolbar()
        {
            Toolbar toolbar = new Toolbar();

            toolbar.Orientation  = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            editimage              = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-dash-edit_active", 22));
            editbutton             = new ToggleToolButton();
            editbutton.IconWidget  = editimage;
            editbutton.Toggled    += HandleEditToggled;
            editbutton.TooltipText = Catalog.GetString("Edit dashboard");
            toolbar.Add(editbutton);
            toolbar.Add(new SeparatorToolItem());

            linksimage              = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-link-disabled", 22));
            linksbutton             = new ToggleToolButton();
            linksbutton.IconWidget  = linksimage;
            linksbutton.Toggled    += HandleLinksToggled;
            linksbutton.TooltipText = Catalog.GetString("Edit action links");
            toolbar.Add(linksbutton);
            toolbar.Add(new SeparatorToolItem());

            popupbutton             = new ToggleToolButton();
            popupbutton.IconWidget  = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-popup", 22));
            popupbutton.Active      = true;
            popupbutton.Toggled    += HandlePopupToggled;
            popupbutton.TooltipText = Catalog.GetString("Disable popup window");
            toolbar.Add(popupbutton);
            toolbar.Add(new SeparatorToolItem());

            fitbutton             = new RadioToolButton((GLib.SList)null);
            fitbutton.IconWidget  = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-dash-fit", 22));
            fitbutton.Toggled    += HandleFitModeToggled;
            fitbutton.TooltipText = Catalog.GetString("Fit dashboard");
            toolbar.Add(fitbutton);
            fillbutton             = new RadioToolButton(fitbutton);
            fillbutton.IconWidget  = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-dash-fill", 22));
            fillbutton.Toggled    += HandleFitModeToggled;
            fillbutton.TooltipText = Catalog.GetString("Fill dashboard");
            toolbar.Add(fillbutton);
            d11button             = new RadioToolButton(fitbutton);
            d11button.IconWidget  = new Gtk.Image(Helpers.Misc.LoadIcon("longomatch-dash-11", 22));
            d11button.Toggled    += HandleFitModeToggled;
            d11button.TooltipText = Catalog.GetString("1:1 dashboard");
            toolbar.Add(d11button);
            toolbar.ShowAll();
            hbox2.PackEnd(toolbar, false, false, 0);

            editbutton.Active  = true;
            linksbutton.Active = false;
        }
Esempio n. 2
0
        void FillToolbar()
        {
            Toolbar toolbar = new Toolbar ();
            toolbar.Orientation = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            editimage = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-edit_active", 22));
            editbutton = new ToggleToolButton ();
            editbutton.IconWidget = editimage;
            editbutton.Toggled += HandleEditToggled;
            editbutton.TooltipText = Catalog.GetString ("Edit dashboard");
            toolbar.Add (editbutton);
            toolbar.Add (new SeparatorToolItem ());

            linksimage = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-link-disabled", 22));
            linksbutton = new ToggleToolButton ();
            linksbutton.IconWidget = linksimage;
            linksbutton.Toggled += HandleLinksToggled;
            linksbutton.TooltipText = Catalog.GetString ("Edit action links");
            toolbar.Add (linksbutton);
            toolbar.Add (new SeparatorToolItem ());

            popupbutton = new ToggleToolButton ();
            popupbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-popup", 22));
            popupbutton.Active = true;
            popupbutton.Toggled += HandlePopupToggled;
            popupbutton.TooltipText = Catalog.GetString ("Disable popup window");
            toolbar.Add (popupbutton);
            toolbar.Add (new SeparatorToolItem ());

            fitbutton = new RadioToolButton ((GLib.SList)null);
            fitbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-fit", 22));
            fitbutton.Toggled += HandleFitModeToggled;
            fitbutton.TooltipText = Catalog.GetString ("Fit dashboard");
            toolbar.Add (fitbutton);
            fillbutton = new RadioToolButton (fitbutton);
            fillbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-fill", 22));
            fillbutton.Toggled += HandleFitModeToggled;
            fillbutton.TooltipText = Catalog.GetString ("Fill dashboard");
            toolbar.Add (fillbutton);
            d11button = new RadioToolButton (fitbutton);
            d11button.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-11", 22));
            d11button.Toggled += HandleFitModeToggled;
            d11button.TooltipText = Catalog.GetString ("1:1 dashboard");
            toolbar.Add (d11button);
            toolbar.ShowAll ();
            hbox2.PackEnd (toolbar, false, false, 0);

            editbutton.Active = true;
            linksbutton.Active = false;
        }