Esempio n. 1
0
 public TUploads(Gtk.TreeView tvUploads, CInterfaceGateway in_krnGateway)
 {
     krnGateway = in_krnGateway;
     Gtk.TreeViewColumn tvc = new TreeViewColumn ("Name",new CellRendererText(),"text",0);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 0;
     tvc = new TreeViewColumn ("File name",new CellRendererText(),"text",1);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 1;
     tvc = new TreeViewColumn ("Speed",new CellRendererText(),"text",2);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 2;
     tvc = new TreeViewColumn ("Position",new CellRendererText(),"text",3);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 3;
     tvc = new TreeViewColumn ("Downloaded",new CellRendererText(),"text",4);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 4;
     tvc = new TreeViewColumn ("Uploaded",new CellRendererText(),"text",5);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 5;
     tvc = new TreeViewColumn ("Progress",new CellRendererText(),"text",6);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 6;
     tvc = new TreeViewColumn ("Software",new CellRendererText(),"text",7);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 7;
     tvc = new TreeViewColumn ("Version",new CellRendererText(),"text",8);
     tvUploads.AppendColumn (tvc);
     tvc.SortColumnId = 8;
 }
Esempio n. 2
0
 public TComments(Gtk.TreeView tvComments, CInterfaceGateway in_krnGateway)
 {
     krnGateway = in_krnGateway;
     Gtk.TreeViewColumn tvc = new TreeViewColumn ("Name", new CellRendererText(),"text",0);
     tvComments.AppendColumn (tvc);
     tvc.SortColumnId = 0;
     tvc = new TreeViewColumn ("Rating", new CellRendererText(),"text",1);
     tvComments.AppendColumn (tvc);
     tvc.SortColumnId = 1;
     tvc = new TreeViewColumn ("Comment", new CellRendererText(),"text",2);
     tvComments.AppendColumn (tvc);
     tvc.SortColumnId = 2;
 }
Esempio n. 3
0
 public TSearch(CInterfaceGateway in_krnGateway,Glade.XML gxml)
 {
     krnGateway = in_krnGateway;
     progressbar = (gxml.GetWidget("progressbar") as ProgressBar);
     btnBeginSearch = (gxml.GetWidget("btnBeginSearch") as Button);
     btnStopSearch = (gxml.GetWidget("btnStopSearch") as Button);
     txtSearch = (gxml.GetWidget("txtSearch") as Entry);
     tvSearch = (gxml.GetWidget("tvSearch") as TreeView);
     m_SearchCount = 0;
     CreateColumns();
     CreatePopupMenu();
     AddEvents();
 }
Esempio n. 4
0
 public TIcon(CInterfaceGateway in_krnGateway, Gtk.Window mwindow)
 {
     krnGateway = in_krnGateway;
     mainwindow = mwindow;
     menu = new Gtk.Menu ();
     EventBox eb = new EventBox ();
     eb.ButtonPressEvent += new ButtonPressEventHandler (TIconClicked);
     eb.Add (new Gtk.Image (new Gdk.Pixbuf (null, "lPhant.png")));
     MenuItem it_show = new MenuItem ("Show");
     it_show.Activated += new EventHandler (TIconShow);
     MenuItem it_options = new MenuItem ("Options");
     it_options.Activated += new EventHandler (TIconOptions);
     ImageMenuItem it_quit = new ImageMenuItem("Quit");
     it_quit.Activated += new EventHandler (TIconQuit);
     menu.Append (it_show);
     menu.Append (it_options);
     menu.Append (it_quit);
     t = new TrayIcon ("HathiGTK");
     t.Add (eb);
     t.ShowAll ();
 }
