summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--konq-plugins/rsync/rsyncplugin.cpp92
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();