Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#7759 closed enhancement (fixed)

Adding name of source file to the title bar

Reported by: jnlc32@… Owned by: Guy Rozendorn <guy@…>
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)

browser.patch (909 bytes ) - added by Guy Rozendorn 14 years ago.
suggested patch for browser.py, to add the 'path_links[-1]' to the page title, if exists
browser.2.patch (953 bytes ) - added by Guy Rozendorn 14 years ago.
attachment.patch (932 bytes ) - added by guy@… 14 years ago.
patch for attachment page title

Download all attachments as: .zip

Change History (16)

comment:1 by Christian Boos, 15 years ago

Component: generalversion control/browser
Milestone: 0.11.3
Owner: set to Christian Boos
Severity: normalminor

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.

comment:2 by Christian Boos, 15 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 Remy Blank, 14 years ago

Keywords: bitesized added

by Guy Rozendorn, 14 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 Guy Rozendorn, 14 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 Remy Blank, 14 years ago

That's a good start. A few comments:

  • We always leave spaces around operators, so len(path_links)==1 should be written len(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 use py: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 Guy Rozendorn, 14 years ago

Attachment: browser.2.patch added

comment:6 by Guy Rozendorn, 14 years ago

cool. how's that?

comment:7 by Christian Boos, 14 years ago

Better :-) Use path_links[1:], as we don't need "source:" in the title.

comment:8 by Remy Blank, 14 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?

by guy@…, 14 years ago

Attachment: attachment.patch added

patch for attachment page title

comment:9 by anonymous, 14 years ago

just attached suggested patch for the attachment title page.

in reply to:  8 ; comment:10 by Christian Boos, 14 years ago

Replying to rblank:

Patch applied in [9235].

Did you really intend to keep source:/...?

Should we rather use "$base - $dir" instead?

I also think so.

in reply to:  10 comment:11 by Remy Blank, 14 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 Remy Blank, 14 years ago

Milestone: next-minor-0.12.x0.12
Resolution: fixed
Status: newclosed

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 Remy Blank, 14 years ago

Owner: changed from Christian Boos to Guy Rozendorn <guy@…>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Guy Rozendorn <guy@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Guy Rozendorn <guy@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.