Example #1
0
        public BestTray(BestWindow bw, bool autostarted)
        {
            this.autostarted = autostarted;

            Raw = egg_tray_icon_new("Search");

            win              = bw;
            win.DeleteEvent += new DeleteEventHandler(WindowDeleteEvent);

            eventbox                   = new Gtk.EventBox();
            eventbox.CanFocus          = true;
            eventbox.ButtonPressEvent += new ButtonPressEventHandler(ButtonPress);

            Gdk.Pixbuf smalldog = Images.GetPixbuf("best.png");
            eventbox.Add(new Gtk.Image(smalldog.ScaleSimple(24, 24, Gdk.InterpType.Hyper)));

            KeyBinding binding = Conf.Searching.ShowSearchWindowBinding;

            string tooltip = String.Format("Beagle Search ({0})", binding.ToReadableString());

            tips = new Gtk.Tooltips();
            tips.SetTip(eventbox, tooltip, null);
            tips.Enable();

            Add(eventbox);
            eventbox.ShowAll();

            keybinder = new Beagle.Util.XKeybinder();
            keybinder.Bind(binding.ToString(),
                           new EventHandler(ShowBeaglePressed));
        }
Example #2
0
		public Search (bool icon_enabled, bool docs_enabled)
		{
			this.icon_enabled = icon_enabled;
			this.docs_enabled = docs_enabled;

			if (icon_enabled) {
				icon_window = new SearchWindow (this);
				icon_window.QueryEvent += OnQueryEvent;

				tray = new TrayIcon ();
				tray.Clicked += OnTrayActivated;
				tray.Search += OnTraySearch;
				tray.Quit += OnTrayQuit;

				Config config = Conf.Get (Conf.Names.BeagleSearchConfig);
				keybinder = new XKeybinder ();
				SetKeyBindings (config);

				Inotify.Start ();
				Conf.WatchForUpdates();
				Conf.Subscribe (Conf.Names.BeagleSearchConfig, OnConfigurationChanged);
			}
		}
Example #3
0
		public BestTray (BestWindow bw, bool autostarted)
		{
			this.autostarted = autostarted;

			Raw = egg_tray_icon_new ("Search");

			win = bw;
			win.DeleteEvent += new DeleteEventHandler (WindowDeleteEvent);
						
			eventbox = new Gtk.EventBox ();
			eventbox.CanFocus = true;
			eventbox.ButtonPressEvent += new ButtonPressEventHandler (ButtonPress);
			
			Gdk.Pixbuf smalldog = Images.GetPixbuf ("best.png");
			eventbox.Add (new Gtk.Image (smalldog.ScaleSimple (24, 24, Gdk.InterpType.Hyper)));

			KeyBinding binding = Conf.Searching.ShowSearchWindowBinding;

			string tooltip = String.Format ("Beagle Search ({0})", binding.ToReadableString ());
			tips = new Gtk.Tooltips ();
			tips.SetTip (eventbox, tooltip, null);
			tips.Enable ();
			
			Add (eventbox);
			eventbox.ShowAll ();

			keybinder = new Beagle.Util.XKeybinder ();
			keybinder.Bind (binding.ToString (),
					new EventHandler (ShowBeaglePressed));
		}