OSDN Git Service

Ver0.20
authorMasayuki Satoh <miyabi.satoh@gmail.com>
Sun, 31 Aug 2014 14:02:08 +0000 (23:02 +0900)
committerMasayuki Satoh <miyabi.satoh@gmail.com>
Sun, 31 Aug 2014 14:02:08 +0000 (23:02 +0900)
21 files changed:
Gefu.pro
README.md
ReadMe.txt
bookmarkdialog.cpp
deleteworker.cpp
filetablemodel.cpp
filetablemodel.h
folderpanel.cpp
folderpanel.h
folderpanel.ui
folderview.cpp
folderview.h
installer-full.nsi
installer.nsi
keybind.txt
locationbox.cpp [deleted file]
locationbox.h [deleted file]
mainwindow.cpp
mainwindow.h
preferencedialog.ui
version.h

index 435f9dd..b88de8a 100644 (file)
--- a/Gefu.pro
+++ b/Gefu.pro
@@ -33,7 +33,6 @@ SOURCES += main.cpp\
     simpletextview.cpp \
     searchbox.cpp \
     folderview.cpp \
-    locationbox.cpp \
     anyview.cpp \
     folderpanel.cpp \
     bookmarkdialog.cpp \
@@ -59,7 +58,6 @@ HEADERS  += mainwindow.h \
     simpletextview.h \
     searchbox.h \
     folderview.h \
-    locationbox.h \
     version.h \
     anyview.h \
     folderpanel.h \
index 846bb74..e3addcf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,6 +3,10 @@ Gefu
 
 Gefu is an Experimental File Utility.
 
+#### 2014/08/31 Ver0.20
+  * ウィンドウ自体が非アクティブになったとき、両パネルとも暗くなっていたのを修正。
+  * ドロップ時、コピー・移動・キャンセルのポップアップメニューを出すようにした。
+
 #### 2014/08/31 Ver0.19
   * 「アーカイバで開く」を追加。
   * パス設定のiniファイルキーを変更(設定が初期化されます)。
index 835bcd7..ea10fbc 100644 (file)
@@ -1,6 +1,6 @@
 ===============================================================================\r
     Gefu(げふぅ) - Gefu is an Experimental File Utility - \r
-    Version 0.19\r
+    Version 0.20\r
 ===============================================================================\r
                                                        2014/08/31 @miyabi_satoh\r
 \r
    自己の責任の上でご利用ください。\r
  - 配布・転載を行う場合は @miyabi_satoh までご連絡ください。\r
    特に利益を生じる無断配布・無断転載は固く禁じます。\r
+ - メニューおよびツールバーのアイコンには、以下を使用しています\r
+    - Tango Icon Library            http://tango.freedesktop.org/Tango_Icon_Library\r
+    - Utilities-file-archiver.png   http://chakraos.org/wiki/index.php?title=File:Utilities-file-archiver.png\r
+    - Cats Icons 2                  http://www.softicons.com/system-icons/cats-icons-2-by-mcdo-design\r
 \r
 ◇ 連絡先 ◇\r
  Web:     https://sourceforge.jp/projects/gefu/\r
  Twitter: https://twitter.com/miyabi_satoh\r
 \r
 ◇ 履歴 ◇\r
+#### 2014/08/31 Ver0.20\r
+  * ウィンドウ自体が非アクティブになったとき、両パネルとも暗くなっていたのを修正。\r
+  * ドロップ時、コピー・移動・キャンセルのポップアップメニューを出すようにした。\r
+\r
 #### 2014/08/31 Ver0.19\r
   * 「アーカイバで開く」を追加。\r
   * パス設定のiniファイルキーを変更(設定が初期化されます)。\r
index 70274a3..b252623 100644 (file)
@@ -7,7 +7,6 @@
 #include <QFileInfo>
 #include <QMessageBox>
 #include <QSettings>
-//#include <QVector>
 
 BookmarkDialog::BookmarkDialog(QWidget *parent) :
     QDialog(parent),
index d4b0232..478de33 100644 (file)
@@ -64,21 +64,22 @@ void DeleteWorker::operate()
 \r
 void DeleteWorker::Listup(const QString &path)\r
 {\r
-//    qDebug() << tr("Listup: ") << path;\r
-\r
     if (isStopRequested()) {\r
         return;\r
     }\r
 \r
-    QFileInfo info(path);\r
-\r
-    if (info.isDir()) {\r
+    if (QFileInfo(path).isDir()) {\r
         QDir dir(path);\r
-        foreach (QFileInfo info2, dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst)) {\r
-//            qDebug() << info2.fileName();\r
-            Listup(info2.absoluteFilePath());\r
+        QFileInfoList list = dir.entryInfoList(QDir::NoDotAndDotDot |\r
+                                               QDir::System |\r
+                                               QDir::Hidden |\r
+                                               QDir::AllDirs |\r
+                                               QDir::Files,\r
+                                               QDir::DirsFirst);\r
+        foreach (const QFileInfo &info, list) {\r
+            Listup(info.absoluteFilePath());\r
         }\r
     }\r
-//    qDebug() << "Targeting: " << path;\r
+\r
     m_Targets << path;\r
 }\r
index ca37b8e..0388a0b 100644 (file)
@@ -120,17 +120,13 @@ QFileInfo FileTableModel::fileInfo(const QModelIndex &index) const
     return QFileInfo();\r
 }\r
 \r
-void FileTableModel::updateAppearance(bool darker)\r
+void FileTableModel::updateAppearance(int darkness)\r
 {\r
-    qDebug() << "FileTableModel::updateAppearance();" << darker;\r
+    qDebug() << "FileTableModel::updateAppearance();" << darkness;\r
 \r
     QSettings settings;\r
-    int darkness = 100;\r
-    if (darker) {\r
-        darkness += settings.value(IniKey_Darkness).toInt();\r
-    }\r
-    m_font = settings.value(IniKey_ViewFont).value<QFont>();\r
 \r
+    m_font = settings.value(IniKey_ViewFont).value<QFont>();\r
     m_NormalBrush = QBrush(settings.value(IniKey_ViewColorBgNormal).value<QColor>().darker(darkness));\r
     m_NormalTextBrush = QBrush(settings.value(IniKey_ViewColorFgNormal).value<QColor>().darker(darkness));\r
     m_MarkBrush = QBrush(settings.value(IniKey_ViewColorBgMark).value<QColor>().darker(darkness));\r
@@ -145,8 +141,12 @@ void FileTableModel::directoryChange(const QString &path)
 {\r
     qDebug() << "FileTableModel::directoryChange" << path;\r
 \r
+    emit preReload();\r
+\r
     m_fsWatcher.removePath(m_dir.absolutePath());\r
     setPath(path);\r
+\r
+    emit postReload();\r
 }\r
 \r
 int FileTableModel::rowCount(const QModelIndex &parent) const\r
@@ -221,7 +221,6 @@ QVariant FileTableModel::data(const QModelIndex &index, int role) const
             }\r
             else {\r
                 // infoを使うと、正しいアイコンが取れない場合がある…なぜ?\r
-//                return m_IconFactory.icon(QFileInfo(info.absoluteFilePath()));\r
                 return m_IconFactory.icon(QFileInfo(info));\r
             }\r
         }\r
index 2bc028d..ec9af4b 100644 (file)
@@ -16,7 +16,7 @@ public:
 \r
     // action\r
     bool setPath(const QString &path);\r
-    void updateAppearance(bool darker = false);\r
+    void updateAppearance(int darkness = false);\r
 \r
     // getter\r
     QDir::SortFlags sorting() const { return m_dir.sorting(); }\r
@@ -35,6 +35,8 @@ public:
 \r
 signals:\r
     void selectionChanged(int checkedFoldrs, int checkedFiles, quint64 totalSize);\r
+    void preReload();\r
+    void postReload();\r
 \r
 public slots:\r
     void directoryChange(const QString &path);\r
index 93b42c8..051ebb3 100644 (file)
@@ -1,7 +1,6 @@
 #include "common.h"
 #include "mainwindow.h"
 #include "searchbox.h"
-#include "locationbox.h"
 #include "folderpanel.h"
 #include "ui_folderpanel.h"
 
@@ -22,7 +21,7 @@ FolderPanel::~FolderPanel()
     delete ui;
 }
 
