stefankueng / BowPad

A simple and fast text editor with a ribbon UI
http://tools.stefankueng.com/BowPad.html
GNU General Public License v3.0
652 stars 84 forks source link

Suggestion for UI enhancement: FileTree view with caption bar and Save Modified Files Dialog. #90

Open kitepad opened 4 years ago

kitepad commented 4 years ago
  1. It's better if FileTree view has a caption bar to contain a toolbar, and have some toolbar button for toggle FileTree visibility, navigate to parent folder, even other functions, such as filter by file extension, file search.

  2. Currently, we have to deal with save dialog one by one for unsaved file when I closed bowpad, it's better if have a single dialog to list all unsaved file and can select files to save.

wmjordan commented 4 years ago

I'd also suggested adding a toolbar to the file tree view in #85.

stefankueng commented 4 years ago
  1. toggling the file tree visibility from such a toolbar is useless: the toolbar won't be visible if the file tree isn't.
  2. there's already an autosave option available which saves all unmodified files automatically to temp file and restores them on the next load (the "Session" button at the far left, right of the "save" button in the ribbon). If you don't want that, then the you're asked for every file, but that dialog has a checkbox which allows you to do this for all files. image
kitepad commented 4 years ago
  1. I think UI will be better if have a caption bar with close button when ribbon bar is minimized. And I can close file tree quickly, otherwise I have to show ribbon bar and click other tab and click FileTree icon to hide it.

  2. I have tested all these functions you said, but I think it is not better when have multiple modified files but I want to save some. I think user experience should better if using dialog like below: image

  3. I have another confuse for "auto save", when "auto save" is disabled, open a file, the file indicated as unsaved. I think it's not accepted because I don't have any action on content, only open it in editor.

wmjordan commented 4 years ago
  1. I can close file tree quickly, otherwise I have to show ribbon bar and click other tab and click FileTree icon to hide it

If you often want to toggle the display of the File Tree, you can right click the File Tree button on the Ribbon Bar and click the Add to Quick Access Toolbar command. After that you can toggle the file tree on the top of the caption bar of BowPad without the Ribbon Bar.

kitepad commented 4 years ago

I know that. But it will disappeared when I hide whole ribbon (modified source code to hide ribbon).

stefankueng commented 4 years ago

Ctrl+Shift+F also toggles the tree view.

wmjordan commented 3 years ago

@kitepad Sorry for bothering. How did you modified the source code to hide ribbon? I am interested in building a BowPad core (#138) which has no dependency on Ribbon that it may run on Windows Server Core. Could you kindly share your modifications?

kitepad commented 3 years ago

void CMainWindow::ShowRibbon(BOOL state) { m_ribbonVisible = state; IPropertyStore* pPropertyStore = NULL; HRESULT hr = m_pRibbon->QueryInterface(__uuidof(IPropertyStore), (void**)&pPropertyStore); if (SUCCEEDED(hr)) { PROPVARIANT propvar; PropVariantInit(&propvar); UIInitPropertyFromBoolean(UI_PKEY_Viewable,m_ribbonVisible,&propvar); hr = pPropertyStore->SetValue(UI_PKEY_Viewable,propvar); pPropertyStore->Commit();

    HMENU pSysMenu = GetSystemMenu(*this, FALSE);
    MENUITEMINFO mii = {sizeof(MENUITEMINFO)};
    mii.fMask        = MIIM_TYPE | MIIM_DATA;
    GetMenuItemInfo(pSysMenu, IDM_TOGGLERIBBON, FALSE, &mii);

    std::wstring la = state ? _T("Hide Ribbon") : _T("Show Ribbon");
    mii.dwTypeData  = const_cast<wchar_t*>(la.c_str());

    SetMenuItemInfo(pSysMenu, IDM_TOGGLERIBBON, FALSE, &mii);

    if (state) {
        ::DeleteMenu(pSysMenu, IDM_FILE_MENU, MF_BYCOMMAND);
    }
    else {
        ::AppendMenu(pSysMenu, MF_STRING | MF_POPUP, IDM_FILE_MENU, _T("Show File Menu"));

    }
}

}

kitepad commented 3 years ago

Actually, to hide ribbon you only need following code: BOOL m_ribbonVisible = FALSE; // TRUE : show ribbon, FALSE: hide ribbon IPropertyStore* pPropertyStore = NULL; HRESULT hr = m_pRibbon->QueryInterface(__uuidof(IPropertyStore), (void**)&pPropertyStore); if (SUCCEEDED(hr)) { PROPVARIANT propvar; PropVariantInit(&propvar); UIInitPropertyFromBoolean(UI_PKEY_Viewable,m_ribbonVisible,&propvar); hr = pPropertyStore->SetValue(UI_PKEY_Viewable,propvar); pPropertyStore->Commit();

wmjordan commented 3 years ago

Dear Kitepad, Thank you for your information.