comparison mainwindow.cpp @ 365:1482f5b9f9dc feature_101

Add an explosion of menus and many keyboard shortcuts.
author Chris Cannam
date Fri, 18 Mar 2011 13:14:14 +0000
parents f89e50d748ed
children
comparison
equal deleted inserted replaced
364:9bafea5ac56f 365:1482f5b9f9dc
454 tr("<h3>%1</h3><p>%2%3").arg(cf) 454 tr("<h3>%1</h3><p>%2%3").arg(cf)
455 .arg(tr("You are about to commit %n file(s) to %1.", "", reportFiles.size()).arg(branchText)) 455 .arg(tr("You are about to commit %n file(s) to %1.", "", reportFiles.size()).arg(branchText))
456 .arg(subsetNote), 456 .arg(subsetNote),
457 reportFiles, 457 reportFiles,
458 comment, 458 comment,
459 tr("Commit"))) { 459 tr("Co&mmit"))) {
460 460
461 if (!m_justMerged && !files.empty()) { 461 if (!m_justMerged && !files.empty()) {
462 // User wants to commit selected file(s) (and this is not 462 // User wants to commit selected file(s) (and this is not
463 // merge commit, which would fail if we selected files) 463 // merge commit, which would fail if we selected files)
464 params << "commit" << "--message" << comment 464 params << "commit" << "--message" << comment
496 if (ConfirmCommentDialog::confirmAndGetShortComment 496 if (ConfirmCommentDialog::confirmAndGetShortComment
497 (this, 497 (this,
498 tr("New Branch"), 498 tr("New Branch"),
499 tr("Enter new branch name:"), 499 tr("Enter new branch name:"),
500 branch, 500 branch,
501 tr("Start Branch"))) { 501 tr("Start &Branch"))) {
502 if (!branch.isEmpty()) {//!!! do something better if it is empty 502 if (!branch.isEmpty()) {//!!! do something better if it is empty
503 503
504 params << "branch" << filterTag(branch); 504 params << "branch" << filterTag(branch);
505 m_runner->requestAction(HgAction(ACT_NEW_BRANCH, m_workFolderPath, params)); 505 m_runner->requestAction(HgAction(ACT_NEW_BRANCH, m_workFolderPath, params));
506 } 506 }
527 if (ConfirmCommentDialog::confirmAndGetShortComment 527 if (ConfirmCommentDialog::confirmAndGetShortComment
528 (this, 528 (this,
529 tr("Tag"), 529 tr("Tag"),
530 tr("Enter tag:"), 530 tr("Enter tag:"),
531 tag, 531 tag,
532 tr("Add Tag"))) { 532 tr("Add &Tag"))) {
533 if (!tag.isEmpty()) {//!!! do something better if it is empty 533 if (!tag.isEmpty()) {//!!! do something better if it is empty
534 534
535 params << "tag" << "--user" << getUserInfo(); 535 params << "tag" << "--user" << getUserInfo();
536 params << "--rev" << Changeset::hashOf(id) << filterTag(tag); 536 params << "--rev" << Changeset::hashOf(id) << filterTag(tag);
537 537
772 .arg(subsetNote), 772 .arg(subsetNote),
773 tr("<h3>%1</h3><p>%2%3").arg(rf) 773 tr("<h3>%1</h3><p>%2%3").arg(rf)
774 .arg(tr("You are about to <b>revert</b> %n file(s).<br><br>This will <b>throw away any changes</b> that you have made to these files but have not committed.", "", files.size())) 774 .arg(tr("You are about to <b>revert</b> %n file(s).<br><br>This will <b>throw away any changes</b> that you have made to these files but have not committed.", "", files.size()))
775 .arg(subsetNote), 775 .arg(subsetNote),
776 files, 776 files,
777 tr("Revert"))) { 777 tr("Re&vert"))) {
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 } 782 }
794 if (ConfirmCommentDialog::confirmAndGetShortComment 794 if (ConfirmCommentDialog::confirmAndGetShortComment
795 (this, 795 (this,
796 tr("Rename"), 796 tr("Rename"),
797 tr("Rename <code>%1</code> to:").arg(xmlEncode(file)), 797 tr("Rename <code>%1</code> to:").arg(xmlEncode(file)),
798 renameTo, 798 renameTo,
799 tr("Rename"))) { 799 tr("Re&name"))) {
800 800
801 if (renameTo != "" && renameTo != file) { 801 if (renameTo != "" && renameTo != file) {
802 802
803 QStringList params; 803 QStringList params;
804 804
821 if (ConfirmCommentDialog::confirmAndGetShortComment 821 if (ConfirmCommentDialog::confirmAndGetShortComment
822 (this, 822 (this,
823 tr("Copy"), 823 tr("Copy"),
824 tr("Copy <code>%1</code> to:").arg(xmlEncode(file)), 824 tr("Copy <code>%1</code> to:").arg(xmlEncode(file)),
825 copyTo, 825 copyTo,
826 tr("Copy"))) { 826 tr("Co&py"))) {
827 827
828 if (copyTo != "" && copyTo != file) { 828 if (copyTo != "" && copyTo != file) {
829 829
830 QStringList params; 830 QStringList params;
831 831
993 { 993 {
994 if (ConfirmCommentDialog::confirm 994 if (ConfirmCommentDialog::confirm
995 (this, tr("Confirm pull"), 995 (this, tr("Confirm pull"),
996 tr("<qt><h3>Pull from remote repository?</h3></qt>"), 996 tr("<qt><h3>Pull from remote repository?</h3></qt>"),
997 tr("<qt><p>You are about to pull changes from the remote repository at <code>%1</code>.</p></qt>").arg(xmlEncode(m_remoteRepoPath)), 997 tr("<qt><p>You are about to pull changes from the remote repository at <code>%1</code>.</p></qt>").arg(xmlEncode(m_remoteRepoPath)),
998 tr("Pull"))) { 998 tr("&Pull"))) {
999 999
1000 QStringList params; 1000 QStringList params;
1001 params << "pull" << m_remoteRepoPath; 1001 params << "pull" << m_remoteRepoPath;
1002 m_runner->requestAction(HgAction(ACT_PULL, m_workFolderPath, params)); 1002 m_runner->requestAction(HgAction(ACT_PULL, m_workFolderPath, params));
1003 } 1003 }
1017 1017
1018 if (ConfirmCommentDialog::confirm 1018 if (ConfirmCommentDialog::confirm
1019 (this, tr("Confirm push"), 1019 (this, tr("Confirm push"),
1020 tr("<qt><h3>Push to remote repository?</h3></qt>"), 1020 tr("<qt><h3>Push to remote repository?</h3></qt>"),
1021 tr("<qt><p>You are about to push your commits to the remote repository at <code>%1</code>.</p>%2</qt>").arg(xmlEncode(m_remoteRepoPath)).arg(uncommittedNote), 1021 tr("<qt><p>You are about to push your commits to the remote repository at <code>%1</code>.</p>%2</qt>").arg(xmlEncode(m_remoteRepoPath)).arg(uncommittedNote),
1022 tr("Push"))) { 1022 tr("&Push"))) {
1023 1023
1024 QStringList params; 1024 QStringList params;
1025 params << "push" << "--new-branch" << m_remoteRepoPath; 1025 params << "push" << "--new-branch" << m_remoteRepoPath;
1026 m_runner->requestAction(HgAction(ACT_PUSH, m_workFolderPath, params)); 1026 m_runner->requestAction(HgAction(ACT_PUSH, m_workFolderPath, params));
1027 } 1027 }
2458 if (settings.value("extdiffbinary", "").toString() != "") { 2458 if (settings.value("extdiffbinary", "").toString() != "") {
2459 haveDiff = true; 2459 haveDiff = true;
2460 } 2460 }
2461 settings.endGroup(); 2461 settings.endGroup();
2462 2462
2463 m_hgRefreshAct -> setEnabled(m_localRepoActionsEnabled); 2463 m_hgRefreshAct->setEnabled(m_localRepoActionsEnabled);
2464 m_hgFolderDiffAct -> setEnabled(m_localRepoActionsEnabled && haveDiff); 2464 m_hgFolderDiffAct->setEnabled(m_localRepoActionsEnabled && haveDiff);
2465 m_hgRevertAct -> setEnabled(m_localRepoActionsEnabled); 2465 m_hgRevertAct->setEnabled(m_localRepoActionsEnabled);
2466 m_hgAddAct -> setEnabled(m_localRepoActionsEnabled); 2466 m_hgAddAct->setEnabled(m_localRepoActionsEnabled);
2467 m_hgRemoveAct -> setEnabled(m_localRepoActionsEnabled); 2467 m_hgRemoveAct->setEnabled(m_localRepoActionsEnabled);
2468 m_hgUpdateAct -> setEnabled(m_localRepoActionsEnabled); 2468 m_hgUpdateAct->setEnabled(m_localRepoActionsEnabled);
2469 m_hgCommitAct -> setEnabled(m_localRepoActionsEnabled); 2469 m_hgCommitAct->setEnabled(m_localRepoActionsEnabled);
2470 m_hgMergeAct -> setEnabled(m_localRepoActionsEnabled); 2470 m_hgMergeAct->setEnabled(m_localRepoActionsEnabled);
2471 m_hgServeAct -> setEnabled(m_localRepoActionsEnabled); 2471 m_hgServeAct->setEnabled(m_localRepoActionsEnabled);
2472 m_hgIgnoreAct -> setEnabled(m_localRepoActionsEnabled); 2472 m_hgIgnoreAct->setEnabled(m_localRepoActionsEnabled);
2473 2473
2474 DEBUG << "m_localRepoActionsEnabled = " << m_localRepoActionsEnabled << endl; 2474 DEBUG << "m_localRepoActionsEnabled = " << m_localRepoActionsEnabled << endl;
2475 DEBUG << "canCommit = " << m_hgTabs->canCommit() << endl; 2475 DEBUG << "canCommit = " << m_hgTabs->canCommit() << endl;
2476 2476
2477 m_hgAddAct->setEnabled(m_localRepoActionsEnabled && m_hgTabs->canAdd()); 2477 m_hgAddAct->setEnabled(m_localRepoActionsEnabled && m_hgTabs->canAdd());
2613 } 2613 }
2614 2614
2615 void MainWindow::createActions() 2615 void MainWindow::createActions()
2616 { 2616 {
2617 //File actions 2617 //File actions
2618 m_openAct = new QAction(QIcon(":/images/fileopen.png"), tr("Open..."), this); 2618 m_openAct = new QAction(QIcon(":/images/fileopen.png"), tr("&Open..."), this);
2619 m_openAct -> setStatusTip(tr("Open an existing repository or working folder")); 2619 m_openAct->setStatusTip(tr("Open an existing repository or working folder"));
2620 2620 m_openAct->setShortcut(tr("Ctrl+O"));
2621 m_changeRemoteRepoAct = new QAction(tr("Set Remote Location..."), this); 2621
2622 m_changeRemoteRepoAct = new QAction(tr("Set Remote &Location..."), this);
2622 m_changeRemoteRepoAct->setStatusTip(tr("Set or change the default remote repository for pull and push actions")); 2623 m_changeRemoteRepoAct->setStatusTip(tr("Set or change the default remote repository for pull and push actions"));
2623 2624
2624 m_settingsAct = new QAction(QIcon(":/images/settings.png"), tr("Settings..."), this); 2625 m_settingsAct = new QAction(QIcon(":/images/settings.png"), tr("&Settings..."), this);
2625 m_settingsAct -> setStatusTip(tr("View and change application settings")); 2626 m_settingsAct->setStatusTip(tr("View and change application settings"));
2626 2627
2627 #ifdef Q_OS_WIN32 2628 #ifdef Q_OS_WIN32
2628 m_exitAct = new QAction(QIcon(":/images/exit.png"), tr("Exit"), this); 2629 m_exitAct = new QAction(QIcon(":/images/exit.png"), tr("E&xit"), this);
2629 #else 2630 #else
2630 m_exitAct = new QAction(QIcon(":/images/exit.png"), tr("Quit"), this); 2631 m_exitAct = new QAction(QIcon(":/images/exit.png"), tr("&Quit"), this);
2631 #endif 2632 #endif
2632 m_exitAct->setShortcuts(QKeySequence::Quit); 2633 m_exitAct->setShortcuts(QKeySequence::Quit);
2633 m_exitAct->setStatusTip(tr("Quit EasyMercurial")); 2634 m_exitAct->setStatusTip(tr("Exit EasyMercurial"));
2634 2635
2635 //Repository actions 2636 //Repository actions
2636 m_hgRefreshAct = new QAction(QIcon(":/images/status.png"), tr("Refresh"), this); 2637 m_hgRefreshAct = new QAction(QIcon(":/images/status.png"), tr("&Refresh"), this);
2638 m_hgRefreshAct->setShortcut(tr("Ctrl+R"));
2637 m_hgRefreshAct->setStatusTip(tr("Refresh the window to show the current state of the working folder")); 2639 m_hgRefreshAct->setStatusTip(tr("Refresh the window to show the current state of the working folder"));
2638 2640
2639 m_hgIncomingAct = new QAction(QIcon(":/images/incoming.png"), tr("Preview"), this); 2641 m_hgIncomingAct = new QAction(QIcon(":/images/incoming.png"), tr("Pre&view Incoming Changes"), this);
2640 m_hgIncomingAct -> setStatusTip(tr("See what changes are available in the remote repository waiting to be pulled")); 2642 m_hgIncomingAct->setIconText(tr("Preview"));
2641 2643 m_hgIncomingAct->setStatusTip(tr("See what changes are available in the remote repository waiting to be pulled"));
2642 m_hgPullAct = new QAction(QIcon(":/images/pull.png"), tr("Pull"), this); 2644
2643 m_hgPullAct -> setStatusTip(tr("Pull changes from the remote repository to the local repository")); 2645 m_hgPullAct = new QAction(QIcon(":/images/pull.png"), tr("Pu&ll from Remote Repository"), this);
2644 2646 m_hgPullAct->setIconText(tr("Pull"));
2645 m_hgPushAct = new QAction(QIcon(":/images/push.png"), tr("Push"), this); 2647 m_hgPullAct->setShortcut(tr("Ctrl+L"));
2648 m_hgPullAct->setStatusTip(tr("Pull changes from the remote repository to the local repository"));
2649
2650 m_hgPushAct = new QAction(QIcon(":/images/push.png"), tr("Pus&h to Remote Repository"), this);
2651 m_hgPushAct->setIconText(tr("Push"));
2652 m_hgPushAct->setShortcut(tr("Ctrl+H"));
2646 m_hgPushAct->setStatusTip(tr("Push changes from the local repository to the remote repository")); 2653 m_hgPushAct->setStatusTip(tr("Push changes from the local repository to the remote repository"));
2647 2654
2648 //Workfolder actions 2655 //Workfolder actions
2649 m_hgFolderDiffAct = new QAction(QIcon(":/images/folderdiff.png"), tr("Diff"), this); 2656 m_hgFolderDiffAct = new QAction(QIcon(":/images/folderdiff.png"), tr("&Diff"), this);
2657 m_hgFolderDiffAct->setIconText(tr("Diff"));
2658 m_hgFolderDiffAct->setShortcut(tr("Ctrl+D"));
2650 m_hgFolderDiffAct->setStatusTip(tr("See what has changed in the working folder compared with the last committed state")); 2659 m_hgFolderDiffAct->setStatusTip(tr("See what has changed in the working folder compared with the last committed state"));
2651 2660
2652 m_hgRevertAct = new QAction(QIcon(":/images/undo.png"), tr("Revert"), this); 2661 m_hgRevertAct = new QAction(QIcon(":/images/undo.png"), tr("Re&vert"), this);
2653 m_hgRevertAct->setStatusTip(tr("Throw away your changes and return to the last committed state")); 2662 m_hgRevertAct->setStatusTip(tr("Throw away your changes and return to the last committed state"));
2654 2663
2655 m_hgAddAct = new QAction(QIcon(":/images/add.png"), tr("Add"), this); 2664 m_hgAddAct = new QAction(QIcon(":/images/add.png"), tr("&Add Files"), this);
2656 m_hgAddAct -> setStatusTip(tr("Mark the selected file(s) to be added on the next commit")); 2665 m_hgAddAct->setIconText(tr("Add"));
2657 2666 m_hgAddAct->setShortcut(tr("+"));
2658 //!!! needs to be modified for number 2667 m_hgAddAct->setStatusTip(tr("Mark the selected files to be added on the next commit"));
2659 m_hgRemoveAct = new QAction(QIcon(":/images/remove.png"), tr("Remove"), this); 2668
2660 m_hgRemoveAct -> setStatusTip(tr("Mark the selected file(s) to be removed from version control on the next commit")); 2669 m_hgRemoveAct = new QAction(QIcon(":/images/remove.png"), tr("&Remove Files"), this);
2661 2670 m_hgRemoveAct->setIconText(tr("Remove"));
2662 m_hgUpdateAct = new QAction(QIcon(":/images/update.png"), tr("Update"), this); 2671 m_hgRemoveAct->setShortcut(tr("Del"));
2672 m_hgRemoveAct->setStatusTip(tr("Mark the selected files to be removed from version control on the next commit"));
2673
2674 m_hgUpdateAct = new QAction(QIcon(":/images/update.png"), tr("&Update to Branch Head"), this);
2675 m_hgUpdateAct->setIconText(tr("Update"));
2676 m_hgUpdateAct->setShortcut(tr("Ctrl+U"));
2663 m_hgUpdateAct->setStatusTip(tr("Update the working folder to the head of the current repository branch")); 2677 m_hgUpdateAct->setStatusTip(tr("Update the working folder to the head of the current repository branch"));
2664 2678
2665 //!!! needs to be modified when files selected 2679 m_hgCommitAct = new QAction(QIcon(":/images/commit.png"), tr("&Commit..."), this);
2666 m_hgCommitAct = new QAction(QIcon(":/images/commit.png"), tr("Commit"), this); 2680 m_hgCommitAct->setShortcut(tr("Ctrl+Return"));
2667 m_hgCommitAct->setStatusTip(tr("Commit your changes to the local repository")); 2681 m_hgCommitAct->setStatusTip(tr("Commit your changes to the local repository"));
2668 2682
2669 m_hgMergeAct = new QAction(QIcon(":/images/merge.png"), tr("Merge"), this); 2683 m_hgMergeAct = new QAction(QIcon(":/images/merge.png"), tr("&Merge"), this);
2684 m_hgMergeAct->setShortcut(tr("Ctrl+M"));
2670 m_hgMergeAct->setStatusTip(tr("Merge the two independent sets of changes in the local repository into the working folder")); 2685 m_hgMergeAct->setStatusTip(tr("Merge the two independent sets of changes in the local repository into the working folder"));
2671 2686
2672 //Advanced actions 2687 //Advanced actions
2673 2688
2674 m_hgIgnoreAct = new QAction(tr("Edit .hgignore File"), this); 2689 m_hgIgnoreAct = new QAction(tr("Edit .hgignore File"), this);
2675 m_hgIgnoreAct -> setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial")); 2690 m_hgIgnoreAct->setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial"));
2676 2691
2677 m_hgServeAct = new QAction(tr("Serve via HTTP"), this); 2692 m_hgServeAct = new QAction(tr("Serve via HTTP"), this);
2678 m_hgServeAct -> setStatusTip(tr("Serve local repository via http for workgroup access")); 2693 m_hgServeAct->setStatusTip(tr("Serve local repository via http for workgroup access"));
2679 2694
2680 //Help actions 2695 //Help actions
2681 m_aboutAct = new QAction(tr("About EasyMercurial"), this); 2696 m_aboutAct = new QAction(tr("About EasyMercurial"), this);
2682 2697
2683 // Miscellaneous 2698 // Miscellaneous
2686 this, SLOT(clearSelections())); 2701 this, SLOT(clearSelections()));
2687 } 2702 }
2688 2703
2689 void MainWindow::createMenus() 2704 void MainWindow::createMenus()
2690 { 2705 {
2691 m_fileMenu = menuBar()->addMenu(tr("File")); 2706 m_fileMenu = menuBar()->addMenu(tr("&File"));
2692 2707
2693 m_fileMenu -> addAction(m_openAct); 2708 m_fileMenu->addAction(m_openAct);
2694 m_recentMenu = m_fileMenu->addMenu(tr("Open Recent")); 2709 m_recentMenu = m_fileMenu->addMenu(tr("Open Re&cent"));
2695 m_fileMenu -> addAction(m_changeRemoteRepoAct); 2710 m_fileMenu->addAction(m_hgRefreshAct);
2696 m_fileMenu -> addSeparator(); 2711 m_fileMenu->addSeparator();
2697 2712 m_fileMenu->addAction(m_settingsAct);
2698 m_advancedMenu = m_fileMenu->addMenu(tr("Advanced")); 2713 m_fileMenu->addSeparator();
2699 2714 m_fileMenu->addAction(m_exitAct);
2700 m_fileMenu -> addAction(m_settingsAct); 2715
2701 2716 QMenu *workMenu;
2702 m_fileMenu -> addSeparator(); 2717 workMenu = menuBar()->addMenu(tr("&Work"));
2703 m_fileMenu -> addAction(m_exitAct); 2718 workMenu->addAction(m_hgFolderDiffAct);
2704 2719 workMenu->addSeparator();
2705 m_advancedMenu -> addAction(m_hgIgnoreAct); 2720 workMenu->addAction(m_hgUpdateAct);
2706 m_advancedMenu -> addSeparator(); 2721 workMenu->addAction(m_hgCommitAct);
2707 m_advancedMenu -> addAction(m_hgServeAct); 2722 workMenu->addAction(m_hgMergeAct);
2723 workMenu->addSeparator();
2724 workMenu->addAction(m_hgAddAct);
2725 workMenu->addAction(m_hgRemoveAct);
2726 workMenu->addSeparator();
2727 workMenu->addAction(m_hgRevertAct);
2728
2729 QMenu *remoteMenu;
2730 remoteMenu = menuBar()->addMenu(tr("&Remote"));
2731 remoteMenu->addAction(m_hgIncomingAct);
2732 remoteMenu->addSeparator();
2733 remoteMenu->addAction(m_hgPullAct);
2734 remoteMenu->addAction(m_hgPushAct);
2735 remoteMenu->addSeparator();
2736 remoteMenu->addAction(m_changeRemoteRepoAct);
2737
2738 m_advancedMenu = menuBar()->addMenu(tr("&Advanced"));
2739 m_advancedMenu->addAction(m_hgIgnoreAct);
2740 m_advancedMenu->addSeparator();
2741 m_advancedMenu->addAction(m_hgServeAct);
2708 2742
2709 m_helpMenu = menuBar()->addMenu(tr("Help")); 2743 m_helpMenu = menuBar()->addMenu(tr("Help"));
2710 m_helpMenu->addAction(m_aboutAct); 2744 m_helpMenu->addAction(m_aboutAct);
2711 } 2745 }
2712 2746
2713 void MainWindow::createToolBars() 2747 void MainWindow::createToolBars()
2714 { 2748 {
2715 m_fileToolBar = addToolBar(tr("File")); 2749 m_fileToolBar = addToolBar(tr("File"));
2716 m_fileToolBar -> setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE)); 2750 m_fileToolBar->setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE));
2717 m_fileToolBar -> addAction(m_openAct); 2751 m_fileToolBar->addAction(m_openAct);
2718 m_fileToolBar -> addAction(m_hgRefreshAct); 2752 m_fileToolBar->addAction(m_hgRefreshAct);
2719 m_fileToolBar -> setMovable(false); 2753 m_fileToolBar->setMovable(false);
2720 2754
2721 m_repoToolBar = addToolBar(tr(REPOMENU_TITLE)); 2755 m_repoToolBar = addToolBar(tr(REPOMENU_TITLE));
2722 m_repoToolBar -> setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE)); 2756 m_repoToolBar->setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE));
2723 m_repoToolBar->addAction(m_hgIncomingAct); 2757 m_repoToolBar->addAction(m_hgIncomingAct);
2724 m_repoToolBar->addAction(m_hgPullAct); 2758 m_repoToolBar->addAction(m_hgPullAct);
2725 m_repoToolBar->addAction(m_hgPushAct); 2759 m_repoToolBar->addAction(m_hgPushAct);
2726 m_repoToolBar -> setMovable(false); 2760 m_repoToolBar->setMovable(false);
2727 2761
2728 m_workFolderToolBar = addToolBar(tr(WORKFOLDERMENU_TITLE)); 2762 m_workFolderToolBar = addToolBar(tr(WORKFOLDERMENU_TITLE));
2729 addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar); 2763 addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar);
2730 m_workFolderToolBar -> setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE)); 2764 m_workFolderToolBar->setIconSize(QSize(MY_ICON_SIZE, MY_ICON_SIZE));
2731 m_workFolderToolBar->addAction(m_hgFolderDiffAct); 2765 m_workFolderToolBar->addAction(m_hgFolderDiffAct);
2732 m_workFolderToolBar->addSeparator(); 2766 m_workFolderToolBar->addSeparator();
2733 m_workFolderToolBar->addAction(m_hgRevertAct); 2767 m_workFolderToolBar->addAction(m_hgRevertAct);
2734 m_workFolderToolBar->addAction(m_hgUpdateAct); 2768 m_workFolderToolBar->addAction(m_hgUpdateAct);
2735 m_workFolderToolBar->addAction(m_hgCommitAct); 2769 m_workFolderToolBar->addAction(m_hgCommitAct);
2736 m_workFolderToolBar->addAction(m_hgMergeAct); 2770 m_workFolderToolBar->addAction(m_hgMergeAct);
2737 m_workFolderToolBar->addSeparator(); 2771 m_workFolderToolBar->addSeparator();
2738 m_workFolderToolBar->addAction(m_hgAddAct); 2772 m_workFolderToolBar->addAction(m_hgAddAct);
2739 m_workFolderToolBar->addAction(m_hgRemoveAct); 2773 m_workFolderToolBar->addAction(m_hgRemoveAct);
2740 m_workFolderToolBar -> setMovable(false); 2774 m_workFolderToolBar->setMovable(false);
2741 2775
2742 updateToolBarStyle(); 2776 updateToolBarStyle();
2743 } 2777 }
2744 2778
2745 void MainWindow::updateToolBarStyle() 2779 void MainWindow::updateToolBarStyle()