SHA256
1
0
forked from pool/ktorrent
Files
ktorrent/no-geoip-db.diff

38 lines
1.6 KiB
Diff

diff -u -r ktorrent-2.1beta1.orig/plugins/infowidget/Makefile.am ktorrent-2.1beta1/plugins/infowidget/Makefile.am
--- ktorrent-2.1beta1.orig/plugins/infowidget/Makefile.am 2006-11-25 13:49:50.000000000 +0100
+++ ktorrent-2.1beta1/plugins/infowidget/Makefile.am 2006-11-25 14:13:45.000000000 +0100
@@ -27,8 +27,4 @@
kde_services_DATA = ktinfowidgetplugin.desktop
kde_kcfg_DATA = ktinfowidgetplugin.kcfg
-
-ktdatadir = $(kde_datadir)/ktorrent/geoip
-
-SUBDIRS = geoip
KDE_CXXFLAGS = $(USE_EXCEPTIONS) $(USE_RTTI)
diff -u -r ktorrent-2.1beta1.orig/plugins/infowidget/peerview.cpp ktorrent-2.1beta1/plugins/infowidget/peerview.cpp
--- ktorrent/plugins/infowidget/peerview.cpp 2007/07/04 09:15:48 1.1
+++ ktorrent/plugins/infowidget/peerview.cpp 2007/07/04 09:17:59
@@ -53,7 +53,7 @@
static QPixmap lock_pix;
static FlagDB flagDB(22, 18);
static bool yes_no_pix_loaded = false;
- static bool geoip_db_exists = true;
+ static bool geoip_db_exists = false;
static QString geoip_data_file;
PeerViewItem::PeerViewItem(PeerView* pv,kt::PeerInterface* peer) : KListViewItem(pv),peer(peer)
@@ -67,10 +67,10 @@
yes_pix = iload->loadIcon("button_ok",KIcon::Small);
no_pix = iload->loadIcon("button_cancel",KIcon::Small);
lock_pix = iload->loadIcon("ktencrypted",KIcon::Small);
-#ifdef USE_SYSTEM_GEOIP
+#if 0
geo_ip = GeoIP_open_type(GEOIP_COUNTRY_EDITION, GEOIP_STANDARD);
geoip_db_exists = (geo_ip != NULL);
-#else
+
geoip_db_exists = !locate("data", "ktorrent/geoip/geoip.dat").isNull();
if(geoip_db_exists) {
geoip_data_file = "ktorrent/geoip/geoip.dat";