tomboy-notes / tomboy-ng

Next generation of Tomboy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not change format to non-fixed width

nhfo opened this issue · comments

commented

Text format button/keyboard shortcut work like toggles, for example Ctrl+B for example turns selected text to bold, and to normal the second time. However Fixed Width/Ctrl+T does not work like toggle. So format can be changed to use fixed width font but then it can not be changed back to non-fixed width font.

I am using version 0.32, GTK2.

commented

Thats interesting, it works for me !

The way the code works is that it looks at the first character of the selection and then changes all of that selection to what ever that first character is not. Maybe you are not selecting exactly the same first character ?

For my test, I selected a work of text, pressed Ctrl-T and it goes fixed width, without changing the selection, I press Ctrl-T again and it reverts to normal text. Can you describe how you are testing please ?

Davo
(wow, 11 minute response time, who said open source is not well supported ? Trouble is I am signing off shortly and after tomorrow will be "off-net" for several days ....)

commented

Thats interesting, it works for me !

Are you on same version? I would think without checking that I am on an ancient version (being on Debian, although Debian 11).

The way the code works is that it looks at the first character of the selection and then changes all of that selection to what ever that first character is not. Maybe you are not selecting exactly the same first character ?

I was not selecting the same text. I selected a part of text formatted to be fixed width. IIUC it should still have worked.

For my test, I selected a work of text, pressed Ctrl-T and it goes fixed width, without changing the selection, I press Ctrl-T again and it reverts to normal text. Can you describe how you are testing please ?

I tried this just now, does not work.

(wow, 11 minute response time, who said open source is not well supported ? Trouble is I am signing off shortly and after tomorrow will be "off-net" for several days ....)

I appreciate it. I can not imagine where you get time for it. Even creating this issue is a stretch for me.

commented

Firstly, version, there is a later version available but that area of the code has not changed for a long time!

OK, lets be clear here, suppose I have a line of text thats says - "something 0iii1iii2iii3 something else"

I select just the 'word' starting with '0', then without cancelling the selection, repeatedly press Ctrl-T. That block of selection toggles to and from Fixed. I stop pressing eventually, leaving all that 'word' fixed.

Now I change the selection, I just select just the "1iii2" part, one press of Ctrl-T and just the selected part reverts to normal text, another press and its again all Fixed. Thats how it should work, that the normal way for a wisiwyg editor. It sounds to me that you are expecting the whole word to change including the parts that are not selected ? That would upset a lot of people ! Maybe your selection starts with a special character ?

But you say that even that does not work for you ? Thats certainly a problem. Can you be really specific about what you are doing, do you see the whole selection change ? Some characters do not change much between fixed and normal spacing, maybe thats confusing ? That may depend on the the actual normal and fixed font you are using, changeable in Settings. Maybe your selection starts with a special character ? All the two state things (Bold, Italics, Highlight, Fixed) work the same way, but thats not your experience ?

As I cannot replicate your problem here (yet) I may end up sending you a version with some debug embedded, that might reveal what happening.

The 11 minutes ? Just lucky, I was browsing and saw it 4 minutes after you posted, pretty cute IMHO.

Davo

commented

Ahem I discovered that both usual font and fixed font were set to the same fixed width font. I am sorry I wasted your time.

So it partly explains Ctrl-T issue I was seeing.

But why it worked the first time? It turns out that if you create a new note, it will use some particular font. If you select some text and press Ctrl-T twice it will change to use the font that is set in settings. If you close this note and open it again, it will display with the font that is set in the settings.

Does it make sense? I have a feeling that I am being too economical with words. Should we close this and create a new issue?

commented

Oh, thats interesting. I will investigate that one indeed. The code in there is surprising complicated and what you suggest is quite possible as new notes are now created differently that in earlier versions. Thanks for the heads up, will get back to you.
Davo

commented

Simpler version of this bug is visible if, eg, set default font to a Roman font. A newly created note initially shows up as a sans font. No switching to mono needed.
I need to go over new note code again ....
Davo

commented

OK, this issue fixed in https://github.com/tomboy-notes/tomboy-ng/wiki/Download_Release

So closing this issue, thanks for your report.

Davo