comparison src/mainwindow.cpp @ 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 2925975bdc9e
children 939701b848e5
comparison
equal deleted inserted replaced
412:498c2ca0b367 413:2a19d5706673
544 m_runner->requestAction(HgAction(ACT_TAG, m_workFolderPath, params)); 544 m_runner->requestAction(HgAction(ACT_TAG, m_workFolderPath, params));
545 } 545 }
546 } 546 }
547 } 547 }
548 548
549 void MainWindow::hgIgnore() 549 void MainWindow::hgEditIgnore()
550 { 550 {
551 QString hgIgnorePath; 551 QString hgIgnorePath;
552 QStringList params; 552 QStringList params;
553 553
554 hgIgnorePath = m_workFolderPath; 554 hgIgnorePath = m_workFolderPath;
581 } 581 }
582 582
583 void MainWindow::hgIgnoreFiles(QStringList files) 583 void MainWindow::hgIgnoreFiles(QStringList files)
584 { 584 {
585 //!!! not implemented yet 585 //!!! not implemented yet
586
587 // we should:
588 //
589 // * show the user the list of file names selected
590 //
591 // * offer a choice (depending on the files selected?)
592 //
593 // - ignore only these files
594 //
595 // - ignore files with these names, in any subdirectories?
596 //
597 // - ignore all files with this extension (if they have a common
598 // extension)?
599 //
600 // - ignore all files with these extensions (if they have any
601 // extensions?)
602 //
603 // Do we need different mechanisms based on whether we have glob
604 // or regex syntax?
605
586 DEBUG << "MainWindow::hgIgnoreFiles: Not implemented" << endl; 606 DEBUG << "MainWindow::hgIgnoreFiles: Not implemented" << endl;
587 } 607 }
588 608
589 void MainWindow::hgUnIgnoreFiles(QStringList files) 609 void MainWindow::hgUnIgnoreFiles(QStringList files)
590 { 610 {
2337 connect(m_hgCommitAct, SIGNAL(triggered()), this, SLOT(hgCommit())); 2357 connect(m_hgCommitAct, SIGNAL(triggered()), this, SLOT(hgCommit()));
2338 connect(m_hgFolderDiffAct, SIGNAL(triggered()), this, SLOT(hgFolderDiff())); 2358 connect(m_hgFolderDiffAct, SIGNAL(triggered()), this, SLOT(hgFolderDiff()));
2339 connect(m_hgUpdateAct, SIGNAL(triggered()), this, SLOT(hgUpdate())); 2359 connect(m_hgUpdateAct, SIGNAL(triggered()), this, SLOT(hgUpdate()));
2340 connect(m_hgRevertAct, SIGNAL(triggered()), this, SLOT(hgRevert())); 2360 connect(m_hgRevertAct, SIGNAL(triggered()), this, SLOT(hgRevert()));
2341 connect(m_hgMergeAct, SIGNAL(triggered()), this, SLOT(hgMerge())); 2361 connect(m_hgMergeAct, SIGNAL(triggered()), this, SLOT(hgMerge()));
2342 connect(m_hgIgnoreAct, SIGNAL(triggered()), this, SLOT(hgIgnore())); 2362 connect(m_hgEditIgnoreAct, SIGNAL(triggered()), this, SLOT(hgEditIgnore()));
2343 2363
2344 connect(m_settingsAct, SIGNAL(triggered()), this, SLOT(settings())); 2364 connect(m_settingsAct, SIGNAL(triggered()), this, SLOT(settings()));
2345 connect(m_openAct, SIGNAL(triggered()), this, SLOT(open())); 2365 connect(m_openAct, SIGNAL(triggered()), this, SLOT(open()));
2346 connect(m_changeRemoteRepoAct, SIGNAL(triggered()), this, SLOT(changeRemoteRepo())); 2366 connect(m_changeRemoteRepoAct, SIGNAL(triggered()), this, SLOT(changeRemoteRepo()));
2347 2367
2491 m_hgRemoveAct->setEnabled(m_localRepoActionsEnabled); 2511 m_hgRemoveAct->setEnabled(m_localRepoActionsEnabled);
2492 m_hgUpdateAct->setEnabled(m_localRepoActionsEnabled); 2512 m_hgUpdateAct->setEnabled(m_localRepoActionsEnabled);
2493 m_hgCommitAct->setEnabled(m_localRepoActionsEnabled); 2513 m_hgCommitAct->setEnabled(m_localRepoActionsEnabled);
2494 m_hgMergeAct->setEnabled(m_localRepoActionsEnabled); 2514 m_hgMergeAct->setEnabled(m_localRepoActionsEnabled);
2495 m_hgServeAct->setEnabled(m_localRepoActionsEnabled); 2515 m_hgServeAct->setEnabled(m_localRepoActionsEnabled);
2496 m_hgIgnoreAct->setEnabled(m_localRepoActionsEnabled); 2516 m_hgEditIgnoreAct->setEnabled(m_localRepoActionsEnabled);
2497 2517
2498 DEBUG << "m_localRepoActionsEnabled = " << m_localRepoActionsEnabled << endl; 2518 DEBUG << "m_localRepoActionsEnabled = " << m_localRepoActionsEnabled << endl;
2499 DEBUG << "canCommit = " << m_hgTabs->canCommit() << endl; 2519 DEBUG << "canCommit = " << m_hgTabs->canCommit() << endl;
2500 2520
2501 m_hgAddAct->setEnabled(m_localRepoActionsEnabled && m_hgTabs->canAdd()); 2521 m_hgAddAct->setEnabled(m_localRepoActionsEnabled && m_hgTabs->canAdd());
2708 m_hgMergeAct->setShortcut(tr("Ctrl+M")); 2728 m_hgMergeAct->setShortcut(tr("Ctrl+M"));
2709 m_hgMergeAct->setStatusTip(tr("Merge the two independent sets of changes in the local repository into the working folder")); 2729 m_hgMergeAct->setStatusTip(tr("Merge the two independent sets of changes in the local repository into the working folder"));
2710 2730
2711 //Advanced actions 2731 //Advanced actions
2712 2732
2713 m_hgIgnoreAct = new QAction(tr("Edit .hgignore File"), this); 2733 m_hgEditIgnoreAct = new QAction(tr("Edit .hgignore File"), this);
2714 m_hgIgnoreAct->setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial")); 2734 m_hgEditIgnoreAct->setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial"));
2715 2735
2716 m_hgServeAct = new QAction(tr("Serve via HTTP"), this); 2736 m_hgServeAct = new QAction(tr("Serve via HTTP"), this);
2717 m_hgServeAct->setStatusTip(tr("Serve local repository via http for workgroup access")); 2737 m_hgServeAct->setStatusTip(tr("Serve local repository via http for workgroup access"));
2718 2738
2719 //Help actions 2739 //Help actions
2758 remoteMenu->addAction(m_hgPushAct); 2778 remoteMenu->addAction(m_hgPushAct);
2759 remoteMenu->addSeparator(); 2779 remoteMenu->addSeparator();
2760 remoteMenu->addAction(m_changeRemoteRepoAct); 2780 remoteMenu->addAction(m_changeRemoteRepoAct);
2761 2781
2762 m_advancedMenu = menuBar()->addMenu(tr("&Advanced")); 2782 m_advancedMenu = menuBar()->addMenu(tr("&Advanced"));
2763 m_advancedMenu->addAction(m_hgIgnoreAct); 2783 m_advancedMenu->addAction(m_hgEditIgnoreAct);
2764 m_advancedMenu->addSeparator(); 2784 m_advancedMenu->addSeparator();
2765 m_advancedMenu->addAction(m_hgServeAct); 2785 m_advancedMenu->addAction(m_hgServeAct);
2766 2786
2767 m_helpMenu = menuBar()->addMenu(tr("&Help")); 2787 m_helpMenu = menuBar()->addMenu(tr("&Help"));
2768 m_helpMenu->addAction(m_aboutAct); 2788 m_helpMenu->addAction(m_aboutAct);