Skip to content
Permalink
Browse files

modified to show an BookmarkEditDialog when adding a bookmark.

  • Loading branch information...
haraki committed Jun 24, 2019
1 parent 88affcc commit ca5006323400dc2bf5ffc12791e2a0003b3079e5
Showing with 14 additions and 2 deletions.
  1. +14 −2 folderform.cpp
@@ -7,6 +7,7 @@
#include "ui_folderform.h"
#include "foldermodel.h"
#include "settings.h"
#include "bookmarkeditdialog.h"

namespace Farman
{
@@ -409,14 +410,25 @@ void FolderForm::onBookmarkDir(bool marked)
{
if(index < 0)
{
Settings::getInstance()->insertBookmarkDirPath(currentPath);
BookmarkInfo retInfo;
if(BookmarkEditDialog::launchDialog(currentPath,
{BookmarkInfo::Type::User,
currentPath,
currentPath},
retInfo,
this) != QDialog::Accepted)
{
return;
}

Settings::getInstance()->insertBookmarkDirPath({retInfo.getName(), retInfo.getPath()});
}
}
else
{
if(index >= 0)
{
Settings::getInstance()->removeBookmarkDirPath(index);
Settings::getInstance()->removeBookmarkDirPath(index);
}
}

0 comments on commit ca50063

Please sign in to comment.
You can’t perform that action at this time.