static void StartTrayIcon()
        {
            if (TomboyIndicatorTray.IndicatorTrayPresent)
            {
                indicator = new TomboyIndicatorTray(manager);
            }
            else
            {
                // Create the tray icon and run the main loop
                tray_icon = new TomboyTrayIcon(manager);
                tray      = tray_icon.Tray;
            }

            StartMainLoop();
        }
Пример #2
0
		static void StartTrayIcon ()
		{
			// Create the tray icon and run the main loop
			tray_icon = new TomboyTrayIcon (manager);
			tray = tray_icon.Tray;
			StartMainLoop ();
		}
Пример #3
0
		public TomboyPanelAppletEventBox (NoteManager manager)
: base ()
		{
			this.manager = manager;
			tray = new TomboyTray (manager, this);

			// Load a 16x16-sized icon to ensure we don't end up with a
			// 1x1 pixel.
			panel_size = 16;
			// Load Icon to display in the panel.
			// First we try the "tomboy-panel" icon. This icon can be replaced
			// by the user's icon theme. If the theme does not have this icon
			// then we fall back to the Tomboy Menu icon named "tomboy".
			var icon = GuiUtils.GetIcon ("tomboy-panel", panel_size) ??
				GuiUtils.GetIcon ("tomboy", panel_size);
			this.image = new Gtk.Image (icon);

			this.CanFocus = true;
			this.ButtonPressEvent += ButtonPress;
			this.Add (image);
			this.ShowAll ();

			string tip_text = TomboyTrayUtils.GetToolTipText ();

			tips = new Gtk.Tooltips ();
			tips.SetTip (this, tip_text, null);
			tips.Enable ();
			tips.Sink ();

			SetupDragAndDrop ();
		}
Пример #4
0
		public static void UpdateTomboyTrayMenu (TomboyTray tray, Gtk.Widget parent)
		{
			if (!tray.IsMenuAdded) {
				if (parent != null)
					tray.TomboyTrayMenu.AttachToWidget (parent, GuiUtils.DetachMenu);
				tray.IsMenuAdded = true;
			}

			tray.AddRecentlyChangedNotes ();

			tray.TomboyTrayMenu.ShowAll ();
		}
Пример #5
0
		public TomboyTrayIcon (NoteManager manager)
		{
			tray = new TomboyTray (manager, this);
			keybinder = new TomboyPrefsKeybinder (manager, this);
			int panel_size = 22;
			// Load Icon to display in the notification area.
			// First we try the "tomboy-panel" icon. This icon can be replaced
			// by the user's icon theme. If the theme does not have this icon
			// then we fall back to the Tomboy Menu icon named "tomboy".
			Pixbuf = GuiUtils.GetIcon ("tomboy-panel", panel_size) ??
				GuiUtils.GetIcon ("tomboy", panel_size);

			Tooltip = TomboyTrayUtils.GetToolTipText ();

			Visible = (bool) Preferences.Get (Preferences.ENABLE_TRAY_ICON);
			Preferences.SettingChanged += (o, args) => {
				if (args.Key == Preferences.ENABLE_TRAY_ICON)
					Visible = (bool) args.Value;
			};

			Tomboy.ExitingEvent += OnExit;
#if MAC
			Visible = false;
#endif
		}