pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.62k stars 410 forks source link

Navigate between previous notes ? #1706

Open bflorat opened 4 years ago

bflorat commented 4 years ago

Hi, thanks for this great app.

Is there a way to navigate easily between previously opened notes (apart from using the next/previous note button) ?

I suppose a multi-tab editor is not compatible with the QOwnNotes concept but maybe a navigation bar (like in a browser) or a panel displaying a list of last notes (like a browser history panel) would be very handy to reopen previously consulted notes.

pbek commented 4 years ago

Thank you for your kind words!

There are shortcuts to jump forward and back in the note history (see Note / Navigation menu and https://www.qownnotes.org/shortcuts/QOwnNotes). Plus you can use the mouse-keys 4 and 5, like in a browser. If you enable the tray icon there also is a small list of past notes.

If that that answers your question feel free to close the issue. 😁

bflorat commented 4 years ago

Thanks for your answer,

I already discovered the navigation shorts and buttons but I didn't figure out the list in the systray, thanks.

This makes your QOwnNotes usable for me. Through, I still think that a dedicated simple panel would be much easier to switch back and forth into recent notes as tabs are not available. I previously used zim and I switch intensively between notes using tabs (usually, I write into three or more notes in a short amount of time). I may be wrong but it seems that your software architecture can support it (you already have the history and your layout concept is very flexible, new panels can be added/hidden at will).

PS: your AES local encryption really rocks, it is really something a differentiator.

pbek commented 4 years ago

I really don't like to introduce a new panel. Not only are there already too many, but they are also a huge amount of work to integrate. I just use my mouse keys to move forward and backward in the history.

Hm, maybe something in the navigation panel?

PS: your AES local encryption really rocks, it is really something a differentiator.

Thank you. And you can also script it: https://docs.qownnotes.org/en/latest/scripting/hooks/#encryptionhook.

bflorat commented 4 years ago

Sure, the navigation panel could display not only the current note but also previous ones. It seems logical to me. Maybe an option to show/hide previous notes ?

Thx for the hook tip.

pbek commented 4 years ago

@bflorat, meanwhile you might like to test https://github.com/pbek/QOwnNotes/issues/1720

bflorat commented 4 years ago

Thanks ! multi-tabs are much better. Not even sure this feature is still useful.

pbek commented 4 years ago

I don't know neither. :grin:

SunSerega commented 12 months ago

Plus you can use the mouse-keys 4 and 5

It's been a while since I had a mouse with side buttons being just "mouse 4" and "mouse 5". The last few mice had side keys that needed manual configuration, to be useful. Currently, I have 2 of my side buttons set to predefined "Browser forward/backward". It works in all browsers, in Explorer, in Visual Studio, in NP++ (kinda)... But not QOwnNotes.

From what I can test quickly - these "Browser forward/backward" have Win virtual codes of 167/166 (0xA7,0xA6). Can you also add them to do the same as "mouse 4" and "mouse 5"?

pbek commented 12 months ago

You can play around with the code here:

https://github.com/pbek/QOwnNotes/blob/2237017a77c895ff70d1950c6f8b150d297e9928/src/mainwindow.cpp#L4171-L4181

SunSerega commented 12 months ago

"Browser forward/backward" are probably keyboard keys... But yeah, I see it nearby too.

pbek commented 12 months ago

The Events from the code part are mouse events.

SunSerega commented 12 months ago

Yeah, the part you linked, but the part right before it seems to handle keyboard keys, no? https://github.com/pbek/QOwnNotes/blob/2237017a77c895ff70d1950c6f8b150d297e9928/src/mainwindow.cpp#L4054 Though it seems to be per-ui_component, meanwhile "Browser forward/backward" would need to be global to work like mouse 4/5.

Also, phind really tried to convince me that these keys only exist in Windows and so aren't defined in QT, but here they are: https://github.com/openwebos/qt/blob/92fde5feca3d792dfd775348ca59127204ab4ac0/src/gui/kernel/qkeymapper_win.cpp#L329-L330

SunSerega commented 12 months ago

Got time to try things out, but Qt Creator wants to eat whole 50GB of my disk space... I don't have that.

Maybe I can somehow highjack GitHub Actions to make binaries for me, so I can still test things here, but that's kind of pushing it already...

Can I hope for one of the maintainers to try and do this? (add the same functionality to keyboard keys Qt::Key_Back and Qt::Key_Forward, that already exists for mouse buttons Qt::BackButton and Qt::ForwardButton)

pbek commented 12 months ago

Can I hope for one of the maintainers to try and do this? (add the same functionality to keyboard keys Qt::Key_Back and Qt::Key_Forward, that already exists for mouse buttons Qt::BackButton and Qt::ForwardButton)

I currently have no good way of testing on Windows, anyone else?