summaryrefslogtreecommitdiffstats
path: root/kppp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp')
-rw-r--r--kppp/accounting.cpp12
-rw-r--r--kppp/accounting.h4
-rw-r--r--kppp/accounts.cpp2
-rw-r--r--kppp/acctselect.cpp2
-rw-r--r--kppp/conwindow.cpp2
-rw-r--r--kppp/debug.cpp2
-rw-r--r--kppp/kpppwidget.cpp4
-rw-r--r--kppp/logview/monthly.cpp46
-rw-r--r--kppp/main.cpp6
-rw-r--r--kppp/miniterm.cpp2
-rw-r--r--kppp/modems.cpp2
-rw-r--r--kppp/pppdata.cpp4
-rw-r--r--kppp/pppstatdlg.cpp10
-rw-r--r--kppp/providerdb.cpp4
-rw-r--r--kppp/pwentry.cpp2
-rw-r--r--kppp/ruleset.cpp2
16 files changed, 53 insertions, 53 deletions
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index 76c5f02e..7f346eef 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -77,7 +77,7 @@ AccountingBase::AccountingBase(TQObject *parent) :
.arg(TQDate::shortMonthName(dt.month()))
.arg(dt.year(), 4);
- LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
+ LogFileName = TDEGlobal::dirs()->saveLocation("appdata", "Log")
+ "/" + LogFileName;
kdDebug(5002) << "LogFileName: " << LogFileName << endl;
@@ -156,7 +156,7 @@ TQString AccountingBase::getCosts(const TQString & accountname) {
gpppdata.setAccount(accountname);
TQString val = gpppdata.totalCosts();
// ### currency from rule file
- // TQString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
+ // TQString val = TDEGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
gpppdata.setAccount(prev_account);
@@ -377,7 +377,7 @@ bool ExecutableAccounting::loadRuleSet(const TQString &) {
}
-void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*buflen*/) {
+void ExecutableAccounting::gotData(TDEProcess */*proc*/, char *buffer, int /*buflen*/) {
TQString field[8];
int nFields = 0;
int pos, last_pos = 0;
@@ -434,13 +434,13 @@ void ExecutableAccounting::slotStart() {
loadCosts();
TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
- proc = new KProcess;
+ proc = new TDEProcess;
TQString s_total;
s_total.sprintf("%0.8f", total());
*proc << s << s_total;
- connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, TQT_SLOT(gotData(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
+ this, TQT_SLOT(gotData(TDEProcess *, char *, int)));
proc->start();
time_t start_time = time(0);
diff --git a/kppp/accounting.h b/kppp/accounting.h
index 614b3560..c1ef870b 100644
--- a/kppp/accounting.h
+++ b/kppp/accounting.h
@@ -132,13 +132,13 @@ public slots:
virtual void slotStop();
private slots:
- void gotData(KProcess *proc, char *buffer, int buflen);
+ void gotData(TDEProcess *proc, char *buffer, int buflen);
signals:
void changed(TQString total, TQString session);
private:
- KProcess *proc;
+ TDEProcess *proc;
TQString currency;
TQString provider;
PPPStats *stats;
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
index 740755e6..2605ad86 100644
--- a/kppp/accounts.cpp
+++ b/kppp/accounts.cpp
@@ -415,7 +415,7 @@ TQString AccountWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = TDEGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
index 1782d27f..55c30e9c 100644
--- a/kppp/acctselect.cpp
+++ b/kppp/acctselect.cpp
@@ -256,7 +256,7 @@ void AccountingSelector::setupTreeWidget() {
tl->setRootIsDecorated(true);
// look in ~/.trinity/share/apps/kppp/Rules and $TDEDIR/share/apps/kppp/Rules
- TQStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
+ TQStringList dirs = TDEGlobal::dirs()->resourceDirs("appdata");
for (TQStringList::ConstIterator it = dirs.begin();
it != dirs.end(); it++) {
insertDir(TQDir((*it) + "Rules"), 0);
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
index 2e6f2281..fb0aa27b 100644
--- a/kppp/conwindow.cpp
+++ b/kppp/conwindow.cpp
@@ -108,7 +108,7 @@ TQString ConWindow::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = TDEGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
diff --git a/kppp/debug.cpp b/kppp/debug.cpp
index 3dee5797..8ad64d41 100644
--- a/kppp/debug.cpp
+++ b/kppp/debug.cpp
@@ -59,7 +59,7 @@ DebugWidget::DebugWidget(TQWidget *parent, const char *name)
statuslabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statuslabel->setAlignment( AlignLeft|AlignVCenter );
statuslabel->setGeometry(2, 307, 400, 20);
- //statusPageLabel->setFont( KGlobalSettings::generalFont() );
+ //statusPageLabel->setFont( TDEGlobalSettings::generalFont() );
dismiss = new TQPushButton(this);
dismiss->setGeometry(330,340,70,30);
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
index 89058d94..6380ba8f 100644
--- a/kppp/kpppwidget.cpp
+++ b/kppp/kpppwidget.cpp
@@ -203,7 +203,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
help_b = new KPushButton(KStdGuiItem::help(), this);
connect( help_b, TQT_SIGNAL(clicked()), TQT_SLOT(helpbutton()));
- KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true);
+ KHelpMenu *helpMenu = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), true);
help_b->setPopup((TQPopupMenu*)helpMenu->menu());
if(help_b->sizeHint().width() > minw)
@@ -258,7 +258,7 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() );
connect(this, TQT_SIGNAL(begin_connect()),con, TQT_SLOT(preinit()));
- TQRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
+ TQRect desk = TDEGlobalSettings::desktopGeometry(topLevelWidget());
con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110);
// connect the ConnectWidgets various signals
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index 0844f85a..0838417d 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -38,9 +38,9 @@ static void formatBytes(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").arg(TDEGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").arg(TDEGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatBytesMonth(double bytes, TQString &result) {
@@ -54,9 +54,9 @@ static void formatBytesMonth(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").arg(TDEGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").arg(TDEGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatDuration(int seconds, TQString &result) {
@@ -292,7 +292,7 @@ void MonthlyWidget::plotMonth() {
selectionItem = 0L;
lv2->clear();
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
TQDate startDate = periodeFirst();
for(int i = 0; i < (int)logList.count(); i++) {
@@ -354,9 +354,9 @@ void MonthlyWidget::plotMonth() {
s_duration);
TQString s_lifrom, s_liuntil, s_costs;
- s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
- s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
- s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
+ s_lifrom = TDEGlobal::locale()->formatTime(li->from().time(), false);
+ s_liuntil = TDEGlobal::locale()->formatTime(li->until().time(), false);
+ s_costs = TDEGlobal::locale()->formatMoney(li->sessionCosts());
(void) new LogListItem(li, lv, con, day, s_lifrom, s_liuntil, s_duration, s_costs, _bin, _bout);
}
@@ -384,7 +384,7 @@ void MonthlyWidget::plotMonth() {
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
+ TQString s_costs(TDEGlobal::locale()->formatMoney(costs, TQString(), 2));
selectionItem = new LogListItem(0, lv2,
i18n("Selection (%n connection)", "Selection (%n connections)", 0),
@@ -394,7 +394,7 @@ void MonthlyWidget::plotMonth() {
i18n("%n connection", "%n connections", count),
s_duration, s_costs, _bin, _bout, TQString(), TQString(), TQString());
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
@@ -414,7 +414,7 @@ void MonthlyWidget::plotMonth() {
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
+ TQString m_costs(TDEGlobal::locale()->formatMoney(costs, TQString(), 2));
(void) new TQListViewItem(lv2, selectionItem,
i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout,
@@ -443,19 +443,19 @@ void MonthlyWidget::slotConnections(int) {
}
void MonthlyWidget::nextMonth() {
- m_periodeFirst = KGlobal::locale()->calendar()->addMonths(m_periodeFirst, 1);
+ m_periodeFirst = TDEGlobal::locale()->calendar()->addMonths(m_periodeFirst, 1);
plotMonth();
}
void MonthlyWidget::prevMonth() {
- m_periodeFirst = KGlobal::locale()->calendar()->addMonths(m_periodeFirst, -1);
+ m_periodeFirst = TDEGlobal::locale()->calendar()->addMonths(m_periodeFirst, -1);
plotMonth();
}
void MonthlyWidget::currentMonth() {
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
TQDate dt = TQDate::currentDate();
calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
@@ -463,7 +463,7 @@ void MonthlyWidget::currentMonth() {
}
void MonthlyWidget::exportWizard() {
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001
.arg(calendar->monthName(periodeFirst()))
.arg(calendar->year(periodeFirst()));
@@ -565,9 +565,9 @@ void MonthlyWidget::exportWizard() {
s_duration);
TQString s_lifrom, s_liuntil, s_costs;
- s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
- s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
- s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
+ s_lifrom = TDEGlobal::locale()->formatTime(li->from().time(), false);
+ s_liuntil = TDEGlobal::locale()->formatTime(li->until().time(), false);
+ s_costs = TDEGlobal::locale()->formatMoney(li->sessionCosts());
// call export method
exportIFace->addDataline(con, day, s_lifrom, s_liuntil, s_duration,
@@ -593,9 +593,9 @@ void MonthlyWidget::exportWizard() {
formatDurationMonth(duration, m_duration);
costsMonth(costs, costs);
- TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
+ TQString m_costs(TDEGlobal::locale()->formatMoney(costs, TQString(), 2));
- TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
+ TQString datetime = TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
exportIFace->addEmptyLine();
exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
@@ -624,7 +624,7 @@ void MonthlyWidget::exportWizard() {
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
+ TQString s_costs(TDEGlobal::locale()->formatMoney(costs, TQString(), 2));
// call export methods
exportIFace->addEmptyLine();
@@ -650,7 +650,7 @@ TQDate MonthlyWidget::periodeFirst() const
TQDate MonthlyWidget::periodeLast() const
{
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
// One month minus one day
return calendar->addDays(calendar->addMonths(m_periodeFirst, 1), -1);
@@ -716,7 +716,7 @@ void MonthlyWidget::slotSelectionChanged()
formatDuration(duration,
s_duration);
- TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
+ TQString s_costs(TDEGlobal::locale()->formatMoney(costs, TQString(), 2));
selectionItem->setText(0, i18n("Selection (%n connection)", "Selection (%n connections)", count));
selectionItem->setText(1, s_duration);
selectionItem->setText(2, s_costs);
diff --git a/kppp/main.cpp b/kppp/main.cpp
index 379529ee..f61b21ae 100644
--- a/kppp/main.cpp
+++ b/kppp/main.cpp
@@ -232,13 +232,13 @@ int main( int argc, char **argv ) {
// make sure that nobody can read the password from the
// config file
- TQString configFile = KGlobal::dirs()->saveLocation("config")
+ TQString configFile = TDEGlobal::dirs()->saveLocation("config")
+ TQString(kapp->name()) + "rc";
if(access(TQFile::encodeName(configFile), F_OK) == 0)
chmod(TQFile::encodeName(configFile), S_IRUSR | S_IWUSR);
// do we really need to generate an empty directory structure here ?
- KGlobal::dirs()->saveLocation("appdata", "Rules");
+ TDEGlobal::dirs()->saveLocation("appdata", "Rules");
int pid = create_pidfile();
TQString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
@@ -359,7 +359,7 @@ pid_t create_pidfile() {
int fd = -1;
char pidstr[40]; // safe
- pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
+ pidfile = TDEGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
if(access(TQFile::encodeName(pidfile), F_OK) == 0) {
diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp
index 990a1088..25d0d94a 100644
--- a/kppp/miniterm.cpp
+++ b/kppp/miniterm.cpp
@@ -228,7 +228,7 @@ void MiniTerm::help() {
MyTerm::MyTerm(TQWidget *parent, const char* name)
: TQMultiLineEdit(parent, name)
{
- setFont(KGlobalSettings::fixedFont());
+ setFont(TDEGlobalSettings::fixedFont());
}
void MyTerm::keyPressEvent(TQKeyEvent *k) {
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
index 42e82049..491c5b1b 100644
--- a/kppp/modems.cpp
+++ b/kppp/modems.cpp
@@ -269,7 +269,7 @@ TQString ModemsWidget::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = TDEGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
index c258eda6..c7b2f044 100644
--- a/kppp/pppdata.cpp
+++ b/kppp/pppdata.cpp
@@ -1464,7 +1464,7 @@ void PPPData::setpppdError(int err) {
// window position
//
void PPPData::winPosConWin(int& p_x, int& p_y) {
- TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = TDEGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, desk.center().y()-55);
}
@@ -1475,7 +1475,7 @@ void PPPData::setWinPosConWin(int p_x, int p_y) {
}
void PPPData::winPosStatWin(int& p_x, int& p_y) {
- TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = TDEGlobalSettings::splashScreenDesktopGeometry();
p_x = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_X, desk.center().x()-160);
p_y = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_Y, desk.center().y()-55);
}
diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp
index 4a816121..073d3f55 100644
--- a/kppp/pppstatdlg.cpp
+++ b/kppp/pppstatdlg.cpp
@@ -286,12 +286,12 @@ void PPPStatsDlg::paintGraph() {
// plot scale line
p.setPen(text);
- p.setFont(TQFont(KGlobalSettings::fixedFont().family(), 8));
+ p.setFont(TQFont(TDEGlobalSettings::fixedFont().family(), 8));
TQRect r;
TQString s = i18n("%1 (max. %2) kb/sec")
- .arg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
- .arg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1));
+ .arg(TDEGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
+ .arg(TDEGlobal::locale()->formatNumber((float)max / 1024.0, 1));
p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r);
p.drawLine(0, 8, r.left() - 8, 8);
@@ -378,12 +378,12 @@ void PPPStatsDlg::closeEvent(TQCloseEvent *) {
void PPPStatsDlg::update_data() {
timeclick();
- ibytes_string = KGlobal::locale()->formatNumber(stats->ibytes, 0);
+ ibytes_string = TDEGlobal::locale()->formatNumber(stats->ibytes, 0);
ipackets_string.setNum(stats->ipackets);
compressedin_string.setNum(stats->compressedin);
uncompressedin_string.setNum(stats->uncompressedin);
errorin_string.setNum(stats->errorin);
- obytes_string = KGlobal::locale()->formatNumber(stats->obytes, 0);
+ obytes_string = TDEGlobal::locale()->formatNumber(stats->obytes, 0);
opackets_string.setNum(stats->opackets);
compressed_string.setNum(stats->compressed);
packetsunc_string.setNum(stats->packetsunc);
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
index 41297545..703d9375 100644
--- a/kppp/providerdb.cpp
+++ b/kppp/providerdb.cpp
@@ -208,7 +208,7 @@ PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) {
// fill the listbox
// set up filter
- TQDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
+ TQDir d(TDEGlobal::dirs()->findDirs("appdata", "Provider").first());
d.setFilter(TQDir::Dirs);
d.setSorting(TQDir::Name);
@@ -294,7 +294,7 @@ void PDB_Provider::setDir(const TQString &_dir) {
// set up filter
dir = _dir;
- TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
+ TQString dir1 = TDEGlobal::dirs()->findDirs("appdata", "Provider").first();
TQRegExp re1(" ");
dir = dir.replace(re1, "_");
dir1 += dir;
diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp
index 270b4b72..7584c3c6 100644
--- a/kppp/pwentry.cpp
+++ b/kppp/pwentry.cpp
@@ -43,7 +43,7 @@ PWEntry::PWEntry( TQWidget *parent, const char *name )
300,
90);
} else {
- TQRect desk = KGlobalSettings::desktopGeometry(parent);
+ TQRect desk = TDEGlobalSettings::desktopGeometry(parent);
setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 );
}
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
index e60e4be1..41fc12c5 100644
--- a/kppp/ruleset.cpp
+++ b/kppp/ruleset.cpp
@@ -507,7 +507,7 @@ TQString RuleSet::currencySymbol() const {
}
TQString RuleSet::currencyString(double f) const {
- return KGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits);
+ return TDEGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits);
}