-void FolderPanel::initialize(MainWindow *mainWnd, bool left)
+void FolderPanel::initialize(MainWindow *mainWnd)
 {
     qDebug() << "FolderPanel::initialize();";
     m_mainWnd = mainWnd;
@@ -30,7 +29,7 @@ void FolderPanel::initialize(MainWindow *mainWnd, bool left)
     // シグナル&スロット
     connect(ui->searchBox, SIGNAL(textEdited(QString)), this, SLOT(searchItem(QString)));
     connect(ui->folderView, SIGNAL(doubleClicked(QModelIndex)), mainWnd, SLOT(open(QModelIndex)));
-    connect(ui->folderView, SIGNAL(dropAccepted(QFileInfoList)), mainWnd, SLOT(dropAccept(QFileInfoList)));
+    connect(ui->folderView, SIGNAL(dropAccepted(QFileInfoList,QDropEvent*)), mainWnd, SLOT(dropAccept(QFileInfoList,QDropEvent*)));
     connect(ui->folderView, SIGNAL(currentChanged(QFileInfo)), mainWnd, SLOT(currentChange(QFileInfo)));
     connect(ui->folderView, SIGNAL(requestContextMenu(QContextMenuEvent*)), mainWnd, SLOT(showContextMenu(QContextMenuEvent*)));
     connect(ui->folderView, SIGNAL(retrieveStarted(QString)), ui->locationBox, SLOT(setText(QString)));
@@ -42,14 +41,49 @@ void FolderPanel::initialize(MainWindow *mainWnd, bool left)
     // 初期状態では検索ボックスは非表示
     ui->searchBox->setVisible(false);
 
-    // ロケーションボックスを初期化する
-    ui->locationBox->initialize(left);
-
     // フォルダビューを初期化する
-    ui->folderView->initialize(mainWnd, left);
+    ui->folderView->initialize(mainWnd);
+}
+
+void FolderPanel::updateAppearance(bool darker)
+{
+    QSettings settings;
+    QPalette pal;
+    int darkness = 100;
+    if (darker) {
+        darkness += settings.value(IniKey_Darkness).toInt();
+    }
+
+    // ロケーションボックス
+    pal = ui->locationBox->palette();
+    pal.setColor(QPalette::Base, settings.value(IniKey_BoxColorBg).value<QColor>().darker(darkness));
+    pal.setColor(QPalette::Text, settings.value(IniKey_BoxColorFg).value<QColor>().darker(darkness));
+    ui->locationBox->setPalette(pal);
+    ui->locationBox->setFont(settings.value(IniKey_BoxFont).value<QFont>());
+
+    // モデル
+    FileTableModel *model = qobject_cast<FileTableModel*>(ui->folderView->model());
+    model->updateAppearance(darkness);
+
+    // ビュー
+    pal = ui->folderView->palette();
+    pal.setColor(QPalette::Base, settings.value(IniKey_ViewColorBgNormal).value<QColor>().darker(darkness));
+    ui->folderView->setPalette(pal);
+
+    // 行の高さを設定する
+    QHeaderView *header = ui->folderView->verticalHeader();
+    header->setDefaultSectionSize(QFontMetrics(model->font()).height() * 1.5);
+
+    // 列の幅を設定する
+    header = ui->folderView->horizontalHeader();
+    header->setSectionResizeMode(0, QHeaderView::Fixed);
+    header->setSectionResizeMode(1, QHeaderView::Stretch);
+    header->setSectionResizeMode(2, QHeaderView::ResizeToContents);
+    header->setSectionResizeMode(3, QHeaderView::ResizeToContents);
+    header->setSectionResizeMode(4, QHeaderView::ResizeToContents);
 }
 
-LocationBox *FolderPanel::locationBox() const
+QLineEdit *FolderPanel::locationBox() const
 {
     return ui->locationBox;
 }
index 89ea159..10209d6 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <QWidget>
 class QLabel;
+class QLineEdit;
 class LocationBox;
 class FolderView;
 class SearchBox;
@@ -20,10 +21,11 @@ public:
     explicit FolderPanel(QWidget *parent = 0);
     ~FolderPanel();
 
-    void initialize(MainWindow *mainWnd, bool left);
+    void initialize(MainWindow *mainWnd);
+    void updateAppearance(bool darker = false);
 
     // getter
-    LocationBox* locationBox() const;
+    QLineEdit *locationBox() const;
     FolderView* folderView() const;
     SearchBox* searchBox() const;
     QLabel* filterLabel() const;
index 5009f1a..e52dcd6 100644 (file)
@@ -35,7 +35,7 @@
       <number>0</number>
      </property>
      <item>
-      <widget class="LocationBox" name="locationBox">
+      <widget class="QLineEdit" name="locationBox">
        <property name="focusPolicy">
         <enum>Qt::ClickFocus</enum>
        </property>
    <extends>QTableView</extends>
    <header>folderview.h</header>
   </customwidget>
-  <customwidget>
-   <class>LocationBox</class>
-   <extends>QLineEdit</extends>
-   <header>locationbox.h</header>
-  </customwidget>
  </customwidgets>
  <resources>
   <include location="resource.qrc"/>
index 082364a..301e80d 100644 (file)
@@ -1,7 +1,6 @@
 #include "common.h"
 #include "mainwindow.h"
 #include "folderpanel.h"
-#include "locationbox.h"
 #include "folderview.h"
 
 #include <QDebug>
@@ -37,6 +36,8 @@ FolderView::FolderView(QWidget *parent) :
 {
     setModel(&m_model);
     connect(&m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(dataChanged(QModelIndex,QModelIndex)));
+    connect(&m_model, SIGNAL(preReload()), this, SLOT(preReload()));
+    connect(&m_model, SIGNAL(postReload()), this, SLOT(postReload()));
 
     setDragEnabled(true);
     setAcceptDrops(true);
@@ -56,7 +57,7 @@ QString FolderView::side() const
     }
 }
 
-void FolderView::initialize(MainWindow *mainWnd, bool left)
+void FolderView::initialize(MainWindow *mainWnd)
 {
     qDebug() << side() << "initialize";
 
@@ -73,65 +74,42 @@ void FolderView::initialize(MainWindow *mainWnd, bool left)
     // 前回終了時のパスを開く
     QSettings settings;
     setPath(settings.value(side() + slash + IniKey_Dir).toString(), true);
-
-    // 色とフォントを設定する
-    updateAppearance(!left);
-
-    // 列のリサイズモードを設定する
-    QHeaderView *header;
-    header = horizontalHeader();
-    header->setSectionResizeMode(0, QHeaderView::Fixed);
-    header->setSectionResizeMode(1, QHeaderView::Stretch);
-    header->setSectionResizeMode(2, QHeaderView::ResizeToContents);
-    header->setSectionResizeMode(3, QHeaderView::ResizeToContents);
-    header->setSectionResizeMode(4, QHeaderView::ResizeToContents);
 }
 
-void FolderView::updateAppearance(bool darker)
+void FolderView::refresh()
 {
-    qDebug() << side() << "updateAppearance";
-    m_model.updateAppearance(darker);
-
-    QSettings settings;
-    QPalette pal = palette();
-    int darkness = 100;
-    if (darker) {
-        darkness += settings.value(IniKey_Darkness).toInt();
-    }
-    pal.setColor(QPalette::Base, settings.value(IniKey_ViewColorBgNormal).value<QColor>().darker(darkness));
-    setPalette(pal);
+    qDebug() << side() << "refresh";
 
-    // 行の高さを設定する
-    QHeaderView *header = verticalHeader();
-    header->setDefaultSectionSize(QFontMetrics(m_model.font()).height() * 1.5);
+    preReload();
 
-    // 列の幅を設定する
-    header = horizontalHeader();
-    header->setSectionResizeMode(0, QHeaderView::Fixed);
-    header->setSectionResizeMode(1, QHeaderView::Stretch);
-    header->setSectionResizeMode(2, QHeaderView::ResizeToContents);
-    header->setSectionResizeMode(3, QHeaderView::ResizeToContents);
-    header->setSectionResizeMode(4, QHeaderView::ResizeToContents);
+    setPath(m_model.absolutePath(), false);
 
-    repaint();
+    postReload();
 }
 
-void FolderView::refresh()
+void FolderView::preReload()
 {
-    qDebug() << side() << "refresh";
-
-    int row = currentIndex().row();
-
-    setPath(m_model.absolutePath(), false);
+    // 現在行と名前を保存しておく
+    m_saveRow = currentIndex().row();
+    m_saveName = currentItem().fileName();
+}
 
-    if (row < 0) {
-        row = 0;
+void FolderView::postReload()
+{
+    // 保存した名前と同名アイテムが見つかれば、再選択する
+    for (int row = 0; row < m_model.rowCount(); row++) {
+        QModelIndex index = m_model.index(row, 1);
+        if (m_model.fileInfo(index).fileName().indexOf(m_saveName) != -1) {
+            setCurrentIndex(index);
+            return;
+        }
     }
-    else if (row >= m_model.rowCount()) {
-        row = m_model.rowCount() - 1;
+
+    // 同名アイテムが見つからなければ、行を維持する
+    if (m_saveRow >= m_model.rowCount()) {
+        m_saveRow = m_model.rowCount() - 1;
     }
-    setCurrentIndex(m_model.index(row, 1));
-//    selectRow(row);
+    setCurrentIndex(m_model.index(m_saveRow, 1));
 }
 
 void FolderView::searchItem(const QString &text)
@@ -191,11 +169,9 @@ void FolderView::setCheckStateAll(Qt::CheckState state)
 
     QModelIndex current = currentIndex();
 
-    setUpdatesEnabled(false);
     for (int n = 0; n < m_model.rowCount(); n++) {
         m_model.setData(m_model.index(n, 0), state, Qt::CheckStateRole);
     }
-    setUpdatesEnabled(true);
 
     setCurrentIndex(current);
 }
@@ -206,7 +182,6 @@ void FolderView::setCheckStateAllFiles()
 
     QModelIndex current = currentIndex();
 
-    setUpdatesEnabled(false);
     for (int n = 0; n < m_model.rowCount(); n++) {
         QModelIndex index = m_model.index(n, 0);
         QFileInfo info = m_model.fileInfo(index);
@@ -217,7 +192,6 @@ void FolderView::setCheckStateAllFiles()
             m_model.setData(index, Qt::Checked, Qt::CheckStateRole);
         }
     }
