Mercurial > hg > easyhg
comparison mainwindow.cpp @ 362:73fb5ef55744
Merge from branch "feature_91b". Really fixes #91
author | Chris Cannam |
---|---|
date | Thu, 17 Mar 2011 17:34:40 +0000 |
parents | 550650bbb959 4cd753e083cc |
children | f89e50d748ed |
comparison
equal
deleted
inserted
replaced
360:f34848e8094b | 362:73fb5ef55744 |
---|---|
777 tr("Revert"))) { | 777 tr("Revert"))) { |
778 | 778 |
779 m_lastRevertedFiles = files; | 779 m_lastRevertedFiles = files; |
780 | 780 |
781 m_runner->requestAction(HgAction(ACT_REVERT, m_workFolderPath, params)); | 781 m_runner->requestAction(HgAction(ACT_REVERT, m_workFolderPath, params)); |
782 } | |
783 } | |
784 | |
785 | |
786 void MainWindow::hgRenameFiles(QStringList files) | |
787 { | |
788 QString renameTo; | |
789 | |
790 QString file; | |
791 if (files.empty()) return; | |
792 file = files[0]; | |
793 | |
794 if (ConfirmCommentDialog::confirmAndGetShortComment | |
795 (this, | |
796 tr("Rename"), | |
797 tr("Rename <code>%1</code> to:").arg(xmlEncode(file)), | |
798 renameTo, | |
799 tr("Rename"))) { | |
800 | |
801 if (renameTo != "" && renameTo != file) { | |
802 | |
803 QStringList params; | |
804 | |
805 params << "rename" << "--" << file << renameTo; | |
806 | |
807 m_runner->requestAction(HgAction(ACT_RENAME_FILE, m_workFolderPath, params)); | |
808 } | |
809 } | |
810 } | |
811 | |
812 | |
813 void MainWindow::hgCopyFiles(QStringList files) | |
814 { | |
815 QString copyTo; | |
816 | |
817 QString file; | |
818 if (files.empty()) return; | |
819 file = files[0]; | |
820 | |
821 if (ConfirmCommentDialog::confirmAndGetShortComment | |
822 (this, | |
823 tr("Copy"), | |
824 tr("Copy <code>%1</code> to:").arg(xmlEncode(file)), | |
825 copyTo, | |
826 tr("Copy"))) { | |
827 | |
828 if (copyTo != "" && copyTo != file) { | |
829 | |
830 QStringList params; | |
831 | |
832 params << "copy" << "--" << file << copyTo; | |
833 | |
834 m_runner->requestAction(HgAction(ACT_COPY_FILE, m_workFolderPath, params)); | |
835 } | |
782 } | 836 } |
783 } | 837 } |
784 | 838 |
785 | 839 |
786 void MainWindow::hgMarkFilesResolved(QStringList files) | 840 void MainWindow::hgMarkFilesResolved(QStringList files) |
2311 this, SLOT(hgCommitFiles(QStringList))); | 2365 this, SLOT(hgCommitFiles(QStringList))); |
2312 | 2366 |
2313 connect(m_hgTabs, SIGNAL(revertFiles(QStringList)), | 2367 connect(m_hgTabs, SIGNAL(revertFiles(QStringList)), |
2314 this, SLOT(hgRevertFiles(QStringList))); | 2368 this, SLOT(hgRevertFiles(QStringList))); |
2315 | 2369 |
2370 connect(m_hgTabs, SIGNAL(renameFiles(QStringList)), | |
2371 this, SLOT(hgRenameFiles(QStringList))); | |
2372 | |
2373 connect(m_hgTabs, SIGNAL(copyFiles(QStringList)), | |
2374 this, SLOT(hgCopyFiles(QStringList))); | |
2375 | |
2316 connect(m_hgTabs, SIGNAL(addFiles(QStringList)), | 2376 connect(m_hgTabs, SIGNAL(addFiles(QStringList)), |
2317 this, SLOT(hgAddFiles(QStringList))); | 2377 this, SLOT(hgAddFiles(QStringList))); |
2318 | 2378 |
2319 connect(m_hgTabs, SIGNAL(removeFiles(QStringList)), | 2379 connect(m_hgTabs, SIGNAL(removeFiles(QStringList)), |
2320 this, SLOT(hgRemoveFiles(QStringList))); | 2380 this, SLOT(hgRemoveFiles(QStringList))); |