All pastes #164356 Raw Edit

Windkracht8

public cpp v1 · immutable
·published 2006-09-08 15:21 UTC
rendered paste body
Index: linux/mainwindow.cc===================================================================RCS file: /cvsroot/linuxdcpp/linuxdcpp/linux/mainwindow.cc,vretrieving revision 1.77diff -u -r1.77 mainwindow.cc--- linux/mainwindow.cc	1 Sep 2006 15:05:57 -0000	1.77+++ linux/mainwindow.cc	8 Sep 2006 15:19:55 -0000@@ -181,6 +181,7 @@ 	transferView.insertColumn("Filename", G_TYPE_STRING, TreeView::STRING, 200); 	transferView.insertColumn("Size", G_TYPE_STRING, TreeView::STRING, 175); 	transferView.insertColumn("Path", G_TYPE_STRING, TreeView::STRING, 200);+	transferView.insertColumn("Ip", G_TYPE_STRING, TreeView::STRING, 175); 	transferView.insertHiddenColumn("Icon", GDK_TYPE_PIXBUF); 	transferView.insertHiddenColumn("TransferItem", G_TYPE_POINTER); 	transferView.insertHiddenColumn("Progress", G_TYPE_INT);@@ -967,6 +968,8 @@  	if (item->isSet(TransferItem::MASK_PROGRESS) && item->progress >= 0 && item->progress <= 100) 		gtk_list_store_set(transferStore, &iter, transferView.col("Progress"), item->progress, -1);+	if (item->isSet(TransferItem::MASK_IP) && !item->ip.empty())+		gtk_list_store_set(transferStore, &iter, transferView.col("Ip"), item->ip.c_str(), -1); }  void MainWindow::removeTransfer_gui(TransferItem *item)@@ -1114,6 +1117,7 @@ 	item->setPath(Util::getFilePath(target)); 	item->setStatus("Download starting..."); 	item->setSize(dl->getSize());+	item->setIp(dl->getUserConnection()->getRemoteIp()); 	item->setSortOrder("d" + item->nicks + item->hubs);  	UFunc *func = new UFunc(this, &MainWindow::updateTransfer_gui, item);@@ -1208,6 +1212,7 @@ 	item->setPath(Util::getFilePath(target)); 	item->setStatus("Upload starting..."); 	item->setSize(ul->getSize());+	item->setIp(ul->getUserConnection()->getRemoteIp()); 	item->setSortOrder("u" + item->nicks + item->hubs);  	UFunc *func = new UFunc(this, &MainWindow::updateTransfer_gui, item);Index: linux/mainwindow.hh===================================================================RCS file: /cvsroot/linuxdcpp/linuxdcpp/linux/mainwindow.hh,vretrieving revision 1.41diff -u -r1.41 mainwindow.hh--- linux/mainwindow.hh	21 Aug 2006 15:52:37 -0000	1.41+++ linux/mainwindow.hh	8 Sep 2006 15:19:55 -0000@@ -157,6 +158,7 @@ 				MASK_SIZE = 1 << 5, 				MASK_SPEED = 1 << 6, 				MASK_PROGRESS = 1 << 7,+				MASK_IP = 1 << 8, 			} Mask;  			bool isSet(Mask m) { return updateMask & m; }@@ -174,6 +176,7 @@ 			void setSize(int64_t size) { this->size = size; updateMask |= MASK_SIZE; } 			void setSpeed(int64_t speed) { this->speed = speed; updateMask |= MASK_SPEED; } 			void setProgress(int progress) { this->progress = progress; updateMask |= MASK_PROGRESS; }+			void setIp(std::string ip) { this->ip = ip; updateMask |= MASK_IP; }  			u_int32_t updateMask; 			User::Ptr user;@@ -185,6 +188,7 @@ 			std::string hubs; 			std::string status; 			std::string time;+			std::string ip; 			std::string sortOrder; 			int64_t size; 			int64_t speed;