diff options
Diffstat (limited to 'tdeio/misc/uiserver.cpp')
| -rw-r--r-- | tdeio/misc/uiserver.cpp | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/tdeio/misc/uiserver.cpp b/tdeio/misc/uiserver.cpp index c929028db..59d436c35 100644 --- a/tdeio/misc/uiserver.cpp +++ b/tdeio/misc/uiserver.cpp @@ -17,7 +17,6 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// -*- mode: c++; c-basic-offset: 4 -*- #include <tqtimer.h> @@ -27,8 +26,8 @@ #include <ksqueezedtextlabel.h> #include <tdeconfig.h> -#include <kstandarddirs.h> -#include <kuniqueapplication.h> +#include <tdestandarddirs.h> +#include <tdeuniqueapplication.h> #include <tdeaboutdata.h> #include <tdecmdlineargs.h> #include <tdeglobal.h> @@ -95,11 +94,11 @@ class UIServerSystemTray:public KSystemTray :KSystemTray(uis) { TDEPopupMenu* pop= contextMenu(); - pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure())); - pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon())); + pop->insertItem(i18n("Settings..."), uis, TQ_SLOT(slotConfigure())); + pop->insertItem(i18n("Remove"), uis, TQ_SLOT(slotRemoveSystemTrayIcon())); setPixmap(loadIcon("document-save")); //actionCollection()->action("file_quit")->setEnabled(true); - KStdAction::quit(TQT_TQOBJECT(uis), TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(uis, TQ_SLOT(slotQuit()), actionCollection()); } }; @@ -194,8 +193,8 @@ ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString // create dialog, but don't show it defaultProgress = new TDEIO::DefaultProgress( false ); defaultProgress->setOnlyClean( true ); - connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) ); - connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) ); + connect ( defaultProgress, TQ_SIGNAL( stopped() ), this, TQ_SLOT( slotCanceled() ) ); + connect ( &m_showTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT(slotShowDefaultProgress()) ); if ( showDefault ) { m_showTimer.start( 500, true ); @@ -479,7 +478,7 @@ ListProgress::ListProgress (TQWidget *parent, const char *name) //used for squeezing the text in local file name and url m_squeezer=new KSqueezedTextLabel(this); m_squeezer->hide(); - connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(columnWidthChanged(int))); + connect(header(),TQ_SIGNAL(sizeChange(int,int,int)),this,TQ_SLOT(columnWidthChanged(int))); } @@ -596,11 +595,11 @@ UIServer::UIServer() // setup toolbar toolBar()->insertButton("edit-delete", TOOL_CANCEL, - TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), - TQT_SLOT(slotCancelCurrent()), FALSE, i18n("Cancel")); + TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotCancelCurrent()), false, i18n("Cancel")); toolBar()->insertButton("configure", TOOL_CONFIGURE, - TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), - TQT_SLOT(slotConfigure()), true, i18n("Settings...")); + TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotConfigure()), true, i18n("Settings...")); toolBar()->setBarPos( TDEToolBar::Left ); @@ -615,18 +614,18 @@ UIServer::UIServer() setCentralWidget( listProgress ); - connect( listProgress, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelection() ) ); - connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ), - TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); - connect( listProgress, TQT_SIGNAL( contextMenu( TDEListView*, TQListViewItem *, const TQPoint &)), - TQT_SLOT(slotShowContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); + connect( listProgress, TQ_SIGNAL( selectionChanged() ), + TQ_SLOT( slotSelection() ) ); + connect( listProgress, TQ_SIGNAL( executed( TQListViewItem* ) ), + TQ_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); + connect( listProgress, TQ_SIGNAL( contextMenu( TDEListView*, TQListViewItem *, const TQPoint &)), + TQ_SLOT(slotShowContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); // setup animation timer updateTimer = new TQTimer( this ); - connect( updateTimer, TQT_SIGNAL( timeout() ), - TQT_SLOT( slotUpdate() ) ); + connect( updateTimer, TQ_SIGNAL( timeout() ), + TQ_SLOT( slotUpdate() ) ); m_bUpdateNewJob=false; setCaption(i18n("Progress Dialog")); @@ -676,10 +675,10 @@ void UIServer::slotShowContextMenu(TDEListView*, TQListViewItem* item, const TQP if (m_contextMenu==0) { m_contextMenu=new TQPopupMenu(this); - m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQT_SLOT(slotCancelCurrent())); -// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQT_SLOT(slotToggleDefaultProgress())); + m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQ_SLOT(slotCancelCurrent())); +// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQ_SLOT(slotToggleDefaultProgress())); m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(i18n("Settings..."), this, TQT_SLOT(slotConfigure())); + m_contextMenu->insertItem(i18n("Settings..."), this, TQ_SLOT(slotConfigure())); } if ( item ) item->setSelected( true ); @@ -708,9 +707,9 @@ void UIServer::slotConfigure() if (m_configDialog==0) { m_configDialog=new ProgressConfigDialog(0); -// connect(m_configDialog,TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancelConfig())); - connect(m_configDialog,TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotApplyConfig())); - connect(m_configDialog,TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotApplyConfig())); +// connect(m_configDialog,TQ_SIGNAL(cancelClicked()), this, TQ_SLOT(slotCancelConfig())); + connect(m_configDialog,TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotApplyConfig())); + connect(m_configDialog,TQ_SIGNAL(applyClicked()), this, TQ_SLOT(slotApplyConfig())); } m_configDialog->m_showSystemTrayCb->setChecked(m_showSystemTray); m_configDialog->m_keepOpenCb->setChecked(m_keepListOpen); @@ -761,8 +760,8 @@ int UIServer::newJob( TQCString observerAppId, bool showProgress ) bool show = !m_bShowList && showProgress; ProgressItem *item = new ProgressItem( listProgress, it.current(), observerAppId, s_jobId, show ); - connect( item, TQT_SIGNAL( jobCanceled( ProgressItem* ) ), - TQT_SLOT( slotJobCanceled( ProgressItem* ) ) ); + connect( item, TQ_SIGNAL( jobCanceled( ProgressItem* ) ), + TQ_SLOT( slotJobCanceled( ProgressItem* ) ) ); if ( m_bShowList && !updateTimer->isActive() ) updateTimer->start( 1000 ); @@ -1038,7 +1037,7 @@ void UIServer::slotJobCanceled( ProgressItem *item ) { void UIServer::slotQuit() { m_shuttingDown = true; - kapp->quit(); + tdeApp->quit(); } void UIServer::slotUpdate() { @@ -1136,11 +1135,11 @@ void UIServer::slotSelection() { for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) { - toolBar()->setItemEnabled( TOOL_CANCEL, TRUE); + toolBar()->setItemEnabled( TOOL_CANCEL, true); return; } } - toolBar()->setItemEnabled( TOOL_CANCEL, FALSE); + toolBar()->setItemEnabled( TOOL_CANCEL, false); } // This code is deprecated, slaves go to Observer::openPassDlg now, @@ -1206,7 +1205,7 @@ void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &met meta["ssl_cipher_bits"].toInt(), KSSLCertificate::KSSLValidation(meta["ssl_cert_state"].toInt())); kdDebug(7024) << "Showing SSL Info dialog" << endl; -#ifndef Q_WS_WIN +#ifndef TQ_WS_WIN if( mainwindow != 0 ) KWin::setMainWindow( kid, mainwindow ); #endif @@ -1234,7 +1233,7 @@ KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringL kcd->setupDialog(certList); kcd->setHost(host); kdDebug(7024) << "Showing SSL certificate dialog" << endl; -#ifndef Q_WS_WIN +#ifndef TQ_WS_WIN if( mainwindow != 0 ) KWin::setMainWindow( kcd, mainwindow ); #endif @@ -1361,7 +1360,7 @@ void UIServer::resizeEvent(TQResizeEvent* e) bool UIServer::queryClose() { - if (( !m_shuttingDown ) && !kapp->sessionSaving()) { + if (( !m_shuttingDown ) && !tdeApp->sessionSaving()) { hide(); return false; } @@ -1375,7 +1374,7 @@ UIServer* UIServer::createInstance() //------------------------------------------------------------ -extern "C" KDE_EXPORT int kdemain(int argc, char **argv) +extern "C" TDE_EXPORT int kdemain(int argc, char **argv) { TDELocale::setMainCatalogue("tdelibs"); // GS 5/2001 - I changed the name to "TDE" to make it look better @@ -1389,15 +1388,15 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) TDECmdLineArgs::init( argc, argv, &aboutdata ); // TDECmdLineArgs::addCmdLineOptions( options ); - KUniqueApplication::addCmdLineOptions(); + TDEUniqueApplication::addCmdLineOptions(); - if (!KUniqueApplication::start()) + if (!TDEUniqueApplication::start()) { kdDebug(7024) << "tdeio_uiserver is already running!" << endl; return (0); } - KUniqueApplication app; + TDEUniqueApplication app; // This app is started automatically, no need for session management app.disableSessionManagement(); |
