Example #1
0
        private void SetupTrayIcon()
        {
            Logger.Debug("Creating TrayIcon");

            EventBox eb = new EventBox();

            appPixBuf = GetIcon("banter-22", 22);
            eb.Add(new Image(appPixBuf));
            //new Image(Gtk.Stock.DialogWarning, IconSize.Menu)); // using stock icon

            // hooking event
            eb.ButtonPressEvent += new ButtonPressEventHandler(this.OnImageClick);
            trayIcon             = new Egg.TrayIcon("RtcApplication");
            trayIcon.Add(eb);
            // showing the trayicon
            trayIcon.ShowAll();
        }
Example #2
0
        // create the tray icon
        public TrayIcon(Plugin plugin)
            : base()
        {
            this.plugin = plugin;

            int width, height;
            IconFactory factory = new IconFactory ();
            factory.LookupIconSize (IconSize.Menu, out width, out height);

            Gdk.Pixbuf icon = new Gdk.Pixbuf (null, "fuse-tray.png", width, height);
            this.Add (new Image (icon));
            this.ButtonPressEvent += tray_click;
            this.EnterNotifyEvent += mouse_enter;
            this.LeaveNotifyEvent += mouse_leave;

            timer.Elapsed += timer_count;

            tray = new Egg.TrayIcon ("Fuse");
        }
        public PreferencesDialog(MainWindow mainWindow)
        {
            //	this.userTorrentSettings = mainWindow.userTorrentSettings;
            this.userEngineSettings = mainWindow.userEngineSettings;
            this.prefSettings       = mainWindow.prefSettings;
            this.labels             = mainWindow.labels;
            this.filterListStore    = mainWindow.labelListStore;
            this.trayIcon           = mainWindow.TrayIcon;
            this.mainWindow         = mainWindow;

            Build();
            buildFoldersPanel();
            buildImportPanel();
            buildLabelPage();
            buildConnectionPage();
            restorePreferences();
            BuildGeneralPage();

            upnpCheckBox.Toggled += OnUpnpCheckBoxToggled;
        }
		public PreferencesDialog(MainWindow mainWindow)
		{
		//	this.userTorrentSettings = mainWindow.userTorrentSettings;
			this.userEngineSettings = mainWindow.userEngineSettings;
			this.prefSettings = mainWindow.prefSettings; 
			this.labels = mainWindow.labels;	
			this.filterListStore = mainWindow.labelListStore;
			this.trayIcon = mainWindow.TrayIcon;
			this.mainWindow = mainWindow;
			
			Build();
			buildFoldersPanel();
			buildImportPanel();
			buildLabelPage();
			buildConnectionPage();
			restorePreferences();
			BuildGeneralPage();
			
			upnpCheckBox.Toggled += OnUpnpCheckBoxToggled;
		}
Example #5
0
		private void BuildTray()
		{
			EventBox eventBox = new EventBox ();
			trayMenu = new Menu ();
			
			//Tooltips trayTip = new Tooltips();
			//trayTip.SetTip(eventBox, "MonoTorrent", null);
			//trayTip.Enable();
			
			quitItem = new ImageMenuItem ("Quit");
			quitItem.Image = new Image (Stock.Quit, IconSize.Menu);
			trayMenu.Append (quitItem);
			trayMenu.ShowAll ();
			
			quitItem.Activated += delegate(object sender, EventArgs args)
				{
					OnDeleteEvent (null,new DeleteEventArgs ());
				};
			
			eventBox.Add (new Image (Stock.GoDown, IconSize.Menu));
			eventBox.ButtonPressEvent += OnTrayClicked;
			trayIcon = new Egg.TrayIcon ("MonoTorrent");
			
			trayIcon.Add (eventBox);
			
			if(prefSettings.EnableTray)
				trayIcon.ShowAll ();
		}