-    setUpdatesEnabled(true);
 
     setCurrentIndex(current);
 }
@@ -228,7 +202,6 @@ void FolderView::invertCheckState()
 
     QModelIndex current = currentIndex();
 
-    setUpdatesEnabled(false);
     for (int n = 0; n < m_model.rowCount(); n++) {
         QModelIndex index = m_model.index(n, 0);
         if (m_model.data(index, Qt::CheckStateRole).toInt() == Qt::Checked) {
@@ -238,7 +211,6 @@ void FolderView::invertCheckState()
             m_model.setData(index, Qt::Checked, Qt::CheckStateRole);
         }
     }
-    setUpdatesEnabled(true);
 
     setCurrentIndex(current);
 }
@@ -320,6 +292,11 @@ QFileInfoList FolderView::selectedItems() const
     return list;
 }
 
+FolderPanel *FolderView::parentPanel() const
+{
+    return qobject_cast<FolderPanel*>(parentWidget());
+}
+
 void FolderView::setPath(const QString &path, bool addHistory)
 {
     qDebug() << side() << "setPath" << path << addHistory;
@@ -329,10 +306,8 @@ void FolderView::setPath(const QString &path, bool addHistory)
     m_mainWnd->statusBar()->showMessage(tr("ファイルリストを取得しています..."));
     emit retrieveStarted(path);
 
-    setUpdatesEnabled(false);
     m_model.setPath(path);
     setCurrentIndex(m_model.index(0, 1));
-    setUpdatesEnabled(true);
 
     if (addHistory) {
         m_history.add(path);
@@ -519,7 +494,7 @@ void FolderView::dropEvent(QDropEvent *event)
 
     event->acceptProposedAction();
 
-    emit dropAccepted(list);
+    emit dropAccepted(list, event);
 }
 
 
@@ -529,30 +504,3 @@ void FolderView::contextMenuEvent(QContextMenuEvent *event)
 
     emit requestContextMenu(event);
 }
-
-
-void FolderView::focusInEvent(QFocusEvent *event)
-{
-    if (!currentIndex().isValid()) {
-        setCurrentIndex(m_model.index(0, 1));
-    }
-
-    this->updateAppearance();
-
-    FolderPanel *fp = qobject_cast<FolderPanel*>(parentWidget());
-    fp->locationBox()->updateAppearance();
-
-    QTableView::focusInEvent(event);
-}
-
-void FolderView::focusOutEvent(QFocusEvent *event)
-{
-    m_model.updateAppearance(true);
-
-    this->updateAppearance(true);
-
-    FolderPanel *fp = qobject_cast<FolderPanel*>(parentWidget());
-    fp->locationBox()->updateAppearance(true);
-
-    QTableView::focusOutEvent(event);
-}
index 42705a8..e23813c 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <QTableView>
 class MainWindow;
+class FolderPanel;
 
 class FolderView : public QTableView
 {
@@ -16,9 +17,7 @@ public:
     QString side() const;
 
     // actions
-    void initialize(MainWindow *mainWnd, bool left);
-    void updateAppearance(bool darker = false);
-    void refresh();
+    void initialize(MainWindow *mainWnd);
 
     void searchItem(const QString &text);
     void searchNext(const QString &text);
@@ -39,6 +38,8 @@ public:
     QFileInfoList selectedItems() const;
     const History* history() const { return &m_history; }
     QStringList nameFilters() const { return m_model.nameFilters(); }
+    FolderPanel *parentPanel() const;
+
 
     // setter
     void setPath(const QString &path, bool addHistory);
@@ -53,18 +54,22 @@ private:
     History m_history;
     QPoint m_dragStartPos;
     bool m_dragging;
+    int m_saveRow;
+    QString m_saveName;
 
 signals:
     void currentChanged(const QFileInfo &info);
     void dataChanged();
-    void dropAccepted(const QFileInfoList &list);
+    void dropAccepted(const QFileInfoList &list, QDropEvent *event);
     void itemFound();
     void itemNotFound();
     void retrieveStarted(const QString &path);
     void requestContextMenu(QContextMenuEvent *event);
-//    void keyPressed(QKeyEvent *event);
 
 public slots:
+    void refresh();
+    void preReload();
+    void postReload();
 
     // QAbstractItemView interface
 protected slots:
@@ -79,8 +84,6 @@ protected:
     void dragEnterEvent(QDragEnterEvent *event);
     void dropEvent(QDropEvent *event);
     void contextMenuEvent(QContextMenuEvent *event);
-    void focusInEvent(QFocusEvent *event);
-    void focusOutEvent(QFocusEvent *event);
 };
 
 #endif // FOLDERVIEW_H
index fc0a1ce..921179b 100644 (file)
@@ -2,7 +2,7 @@
 \r
 ; HM NIS Edit Wizard helper defines\r
 !define PRODUCT_NAME "Gefu"\r
-!define PRODUCT_VERSION "0.19"\r
+!define PRODUCT_VERSION "0.20"\r
 !define PRODUCT_PUBLISHER "@miyabi_satoh"\r
 !define PRODUCT_WEB_SITE "http://gefu.sourceforge.jp/"\r
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Gefu.exe"\r
@@ -51,7 +51,7 @@ var ICONS_GROUP
 ; MUI end ------\r
 \r
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
-OutFile "Gefu019_full_setup.exe"\r
+OutFile "Gefu020_full_setup.exe"\r
 InstallDir "$PROGRAMFILES\Gefu"\r
 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""\r
 ShowInstDetails show\r
index d18e909..920f98b 100644 (file)
@@ -2,7 +2,7 @@
 \r
 ; HM NIS Edit Wizard helper defines\r
 !define PRODUCT_NAME "Gefu"\r
-!define PRODUCT_VERSION "0.19"\r
+!define PRODUCT_VERSION "0.20"\r
 !define PRODUCT_PUBLISHER "@miyabi_satoh"\r
 !define PRODUCT_WEB_SITE "http://gefu.sourceforge.jp/"\r
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Gefu.exe"\r
@@ -51,7 +51,7 @@ var ICONS_GROUP
 ; MUI end ------\r
 \r
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
-OutFile "Gefu019_Setup.exe"\r
+OutFile "Gefu020_Setup.exe"\r
 InstallDir "$PROGRAMFILES\Gefu"\r
 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""\r
 ShowInstDetails show\r
index d11274d..20d4b4c 100644 (file)
@@ -1,4 +1,13 @@
 == キーバインド一覧
+= 共通
+||キー      ||装飾なし                           ||Shift                            ||Alt                            ||Ctrl(Command)                ||覚え方                         ||
+||Q         ||終了                               ||                                 ||                               ||                             ||Quit                           ||
+||Z         ||環境設定                           ||アップデートを確認               ||                               ||                             ||                               ||
+||+         ||フォントサイズを大きく/拡大       ||                                 ||                               ||                             ||                               ||
+||-         ||フォントサイズを小さく/縮小       ||                                 ||                               ||                             ||                               ||
+||↑        ||カーソルを上に移動                 ||隣パネルのカーソルを上に移動     ||隣パネルのカーソルを先頭に移動 ||                             ||                               ||
+||↓        ||カーソルを下に移動                 ||隣パネルのカーソルを下に移動     ||隣パネルのカーソルを末尾に移動 ||                             ||                               ||
+
 = フォルダビュー
 ||キー      ||装飾なし                           ||Shift                            ||Alt                            ||Ctrl(Command)                ||覚え方                         ||
 ||A         ||すべてのファイルをマーク           ||すべてマーク                     ||                               ||                             ||All                            ||
 ||M         ||開く                               ||アプリケーションで開く           ||                               ||隣のパネルにアイテムを移動   ||viのキーバインド, Move         ||
 ||O         ||隣のパネルと同じフォルダを表示     ||隣のパネルに同じフォルダを表示   ||                               ||                             ||Onaji(同じ)                    ||
 ||P         ||プレビューモードに切り替え/解除   ||                                 ||                               ||                             ||Preview                        ||
-||Q         ||終了                               ||                                 ||                               ||                             ||Quit                           ||
 ||R         ||履歴を表示                         ||                                 ||                               ||名前の変更                   ||Rireki, Rename                 ||
 ||S         ||ソート方法を選択                   ||システムファイルを表示/非表示    ||                               ||                             ||Sort, System                   ||
 ||U         ||すべてのマークを解除               ||アーカイバで開く                 ||                               ||                             ||Unmark, Unpack                 ||
 ||W         ||表示フォルダを交換                 ||                                 ||                               ||                             ||swapの「W」                    ||
 ||X         ||コマンドを実行                     ||                                 ||                               ||                             ||executeの「X」                 ||
