Skip to content

Commit

Permalink
chore: [collaborators] disable svn
Browse files Browse the repository at this point in the history
svn should not contain in this plugin,
remove it later.

Log:
Change-Id: I2dede14d085d5c1b3da427f82d1b2353d38b4729
  • Loading branch information
deepin-mozart committed Jun 12, 2024
1 parent 47ce67f commit 5c53bad
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/plugins/collaborators/collaborators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,33 @@ bool Collaborators::start()
if (windowService->addNavigationItem) {
QAction *actionGit = new QAction(MWNA_GIT, this);
actionGit->setIcon(QIcon::fromTheme("git-navigation"));

#ifdef ENABLE_SVN // TODO(Any): svn should not contained in this plugin.
QAction *actionSvn = new QAction(MWNA_SVN, this);
actionSvn->setIcon(QIcon::fromTheme("svn-navigation"));

windowService->addNavigationItem(new AbstractAction(actionGit), Priority::medium);
windowService->addNavigationItem(new AbstractAction(actionSvn), Priority::medium);
AbstractWidget *svnMainWidgetImpl = new AbstractWidget(CVSkeeper::instance()->svnMainWidget());
windowService->registerWidget(MWNA_SVN, svnMainWidgetImpl);
connect(actionSvn, &QAction::triggered, this, [=](){
windowService->replaceWidget(MWNA_SVN,
Position::FullWindow);
windowService->hideStatusBar();
}, Qt::DirectConnection);
#endif

windowService->addNavigationItem(new AbstractAction(actionGit), Priority::medium);

AbstractWidget *gitMainWidgetImpl = new AbstractWidget(CVSkeeper::instance()->gitMainWidget());
AbstractWidget *svnMainWidgetImpl = new AbstractWidget(CVSkeeper::instance()->svnMainWidget());


windowService->registerWidget(MWNA_GIT, gitMainWidgetImpl);
windowService->registerWidget(MWNA_SVN, svnMainWidgetImpl);


connect(actionGit, &QAction::triggered, this, [=](){
windowService->replaceWidget(MWNA_GIT,
Position::FullWindow);
windowService->hideStatusBar();
}, Qt::DirectConnection);
connect(actionSvn, &QAction::triggered, this, [=](){
windowService->replaceWidget(MWNA_SVN,
Position::FullWindow);
windowService->hideStatusBar();
}, Qt::DirectConnection);
}
}
return true;
Expand Down

0 comments on commit 5c53bad

Please sign in to comment.