[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2214: Make the relay list sortable by country again. (This, boys a (in trunk: . src/vidalia/network)
Author: edmanm
Date: 2007-12-13 21:20:14 -0500 (Thu, 13 Dec 2007)
New Revision: 2214
Modified:
trunk/
trunk/src/vidalia/network/netviewer.cpp
trunk/src/vidalia/network/routerlistitem.cpp
trunk/src/vidalia/network/routerlistitem.h
Log:
r2299@lysithea: edmanm | 2007-12-13 21:20:08 -0500
Make the relay list sortable by country again. (This, boys and girls, is why
giant commits like r2184 are naughty.)
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2299] on 0108964c-5b0b-4c9e-969f-e2288315d100
Modified: trunk/src/vidalia/network/netviewer.cpp
===================================================================
--- trunk/src/vidalia/network/netviewer.cpp 2007-12-12 03:28:39 UTC (rev 2213)
+++ trunk/src/vidalia/network/netviewer.cpp 2007-12-14 02:20:14 UTC (rev 2214)
@@ -428,7 +428,7 @@
router = ui.treeRouterList->findRouterById(id);
if (router) {
/* Save the location information in the descriptor */
- router->setLocation(geoip.city(), geoip.country());
+ router->setLocation(geoip);
/* Plot the router on the map */
_map->addRouter(router->id(), geoip.latitude(), geoip.longitude());
}
Modified: trunk/src/vidalia/network/routerlistitem.cpp
===================================================================
--- trunk/src/vidalia/network/routerlistitem.cpp 2007-12-12 03:28:39 UTC (rev 2213)
+++ trunk/src/vidalia/network/routerlistitem.cpp 2007-12-14 02:20:14 UTC (rev 2214)
@@ -102,16 +102,17 @@
/** Sets the location information for this item's router descriptor. */
void
-RouterListItem::setLocation(const QString &city, const QString &country)
+RouterListItem::setLocation(const GeoIp &geoip)
{
- QPixmap flag(":/images/flags/" + country.toLower() + ".png");
+ QPixmap flag(":/images/flags/" + geoip.country().toLower() + ".png");
if (!flag.isNull()) {
setIcon(COUNTRY_COLUMN, QIcon(flag));
}
- setToolTip(COUNTRY_COLUMN, city + "," + country);
+ setToolTip(COUNTRY_COLUMN, geoip.toLocation());
if (_rd)
- _rd->setLocation(city + "," + country);
+ _rd->setLocation(geoip.toLocation());
+ _country = geoip.country();
}
/** Overload the comparison operator. */
Modified: trunk/src/vidalia/network/routerlistitem.h
===================================================================
--- trunk/src/vidalia/network/routerlistitem.h 2007-12-12 03:28:39 UTC (rev 2213)
+++ trunk/src/vidalia/network/routerlistitem.h 2007-12-14 02:20:14 UTC (rev 2214)
@@ -33,6 +33,7 @@
#include <QString>
#include <routerdescriptor.h>
+#include "geoip.h"
#include "routerlistwidget.h"
class RouterListWidget;
@@ -57,7 +58,7 @@
/** Returns the descriptor for this router. */
RouterDescriptor descriptor() const { return *_rd; }
/** Sets the location information for this router item. */
- void setLocation(const QString &city, const QString& country);
+ void setLocation(const GeoIp &geoip);
/** Overload the comparison operator. */
virtual bool operator<(const QTreeWidgetItem &other) const;