Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed default title length from 30 to 80. #2335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamDanischewski
Copy link

Changed the default file name length in the title bar from 30 to 80.

Fulfills: Enhancement Request - File Name in Title Bar Too Short #2334

@elextr
Copy link
Member

elextr commented Oct 3, 2019

LGTM

There may be lots of complicated things that could be done here, but hey if a fixed 30 has worked for most people to date then a fixed 80 is no worse.

@eht16
Copy link
Member

eht16 commented Oct 3, 2019

As 80 characters is as arbitary as 30, this change would break the behaviour which was requested in https://sourceforge.net/p/geany/bugs/298/. I think if at all, we should make it configurable (and maybe enlarge the default a it).

@elextr
Copy link
Member

elextr commented Oct 3, 2019

@eht16 if I read it right 298 is for tabs, this is title bar.

@eht16
Copy link
Member

eht16 commented Oct 3, 2019

298 is about tab, dialogs and title bar (at least according to my comment in the issue :D).
I think my point would be valid even if not. Just let's add a (probably hidden) preference for this.
The OP prefers 80 characters, the original requestor needed less, the next will need some value in between.

@kugel-
Copy link
Member

kugel- commented Oct 3, 2019

God, please don't add prefs for stuff like this.

@AdamDanischewski
Copy link
Author

@elextr:

There may be lots of complicated things that could be done here, but hey if a fixed 30 has worked for most people to date then a fixed 80 is no worse.

@elextr Thanks, my sentiments exactly.

Eventually the hardcoded value could/should probably be moved to a defined constant. Maybe a refactoring beautification PR?

FYI: this value is hardcoded twice, it's also in document.c:

419	if (length < 0)
420		length = 30;

I left it 30 since a filename length less than zero probably doesn't need 80.

@codebrainz
Copy link
Member

IMO, we should just remove the ellipsizing from the window title altogether. It used to be an arbitrary 30 chars, now an arbitrary 80, and there's still the directory path and project name which could be really long, it's totally dependent on window size and user's font size, and sane window managers already handle this. Moreover, the original issue on SF was an extreme edge case where the user's filename somehow had embedded in it all of the query string parameters which shouldn't even be part of a filename.

@AdamDanischewski
Copy link
Author

@codebrainz If removing the ellipsizing works reliably I'm fine with it, but if that needs more extensive testing maybe we can put that into a new PR? This will improve it quick and safe for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants