Exemple #1
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
        }
Exemple #2
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
		}