cosmetic changes for the middle column buttons
authorLukas Hrazky <lukkash@email.cz>
Sat, 17 Jul 2010 14:57:32 +0000 (16:57 +0200)
committerLukas Hrazky <lukkash@email.cz>
Sun, 18 Jul 2010 20:10:05 +0000 (22:10 +0200)
Signed-off-by: Lukas Hrazky <lukkash@email.cz>

src/case.cpp
src/case.h

index 5674801..6770447 100644 (file)
@@ -27,11 +27,11 @@ Case::Case(QWidget *parent) :
     rightPane(new Pane(this)),
     activePane(leftPane),
     inactivePane(rightPane),
-    cloneBtn(new Button(">>", 0, 60, 70)),
-    moveBtn(new Button("mv>", 0, 60, 70)),
+    cloneBtn(new Button(">", 0, 60, 70)),
+    swapBtn(new Button("<>", 0, 60, 70)),
     copyBtn(new Button("cp>", 0, 60, 70)),
+    moveBtn(new Button("mv>", 0, 60, 70)),
     delBtn(new Button("rm", 0, 60, 70)),
-    swapBtn(new Button("<>", 0, 60, 70)),
     fileOperator(new FileOperator(this))
 {
     QVBoxLayout *layout = new QVBoxLayout;
@@ -58,10 +58,10 @@ Case::Case(QWidget *parent) :
     cloneBtn->setContentsMargins(0, 0, 0, 0);
 
     middleButtons->addWidget(cloneBtn);
-    middleButtons->addWidget(moveBtn);
+    middleButtons->addWidget(swapBtn);
     middleButtons->addWidget(copyBtn);
+    middleButtons->addWidget(moveBtn);
     middleButtons->addWidget(delBtn);
-    middleButtons->addWidget(swapBtn);
 
     paneLayout->addWidget(rightPane);
 
@@ -71,10 +71,10 @@ Case::Case(QWidget *parent) :
     connect(this, SIGNAL(activePaneSwitched()), rightPane, SLOT(toggleActive()));
 
     connect(cloneBtn, SIGNAL(pressed()), this, SLOT(clonePane()));
-    connect(delBtn, SIGNAL(pressed()), this, SLOT(deleteFiles()));
+    connect(swapBtn, SIGNAL(pressed()), this, SLOT(swapPanes()));
     connect(copyBtn, SIGNAL(pressed()), this, SLOT(copyFiles()));
     connect(moveBtn, SIGNAL(pressed()), this, SLOT(moveFiles()));
-    connect(swapBtn, SIGNAL(pressed()), this, SLOT(swapPanes()));
+    connect(delBtn, SIGNAL(pressed()), this, SLOT(deleteFiles()));
 }
 
 
@@ -84,23 +84,28 @@ void Case::switchActivePane() {
     inactivePane = tmpPane;
 
     if (leftPane == activePane) {
-        cloneBtn->setText(">>");
-        moveBtn->setText("mv>");
+        cloneBtn->setText(">");
         copyBtn->setText("cp>");
+        moveBtn->setText("mv>");
     } else {
-        cloneBtn->setText("<<");
-        moveBtn->setText("<mv");
+        cloneBtn->setText("<");
         copyBtn->setText("<cp");
+        moveBtn->setText("<mv");
     }
 
     emit activePaneSwitched();
 }
 
 
-void Case::deleteFiles() {
-    if (activePane->selection().size()) {
-        fileOperator->deleteFiles(activePane->selection());
-    }
+void Case::clonePane() {
+    inactivePane->changePath(activePane->path());
+}
+
+
+void Case::swapPanes() {
+    QString tmpPath = activePane->path();
+    activePane->changePath(inactivePane->path());
+    inactivePane->changePath(tmpPath);
 }
 
 
@@ -120,13 +125,8 @@ void Case::moveFiles() {
 }
 
 
-void Case::clonePane() {
-    inactivePane->changePath(activePane->path());
-}
-
-
-void Case::swapPanes() {
-    QString tmpPath = activePane->path();
-    activePane->changePath(inactivePane->path());
-    inactivePane->changePath(tmpPath);
+void Case::deleteFiles() {
+    if (activePane->selection().size()) {
+        fileOperator->deleteFiles(activePane->selection());
+    }
 }
index 2040124..b8f2919 100644 (file)
@@ -40,15 +40,15 @@ public slots:
 
 private:
     Pane *leftPane, *rightPane, *activePane, *inactivePane;
-    Button *cloneBtn, *moveBtn, *copyBtn, *delBtn, *swapBtn;
+    Button *cloneBtn, *swapBtn, *copyBtn, *moveBtn, *delBtn;
     FileOperator *fileOperator;
 
 private slots:
-    void deleteFiles();
-    void copyFiles();
-    void moveFiles();
     void clonePane();
     void swapPanes();
+    void copyFiles();
+    void moveFiles();
+    void deleteFiles();
 };
 
 #endif // CASE_H