From 545e53fd4648ddbc95725225b025e94054001720 Mon Sep 17 00:00:00 2001
From: tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Date: Thu, 1 Apr 2010 23:14:54 +0000
Subject: Cleanup

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1110119 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
 konq-plugins/rsync/rsyncplugin.cpp | 92 +++++++++++++++++++-------------------
 1 file 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();
-- 
cgit v1.2.3

