示例#1
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();
        }
示例#2
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 ();
		}