Mercurial > hg > easyhg
changeset 413:2a19d5706673 ignore
Reconnect the ignore-related right-button menu entries (still not implemented yet though)
author | Chris Cannam |
---|---|
date | Mon, 13 Jun 2011 17:28:49 +0100 |
parents | 498c2ca0b367 |
children | 939701b848e5 |
files | src/filestatuswidget.cpp src/mainwindow.cpp src/mainwindow.h |
diffstat | 3 files changed, 31 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/filestatuswidget.cpp Mon Jun 13 16:56:01 2011 +0100 +++ b/src/filestatuswidget.cpp Mon Jun 13 17:28:49 2011 +0100 @@ -67,8 +67,8 @@ m_actionLabels[FileStates::Remove] = tr("Remove from version control"); m_actionLabels[FileStates::RedoMerge] = tr("Redo merge"); m_actionLabels[FileStates::MarkResolved] = tr("Mark conflict as resolved"); - m_actionLabels[FileStates::Ignore] = tr("Ignore"); - m_actionLabels[FileStates::UnIgnore] = tr("Stop ignoring"); + m_actionLabels[FileStates::Ignore] = tr("Ignore..."); + m_actionLabels[FileStates::UnIgnore] = tr("Stop ignoring..."); m_descriptions[FileStates::Clean] = tr("You have not changed these files."); m_descriptions[FileStates::Modified] = tr("You have changed these files since you last committed them."); @@ -125,11 +125,6 @@ FileStates::Activities activities = m_fileStates.activitiesSupportedBy(s); int prevGroup = -1; foreach (FileStates::Activity a, activities) { - // Skip activities which are not yet implemented - if (a == FileStates::Ignore || - a == FileStates::UnIgnore) { - continue; - } int group = FileStates::activityGroup(a); if (group != prevGroup && prevGroup != -1) { QAction *sep = new QAction("", w);
--- a/src/mainwindow.cpp Mon Jun 13 16:56:01 2011 +0100 +++ b/src/mainwindow.cpp Mon Jun 13 17:28:49 2011 +0100 @@ -546,7 +546,7 @@ } } -void MainWindow::hgIgnore() +void MainWindow::hgEditIgnore() { QString hgIgnorePath; QStringList params; @@ -583,6 +583,26 @@ void MainWindow::hgIgnoreFiles(QStringList files) { //!!! not implemented yet + + // we should: + // + // * show the user the list of file names selected + // + // * offer a choice (depending on the files selected?) + // + // - ignore only these files + // + // - ignore files with these names, in any subdirectories? + // + // - ignore all files with this extension (if they have a common + // extension)? + // + // - ignore all files with these extensions (if they have any + // extensions?) + // + // Do we need different mechanisms based on whether we have glob + // or regex syntax? + DEBUG << "MainWindow::hgIgnoreFiles: Not implemented" << endl; } @@ -2339,7 +2359,7 @@ connect(m_hgUpdateAct, SIGNAL(triggered()), this, SLOT(hgUpdate())); connect(m_hgRevertAct, SIGNAL(triggered()), this, SLOT(hgRevert())); connect(m_hgMergeAct, SIGNAL(triggered()), this, SLOT(hgMerge())); - connect(m_hgIgnoreAct, SIGNAL(triggered()), this, SLOT(hgIgnore())); + connect(m_hgEditIgnoreAct, SIGNAL(triggered()), this, SLOT(hgEditIgnore())); connect(m_settingsAct, SIGNAL(triggered()), this, SLOT(settings())); connect(m_openAct, SIGNAL(triggered()), this, SLOT(open())); @@ -2493,7 +2513,7 @@ m_hgCommitAct->setEnabled(m_localRepoActionsEnabled); m_hgMergeAct->setEnabled(m_localRepoActionsEnabled); m_hgServeAct->setEnabled(m_localRepoActionsEnabled); - m_hgIgnoreAct->setEnabled(m_localRepoActionsEnabled); + m_hgEditIgnoreAct->setEnabled(m_localRepoActionsEnabled); DEBUG << "m_localRepoActionsEnabled = " << m_localRepoActionsEnabled << endl; DEBUG << "canCommit = " << m_hgTabs->canCommit() << endl; @@ -2710,8 +2730,8 @@ //Advanced actions - m_hgIgnoreAct = new QAction(tr("Edit .hgignore File"), this); - m_hgIgnoreAct->setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial")); + m_hgEditIgnoreAct = new QAction(tr("Edit .hgignore File"), this); + m_hgEditIgnoreAct->setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial")); m_hgServeAct = new QAction(tr("Serve via HTTP"), this); m_hgServeAct->setStatusTip(tr("Serve local repository via http for workgroup access")); @@ -2760,7 +2780,7 @@ remoteMenu->addAction(m_changeRemoteRepoAct); m_advancedMenu = menuBar()->addMenu(tr("&Advanced")); - m_advancedMenu->addAction(m_hgIgnoreAct); + m_advancedMenu->addAction(m_hgEditIgnoreAct); m_advancedMenu->addSeparator(); m_advancedMenu->addAction(m_hgServeAct);
--- a/src/mainwindow.h Mon Jun 13 16:56:01 2011 +0100 +++ b/src/mainwindow.h Mon Jun 13 17:28:49 2011 +0100 @@ -93,7 +93,7 @@ void hgNewBranch(); void hgNoBranch(); void hgServe(); - void hgIgnore(); + void hgEditIgnore(); void hgAnnotateFiles(QStringList); void hgDiffFiles(QStringList); @@ -211,12 +211,13 @@ QAction *m_hgRevertAct; QAction *m_hgAddAct; QAction *m_hgRemoveAct; + QAction *m_hgIgnoreAct; QAction *m_hgUpdateAct; QAction *m_hgCommitAct; QAction *m_hgMergeAct; QAction *m_hgUpdateToRevAct; QAction *m_hgAnnotateAct; - QAction *m_hgIgnoreAct; + QAction *m_hgEditIgnoreAct; QAction *m_hgServeAct; // Menus