summaryrefslogtreecommitdiffstats
path: root/src/tork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tork.cpp')
-rw-r--r--src/tork.cpp306
1 files changed, 153 insertions, 153 deletions
diff --git a/src/tork.cpp b/src/tork.cpp
index 00a5a47..2c56e0a 100644
--- a/src/tork.cpp
+++ b/src/tork.cpp
@@ -27,39 +27,39 @@
#include <ntqtimer.h>
#include <ntqgroupbox.h>
-#include <kconfigdialog.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeconfigdialog.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <kiconloader.h>
-#include <kdeversion.h>
-#include <kmenubar.h>
+#include <tdeversion.h>
+#include <tdemenubar.h>
#include <kstatusbar.h>
#include <kkeydialog.h>
#include <ksqueezedtextlabel.h>
#include <kedittoolbar.h>
-#include <ktoolbarbutton.h>
+#include <tdetoolbarbutton.h>
#include <krun.h>
-#include <kstdaccel.h>
-#include <kaction.h>
+#include <tdestdaccel.h>
+#include <tdeaction.h>
#include <kstdaction.h>
-#include <kpopupmenu.h>
+#include <tdepopupmenu.h>
#include <kprocio.h>
-#include <kmessagebox.h>
+#include <tdemessagebox.h>
#include <dcopref.h>
-#include <kconfig.h>
-#include <kmessagebox.h>
-#include <klocale.h>
+#include <tdeconfig.h>
+#include <tdemessagebox.h>
+#include <tdelocale.h>
#include <kpassivepopup.h>
-#include <kio/netaccess.h>
-#include <khtml_part.h>
+#include <tdeio/netaccess.h>
+#include <tdehtml_part.h>
#include <dom/html_misc.h>
#include <kurl.h>
-#include <khtmlview.h>
+#include <tdehtmlview.h>
#include <kstandarddirs.h>
#include <ktip.h>
-#include <kwin.h>
+#include <twin.h>
#include <knotifyclient.h>
-#include <klistviewsearchline.h>
+#include <tdelistviewsearchline.h>
#include <ntqtooltip.h>
#include <ntqlabel.h>
@@ -69,7 +69,7 @@
#include <ntqhostaddress.h>
#include <dcopref.h>
#include <dcopclient.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
#ifndef EXTERNAL_GEOIP
# include "GeoIP-1.4.0/libGeoIP/GeoIP.h"
@@ -96,7 +96,7 @@
#include "../config.h"
-tork *kmain = 0L;
+tork *tdemain = 0L;
using namespace tk;
@@ -117,7 +117,7 @@ TQValueVector<TQString> countryType(256);
tork::tork()
: DCOPObject( "DCOPTork" ),
- KMainWindow( 0, "TorK" ),
+ TDEMainWindow( 0, "TorK" ),
m_view(new torkView(this)),
m_printer(0),
m_servererrornag(true),
@@ -142,7 +142,7 @@ tork::tork()
kapp->dcopClient()->setDefaultObject( objId() );
// }
- kmain = this;
+ tdemain = this;
client = 0L;
childproc = 0L;
privoxyproc = 0L;
@@ -215,7 +215,7 @@ tork::tork()
// Comment the following line once you are sure all your windows have a name:
likeBack->setWindowNamesListing(LikeBack::WarnUnnamedWindows);
- // This line should be called early in your KMainWindow constructor because it references actionCollection().
+ // This line should be called early in your TDEMainWindow constructor because it references actionCollection().
// It should be called before createGUI() for the action to be plugged in the Help menu:
likeBack->sendACommentAction(actionCollection());
@@ -236,7 +236,7 @@ tork::tork()
//currentChanged(0);
//applySettings(false);
- // tell the KMainWindow that this is indeed the main widget
+ // tell the TDEMainWindow that this is indeed the main widget
setCentralWidget(m_view);
setStandardToolBarMenuEnabled(true);
@@ -323,10 +323,10 @@ tork::tork()
showTipOnStart();
turnOffKDE();
- if ((KApplication::kApplication()->isRestored()))
+ if ((TDEApplication::kApplication()->isRestored()))
startEverything();
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if( args->isSet( "toggleKDE" ) ){
startEverything();
enableKDE(true);
@@ -386,11 +386,11 @@ tork::tork()
toolBar("TorToolBar")->toggleButton(toolBar("TorToolBar")->idAt(2));
toolBar("MoreToolBar")->show();
}else{
- toolBar("TorToolBar")->setIconText( KToolBar::IconTextRight, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconTextRight, false );
m_ModeButton->plug( toolBar("TorToolBar") );
toolBar("TorToolBar")->setToggle(toolBar("TorToolBar")->idAt(2),true);
toolBar("MoreToolBar")->hide();
- toolBar("TorToolBar")->setIconText( KToolBar::IconOnly, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconOnly, false );
}
}
@@ -411,7 +411,7 @@ void tork::prepareToShut()
client = 0L;
}
- KConfig* config = new KConfig("kioslaverc", false, false);
+ TDEConfig* config = new TDEConfig("tdeioslaverc", false, false);
config->setGroup( "Proxy Settings" );
config->writeEntry( "httpProxy", TorkConfig::originalHttpProxy() );
config->writeEntry( "httpsProxy", TorkConfig::originalHttpsProxy() );
@@ -421,7 +421,7 @@ void tork::prepareToShut()
//delete config;
// Inform all running io-slaves about the changes...
// if we cannot update, ioslaves inform the end user...
- if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
+ if (!DCOPRef("*", "TDEIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
{
TQString caption = i18n("Update Failed");
TQString message = i18n("You have to restart the running applications "
@@ -457,7 +457,7 @@ void tork::prepareToShut()
privoxytest = 0L;
}
- m_view->m_osd->saveSettings(KGlobal::config());
+ m_view->m_osd->saveSettings(TDEGlobal::config());
TorkConfig::writeConfig();
@@ -480,14 +480,14 @@ void tork::shuttingDown()
if (m_DNSTorified){
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("<b>You are now in "
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("<b>You are now in "
"FailSafe Mode</b>. <br> You need to be in Normal Mode before "
"you can close TorK."));
return;
}
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", "TorK Has Closed And Returned "
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", "TorK Has Closed And Returned "
"KDE To Its Non-Anonymous State! Goodbye!");
prepareToShut();
@@ -502,42 +502,42 @@ void tork::setupActions()
_tray = new TrayIcon(this);
_tray->setPixmap(KSystemTray::loadIcon("tork_pressplay"));
connect(_tray,SIGNAL(quitSelected()),SLOT(shuttingDown()));
- KPopupMenu *conf_menu = _tray->contextMenu();
- torkConfigure = new KAction(i18n("&Configure TorK"), "configure", 0,
+ TDEPopupMenu *conf_menu = _tray->contextMenu();
+ torkConfigure = new TDEAction(i18n("&Configure TorK"), "configure", 0,
this, SLOT(optionsPreferences()),actionCollection(),"configure_tor");
- torkStart = new KAction(i18n("Connect To Tor"), "tork_play", 0,this,
+ torkStart = new TDEAction(i18n("Connect To Tor"), "tork_play", 0,this,
SLOT(startEverything()),actionCollection(),"start_tor");
- torkStop = new KAction(i18n("Disconnect From Tor"),"tork_stop", 0,this,
+ torkStop = new TDEAction(i18n("Disconnect From Tor"),"tork_stop", 0,this,
SLOT(stopTorGracefully()),actionCollection(),"stop_tor");
- enableKonqi = new KAction(i18n("Enable/Disable Konqueror's use of Tor"),"konqueror", 0,this,
+ enableKonqi = new TDEAction(i18n("Enable/Disable Konqueror's use of Tor"),"konqueror", 0,this,
SLOT(toggleKDESetting()),actionCollection(),"enable_konqi");
- enableTormon = new KAction(i18n("Toggle Tor Traffic OSD"),"tork_konsole", 0,this,
+ enableTormon = new TDEAction(i18n("Toggle Tor Traffic OSD"),"tork_konsole", 0,this,
SLOT(toggleTorMon()),actionCollection(),"enable_tormon");
- browseHiddenServices = new KAction(i18n("Browse Hidden Services"),"tork_tor", 0,this,
+ browseHiddenServices = new TDEAction(i18n("Browse Hidden Services"),"tork_tor", 0,this,
SLOT(hiddenServices()),actionCollection(),"hidden_services");
- browseNetworkList = new KAction(i18n("Browse Tor Network Status"),"info", 0,this,
+ browseNetworkList = new TDEAction(i18n("Browse Tor Network Status"),"info", 0,this,
SLOT(networkList()),actionCollection(),"network_list");
#ifndef LIVECD
- torkUpdateTork = new KAction(i18n("Download Tork"), "tork_green", 0,this,
+ torkUpdateTork = new TDEAction(i18n("Download Tork"), "tork_green", 0,this,
SLOT(updateTork()),actionCollection(),"update_tork");
- torkUpdateStable = new KAction(i18n("Download Tor (Stable Version)"), "tork_tor", 0,this,
+ torkUpdateStable = new TDEAction(i18n("Download Tor (Stable Version)"), "tork_tor", 0,this,
SLOT(updateTorStable()),actionCollection(),"update_torstable");
- torkUpdateUnstable = new KAction(i18n("Download Tor (Experimental Version)"), "tork_tor", 0,this,
+ torkUpdateUnstable = new TDEAction(i18n("Download Tor (Experimental Version)"), "tork_tor", 0,this,
SLOT(updateTorUnstable()),actionCollection(),"update_torunstable");
- torkUpdatePrivoxy = new KAction(i18n("Download Privoxy (Proxy)"), "proxy", 0,this,
+ torkUpdatePrivoxy = new TDEAction(i18n("Download Privoxy (Proxy)"), "proxy", 0,this,
SLOT(updatePrivoxy()),actionCollection(),"update_privoxy");
#endif
- torkFirstRunWizard = new KAction(i18n("First Run Wizard"), "wizard", 0,this,
+ torkFirstRunWizard = new TDEAction(i18n("First Run Wizard"), "wizard", 0,this,
SLOT(runWizard()),actionCollection(),"firstrun_wizard");
- toggleTorbar = new KAction(i18n("Toggle Tor Bar"), "tork_tor", 0,this,
+ toggleTorbar = new TDEAction(i18n("Toggle Tor Bar"), "tork_tor", 0,this,
SLOT(toggleTorBar()),actionCollection(),"toggle_torbar");
connect(m_view->TorkTabs,SIGNAL(currentChanged( TQWidget* )),SLOT(currentTabChanged( TQWidget* )));
//Servers Filter
- m_ServerFilterButton = new KActionMenu( i18n( "Servers" ), "filter", actionCollection() );
+ m_ServerFilterButton = new TDEActionMenu( i18n( "Servers" ), "filter", actionCollection() );
m_ServerFilterButton->setDelayed( false );
m_ServerFilterMenu = m_ServerFilterButton->popupMenu();
m_ServerFilterMenu->insertItem( i18n( "All" ), this, SLOT( filterServers( int ) ), 0, 0 );
@@ -558,17 +558,17 @@ void tork::setupActions()
m_ServerFilterMenu->setItemChecked( 0, true );
- m_CountryMenu = new KPopupMenu( this );
+ m_CountryMenu = new TDEPopupMenu( this );
m_ServerFilterMenu->insertItem( i18n( "Show Countries" ), m_CountryMenu );
- m_CountryMenuEU = new KPopupMenu( this );
- m_CountryMenuAF = new KPopupMenu( this );
- m_CountryMenuAS = new KPopupMenu( this );
- m_CountryMenuNA = new KPopupMenu( this );
- m_CountryMenuAN = new KPopupMenu( this );
- m_CountryMenuSA = new KPopupMenu( this );
- m_CountryMenuNN = new KPopupMenu( this );
- m_CountryMenuOC = new KPopupMenu( this );
+ m_CountryMenuEU = new TDEPopupMenu( this );
+ m_CountryMenuAF = new TDEPopupMenu( this );
+ m_CountryMenuAS = new TDEPopupMenu( this );
+ m_CountryMenuNA = new TDEPopupMenu( this );
+ m_CountryMenuAN = new TDEPopupMenu( this );
+ m_CountryMenuSA = new TDEPopupMenu( this );
+ m_CountryMenuNN = new TDEPopupMenu( this );
+ m_CountryMenuOC = new TDEPopupMenu( this );
continentMapList["EU"] = m_CountryMenuEU;
continentMapList["AF"] = m_CountryMenuAF;
@@ -599,7 +599,7 @@ void tork::setupActions()
m_view->serverFilter->setHidden(true);
// Launch Filter
- m_LaunchMenuButton = new KActionMenu( i18n( "Launch" ), "tork_tor", actionCollection() );
+ m_LaunchMenuButton = new TDEActionMenu( i18n( "Launch" ), "tork_tor", actionCollection() );
m_LaunchMenuButton->setDelayed( false );
m_LaunchMenu = m_LaunchMenuButton->popupMenu();
m_LaunchMenu->insertItem( SmallIcon("tork_mail"), i18n( "Anonymous Email" ), m_view,
@@ -627,7 +627,7 @@ void tork::setupActions()
this,SLOT( torkify( int )), 0, 4 );
// Log Filter
- m_LogFilterButton = new KActionMenu( i18n( "Tor Log" ), "filter", actionCollection() );
+ m_LogFilterButton = new TDEActionMenu( i18n( "Tor Log" ), "filter", actionCollection() );
m_LogFilterButton->setDelayed( false );
m_LogFilterMenu = m_LogFilterButton->popupMenu();
m_LogFilterMenu->insertItem( i18n( "All" ), this, SLOT( filterLog( int ) ), 0, 0 );
@@ -638,11 +638,11 @@ void tork::setupActions()
m_LogFilterMenu->setItemChecked( 0, true );
// Traffic Filter
- m_TrafficFilterButton = new KActionMenu( i18n( "Traffic" ), "filter", actionCollection() );
+ m_TrafficFilterButton = new TDEActionMenu( i18n( "Traffic" ), "filter", actionCollection() );
m_TrafficFilterButton->setDelayed( false );
m_TrafficFilterMenu = m_TrafficFilterButton->popupMenu();
- m_TorTrafficFilterMenu = new KPopupMenu( this );
- m_NonTorTrafficFilterMenu = new KPopupMenu( this );
+ m_TorTrafficFilterMenu = new TDEPopupMenu( this );
+ m_NonTorTrafficFilterMenu = new TDEPopupMenu( this );
m_TrafficFilterMenu->insertItem( i18n( "Tor Traffic" ), m_TorTrafficFilterMenu );
m_TrafficFilterMenu->insertItem( i18n( "Non-Tor Traffic" ), m_NonTorTrafficFilterMenu );
@@ -687,23 +687,23 @@ void tork::setupActions()
m_NonTorTrafficFilterMenu->setItemChecked( 0, true );
- m_IdentityButton = new KAction(i18n("Change Identity"),"tork_identity", 0,this,
+ m_IdentityButton = new TDEAction(i18n("Change Identity"),"tork_identity", 0,this,
SLOT(useNewIdentity()),actionCollection());
//Pseudonymity Buttons
- m_PseudoButton = new KActionMenu( i18n( "Be From.." ), "tork_internet",
+ m_PseudoButton = new TDEActionMenu( i18n( "Be From.." ), "tork_internet",
actionCollection() );
m_PseudoButton->setDelayed( false );
m_PseudoMenu = m_PseudoButton->popupMenu();
- m_PseudoMenuEU = new KPopupMenu( this );
- m_PseudoMenuAF = new KPopupMenu( this );
- m_PseudoMenuAS = new KPopupMenu( this );
- m_PseudoMenuNA = new KPopupMenu( this );
- m_PseudoMenuAN = new KPopupMenu( this );
- m_PseudoMenuSA = new KPopupMenu( this );
- m_PseudoMenuNN = new KPopupMenu( this );
- m_PseudoMenuOC = new KPopupMenu( this );
+ m_PseudoMenuEU = new TDEPopupMenu( this );
+ m_PseudoMenuAF = new TDEPopupMenu( this );
+ m_PseudoMenuAS = new TDEPopupMenu( this );
+ m_PseudoMenuNA = new TDEPopupMenu( this );
+ m_PseudoMenuAN = new TDEPopupMenu( this );
+ m_PseudoMenuSA = new TDEPopupMenu( this );
+ m_PseudoMenuNN = new TDEPopupMenu( this );
+ m_PseudoMenuOC = new TDEPopupMenu( this );
continentMap["EU"] = m_PseudoMenuEU;
continentMap["AF"] = m_PseudoMenuAF;
@@ -728,7 +728,7 @@ void tork::setupActions()
m_PseudoMenu->setItemChecked(999,true);
// Server Button
- m_ServerButton = new KActionMenu( i18n( "Run Server" ), "server", actionCollection() );
+ m_ServerButton = new TDEActionMenu( i18n( "Run Server" ), "server", actionCollection() );
m_ServerButton->setDelayed( false );
m_ServerButtonMenu = m_ServerButton->popupMenu();
m_ServerButtonMenu->insertItem( i18n( "None" ), this, SLOT( configureServer( int ) ), 0, 0 );
@@ -739,9 +739,9 @@ void tork::setupActions()
m_ServerButtonMenu->insertItem( i18n( "To Defeat Censorship Of Tor" ), this,
SLOT( configureServer( int ) ), 0, 3 );
m_ServerButtonMenu->insertSeparator();
- m_ServerButtonMenu->insertItem( KGlobal::iconLoader()->loadIconSet("configure", KIcon::Small),
+ m_ServerButtonMenu->insertItem( TDEGlobal::iconLoader()->loadIconSet("configure", TDEIcon::Small),
i18n( "Configure Server" ), this, SLOT( configureServer( int ) ), 0, 4 );
- m_ServerButtonMenu->insertItem( KGlobal::iconLoader()->loadIconSet("tork_agent", KIcon::Small),
+ m_ServerButtonMenu->insertItem( TDEGlobal::iconLoader()->loadIconSet("tork_agent", TDEIcon::Small),
i18n( "Manage Hidden Services" ), this, SLOT( configureServer( int ) ), 0, 5 );
m_ServerButtonMenu->setItemChecked( 0, true );
@@ -749,24 +749,24 @@ void tork::setupActions()
m_ServerButtonMenu->setItemEnabled( 4, !TorkConfig::clientOnly() );
// Server Button
- m_SecurityButton = new KActionMenu( i18n( "Fail-Safe" ), "tork_penguin", actionCollection() );
+ m_SecurityButton = new TDEActionMenu( i18n( "Fail-Safe" ), "tork_penguin", actionCollection() );
m_SecurityButton->setDelayed( false );
m_SecurityButtonMenu = m_SecurityButton->popupMenu();
- m_SecurityButtonMenu->insertItem( KGlobal::iconLoader()->loadIconSet("tork_penguin", KIcon::Small),
+ m_SecurityButtonMenu->insertItem( TDEGlobal::iconLoader()->loadIconSet("tork_penguin", TDEIcon::Small),
i18n( "None" ), this, SLOT( configureSecurity( int ) ), 0, 0 );
- m_SecurityButtonMenu->insertItem(KGlobal::iconLoader()->loadIconSet("tork_agent", KIcon::Small),
+ m_SecurityButtonMenu->insertItem(TDEGlobal::iconLoader()->loadIconSet("tork_agent", TDEIcon::Small),
i18n( "DNS FailSafe" ), this, SLOT( configureSecurity( int ) ), 0, 1 );
- m_SecurityButtonMenu->insertItem( KGlobal::iconLoader()->loadIconSet("gv", KIcon::Small),
+ m_SecurityButtonMenu->insertItem( TDEGlobal::iconLoader()->loadIconSet("gv", TDEIcon::Small),
i18n( "System FailSafe" ),this, SLOT( configureSecurity( int ) ), 0, 2 );
m_SecurityButtonMenu->insertSeparator();
- m_SecurityButtonMenu->insertItem( KGlobal::iconLoader()->loadIconSet("configure",
- KIcon::Small),i18n( "Configure FailSafe" ), this, SLOT( configureSecurity( int ) ), 0, 3 );
+ m_SecurityButtonMenu->insertItem( TDEGlobal::iconLoader()->loadIconSet("configure",
+ TDEIcon::Small),i18n( "Configure FailSafe" ), this, SLOT( configureSecurity( int ) ), 0, 3 );
m_SecurityButtonMenu->setItemChecked( 0, true );
- m_UnCensorButton = new KAction(i18n("Un-Censor"),"tork_uncensor", 0,this,
+ m_UnCensorButton = new TDEAction(i18n("Un-Censor"),"tork_uncensor", 0,this,
SLOT(showFirewallEvasion()),actionCollection());
- torkTip = new KAction(i18n("Tip of the Day"), "idea", 0,this,
+ torkTip = new TDEAction(i18n("Tip of the Day"), "idea", 0,this,
SLOT(showTip()),actionCollection(),"help_show_tip");
//set up all other actions
@@ -784,11 +784,11 @@ void tork::setupActions()
createGUI();
- m_ModeButton = new KAction(i18n("More Options"),"add", 0,this,
+ m_ModeButton = new TDEAction(i18n("More Options"),"add", 0,this,
SLOT(switchMode()),actionCollection());
//Set Up Advanced Toolbar
- toolBar("MoreToolBar")->setIconText( KToolBar::IconTextRight, false );
+ toolBar("MoreToolBar")->setIconText( TDEToolBar::IconTextRight, false );
m_PseudoButton->plug( toolBar("MoreToolBar") );
m_ServerButton->plug( toolBar("MoreToolBar") );
#ifndef LIVECD
@@ -796,15 +796,15 @@ void tork::setupActions()
m_SecurityButton->plug( toolBar("MoreToolBar") );
#endif
#endif
- toolBar("MoreToolBar")->setIconText( KToolBar::IconOnly, false );
+ toolBar("MoreToolBar")->setIconText( TDEToolBar::IconOnly, false );
//Set Up Core Toolbar
- toolBar("TorToolBar")->setIconText( KToolBar::IconTextRight, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconTextRight, false );
m_UnCensorButton->plug( toolBar("TorToolBar") );
#ifndef LIVECD
//m_IdentityButton->plug( toolBar("TorToolBar") );
#endif
- toolBar("TorToolBar")->setIconText( KToolBar::IconOnly, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconOnly, false );
m_PseudoButton->setToolTip( i18n( "Pretend you're using the Internet <br> in another country." ) );
@@ -914,7 +914,7 @@ void tork::applyPseudonymity( int country_id )
}
// Update Menu
- for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
+ for ( TQMap<TQString, TDEPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
{
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index),false);
@@ -1002,7 +1002,7 @@ void
tork::currentTabChanged(TQWidget* cur ) //SLOT
{
- toolBar()->setIconText( KToolBar::IconTextRight, false );
+ toolBar()->setIconText( TDEToolBar::IconTextRight, false );
if (cur == prev)
return;
@@ -1032,7 +1032,7 @@ tork::currentTabChanged(TQWidget* cur ) //SLOT
}
- toolBar()->setIconText( KToolBar::IconOnly, false );
+ toolBar()->setIconText( TDEToolBar::IconOnly, false );
m_ServerFilterButton->setToolTip( i18n( "Filter the List of Servers." ) );
m_LaunchMenuButton->setToolTip( i18n( "Launch anonymized applications <br> with a single click." ) );
m_LogFilterButton->setToolTip( i18n( "Filter Log Messages by Type." ) );
@@ -1142,7 +1142,7 @@ tork::switchMode() //SLOT
if (TorkConfig::advancedMode()){
m_ModeButton->unplug( toolBar("TorToolBar") );
- toolBar("TorToolBar")->setIconText( KToolBar::IconOnly, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconOnly, false );
m_ModeButton->plug( toolBar("TorToolBar") );
toolBar("TorToolBar")->setToggle(toolBar("TorToolBar")->idAt(2),true);
toolBar("TorToolBar")->toggleButton(toolBar("TorToolBar")->idAt(2));
@@ -1150,7 +1150,7 @@ tork::switchMode() //SLOT
}else{
m_ModeButton->unplug( toolBar("TorToolBar") );
- toolBar("TorToolBar")->setIconText( KToolBar::IconTextRight, false );
+ toolBar("TorToolBar")->setIconText( TDEToolBar::IconTextRight, false );
m_ModeButton->plug( toolBar("TorToolBar") );
toolBar("MoreToolBar")->hide();
}
@@ -1277,11 +1277,11 @@ tork::configureSecurity( int id ) //SLOT
filterproc = new KProcIO();
filterproc->setUseShell(TRUE);
- TQString filterCommand= TQString("kdesu --noignorebutton --miniicon tork --caption '%1' -t -i %2 -d -c "
+ TQString filterCommand= TQString("tdesu --noignorebutton --miniicon tork --caption '%1' -t -i %2 -d -c "
"'%3'").arg(filterRequest).arg(iconstring).arg(cmd);
connect( filterproc, SIGNAL(readReady(KProcIO * )),
SLOT(processFilter(KProcIO * )) );
- connect( filterproc, SIGNAL(processExited(KProcess *)),
+ connect( filterproc, SIGNAL(processExited(TDEProcess *)),
SLOT(filterExited()) );
*filterproc<<filterCommand;
@@ -1339,7 +1339,7 @@ void tork::filterExited()
client->enableTransPort(false);
}
m_SecurityButton->setIconSet(SmallIconSet("tork_penguin"));
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("You are now in <b>Normal Mode</b>. <br> Tor and TorK will operate normally."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("You are now in <b>Normal Mode</b>. <br> Tor and TorK will operate normally."));
break;
case 1:
m_DNSTorified = true;
@@ -1348,7 +1348,7 @@ void tork::filterExited()
client->enableTransPort(true);
}
m_SecurityButton->setIconSet(SmallIconSet("tork_agent"));
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("You are now in <b>DNS FailSafe Mode</b>. <br> All DNS queries will be routed through Tor."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("You are now in <b>DNS FailSafe Mode</b>. <br> All DNS queries will be routed through Tor."));
break;
case 2:
m_DNSTorified = true;
@@ -1357,7 +1357,7 @@ void tork::filterExited()
client->enableTransPort(true);
}
m_SecurityButton->setIconSet(SmallIconSet("gv"));
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("You are now in <b>System FailSafe Mode</b>. <br> Tor will use new routes for every new connection as often as possible. <br> All secure traffic will be routed through Tor."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("You are now in <b>System FailSafe Mode</b>. <br> Tor will use new routes for every new connection as often as possible. <br> All secure traffic will be routed through Tor."));
break;
default:
break;
@@ -1435,7 +1435,7 @@ tork::filterCountries( int id ) //SLOT
// Display servers for each selected country
- for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMapList.begin();
+ for ( TQMap<TQString, TDEPopupMenu*>::Iterator menu = continentMapList.begin();
menu != continentMapList.end(); ++menu ){
if (m_CountryMenu->isItemChecked(251)){ // If 'All' selected, deselect all items
for (unsigned int index = 0; index != menu.data()->count(); ++index){
@@ -1526,7 +1526,7 @@ tork::filterServers( int id ) //SLOT
}
for ( TQMap<TQString,
- KPopupMenu*>::Iterator menu = continentMapList.begin();
+ TDEPopupMenu*>::Iterator menu = continentMapList.begin();
menu != continentMapList.end(); ++menu ){
TQListView* tmp = dynamic_cast<TQListView*>(m_view->serverList);
filterView(countryType, tmp, menu.data(), 255, 4);
@@ -1558,7 +1558,7 @@ tork::filterServers( int id ) //SLOT
void
tork::filterView( TQValueVector<TQString> &possibleValues, TQListView* &view,
- KPopupMenu* &menu, int id, int column ){
+ TDEPopupMenu* &menu, int id, int column ){
if (possibleValues[id] == "All"){
TQListViewItemIterator it(view);
@@ -1601,7 +1601,7 @@ tork::filterView( TQValueVector<TQString> &possibleValues, TQListView* &view,
void
tork::filterViewServers( TQValueVector<TQString> &possibleValues,
- TQListView* &view, KPopupMenu* &menu, int ,
+ TQListView* &view, TDEPopupMenu* &menu, int ,
int column) //SLOT
{
@@ -1692,14 +1692,14 @@ void tork::optionsConfigureKeys()
void tork::optionsConfigureToolbars()
{
// use the standard toolbar editor
- #if defined(KDE_MAKE_VERSION)
- # if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
- saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ #if defined(TDE_MAKE_VERSION)
+ # if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0)
+ saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else
- saveMainWindowSettings(KGlobal::config());
+ saveMainWindowSettings(TDEGlobal::config());
# endif
#else
- saveMainWindowSettings(KGlobal::config());
+ saveMainWindowSettings(TDEGlobal::config());
#endif
KEditToolbar dlg(factory());
connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(newToolbarConfig()));
@@ -1712,14 +1712,14 @@ void tork::newToolbarConfig()
// recreate our GUI, and re-apply the settings (e.g. "text under icons", etc.)
createGUI();
- #if defined(KDE_MAKE_VERSION)
- # if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
- applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ #if defined(TDE_MAKE_VERSION)
+ # if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0)
+ applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else
- applyMainWindowSettings(KGlobal::config());
+ applyMainWindowSettings(TDEGlobal::config());
# endif
#else
- applyMainWindowSettings(KGlobal::config());
+ applyMainWindowSettings(TDEGlobal::config());
#endif
}
@@ -1728,8 +1728,8 @@ void tork::copyOldConfig()
{
TorkConfig::writeConfig();
- KConfigSkeletonItem::List pitems(TorkConfig::self()->items());
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List pitems(TorkConfig::self()->items());
+ TDEConfigSkeletonItem::List::ConstIterator it;
PrevConfig::PrevConfigList::iterator tp;
for( it = pitems.begin(); it != pitems.end(); ++it ) {
@@ -1762,12 +1762,12 @@ void tork::optionsPreferences()
copyOldConfig();
- TorkConfigDialog* dialog = (TorkConfigDialog*) KConfigDialog::exists( "settings" );
+ TorkConfigDialog* dialog = (TorkConfigDialog*) TDEConfigDialog::exists( "settings" );
if( !dialog )
{
- //KConfigDialog didn't find an instance of this dialog, so lets create it :
+ //TDEConfigDialog didn't find an instance of this dialog, so lets create it :
dialog = new TorkConfigDialog( this, "settings", TorkConfig::self() );
}
@@ -1791,11 +1791,11 @@ void tork::openConfig(const TQCString& page)
//
// compare the names of the widgets in the .ui file
// to the names of the variables in the .kcfg file
- TorkConfigDialog* dialog = (TorkConfigDialog*) KConfigDialog::exists( "settings" );
+ TorkConfigDialog* dialog = (TorkConfigDialog*) TDEConfigDialog::exists( "settings" );
if( !dialog )
{
- //KConfigDialog didn't find an instance of this dialog, so lets create it :
+ //TDEConfigDialog didn't find an instance of this dialog, so lets create it :
dialog = new TorkConfigDialog( this, "settings", TorkConfig::self() );
}
@@ -1942,7 +1942,7 @@ void tork::startTor()
*childproc << TorkConfig::torLocation() << " -f " + torConfFile;
- connect( childproc, SIGNAL(processExited(KProcess *)),
+ connect( childproc, SIGNAL(processExited(TDEProcess *)),
SLOT(childExited()) );
connect( childproc, SIGNAL(readReady(KProcIO *)),
SLOT(receivedOutput(KProcIO *)) );
@@ -1974,7 +1974,7 @@ void tork::stopTor()
{
if (m_DNSTorified){
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("<b>You are now in FailSafe Mode</b>. <br> You need to be in Normal Mode before you can stop Tor."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("<b>You are now in FailSafe Mode</b>. <br> You need to be in Normal Mode before you can stop Tor."));
return;
}
@@ -2013,7 +2013,7 @@ void tork::stopTor()
//Reset Country filter menu to 'All' checked
- for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMapList.begin(); menu != continentMapList.end(); ++menu ){
+ for ( TQMap<TQString, TDEPopupMenu*>::Iterator menu = continentMapList.begin(); menu != continentMapList.end(); ++menu ){
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index), false );
}
@@ -2028,7 +2028,7 @@ void tork::stopTor()
//Reset Pseudonymity filter menu to 'All' checked
- for ( TQMap<TQString, KPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
+ for ( TQMap<TQString, TDEPopupMenu*>::Iterator menu = continentMap.begin(); menu != continentMap.end(); ++menu )
{
for (unsigned int index = 0; index != menu.data()->count(); ++index){
menu.data()->setItemChecked( menu.data()->idAt(index),false);
@@ -2361,8 +2361,8 @@ void tork::writeCustomOptions2(TQTextStream &ts)
}
- KConfigSkeletonItem::List items = TorkConfig::self()->items();
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List items = TorkConfig::self()->items();
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
kdDebug() << (*it)->name() << endl;
if (elementShouldBeUsed((*it))){
@@ -2403,7 +2403,7 @@ void tork::writeCustomOptions2(TQTextStream &ts)
}
-bool tork::elementShouldBeUsed(const KConfigSkeletonItem* it)
+bool tork::elementShouldBeUsed(const TDEConfigSkeletonItem* it)
{
@@ -2425,7 +2425,7 @@ bool tork::elementShouldBeUsed(const KConfigSkeletonItem* it)
return false;
}
-bool tork::noSpecialProcessing(const KConfigSkeletonItem* it, TQTextStream &ts)
+bool tork::noSpecialProcessing(const TDEConfigSkeletonItem* it, TQTextStream &ts)
{
if (((*it).name() == "DirListenAddress") ||
@@ -2636,7 +2636,7 @@ void tork::privoxyExited()
died = true;
if (privoxyproc != 0L){
- disconnect( privoxyproc, SIGNAL(processExited(KProcess *)),
+ disconnect( privoxyproc, SIGNAL(processExited(TDEProcess *)),
this,SLOT(privoxyExited()) );
delete privoxyproc;
privoxyproc = 0L;
@@ -2748,7 +2748,7 @@ void tork::startPrivoxy()
}
if (privoxyproc != 0L){
- disconnect( privoxyproc, SIGNAL(processExited(KProcess *)),
+ disconnect( privoxyproc, SIGNAL(processExited(TDEProcess *)),
this,SLOT(privoxyExited()) );
delete privoxyproc;
privoxyproc = 0L;
@@ -2772,7 +2772,7 @@ void tork::startPrivoxy()
*privoxyproc << TorkConfig::privoxyLocation() << " --user " << getenv("USER")
<< " --no-daemon --pidfile " << privoxypid << " " << privoxyConfFile;
- connect( privoxyproc, SIGNAL(processExited(KProcess *)),
+ connect( privoxyproc, SIGNAL(processExited(TDEProcess *)),
SLOT(privoxyExited()) );
privoxyproc->start(KProcIO::NotifyOnExit) ;
@@ -3178,7 +3178,7 @@ void tork::copyCookie()
KProcIO *catproc = new KProcIO();
catproc->setUseShell(TRUE);
TQString whichCommand= TQString(
- "kdesu -c '"
+ "tdesu -c '"
"mkdir -p -m 600 %1/.tor;"
"cp -u /var/lib/tor/control_auth_cookie %2/.tor/control_auth_cookie;"
"cp -u /usr/local/var/lib/tor/control_auth_cookie %3/.tor/control_auth_cookie;"
@@ -3365,9 +3365,9 @@ void tork::toggleKDESetting()
setKDE(TorkConfig::kDEUsesTor());
if (TorkConfig::kDEUsesTor())
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("All <b>Konqueror</b> Sessions Are Now Safe for Anonymous Use. <br> <b>Amarok, Akregator, KTorrent should be treated with caution! </b><br> This is because they may have javascript/java/plugins/flash enabled."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("All <b>Konqueror</b> Sessions Are Now Safe for Anonymous Use. <br> <b>Amarok, Akregator, KTorrent should be treated with caution! </b><br> This is because they may have javascript/java/plugins/flash enabled."));
else
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("<b>Konqueror</b> is Now Back to "
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("<b>Konqueror</b> is Now Back to "
"Non-Anonymous Use! <br> Close Konqueror completely and do not use it non-anonymously for a while. <br>"
"This is because malicious websites could gain access to information from your anonymous "
"session."));
@@ -3380,9 +3380,9 @@ void tork::enableKDE(bool enable)
setKDE(TorkConfig::kDEUsesTor());
if (TorkConfig::kDEUsesTor())
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("All <b>Konqueror</b> Sessions Are Now Safe for Anonymous Use. <br> <b>Amarok, Akregator, KTorrent should be treated with caution! </b><br> This is because they may have javascript/java/plugins/flash enabled."));
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("All <b>Konqueror</b> Sessions Are Now Safe for Anonymous Use. <br> <b>Amarok, Akregator, KTorrent should be treated with caution! </b><br> This is because they may have javascript/java/plugins/flash enabled."));
else
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled", i18n("<b>Konqueror</b> is Now Back to "
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled", i18n("<b>Konqueror</b> is Now Back to "
"Non-Anonymous Use! <br>Close Konqueror completely and do not use it non-anonymously for a while. <br>"
"This is because malicious websites could gain access to information from your anonymous "
"session."));
@@ -3427,7 +3427,7 @@ void tork::setKDE(bool set)
if (!m_view->konqitem)
return;
- KConfig* config = new KConfig("kioslaverc", false, false);
+ TDEConfig* config = new TDEConfig("tdeioslaverc", false, false);
config->setGroup( "Proxy Settings" );
if (set){
config->writeEntry( "httpProxy", TQString("%1:%2")
@@ -3441,15 +3441,15 @@ void tork::setKDE(bool set)
.arg(TorkConfig::konqFtpProxyPort()) );
config->writeEntry( "ProxyType", "1" );
config->sync();
- config = new KConfig("kcookiejarrc", false, false);
+ config = new TDEConfig("kcookiejarrc", false, false);
config->setGroup( "Cookie Policy" );
- //KConfig doesn't return a bool, just a text representation of the bool
+ //TDEConfig doesn't return a bool, just a text representation of the bool
TorkConfig::setOriginalCookies(config->readEntry( "Cookies" )
== "true" ? true : false);
config->writeEntry( "Cookies", !TorkConfig::disableCookies() );
TorkConfig::writeConfig();
config->sync();
- config = new KConfig("kio_httprc", false, false);
+ config = new TDEConfig("tdeio_httprc", false, false);
TorkConfig::setOriginalUseCache(config->readEntry( "UseCache" )
== "true" ? true : false);
TorkConfig::setOriginalSendUserAgent(config->readEntry("SendUserAgent" )
@@ -3459,7 +3459,7 @@ void tork::setKDE(bool set)
!TorkConfig::disableBrowserIdentification() );
TorkConfig::writeConfig();
config->sync();
- config = new KConfig("konquerorrc", false, false);
+ config = new TDEConfig("konquerorrc", false, false);
config->setGroup( "Java/JavaScript Settings" );
TorkConfig::setOriginalEnableJavascript(config->readEntry( "EnableJavaScript" )
== "true" ? true : false);
@@ -3479,19 +3479,19 @@ void tork::setKDE(bool set)
config->writeEntry( "ProxyType", TorkConfig::originalProxyType() );
config->sync();
- config = new KConfig("kcookiejarrc", false, false);
+ config = new TDEConfig("kcookiejarrc", false, false);
config->setGroup( "Cookie Policy" );
config->writeEntry( "Cookies", TorkConfig::originalCookies() );
config->sync();
- config = new KConfig("kio_httprc", false, false);
+ config = new TDEConfig("tdeio_httprc", false, false);
config->writeEntry( "UseCache", TorkConfig::originalUseCache() );
config->writeEntry( "SendUserAgent", TorkConfig::originalSendUserAgent() );
config->sync();
kdDebug() << "UseCache" << config->readEntry( "UseCache" )
<< endl;
- config = new KConfig("konquerorrc", false, false);
+ config = new TDEConfig("konquerorrc", false, false);
config->setGroup( "Java/JavaScript Settings" );
config->writeEntry( "EnableJavaScript", TorkConfig::originalEnableJavascript() );
config->writeEntry( "EnableJava", TorkConfig::originalEnableJava() );
@@ -3502,7 +3502,7 @@ void tork::setKDE(bool set)
// Inform all running io-slaves about the changes...
// if we cannot update, ioslaves inform the end user...
- if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
+ if (!DCOPRef("*", "TDEIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
{
TQString caption = i18n("Update Failed");
TQString message = i18n("You have to restart the running applications "
@@ -3627,13 +3627,13 @@ void tork::showWarning( display_status_t &msg, const TQString &headline,const TQ
m_tooltip->display();
- if (!kmain->isActiveWindow()){
+ if (!tdemain->isActiveWindow()){
KPassivePopup *pop;
TQPoint pnt;
- pop = new KPassivePopup( kmain->_tray );
- pnt = kmain->_tray->pos();
+ pop = new KPassivePopup( tdemain->_tray );
+ pnt = tdemain->_tray->pos();
pop->setTimeout(15000);
pop->setView( i18n("%1").arg(headline),i18n("See TorK window for details.") );
pop->show(TQPoint(pnt));
@@ -3689,13 +3689,13 @@ void tork::askQuestion(display_status_t &msg, const TQString &headline,const TQS
m_tooltip->display();
- if (!kmain->isActiveWindow()){
+ if (!tdemain->isActiveWindow()){
KPassivePopup *pop;
TQPoint pnt;
- pop = new KPassivePopup( kmain->_tray );
- pnt = kmain->_tray->pos();
+ pop = new KPassivePopup( tdemain->_tray );
+ pnt = tdemain->_tray->pos();
pop->setTimeout(15000);
pop->setView( i18n("%1").arg(headline),i18n("%1 See TorK window for details.").arg(body) );
pop->show(TQPoint(pnt));
@@ -3836,7 +3836,7 @@ void tork::torClosedConnection()
if (m_DNSTorified){
- KNotifyClient::event(kmain->_tray->winId(),"TorDisabled",
+ KNotifyClient::event(tdemain->_tray->winId(),"TorDisabled",
i18n("<b>You are still in"
" FailSafe Mode</b>. <br> If Tor is still running its capacity to route FailSafe traffic <br> will"
" remain enabled. Enter your password to return <br> the rest of your system to Normal Mode."));
@@ -3953,7 +3953,7 @@ void tork::startNetStat()
*netstatproc << netstatcmd;
- connect( netstatproc, SIGNAL(processExited(KProcess *)),
+ connect( netstatproc, SIGNAL(processExited(TDEProcess *)),
SLOT(netStatExited()) );
connect( netstatproc, SIGNAL(readReady(KProcIO *)),
SLOT(receivedNetStatOutput(KProcIO *)) );
@@ -4337,10 +4337,10 @@ void tork::resetTor()
{
KProcIO *catproc = new KProcIO();
catproc->setUseShell(TRUE);
- TQString whichCommand= "kdesu -c 'killall -s HUP tor'";
+ TQString whichCommand= "tdesu -c 'killall -s HUP tor'";
*catproc<<whichCommand;
catproc->start(KProcIO::NotifyOnExit,TRUE);
- connect( catproc, SIGNAL(processExited(KProcess *)),
+ connect( catproc, SIGNAL(processExited(TDEProcess *)),
SLOT(resetExited()) );
}