-||Z         ||環境設定                           ||アップデートを確認               ||                               ||                             ||                               ||
 ||TAB       ||隣のパネルに移動                   ||                                 ||                               ||                             ||                               ||
-||SPACE     ||マーク/解除                       ||中央で分割                       ||                               ||                             ||                               ||
-||ENTER     ||フォルダを開く/内蔵ビューアで開く ||アプリケーションで開く           ||                               ||                             ||                               ||
+||SPACE     ||マーク/解除                       ||パネルを中央で分割               ||                               ||                             ||                               ||
+||RETURN    ||フォルダを開く/内蔵ビューアで開く ||アプリケーションで開く           ||                               ||                             ||                               ||
 ||BACKSPACE ||親フォルダに移動                   ||ルートフォルダに移動             ||                               ||                             ||                               ||
 ||[         ||履歴を戻る                         ||                                 ||                               ||                             ||                               ||
 ||]         ||履歴を進む                         ||                                 ||                               ||                             ||                               ||
 ||>         ||ターミナルで開く                   ||                                 ||                               ||                             ||                               ||
 ||*         ||フィルタを設定                     ||                                 ||                               ||                             ||ワイルドカード(*)              ||
 ||/         ||ファイル検索開始/終了              ||                                 ||                               ||                             ||                               ||
-||+         ||フォントサイズを大きく             ||                                 ||                               ||                             ||                               ||
-||-         ||フォントサイズを小さく             ||                                 ||                               ||                             ||                               ||
-||↑        ||カーソルを上に移動                 ||隣パネルのカーソルを上に移動     ||隣パネルのカーソルを先頭に移動 ||                             ||                               ||
-||↓        ||カーソルを下に移動                 ||隣パネルのカーソルを下に移動     ||隣パネルのカーソルを末尾に移動 ||                             ||                               ||
 ||←        ||親フォルダに移動/隣のパネルに移動  ||右パネルを拡大                   ||                               ||                             ||                               ||
 ||→        ||親フォルダに移動/隣のパネルに移動  ||左パネルを拡大                   ||                               ||                             ||                               ||
+
 = テキストビューア
 ||キー      ||装飾なし                           ||Shift                            ||Alt                            ||Ctrl(Command)                    ||覚え方                ||
 ||C         ||ファイル名をクリップボードにコピー ||フルパスをクリップボードにコピー ||                               ||選択範囲をクリップボードにコピー ||Copy                  ||
 ||K         ||カーソルを上に移動                 ||カーソルを先頭に移動             ||                               ||                                 ||viのキーバインド      ||
 ||O         ||                                   ||                                 ||                               ||UTF-16BEで再読込                 ||I(UTF-16)の隣のキー   ||
 ||P         ||                                   ||                                 ||                               ||UTF-16LEで再読込                 ||O(UTF-16BE)の隣のキー ||
-||Q         ||終了                               ||                                 ||                               ||                                 ||Quit                  ||
 ||S         ||                                   ||                                 ||                               ||Shift-JISで再読込                ||SJIS                  ||
 ||U         ||                                   ||                                 ||                               ||UTF-8で再読込                    ||UTF-8                 ||
-||Z         ||環境設定                           ||アップデートを確認               ||                               ||                                 ||                      ||
-||ENTER     ||フォルダビューに戻る               ||                                 ||                               ||                                 ||                      ||
+||RETURN    ||フォルダビューに戻る               ||                                 ||                               ||                                 ||                      ||
 ||BACKSPACE ||フォルダビューに戻る               ||                                 ||                               ||                                 ||                      ||
-||+         ||フォントサイズを大きく             ||                                 ||                               ||                                 ||                      ||
-||-         ||フォントサイズを小さく             ||                                 ||                               ||                                 ||                      ||
-||↑        ||カーソルを上に移動                 ||隣パネルのカーソルを上に移動     ||隣パネルのカーソルを先頭に移動 ||                                 ||                      ||
-||↓        ||カーソルを下に移動                 ||隣パネルのカーソルを下に移動     ||隣パネルのカーソルを末尾に移動 ||                                 ||                      ||
 ||←        ||PageUp                             ||                                 ||                               ||                                 ||                      ||
 ||→        ||PageDown                           ||                                 ||                               ||                                 ||                      ||
+
+= 画像ビューア
+||キー      ||装飾なし                           ||Shift ||Alt ||Ctrl(Command) ||覚え方 ||
+||SPACE     ||ウィンドウにフィット               ||      ||    ||              ||       ||
+||RETURN    ||フォルダビューに戻る               ||      ||    ||              ||       ||
+||BACKSPACE ||フォルダビューに戻る               ||      ||    ||              ||       ||
+||=         ||等倍                               ||      ||    ||              ||       ||
+||9         ||右に90度回転                       ||      ||    ||              ||       ||
+||0         ||右に180度回転                      ||      ||    ||              ||       ||
diff --git a/locationbox.cpp b/locationbox.cpp
deleted file mode 100644 (file)
index 2468434..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "common.h"
-#include "locationbox.h"
-
-#include <QDebug>
-#include <QSettings>
-
-LocationBox::LocationBox(QWidget *parent) :
-    QLineEdit(parent)
-{
-}
-
-void LocationBox::initialize(bool left)
-{
-    qDebug() << "LocationBox::initialize";
-
-    updateAppearance(!left);
-}
-
-void LocationBox::updateAppearance(bool darker)
-{
-    qDebug() << "LocationBox::updateAppearance";
-
-    QSettings settings;
-
-    QPalette pal = palette();
-    int darkness = 100;
-    if (darker) {
-        darkness += settings.value(IniKey_Darkness).toInt();
-    }
-    pal.setColor(QPalette::Base, settings.value(IniKey_BoxColorBg).value<QColor>().darker(darkness));
-    pal.setColor(QPalette::Text, settings.value(IniKey_BoxColorFg).value<QColor>().darker(darkness));
-    setPalette(pal);
-
-    setFont(settings.value(IniKey_BoxFont).value<QFont>());
-}
diff --git a/locationbox.h b/locationbox.h
deleted file mode 100644 (file)
index ac41b8f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef LOCATIONBOX_H
-#define LOCATIONBOX_H
-
-#include <QLineEdit>
-
-class LocationBox : public QLineEdit
-{
-    Q_OBJECT
-public:
-    explicit LocationBox(QWidget *parent = 0);
-
-    void initialize(bool left);
-    void updateAppearance(bool darker = false);
-
-signals:
-
-public slots:
-
-};
-
-#endif // LOCATIONBOX_H
index b7160cc..22091c0 100644 (file)
@@ -3,7 +3,6 @@
 #include "preferencedialog.h"\r
 #include "folderview.h"\r
 #include "searchbox.h"\r
-#include "locationbox.h"\r
 #include "copymoveworker.h"\r
 #include "operationdialog.h"\r
 #include "overwritedialog.h"\r
@@ -37,7 +36,7 @@
 MainWindow::MainWindow(QWidget *parent) :\r
     QMainWindow(parent),\r
     ui(new Ui::MainWindow),\r
-    m_focusedView(NULL),\r
+    m_activeView(NULL),\r
     m_overwriteDialog(NULL),\r
     m_viewMode(ModeBasic)\r
 {\r
@@ -78,7 +77,8 @@ MainWindow::MainWindow(QWidget *parent) :
         fp->setObjectName(QString("folderPanel%1").arg(i));\r
         fp->folderView()->setObjectName(QString("folderView%1").arg(i));\r
 \r
-        fp->initialize(this, i == 1);\r
+        fp->initialize(this);\r
+        fp->updateAppearance(i == 2);\r
     }\r
 \r
     QSettings settings;\r
@@ -88,8 +88,6 @@ MainWindow::MainWindow(QWidget *parent) :
     // メニュー項目の状態を初期化する\r
     ui->view_Hidden->setChecked(settings.value(IniKey_ShowHidden).toBool());\r
     ui->view_System->setChecked(settings.value(IniKey_ShowSystem).toBool());\r
-//    ui->action_OpenEditor->setEnabled(!settings.value(IniKey_PathEditor).toString().isEmpty());\r
-//    ui->action_OpenTerminal->setEnabled(!settings.value(IniKey_PathTerminal).toString().isEmpty());\r
 \r
     // 追加のショートカットキーを設定する\r
     QList<QKeySequence> shortcuts;\r
