diff options
Diffstat (limited to 'src/torkview.cpp')
-rw-r--r-- | src/torkview.cpp | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/src/torkview.cpp b/src/torkview.cpp index c7a0d50..e03fe92 100644 --- a/src/torkview.cpp +++ b/src/torkview.cpp @@ -19,14 +19,40 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <tqregexp.h> +#include <tqsplitter.h> +#include <tqgroupbox.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqlistview.h> + +#include <kdebug.h> +#include <kstandarddirs.h> +#include <kiconloader.h> +#include <kmimetype.h> +#include <ksystemtray.h> +#include <kprocio.h> +#include <tdemessagebox.h> +#include <krun.h> +#include <kurl.h> +#include <tdeio/netaccess.h> +#include <tdelocale.h> + #include <sys/time.h> +/* Linux-specific includes */ +#include <dirent.h> +#include <unistd.h> + #include "torkview.h" #include "tork.h" #include "torclient.h" -#include <tdelocale.h> -#include <ntqlabel.h> -#include <ntqlistview.h> #include "dndlistview.h" #include "portsandicons.h" #include "torkconfig.h" @@ -34,40 +60,16 @@ #include "functions.h" #include "mixminion.h" #include "crypto.h" - #include "hitwidget.h" #include "kwidgetlistbox.h" #include "kerrylabel.h" - -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#ifdef EXTERNAL_GEOIP # include <GeoIP.h> +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif -#include "kdebug.h" -#include <kstandarddirs.h> -#include <kiconloader.h> -#include <kmimetype.h> -#include <ksystemtray.h> -#include <kprocio.h> -#include <tdemessagebox.h> -#include <krun.h> -#include <kurl.h> -#include <tdeio/netaccess.h> - -#include <ntqregexp.h> -#include <ntqsplitter.h> -#include <ntqgroupbox.h> -#include <ntqfile.h> -#include <ntqdir.h> -#include <ntqpixmap.h> -/* Linux-specific includes */ -#include <dirent.h> -#include <unistd.h> -#include "../config.h" - using namespace tk; @@ -80,15 +82,15 @@ torkView::torkView(TQWidget *parent) : torkview_base(parent), m_pop(0L), m_tormon(TorkConfig::showTorMon()), torbtx(0), torbrx(0) { -#ifndef EXTERNAL_GEOIP - geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); -#else +#ifdef EXTERNAL_GEOIP GeoIP * gi = 0; gi = GeoIP_new(GEOIP_STANDARD); if (gi) geoip_db = true; else geoip_db = false; +#else + geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); #endif greenonion << "green" << "up" << "built" << "good" << "connected" << "succeeded"; @@ -1324,10 +1326,10 @@ void torkView::serverStatusUpdated(const TQString &ip,const TQString &fp, int country_id = 0; GeoIP * gi = 0; if (geoip_db) -#ifndef EXTERNAL_GEOIP - gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); -#else +#ifdef EXTERNAL_GEOIP gi = GeoIP_new(GEOIP_STANDARD); +#else + gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); #endif if (gi){ |