void IPadContent.Initialize (IPadWindow window)
		{
			toolbar = window.GetToolbar (PositionType.Top);
			toolbar.Add (switcherCombo);
			toolbar.ShowAll ();
			switcherCombo.Changed += new EventHandler (OnContentSwitched);
			OnContentSwitched (null, null);
			
			separator = new VSeparator ();
		}
Пример #2
0
		void InitializeSortingWidgets (IPadWindow window)
		{
			groupToggleButton = new ToggleButton ();
			groupToggleButton.Image = new Image (ImageService.GetPixbuf ("md-design-categorise", IconSize.Menu));
			groupToggleButton.Toggled += new EventHandler (OnButtonGroupClicked);
			groupToggleButton.TooltipText = GettextCatalog.GetString ("Group entries by type");

			sortAlphabeticallyToggleButton = new ToggleButton ();
			sortAlphabeticallyToggleButton.Image = new Image (Gtk.Stock.SortAscending, IconSize.Menu);
			sortAlphabeticallyToggleButton.Toggled += new EventHandler (OnButtonSortAlphabeticallyClicked);
			sortAlphabeticallyToggleButton.TooltipText = GettextCatalog.GetString ("Sort entries alphabetically");

			preferencesButton = new DockToolButton (Gtk.Stock.Preferences);
			preferencesButton.Image = new Image (Gtk.Stock.Preferences, IconSize.Menu);
			preferencesButton.Clicked += new EventHandler (OnButtonPreferencesClicked);
			preferencesButton.TooltipText = GettextCatalog.GetString ("Open preferences dialog");

			separator = new VSeparator ();

			toolbar = window.GetToolbar (PositionType.Top);
			toolbar.Add (groupToggleButton);
			toolbar.Add (sortAlphabeticallyToggleButton);
			toolbar.Add (separator);
			toolbar.Add (preferencesButton);
			toolbar.ShowAll ();

			toolbar.Visible = false;
		}