@@ -206,8 +204,10 @@ void MainWindow::focusChange(QWidget *old, QWidget *now)
     if (now == ui->pane1->folderPanel()->folderView() ||\r
         now == ui->pane2->folderPanel()->folderView())\r
     {\r
-        FolderView *view = static_cast<FolderView*>(now);\r
-        ui->statusBar->showMessage(view->currentItem().absoluteFilePath());\r
+        m_activeView = qobject_cast<FolderView*>(now);\r
+        ui->statusBar->showMessage(m_activeView->currentItem().absoluteFilePath());\r
+        m_activeView->parentPanel()->updateAppearance(false);\r
+        otherSideFolderView(m_activeView)->parentPanel()->updateAppearance(true);\r
     }\r
 \r
     if (now) {\r
@@ -219,10 +219,7 @@ void MainWindow::executeCommand()
 {\r
     qDebug() << "MainWindow::executeCommand";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QFileInfoList list = view->selectedItems();\r
+    QFileInfoList list = m_activeView->selectedItems();\r
     QString command = QString::null;\r
     foreach (const QFileInfo &info, list) {\r
 #ifdef Q_OS_MAC\r
@@ -248,7 +245,7 @@ void MainWindow::executeCommand()
     int ret = dlg.exec();\r
     command = dlg.textValue();\r
     if (ret == QDialog::Accepted && !command.isEmpty()) {\r
-        startProcess(command, view->dir(), tr("コマンドの実行に失敗しました。"));\r
+        startProcess(command, m_activeView->dir(), tr("コマンドの実行に失敗しました。"));\r
     }\r
 }\r
 \r
@@ -284,10 +281,7 @@ void MainWindow::historyBack()
 {\r
     qDebug() << "MainWindow::historyBack();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    if (view->historyBack()) {\r
+    if (m_activeView->historyBack()) {\r
         updateActions();\r
     }\r
 }\r
@@ -296,10 +290,7 @@ void MainWindow::historyForward()
 {\r
     qDebug() << "MainWindow::historyForward();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    if (view->historyForward()) {\r
+    if (m_activeView->historyForward()) {\r
         updateActions();\r
     }\r
 }\r
@@ -308,104 +299,59 @@ void MainWindow::markAll()
 {\r
     qDebug() << "MainWindow::markAll();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->setCheckStateAll(Qt::Checked);\r
+    m_activeView->setCheckStateAll(Qt::Checked);\r
 }\r
 \r
 void MainWindow::markAllFiles()\r
 {\r
     qDebug() << "MainWindow::markAllFiles();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->setCheckStateAllFiles();\r
+    m_activeView->setCheckStateAllFiles();\r
 }\r
 \r
 void MainWindow::markAllOff()\r
 {\r
     qDebug() << "MainWindow::markAllOff();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->setCheckStateAll(Qt::Unchecked);\r
+    m_activeView->setCheckStateAll(Qt::Unchecked);\r
 }\r
 \r
 void MainWindow::markInvert()\r
 {\r
     qDebug() << "MainWindow::markInvert();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->invertCheckState();\r
+    m_activeView->invertCheckState();\r
 }\r
 \r
 void MainWindow::markToggle()\r
 {\r
     qDebug() << "MainWindow::markToggle();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->toggleCheckState(view->currentIndex());\r
+    m_activeView->toggleCheckState(m_activeView->currentIndex());\r
 }\r
 \r
 void MainWindow::moveItems()\r
 {\r
     qDebug() << "MainWindow::moveItems";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QFileInfoList list = view->selectedItems();\r
+    QFileInfoList list = m_activeView->selectedItems();\r
     if (list.isEmpty()) {\r
         return;\r
     }\r
 \r
-    QSettings settings;\r
-    if (settings.value(IniKey_ConfirmMove).toBool()) {\r
-        if (QMessageBox::question(this, tr("確認"), tr("移動を実行しますか?"))\r
-            != QMessageBox::Yes)\r
-        {\r
-            return;\r
-        }\r
-    }\r
-\r
-    // 上書き確認ダイアログを初期化する\r
-    m_overwriteDialog->reset();\r
+    int row = m_activeView->currentIndex().row();\r
 \r
-    // ワーカースレッドを作成する\r
-    FolderView *other = otherSideFolderView(view);\r
-    CopyMoveWorker *worker = new CopyMoveWorker();\r
-    connect(worker, SIGNAL(askOverWrite(QString*,QString*,QString,QString)),\r
-            this, SLOT(askOverWrite(QString*,QString*,QString,QString)));\r
-    worker->setCopyList(&list);\r
-    worker->setTargetDir(other->dir());\r
-    worker->setMoveMode(true);\r
+    QString tgtPath = otherSideFolderView(m_activeView)->dir();\r
+    moveItems(list, tgtPath);\r
+    m_activeView->refresh();\r
 \r
-    // 進捗ダイアログを表示して、処理を開始する\r
-    OperationDialog opDlg(this);\r
-    opDlg.setWindowTitle(tr("移動"));\r
-    opDlg.setWorker(worker);\r
-    opDlg.setAutoClose(settings.value(IniKey_AutoCloseMove).toBool());\r
-\r
-    int row = view->currentIndex().row();\r
-\r
-    opDlg.exec();\r
-\r
-    if (row >= view->model()->rowCount()) {\r
-        row = view->model()->rowCount() - 1;\r
+    if (row >= m_activeView->model()->rowCount()) {\r
+        row = m_activeView->model()->rowCount() - 1;\r
     }\r
-    //view->selectRow(row);\r
-    view->setCurrentIndex(view->model()->index(row, 1));\r
-\r
-    settings.setValue(IniKey_AutoCloseMove, opDlg.autoClose());\r
+    m_activeView->setCurrentIndex(m_activeView->model()->index(row, 1));\r
 }\r
 \r
+\r
 void MainWindow::leftKeyPress()\r
 {\r
     qDebug() << "MainWindow::leftKeyPress();";\r
@@ -451,13 +397,10 @@ void MainWindow::chooseFolder()
 {\r
     qDebug() << "MainWindow::chooseFolder();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QString path = QFileDialog::getExistingDirectory(\r
-                this, tr("フォルダを選択"), view->dir());\r
+                this, tr("フォルダを選択"), m_activeView->dir());\r
     if (!path.isEmpty()) {\r
-        view->setPath(path, true);\r
+        m_activeView->setPath(path, true);\r
         updateActions();\r
     }\r
 }\r
@@ -466,22 +409,16 @@ void MainWindow::copyFilenameToClipboard()
 {\r
     qDebug() << "MainWindow::copyFilenameToClipboard();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QClipboard *clipboard = QApplication::clipboard();\r
-    clipboard->setText(view->currentItem().fileName());\r
+    clipboard->setText(m_activeView->currentItem().fileName());\r
 }\r
 \r
 void MainWindow::copyFullpathTpClipboard()\r
 {\r
     qDebug() << "MainWindow::copyFullpathTpClipboard();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QClipboard *clipboard = QApplication::clipboard();\r
-    clipboard->setText(view->currentItem().absoluteFilePath());\r
+    clipboard->setText(m_activeView->currentItem().absoluteFilePath());\r
 }\r
 \r
 void MainWindow::askOverWrite(QString *copyMethod,\r
@@ -534,19 +471,32 @@ void MainWindow::currentChange(const QFileInfo &info)
     updateActions();\r
 }\r
 \r
-void MainWindow::dropAccept(const QFileInfoList &list)\r
+void MainWindow::dropAccept(const QFileInfoList &list, QDropEvent *event)\r
 {\r
     qDebug() << "MainWindow::dropAccept();";\r
 \r
     FolderView *view = static_cast<FolderView*>(sender());\r
     Q_CHECK_PTR(view);\r
 \r
-    copyItems(list, view->dir());\r
+    bool move = false;\r
+    QMenu menu(this);\r
+    QAction *actCopy = menu.addAction(tr("コピー"));\r
+    QAction *actMove = menu.addAction(tr("移動"));\r
+    menu.addSeparator();\r
+    menu.addAction(tr("キャンセル"));\r
+\r
+    QAction *selected = menu.exec(view->mapToGlobal(event->pos()));\r
+    if (selected == actMove) {\r
+        moveItems(list, view->dir());\r
+    }\r
+    else if (selected == actCopy) {\r
+        copyItems(list, view->dir());\r
+    }\r
 }\r
 \r
 void MainWindow::copyItems(const QFileInfoList &list, const QString &tgtDir)\r
 {\r
-    qDebug() << "MainWindow::copyItems();";\r
+    qDebug() << "MainWindow::copyItems();" << tgtDir;\r
 \r
     QSettings settings;\r
     if (settings.value(IniKey_ConfirmCopy).toBool()) {\r
@@ -579,19 +529,51 @@ void MainWindow::copyItems(const QFileInfoList &list, const QString &tgtDir)
     settings.setValue(IniKey_AutoCloseCopy, opDlg.autoClose());\r
 }\r
 \r
+void MainWindow::moveItems(const QFileInfoList &list, const QString &tgtDir)\r
+{\r
+    qDebug() << "MainWindow::moveItems();" << tgtDir;\r
+\r
+    QSettings settings;\r
+    if (settings.value(IniKey_ConfirmMove).toBool()) {\r
+        if (QMessageBox::question(this, tr("確認"), tr("移動を実行しますか?"))\r
+            != QMessageBox::Yes)\r
+        {\r
+            return;\r
+        }\r
+    }\r
+\r
+    // 上書き確認ダイアログを初期化する\r
+    m_overwriteDialog->reset();\r
+\r
+    // ワーカースレッドを作成する\r
+    CopyMoveWorker *worker = new CopyMoveWorker();\r
+    connect(worker, SIGNAL(askOverWrite(QString*,QString*,QString,QString)),\r
+            this, SLOT(askOverWrite(QString*,QString*,QString,QString)));\r
+    worker->setCopyList(&list);\r
+    worker->setTargetDir(tgtDir);\r
+    worker->setMoveMode(true);\r
+\r
+    // 進捗ダイアログを表示して、処理を開始する\r
+    OperationDialog opDlg(this);\r
+    opDlg.setWindowTitle(tr("移動"));\r
+    opDlg.setWorker(worker);\r
+    opDlg.setAutoClose(settings.value(IniKey_AutoCloseMove).toBool());\r
+\r
+    opDlg.exec();\r
+\r
+    settings.setValue(IniKey_AutoCloseMove, opDlg.autoClose());\r
+}\r
+\r
 void MainWindow::copyItems()\r
 {\r
     qDebug() << "MainWindow::copyItems";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QFileInfoList list = view->selectedItems();\r
+    QFileInfoList list = m_activeView->selectedItems();\r
     if (list.isEmpty()) {\r
         return;\r
     }\r
 \r
-    QString tgtPath = otherSideFolderView(view)->dir();\r
+    QString tgtPath = otherSideFolderView(m_activeView)->dir();\r
     copyItems(list, tgtPath);\r
 }\r
 \r
@@ -599,9 +581,6 @@ void MainWindow::createFile()
 {\r
     qDebug() << "MainWindow::createFile";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     bool bOk;\r
     QString name = QInputDialog::getText(\r
                 this, tr("ファイルを作成"), tr("ファイル名:"),\r
@@ -610,7 +589,7 @@ void MainWindow::createFile()
         return;\r
     }\r
 \r
-    QDir dir(view->dir());\r
+    QDir dir(m_activeView->dir());\r
     QFile file(dir.absoluteFilePath(name));\r
     if (!file.open(QIODevice::WriteOnly)) {\r
         QMessageBox::critical(\r
@@ -625,8 +604,8 @@ void MainWindow::createFile()
             openEditor(dir.absoluteFilePath(name));\r
         }\r
 \r
-        view->refresh();\r
-        view->searchItem(name);\r
+        m_activeView->refresh();\r
+        m_activeView->searchItem(name);\r
     }\r
 }\r
 \r
@@ -634,9 +613,6 @@ void MainWindow::createFolder()
 {\r
     qDebug() << "MainWindow::createFolder";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     bool bOk;\r
     QString name = QInputDialog::getText(\r
                 this, tr("フォルダを作成"), tr("フォルダ名:"),\r
@@ -645,7 +621,7 @@ void MainWindow::createFolder()
         return;\r
     }\r
 \r
-    QDir dir(view->dir());\r
+    QDir dir(m_activeView->dir());\r
     if (!dir.mkpath(name)) {\r
         QMessageBox::critical(\r
                     this, tr("エラー"),\r
@@ -654,11 +630,11 @@ void MainWindow::createFolder()
     else {\r
         QSettings settings;\r
         if (settings.value(IniKey_MoveAfterCreateFolder).toBool()) {\r
-            view->setPath(dir.absoluteFilePath(name), true);\r
+            m_activeView->setPath(dir.absoluteFilePath(name), true);\r
         }\r
 \r
-        view->refresh();\r
-        view->searchItem(name);\r
+        m_activeView->refresh();\r
+        m_activeView->searchItem(name);\r
     }\r
 }\r
 \r
@@ -666,10 +642,7 @@ void MainWindow::deleteItems()
 {\r
     qDebug() << "MainWindow::deleteItems";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QFileInfoList list = view->selectedItems();\r
+    QFileInfoList list = m_activeView->selectedItems();\r
     if (list.isEmpty()) {\r
         return;\r
     }\r
@@ -699,16 +672,15 @@ void MainWindow::deleteItems()
     opDlg.setWorker(worker);\r
     opDlg.setAutoClose(settings.value(IniKey_AutoCloseDelete).toBool());\r
 \r
-    int row = view->currentIndex().row();\r
+    int row = m_activeView->currentIndex().row();\r
 \r
     opDlg.exec();\r
-    view->refresh();\r
+    m_activeView->refresh();\r
 \r
-    if (row >= view->model()->rowCount()) {\r
-        row = view->model()->rowCount() - 1;\r
+    if (row >= m_activeView->model()->rowCount()) {\r
+        row = m_activeView->model()->rowCount() - 1;\r
     }\r
-//    view->selectRow(row);\r
-    view->setCurrentIndex(view->model()->index(row, 1));\r
+    m_activeView->setCurrentIndex(m_activeView->model()->index(row, 1));\r
 \r
     settings.setValue(IniKey_AutoCloseDelete, opDlg.autoClose());\r
 }\r
@@ -716,21 +688,15 @@ void MainWindow::deleteItems()
 void MainWindow::open(const QModelIndex &index)\r
 {\r
     Q_UNUSED(index);\r
-    qDebug() << "MainWindow::open";\r
-\r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
+    qDebug() << "MainWindow::open" << index;\r
 \r
-    QFileInfo info = view->currentItem();\r
+    QFileInfo info = m_activeView->currentItem();\r
     if (info.isDir()) {\r
-        view->setPath(info.absoluteFilePath(), true);\r
+        m_activeView->setPath(info.absoluteFilePath(), true);\r
         updateActions();\r
         return;\r
     }\r
 \r
-    setUpdatesEnabled(false);\r
-\r
-    m_focusedView = view;\r
     if (ui->pane3->setViewItem(info)) {\r
         ui->pane3->setVisible(true);\r
         ui->splitter->setVisible(false);\r
@@ -739,18 +705,17 @@ void MainWindow::open(const QModelIndex &index)
     }\r
     else {\r
         ui->pane3->setVisible(false);\r
+        if (index.isValid()) {\r
+            QString path = QDir::toNativeSeparators(info.absoluteFilePath());\r
+            QDesktopServices::openUrl(QUrl("file:///" + path));\r
+        }\r
     }\r
-\r
-    setUpdatesEnabled(true);\r
 }\r
 \r
 void MainWindow::openEditor(const QString &path)\r
 {\r
     qDebug() << "MainWindow::openEditor";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QSettings settings;\r
     QString exe = settings.value(IniKey_PathEditor).toString();\r
     if (exe.isEmpty()) {\r
@@ -762,7 +727,7 @@ void MainWindow::openEditor(const QString &path)
 \r
     QFileInfoList list;\r
     if (path.isEmpty()) {\r
-        list = view->selectedItems();\r
+        list = m_activeView->selectedItems();\r
     }\r
     else {\r
         list << path;\r
@@ -777,7 +742,7 @@ void MainWindow::openEditor(const QString &path)
 #else\r
     QString command = exe + files;\r
 #endif\r
-    if (!startProcess(command, view->dir(), tr("外部エディタの起動に失敗しました。"))) {\r
+    if (!startProcess(command, m_activeView->dir(), tr("外部エディタの起動に失敗しました。"))) {\r
         qDebug() << command;\r
     }\r
 }\r
@@ -786,9 +751,6 @@ void MainWindow::openTerminal()
 {\r
     qDebug() << "MainWindow::openTerminal";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QSettings settings;\r
     QString exe = settings.value(IniKey_PathTerminal).toString();\r
     if (exe.isEmpty()) {\r
@@ -799,7 +761,7 @@ void MainWindow::openTerminal()
     }\r
 \r
     QSet<QString> dirs;\r
-    foreach (const QFileInfo &info, view->selectedItems()) {\r
+    foreach (const QFileInfo &info, m_activeView->selectedItems()) {\r
         if (info.isDir()) {\r
             dirs.insert(info.absoluteFilePath());\r
         }\r
@@ -814,7 +776,7 @@ void MainWindow::openTerminal()
 #else\r
         QString command = exe + " " + QQ(dir);\r
 #endif\r
-        if (!startProcess(command, view->dir(), tr("ターミナルの起動に失敗しました。"))) {\r
+        if (!startProcess(command, m_activeView->dir(), tr("ターミナルの起動に失敗しました。"))) {\r
             qDebug() << command;\r
             break;\r
         }\r
@@ -825,9 +787,6 @@ void MainWindow::openArchiver()
 {\r
     qDebug() << "MainWindow::openArchiver";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QSettings settings;\r
     QString exe = settings.value(IniKey_PathArchiver).toString();\r
     if (exe.isEmpty()) {\r
@@ -838,7 +797,7 @@ void MainWindow::openArchiver()
     }\r
 \r
     QString files;\r
-    foreach (const QFileInfo &info, view->selectedItems()) {\r
+    foreach (const QFileInfo &info, m_activeView->selectedItems()) {\r
         files += " " + QQ(info.absoluteFilePath());\r
     }\r
 #ifdef Q_OS_MAC\r
@@ -846,7 +805,7 @@ void MainWindow::openArchiver()
 #else\r
     QString command = exe + files;\r
 #endif\r
-    if (!startProcess(command, view->dir(), tr("アーカイバの起動に失敗しました。"))) {\r
+    if (!startProcess(command, m_activeView->dir(), tr("アーカイバの起動に失敗しました。"))) {\r
         qDebug() << command;\r
     }\r
 }\r
@@ -855,35 +814,26 @@ void MainWindow::openBookmark()
 {\r
     qDebug() << "MainWindow::openBookmark();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     QAction *action = qobject_cast<QAction*>(sender());\r
     Q_CHECK_PTR(action);\r
 \r
     QSettings settings;\r
     int i = action->data().toInt();\r
-    view->setPath(settings.value(IniKey_BookmarkEntryPath(i)).toString(), true);\r
+    m_activeView->setPath(settings.value(IniKey_BookmarkEntryPath(i)).toString(), true);\r
 }\r
 \r
 void MainWindow::refresh()\r
 {\r
     qDebug() << "MainWindow::refresh();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->refresh();\r
+    m_activeView->refresh();\r
 }\r
 \r
 void MainWindow::renameItems()\r
 {\r
     qDebug() << "MainWindow::renameItems";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QFileInfoList list = view->selectedItems();\r
+    QFileInfoList list = m_activeView->selectedItems();\r
     if (list.isEmpty()) {\r
         return;\r
     }\r
@@ -895,7 +845,7 @@ void MainWindow::renameItems()
     else {\r
         dlg = new RenameMultiDialog(this);\r
     }\r
-    dlg->setWorkingDirectory(view->dir());\r
+    dlg->setWorkingDirectory(m_activeView->dir());\r
     dlg->setNames(list);\r
     int dlgResult = dlg->exec();\r
     if (dlgResult != QDialog::Accepted || dlg->renameMap().isEmpty()) {\r
@@ -920,10 +870,10 @@ void MainWindow::renameItems()
     opDlg.setAutoClose(settings.value(IniKey_AutoCloseRename).toBool());\r
 \r
     opDlg.exec();\r
-    view->refresh();\r
+    m_activeView->refresh();\r
 \r
     QFileInfo info(dlg->renameMap().first());\r
-    view->searchItem(info.fileName());\r
+    m_activeView->searchItem(info.fileName());\r
 \r
     settings.setValue(IniKey_AutoCloseRename, opDlg.autoClose());\r
 }\r
@@ -932,10 +882,7 @@ void MainWindow::shellExecute()
 {\r
     qDebug() << "MainWindow::shellExecute";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    foreach (const QFileInfo &info, view->selectedItems()) {\r
+    foreach (const QFileInfo &info, m_activeView->selectedItems()) {\r
         QString path = QDir::toNativeSeparators(info.absoluteFilePath());\r
         QDesktopServices::openUrl(QUrl("file:///" + path));\r
     }\r
@@ -943,8 +890,7 @@ void MainWindow::shellExecute()
 \r
 void MainWindow::showBookmarkDialog()\r
 {\r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
+    qDebug() << "MainWindow::showBookmarkDialog();";\r
 \r
     BookmarkDialog dlg(this);\r
     dlg.setEditMode(false);\r
@@ -952,7 +898,7 @@ void MainWindow::showBookmarkDialog()
         int n = dlg.selectedIndex();\r
 \r
         QSettings settings;\r
-        view->setPath(settings.value(IniKey_BookmarkEntryPath(n)).toString(), true);\r
+        m_activeView->setPath(settings.value(IniKey_BookmarkEntryPath(n)).toString(), true);\r
     }\r
 }\r
 \r
@@ -972,10 +918,7 @@ void MainWindow::showFilterDialog()
 {\r
     qDebug() << "MainWindow::showFilterDialog();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QString filters = view->nameFilters().join(" ");\r
+    QString filters = m_activeView->nameFilters().join(" ");\r
 \r
     QInputDialog dlg(this);\r
     dlg.setInputMode(QInputDialog::TextInput);\r
@@ -985,16 +928,16 @@ void MainWindow::showFilterDialog()
     dlg.resize(width() * 0.8, dlg.height());\r
 \r
     if (dlg.exec() == QDialog::Accepted) {\r
-        static_cast<FolderPanel*>(view->parent())->setNameFilters(dlg.textValue());\r
-        int row = view->currentIndex().row();\r
+        static_cast<FolderPanel*>(m_activeView->parent())->setNameFilters(dlg.textValue());\r
+        int row = m_activeView->currentIndex().row();\r
 \r
-        view->refresh();\r
+        m_activeView->refresh();\r
 \r
-        if (row >= view->model()->rowCount()) {\r
-            row = view->model()->rowCount() - 1;\r
+        if (row >= m_activeView->model()->rowCount()) {\r
+            row = m_activeView->model()->rowCount() - 1;\r
         }\r
-//        view->selectRow(row);\r
-        view->setCurrentIndex(view->model()->index(row, 1));\r
+\r
+        m_activeView->setCurrentIndex(m_activeView->model()->index(row, 1));\r
 \r
     }\r
 }\r
@@ -1003,27 +946,24 @@ void MainWindow::showHistoryDialog()
 {\r
     qDebug() << "MainWindow::showHistoryDialog();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    FolderView *vOther = otherSideFolderView(view);\r
+    FolderView *vOther = otherSideFolderView(m_activeView);\r
 \r
     HistoryDialog dlg(this);\r
-    if (view->side() == "Left") {\r
+    if (m_activeView->side() == "Left") {\r
         dlg.setDefaultLeft(true);\r
-        dlg.setHistory(view->history(), vOther->history());\r
+        dlg.setHistory(m_activeView->history(), vOther->history());\r
     }\r
     else {\r
         dlg.setDefaultLeft(false);\r
-        dlg.setHistory(vOther->history(), view->history());\r
+        dlg.setHistory(vOther->history(), m_activeView->history());\r
     }\r
 \r
     if (dlg.exec() == QDialog::Accepted) {\r
-        if (view->side() == dlg.selectedSide()) {\r
-            view->setHistoryIndexAt(dlg.selectedIndex());\r
+        if (m_activeView->side() == dlg.selectedSide()) {\r
+            m_activeView->setHistoryIndexAt(dlg.selectedIndex());\r
         }\r
         else {\r
-            view->setPath(vOther->history()->at(dlg.selectedIndex()), true);\r
+            m_activeView->setPath(vOther->history()->at(dlg.selectedIndex()), true);\r
         }\r
     }\r
 }\r
@@ -1032,15 +972,12 @@ void MainWindow::showSortDialog()
 {\r
     qDebug() << "MainWindow::showSortDialog();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     SortDialog dlg(this);\r
-    dlg.setRightOrLeft(view->side());\r
+    dlg.setRightOrLeft(m_activeView->side());\r
 \r
     if (dlg.exec() == QDialog::Accepted) {\r
-        view->setSorting();\r
-        view->refresh();\r
+        m_activeView->setSorting();\r
+        m_activeView->refresh();\r
     }\r
 }\r
 \r
@@ -1072,17 +1009,14 @@ void MainWindow::switchHalfMode(bool checked)
 {\r
     qDebug() << "MainWindow::switchHalfMode();" << checked;\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
     AnyView *pane = static_cast<AnyView*>(\r
-                otherSideFolderView(view)->parent()->parent());\r
+                otherSideFolderView(m_activeView)->parent()->parent());\r
     Q_CHECK_PTR(pane);\r
 \r
     if (checked) {\r
         // ハーフモードへ移行する\r
         setViewMode(ModeHalfView);\r
-        pane->setViewItem(view->currentItem());\r
+        pane->setViewItem(m_activeView->currentItem());\r
     }\r
     else {\r
         // ハーフモードを解除する\r
@@ -1092,26 +1026,6 @@ void MainWindow::switchHalfMode(bool checked)
     updateActions();\r
 }\r
 \r
-//void MainWindow::searchItem(const QString &text)\r
-//{\r
-//    qDebug() << "MainWindow::searchItem" << text;\r
-\r
-//    SearchBox *box = qobject_cast<SearchBox*>(qApp->focusWidget());\r
-//    Q_CHECK_PTR(box);\r
-\r
-//    if (text.right(1) == "/") {\r
-//        // '/'が入力されたら、検索終了\r
-//        box->setText(text.left(text.length() - 1));\r
-//        ui->action_Search->setChecked(false);\r
-//    }\r
-//    else {\r
-//        FolderPanel *fp = qobject_cast<FolderPanel*>(box->parent());\r
-//        Q_CHECK_PTR(fp);\r
-\r
-//        fp->folderView()->searchItem(box->text());\r
-//    }\r
-//}\r
-\r
 void MainWindow::searchNext()\r
 {\r
     qDebug() << "MainWindow::searchNext";\r
@@ -1119,10 +1033,7 @@ void MainWindow::searchNext()
     SearchBox *box = qobject_cast<SearchBox*>(qApp->focusWidget());\r
     Q_CHECK_PTR(box);\r
 \r
-    FolderPanel *fp = qobject_cast<FolderPanel*>(box->parent());\r
-    Q_CHECK_PTR(fp);\r
-\r
-    fp->folderView()->searchNext(box->text());\r
+    m_activeView->searchNext(box->text());\r
 }\r
 \r
 void MainWindow::searchPrev()\r
@@ -1132,10 +1043,7 @@ void MainWindow::searchPrev()
     SearchBox *box = qobject_cast<SearchBox*>(qApp->focusWidget());\r
     Q_CHECK_PTR(box);\r
 \r
-    FolderPanel *fp = qobject_cast<FolderPanel*>(box->parent());\r
-    Q_CHECK_PTR(fp);\r
-\r
-    fp->folderView()->searchPrev(box->text());\r
+    m_activeView->searchPrev(box->text());\r
 }\r
 \r
 void MainWindow::setCursorToBegin()\r
@@ -1243,8 +1151,8 @@ void MainWindow::changeFontSize(int diff)
         font.setPointSize(font.pointSize() + diff);\r
         settings.setValue(IniKey_ViewFont, font);\r
 \r
-        ui->pane1->folderPanel()->folderView()->updateAppearance();\r
-        ui->pane2->folderPanel()->folderView()->updateAppearance();\r
+        ui->pane1->folderPanel()->updateAppearance();\r
+        ui->pane2->folderPanel()->updateAppearance();\r
     }\r
 \r
     // テキストビューのフォントサイズ変更\r
@@ -1333,47 +1241,35 @@ void MainWindow::setPathFromOther()
 {\r
     qDebug() << "MainWindow::setPathFromOther();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    FolderView *other = otherSideFolderView(view);\r
+    FolderView *other = otherSideFolderView(m_activeView);\r
 \r
-    view->setPath(other->dir(), true);\r
+    m_activeView->setPath(other->dir(), true);\r
 }\r
 \r
 void MainWindow::setPathToHome()\r
 {\r
     qDebug() << "MainWindow::setPathToHome();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->setPath(QDir::homePath(), true);\r
+    m_activeView->setPath(QDir::homePath(), true);\r
 }\r
 \r
 void MainWindow::setPathToOther()\r
 {\r
     qDebug() << "MainWindow::setPathToOther();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
+    FolderView *other = otherSideFolderView(m_activeView);\r
 \r
-    FolderView *other = otherSideFolderView(view);\r
-\r
-    other->setPath(view->dir(), true);\r
+    other->setPath(m_activeView->dir(), true);\r
 }\r
 \r
 void MainWindow::setPathToParent()\r
 {\r
     qDebug() << "MainWindow::setPathToParent();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    QDir dir(view->dir());\r
+    QDir dir(m_activeView->dir());\r
     if (!dir.isRoot()) {\r
         dir.cdUp();\r
-        view->setPath(dir.absolutePath(), true);\r
+        m_activeView->setPath(dir.absolutePath(), true);\r
     }\r
 }\r
 \r
@@ -1381,10 +1277,7 @@ void MainWindow::setPathToRoot()
 {\r
     qDebug() << "MainWindow::setPathToRoot();";\r
 \r
-    FolderView *view = static_cast<FolderView*>(qApp->focusWidget());\r
-    Q_CHECK_PTR(view);\r
-\r
-    view->setPath(QDir::rootPath(), true);\r
+    m_activeView->setPath(QDir::rootPath(), true);\r
 }\r
 \r
 void MainWindow::toggleSearchBox(bool checked)\r
@@ -1396,10 +1289,8 @@ void MainWindow::toggleSearchBox(bool checked)
 \r
     if (checked) {\r
         setViewMode(m_viewMode | ModeSearch);\r
-        view = static_cast<FolderView*>(qApp->focusWidget());\r
-        Q_CHECK_PTR(view);\r
 \r
-        box = view->parent()->findChild<SearchBox*>("searchBox");\r
+        box = m_activeView->parent()->findChild<SearchBox*>("searchBox");\r
         Q_CHECK_PTR(box);\r
 \r
         box->setVisible(true);\r
@@ -1431,13 +1322,11 @@ void MainWindow::showPreferenceDialog()
 \r
     PreferenceDialog dlg(this);\r
     if (dlg.exec() == QDialog::Accepted) {\r
-        bool dark1 = !ui->pane1->folderPanel()->folderView()->hasFocus();\r
-        bool dark2 = !ui->pane2->folderPanel()->folderView()->hasFocus();\r
+        bool dark1 = m_activeView != ui->pane1->folderPanel()->folderView();\r
+        bool dark2 = m_activeView != ui->pane2->folderPanel()->folderView();\r
 \r
-        ui->pane1->folderPanel()->locationBox()->updateAppearance(dark1);\r
-        ui->pane2->folderPanel()->locationBox()->updateAppearance(dark2);\r
-        ui->pane1->folderPanel()->folderView()->updateAppearance(dark1);\r
-        ui->pane2->folderPanel()->folderView()->updateAppearance(dark2);\r
+        ui->pane1->folderPanel()->updateAppearance(dark1);\r
+        ui->pane2->folderPanel()->updateAppearance(dark2);\r
         ui->pane1->textView()->updateAppearance();\r
         ui->pane2->textView()->updateAppearance();\r
         ui->pane3->textView()->updateAppearance();\r
@@ -1574,7 +1463,7 @@ void MainWindow::viewFinish()
     ui->statusBar->findChild<QLabel*>("Right")->setText("");\r
     ui->pane3->setVisible(false);\r
     ui->splitter->setVisible(true);\r
-    m_focusedView->setFocus();\r
+    m_activeView->setFocus();\r
 }\r
 \r
 void MainWindow::initActionConnections()\r
@@ -1632,6 +1521,7 @@ void MainWindow::initActionConnections()
     connect(ui->view_HalfMode, SIGNAL(toggled(bool)), this, SLOT(switchHalfMode(bool)));\r
     connect(ui->view_Hidden, SIGNAL(toggled(bool)), this, SLOT(toggleShowHiddenFiles(bool)));\r
     connect(ui->view_Refresh, SIGNAL(triggered()), this, SLOT(refresh()));\r
+\r
     connect(ui->view_Sort, SIGNAL(triggered()), this, SLOT(showSortDialog()));\r
     connect(ui->view_Swap, SIGNAL(triggered()), this, SLOT(swapView()));\r
     connect(ui->view_System, SIGNAL(toggled(bool)), this, SLOT(toggleShowSystemFiles(bool)));\r
index 88ae44e..484b908 100644 (file)
@@ -35,7 +35,7 @@ public slots:
                       const QString &srcPath, const QString &tgtPath);\r
 \r
     void currentChange(const QFileInfo &info);\r
-    void dropAccept(const QFileInfoList &list);\r
+    void dropAccept(const QFileInfoList &list, QDropEvent *event);\r
     void focusChange(QWidget * old, QWidget * now);\r
     void leftKeyPress();\r
     void rightKeyPress();\r
@@ -115,7 +115,7 @@ private:
     typedef QFlags<Mode> ModeFlags;\r
 \r
     Ui::MainWindow *ui;\r
-    QWidget *m_focusedView;\r
+    FolderView *m_activeView;\r
     OverWriteDialog *m_overwriteDialog;\r
     ModeFlags m_viewMode;\r
 \r
@@ -127,6 +127,7 @@ private:
     void setEnabledAllActions(bool enable);\r
     void showNameFilters(FolderView *view);\r
     void copyItems(const QFileInfoList &list, const QString &tgtDir);\r
+    void moveItems(const QFileInfoList &list, const QString &tgtDir);\r
     void changeFontSize(int diff);\r
     void initBookmark();\r
     void sendEventOther(QEvent *event);\r
index 3740d85..15d1dee 100644 (file)
@@ -32,7 +32,7 @@
       <enum>Qt::StrongFocus</enum>
      </property>
      <property name="currentIndex">
-      <number>3</number>
+      <number>4</number>
      </property>
      <widget class="QWidget" name="tabBoot_Exit">
       <attribute name="title">
@@ -1748,6 +1748,12 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ
                <height>110</height>
               </size>
              </property>
+             <property name="font">
+              <font>
+               <family>Monaco</family>
+               <pointsize>13</pointsize>
+              </font>
+             </property>
              <property name="plainText">
               <string>1
 2
@@ -1895,8 +1901,8 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ
   </connection>
  </connections>
  <buttongroups>
-  <buttongroup name="sizeOptions"/>
   <buttongroup name="overwriteOptions"/>
+  <buttongroup name="sizeOptions"/>
   <buttongroup name="posOptions"/>
  </buttongroups>
 </ui>
index b23807a..742b8a2 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
 #ifndef VERSION_H
 #define VERSION_H
 
-#define VERSION_VALUE   0.19
+#define VERSION_VALUE   0.20
 
 #endif // VERSION_H