diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-01 23:14:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-01 23:14:54 +0000 |
commit | 545e53fd4648ddbc95725225b025e94054001720 (patch) | |
tree | e3fb07eafaf87817ff9244acb025db68a9ac0469 /konq-plugins | |
parent | 1f1dabc7d673c1228f7af00213031970be23563f (diff) | |
download | tdeaddons-545e53fd4648ddbc95725225b025e94054001720.tar.gz tdeaddons-545e53fd4648ddbc95725225b025e94054001720.zip |
Cleanup
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1110119 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins')
-rw-r--r-- | konq-plugins/rsync/rsyncplugin.cpp | 92 |
1 files changed, 47 insertions, 45 deletions
diff --git a/konq-plugins/rsync/rsyncplugin.cpp b/konq-plugins/rsync/rsyncplugin.cpp index 434ceab..7b69b91 100644 --- a/konq-plugins/rsync/rsyncplugin.cpp +++ b/konq-plugins/rsync/rsyncplugin.cpp @@ -101,8 +101,53 @@ #include "rsyncconfigdialog.h" #define myDebug(x) kdDebug(7127) << __LINE__ << ": " x -// #define myDebug(x) cout << __LINE__ << ": " x -#define infoMessage(x) printf("INFO: %s\n\r", x); + +RsyncPlugin::RsyncPlugin (QObject* parent, const char* name, + const QStringList&) + :KParts::Plugin (parent, name), + m_pSyncNow(0), + m_pSyncSetup(0) +{ + m_part = ::qt_cast<KonqDirPart*>(parent); + + if ( !m_part || !m_part->scrollWidget() ) + return; + + m_pSyncNow = new KAction(i18n("Synchronize F&older"), "syncnow", + actionCollection(), "syncnow"); + m_pSyncSetup = new KAction (i18n("Setup Syn&chronization"), "setupsync", + actionCollection(), "setupsync"); + m_pSyncNow->setIcon("remotesync"); + m_pSyncSetup->setIcon("remotesyncconfig"); + m_pSyncNow->setEnabled (false); + + connect (m_part, SIGNAL(aboutToOpenURL()), SLOT(slotOpenURL())); + + connect(m_pSyncNow, SIGNAL(activated()), this, SLOT(slotSync())); + connect(m_pSyncSetup, SIGNAL(activated()), this, SLOT(slotSetup())); + + loadSettings(); + + childPid = 0; + isLoggedIn = false; + firstLogin = true; + connectionAuth.keepPassword = true; + outBufPos = -1; + outBuf = NULL; + outBufLen = 0; + isStat = false; // FIXME: just a workaround for konq deficiencies + redirectUser = ""; // FIXME: just a workaround for konq deficiencies + redirectPass = ""; // FIXME: just a workaround for konq deficiencies +} + +RsyncPlugin::~RsyncPlugin() +{ + delete m_pSyncNow; + delete m_pSyncSetup; +} + +static char *rsyncPath = NULL; +static char *suPath = NULL; static int open_pty_pair(int fd[2]) { @@ -830,49 +875,6 @@ int RsyncPlugin::addLocalFolderByName(QString folderurl, QString remoteurl, QStr return 1; } -RsyncPlugin::RsyncPlugin (QObject* parent, const char* name, - const QStringList&) - :KParts::Plugin (parent, name), - m_pSyncMenu(0) -{ - m_part = ::qt_cast<KonqDirPart*>(parent); - - if ( !m_part || !m_part->scrollWidget() ) - return; - - m_pSyncNow = new KAction(i18n("Synchronize F&older"), "syncnow", - actionCollection(), "syncnow"); - m_pSyncSetup = new KAction (i18n("Setup Syn&chronization"), "setupsync", - actionCollection(), "setupsync"); - m_pSyncNow->setIcon("remotesync"); - m_pSyncSetup->setIcon("remotesyncconfig"); - m_pSyncNow->setEnabled (false); - - connect (m_part, SIGNAL(aboutToOpenURL()), SLOT(slotOpenURL())); - - connect(m_pSyncNow, SIGNAL(activated()), this, SLOT(slotSync())); - connect(m_pSyncSetup, SIGNAL(activated()), this, SLOT(slotSetup())); - - loadSettings(); - - // Initialize the rsync backend variables - childPid = 0; - isLoggedIn = false; - firstLogin = true; - connectionAuth.keepPassword = true; - outBufPos = -1; - outBuf = NULL; - outBufLen = 0; - isStat = false; // FIXME: just a workaround for konq deficiencies - redirectUser = ""; // FIXME: just a workaround for konq deficiencies - redirectPass = ""; // FIXME: just a workaround for konq deficiencies -} - -RsyncPlugin::~RsyncPlugin() -{ - delete m_pSyncMenu; -} - void RsyncPlugin::slotOpenURL () { KURL url = m_part->url(); |