Esempio n. 5
0
 public TDownloads(Gtk.TreeView tvDownloads, CInterfaceGateway in_krnGateway)
 {
     krnGateway = in_krnGateway;
     Gtk.TreeViewColumn tvc = new TreeViewColumn ("File name",new CellRendererText(),"text",0);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 0;
     tvc = new TreeViewColumn ("Size",new CellRendererText(),"text",1);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 1;
     tvc = new TreeViewColumn ("Speed",new CellRendererText(),"text",2);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 2;
     tvc = new TreeViewColumn ("Completed",new CellRendererText(),"text",3);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 3;
     tvc = new TreeViewColumn ("Remaining",new CellRendererText(),"text",4);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 4;
     tvc = new TreeViewColumn ("Sources",new CellRendererText(),"text",5);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 5;
     tvc = new TreeViewColumn ("Useful S.",new CellRendererText(),"text",6);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 6;
     tvc = new TreeViewColumn ("Transfer",new CellRendererText(),"text",7);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 7;
     tvc = new TreeViewColumn ("Status",new CellRendererText(),"text",8);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 8;
     tvc = new TreeViewColumn ("Progress",new CellRendererText(),"text",9);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 9;
     tvc = new TreeViewColumn ("Priority",new CellRendererText(),"text",10);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 10;
     tvc = new TreeViewColumn ("Estimated",new CellRendererText(),"text",11);
     tvDownloads.AppendColumn (tvc);
     tvc.SortColumnId = 11;
 }
Esempio n. 6
0
 public TSharedFiles(Gtk.TreeView tv, CInterfaceGateway in_krnGateway)
 {
     tvSharedFiles = tv;
     krnGateway = in_krnGateway;
     store = new TreeStore (typeof (string), typeof (string), typeof (string),
                        typeof (string));
     tvSharedFiles.Model = store;
     Gtk.TreeViewColumn tvc = new TreeViewColumn ("File name", new CellRendererText(),"text",0);
     tvSharedFiles.AppendColumn (tvc);
     tvc.SortColumnId = 0;
     tvc = new TreeViewColumn ("Size", new CellRendererText(),"text",1);
     tvSharedFiles.AppendColumn (tvc);
     tvc.SortColumnId = 1;
     tvc = new TreeViewColumn ("Priority", new CellRendererText(),"text",2);
     tvSharedFiles.AppendColumn (tvc);
     tvc.SortColumnId = 2;
     tvc = new TreeViewColumn ("Progress", new CellRendererText(),"text",3);
     tvSharedFiles.AppendColumn (tvc);
     tvc.SortColumnId = 3;
     loadSharedFiles();
     //krnGateway.OnNewSharedFile+=new FileEvent(prueba);
 }
Esempio n. 7
0
 public OptionsDialog(CInterfaceGateway in_krnGateway)
 {
     Glade.XML gxml = new Glade.XML (null, "elephant.glade", "dlgOptions", null);
     gxml.Autoconnect (this);
     krnGateway=in_krnGateway;
     stSharedFolders = new TreeStore (typeof (string));
     tvSharedFolders.Model = stSharedFolders;
     Gtk.TreeViewColumn tvc = new TreeViewColumn ("Path", new CellRendererText (), "text", 0);
     tvSharedFolders.AppendColumn(tvc);
     stTempFolders = new TreeStore (typeof (string));
     tvTempFolders.Model = stTempFolders;
     tvc = new TreeViewColumn ("Path", new CellRendererText (), "text", 0);
     tvTempFolders.AppendColumn(tvc);
 }
Esempio n. 8
0
 public HathiGTK(string[] args)
 {
     Application.Init();
     gxml = new Glade.XML (null, "elephant.glade", "mainwindow", null);
     gxml.Autoconnect (this);
     HathiKernel=new CKernel(); //creates and starts the kernel
     krnGateway=CKernel.InterfaceGateway[0]; //gateway to talk with the kernel
     InitInterface();
     //preferences = new Config(CKernel.DllDirectory, "configInterface.xml", "0.01", "HathiInterface");
     //m_Preferences=krnGateway.GetConfig(); //do I need it?
     mainwindow.Title = "HathiGTK " + CKernel.Version.ToString();
     mainwindow.Show();
     Application.Run();
 }