#7759 closed enhancement (fixed)
Adding name of source file to the title bar
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | version control/browser | Version: | 0.11 |
Severity: | minor | Keywords: | bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Usually when developing we open up multiple tabs.
In the titlebar it currently shows
/src/project/…/hello.c
This optional preference or default would be nice
hello.c - /src/project/…/hello.c
So I'm not looking at all these tabs that say /src
Version is: 0.11b2
Attachments (3)
Change History (16)
comment:1 by , 16 years ago
Component: | general → version control/browser |
---|---|
Milestone: | → 0.11.3 |
Owner: | set to |
Severity: | normal → minor |
comment:2 by , 16 years ago
Somewhat related: attachment preview pages have only "Attachment" for title. That could instead show the filename as well (e.g. the_fix.patch / #123
).
For browser pages we could have something like "attachment.py in trunk/trac".
comment:3 by , 15 years ago
Keywords: | bitesized added |
---|
by , 15 years ago
Attachment: | browser.patch added |
---|
suggested patch for browser.py, to add the 'path_links[-1]' to the page title, if exists
comment:4 by , 15 years ago
The patch I just added puts on the page title either '/' or the full path if is short, or the '%1 - %2' where %1 is the last element in the path and %2 is the full path
comment:5 by , 15 years ago
That's a good start. A few comments:
- We always leave spaces around operators, so
len(path_links)==1
should be writtenlen(path_links) == 1
. - We support Python down to 2.4 on trunk, so the ternary operator
... if ... else ...
is not available. You can often get the same result with... and ... or ...
, but in this case, maybe it would be more readable to usepy:choose
on the<title>
tag:<title py:choose="len(path_links)"> <py:when test="1">${...}</py:when> <py:when test="2">${...}</py:when> <py:otherwise>${...}<py:otherwise> </title>
by , 15 years ago
Attachment: | browser.2.patch added |
---|
follow-up: 10 comment:8 by , 15 years ago
Patch applied in [9235]. Waiting for the corresponding attachment change.
One minor thing: currently we display "$base - $dir/$base". Should we rather use "$base - $dir" instead?
follow-up: 11 comment:10 by , 15 years ago
comment:11 by , 15 years ago
Replying to cboos:
Did you really intend to keep
source:/...
?
No, and it's not present in the changeset :)
Should we rather use "$base - $dir" instead?
I also think so.
Ok, I'll fix that.
comment:12 by , 15 years ago
Milestone: | next-minor-0.12.x → 0.12 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Attachment patch applied in [9238] with minor modifications:
- Moved the
parent
assignment to the<head>
tag, as we also use it in the body. - Fixed the indentation within the
<title>
tag (we use 2 spaces per level). - Use "{name} on {parent}" for the title, and added the required translation marker.
I also fixed the title for the browser to show "{base} in {dir}", again with a translation marker.
comment:13 by , 15 years ago
Owner: | changed from | to
---|
That will work as long as you have only a few tabs opened… I usually only see the favicons for my tabs ;-)
Nevertheless, I think it's a nice suggestion.