Bug 158401

Summary: filename in title bar
Product: [Applications] okular Reporter: Stefan Endrullis <stefan>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: wishlist CC: aacid, alvaro.aguilera, bumbelejer, dav1dblunk3tt, hhielscher, ll03_11, mail, mey.wer, niburu1, ssmail1398-bug, suy, whynot
Priority: NOR    
Version: 0.6.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0
Sentry Crash Report:
Attachments: Patch to show filename instead of Title metadata in Okular's window caption.

Description Stefan Endrullis 2008-02-25 16:00:27 UTC
Version:           0.6.1 (using KDE 4.0.1)
Installed from:    Ubuntu Packages
OS:                Linux

This is a feature request. I would like to see the filename instead of the document title (read from file header) in the window title bar. Or maybe show both of them in the caption or just make it configurable.

Currently Okular 0.6.1 shows only the title of PDF files, not the filename. For me that's very confusing. Most of the PDF files you'll find in the web are not correctly labeled. If you open them into okular and if you often switch between these windows you get crazy, because you cannot identify them by the window caption. You only see captions like "thesis.dvi" (even if the filename is called "glossary.pdf"), "Title", ...

The problem is, that you cannot change the title of a PDF file without hacking the file. I wouldn't say anything against it if you would be easily able to change it (as you can change filenames).
Comment 1 Stefan Endrullis 2008-02-25 16:01:54 UTC
There is also a general issue related to this feature issue: bug 89205
Comment 2 Pino Toscano 2008-02-25 16:13:40 UTC
> I would like to see the filename instead of the document title (read from file header) in the window title bar.

The current solution was done because lots of people requested it, FWIW.

> Or maybe show both of them in the caption 

Would a really really long window title improve the situation? Don't think so.

> or just make it configurable.

Right, the start of the path that leads in having a plane cabin instead of an application.
Comment 3 Stefan Endrullis 2008-02-25 16:42:12 UTC
> > I would like to see the filename instead of the document title (read from
> file header) in the window title bar.
> 
> The current solution was done because lots of people requested it, FWIW.

I cannot believe that most people want this solution. They didn't know about the consequences then they voted for it. Maybe start a new vote in some months.

Well, I would absolutely prefer the filename instead of a title (without any useful information and without the capability to change it).

It would be a solution if okular would be able to remove the document title and save the modified PDF files, but I don't think you are going to implement a PDF editor because of the "plane cabin" thing. I suppose without a title the filename is displayed, right?

> > Or maybe show both of them in the caption
> 
> Would a really really long window title improve the situation? Don't think
> so. 

That's not my favorite solution, but OK. In most cases the filename is very short. If the title bar would be of the form "<filename> (<title>) - okular" every body would be able to identify the documents.

> > or just make it configurable.
> 
> Right, the start of the path that leads in having a plane cabin instead of an
> application.

So you also think that kate is a plane cabin? There you can configure if you want to see the filename + full path or only the filename.
Comment 4 kde2eran 2008-02-26 12:57:09 UTC
Looking at my collection of many thousands of PDF documents, about 80% of them have PDF titles that are incorrect, meaningless ("Template", "main.dvi") or dangerously misleading ("foo.dvi").

It's easy to see why, too: Acrobat Reader shows the filename rather than PDF title in its window title bar, so most authors of PDF files never see the PDF title and therefore don't bother to set it correctly.
Comment 5 kde2eran 2008-02-27 03:18:08 UTC
Created attachment 23724 [details]
Patch to show filename instead of Title metadata in Okular's window caption.

Making Okular's behavior the same as that of KPDF and Acrobat Reader is trivial
-- see attachment.
Comment 6 Stefan Endrullis 2008-02-28 18:18:29 UTC
Thank you!
Comment 7 Pino Toscano 2008-03-01 12:12:31 UTC
I refuse that patch.
There are lots of PDF documents that just have a good title; also, keep in mind that Okular reads other formats than PDF, and actually we have also CHM and DjVu documents that can provide a title.
And I disagree in showing the filename instead of the title just becase "acroread does that" - if acroread taught people to do not care about something that can be actually useful (and in the specifications of _Adobe_'s format), I fail to see why we should ignore it.
Comment 8 Stefan Endrullis 2008-03-01 13:40:42 UTC
First I want to say that okular is a great program. That's why I'm using it (currently a patched version) instead of many other PDF viewers like kpdf, xpdf, evince, ...

The development team has done a great job with the review tool! I like it very much.

And now please try to image you got 10 PDF files which you have to work with. And every file has the document title "Title". What are you doing now? Open only one file at a time? Try to edit the title with pdfedit to change to title of every file? I even don't know if that's possible. I haven't found it. So what can we else? I have no idea.

In this case I just wish to see the filename in the caption of the viewer, because a filename is totally easy to change.

And I think that's exactly the reason, why Adobe is not using the title attribute in their viewers, even if they have designed the PDF format and know about this attribute at best. And they decided not to use it in the caption and most other viewers (xpdf, kpdf, gv (gostview), kgostview, pdfedit) do the same.

If you still want to use the title maybe there would be a way for people like me to force the filename in the caption by editing the settings file of okular.
I don't need to have a GUI to change it. The only thing I don't want is always to checkout, patch and compile the sources when I want to update okular, because I'm using Ubuntu/Debian, not Gentoo :)
Comment 9 Albert Astals Cid 2008-03-01 14:44:46 UTC
This is the kind of thing that will only be solved by an option in the configuration dialog and we are KDE so we can add them without saying "Oh god no the user will be puzzled by so many options". So i'm all for having this chosed by the user with the default we prefer.
Comment 10 Helge Hielscher 2008-08-17 13:07:58 UTC
In Okular 0.7 the filename is not available to the user, not even File/Properties contains it.
Comment 11 Jörg Endrullis 2008-09-18 11:34:31 UTC
*** This bug has been confirmed by popular vote. ***
Comment 12 Pino Toscano 2008-11-29 15:36:17 UTC
SVN commit 890576 by pino:

Add hidden configuration for showing the document title (if any) in the title bar. Default is true (as before).
Based on a patch by Alejandro Exojo, thanks!
$ kwriteconfig --file okularpartrc --group General --key DisplayDocumentTitle --type bool false

BUG: 158401


 M  +3 -0      conf/okular.kcfg  
 M  +12 -8     part.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=890576
Comment 13 Stefan Endrullis 2008-11-29 16:07:21 UTC
Thanks very much, Pino Toscano!

Thanks also for the command line to set the option - very useful for setup scripts.
Comment 14 Helge Hielscher 2008-11-30 15:08:15 UTC
What about displaying the document title *and* the filename?
Comment 15 Pino Toscano 2009-03-18 12:55:28 UTC
*** Bug 187506 has been marked as a duplicate of this bug. ***
Comment 16 Kenneth L. Lee 2009-05-31 15:43:47 UTC
(In reply to comment #13)
> Thanks very much, Pino Toscano!
> 
> Thanks also for the command line to set the option - very useful for setup
> scripts.

Thanks very much, it is very  useful. It took me a long time to find this bugfix, and I created an acount to reply
Comment 17 Pino Toscano 2009-12-16 18:07:20 UTC
*** Bug 218965 has been marked as a duplicate of this bug. ***
Comment 18 Werner Meyer 2009-12-16 21:52:15 UTC
I'm not content with the solution for Bug 208999.

Please give the user possibility to customise the following way:

Please add in the upper block „here“ (don't have the english version: second
menu from the right - last menu-entry, first tab):
a checkbox/switch either to show the document-title (ps/pdf-property
(metadata)) or the filename (which I prefer!!!) as window-caption.

(This is interesting for other apps similar.)

Btw - is the SVN commit 890576 available as opensuse11.2.rpm?
Comment 19 Pino Toscano 2010-02-02 15:08:57 UTC
*** Bug 225271 has been marked as a duplicate of this bug. ***
Comment 20 Werner Meyer 2010-02-22 21:04:09 UTC
The hint with

kwriteconfig --file okularpartrc --group General --key DisplayDocumentTitle
--type bool false

(without linebreak)

is great - thank you!

Werner
Comment 21 OnAir 2010-03-02 12:18:32 UTC
yes. thanks a lot for that. it works fine.

regards
Comment 22 niburu1 2010-03-28 16:29:38 UTC
(In reply to comment #7)
> I refuse that patch.
> There are lots of PDF documents that just have a good title; also, keep in mind that Okular reads other formats than PDF, and actually we have also CHM and DjVu documents that can provide a title.
> And I disagree in showing the filename instead of the title just becase "acroread does that" - if acroread taught people to do not care about something that can be actually useful (and in the specifications of _Adobe_'s format), I fail to see why we should ignore it.

This isn't a normative issue. Yes, everyone *ought to* correctly label the pdfs they create, but unfortunately most users simply DO NOT. Do you think most creators of pdf documents are going to change because of some terrible non-configurable feature of a pdf viewer they've never heard of, such as Okular? (It IS a great viewer, by the way.)

The option to display the filename needs to be configurable. I'm even surprised that anybody at all would rather have Okular display the pdf title instead.
Comment 23 niburu1 2010-03-28 16:34:07 UTC
(In reply to comment #12)
> SVN commit 890576 by pino:
> 
> Add hidden configuration for showing the document title (if any) in the title
> bar. Default is true (as before).
> Based on a patch by Alejandro Exojo, thanks!
> $ kwriteconfig --file okularpartrc --group General --key DisplayDocumentTitle
> --type bool false

Brilliant, thanks!
Comment 24 davidblunkett 2011-01-29 19:35:08 UTC
I'll add my 2p here.  This bug is incredibly annoying and should be fixed by default. 95% of the very many pdfs I view are downloaded or created by other people and possess annoying titles like "microsoft word" [124356342xvs.pdf] etc etc and when I save them I rename them.  

The lack of connection to reality of the title is mildly annoying but the insistence of okular honouring this over the filename is really annoying.

The default should be filename as this always means something and is useful whereas the title rarely means something and will never be more useful than occansionally and unreliably linked to the history of the document.
Comment 25 Hannes Schniepp 2011-08-07 20:54:13 UTC
I agree with many here that it is often extremely difficult and annoying to work with PDFs when the filename is not displayed in the title bar.  

The workaround using kwriteconfig is extremely helpful and satisfying for me (thanks!). However, I think for the sake of the quality of okular, there should be a better solution, like a GUI-configurable feature (rather than a hidden one for which one needs to google bug reports).
Comment 26 Kenneth L. Lee 2011-08-08 01:31:41 UTC
They may think it is a disrespect to the original author to display only the 
modified name, so they refused to modify it.
On Sunday, August 07, 2011 08:54:13 PM Hannes Schniepp wrote:
> https://bugs.kde.org/show_bug.cgi?id=158401
> 
> 
> Hannes Schniepp <whynot@nurfuerspam.de> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> CC|                            |whynot@nurfuerspam.de
> 
> 
> 
> 
> --- Comment #25 from Hannes Schniepp <whynot nurfuerspam de>  2011-08-07
> 20:54:13 --- I agree with many here that it is often extremely difficult
> and annoying to work with PDFs when the filename is not displayed in the
> title bar.
> 
> The workaround using kwriteconfig is extremely helpful and satisfying for me
> (thanks!). However, I think for the sake of the quality of okular, there
> should be a better solution, like a GUI-configurable feature (rather than a
> hidden one for which one needs to google bug reports).
Comment 27 niburu1 2011-08-08 07:38:31 UTC
(In reply to comment #26)
> They may think it is a disrespect to the original author to display only the 
> modified name, so they refused to modify it.

Sure. But while that *is* a reason not to display the filename, it is not a *good enough* one.
Comment 28 Albert Astals Cid 2011-08-09 16:00:08 UTC
Git commit 9f99d536dc4946f79832d7780cc1a21f5afaf53c by Albert Astals Cid.
Committed on 09/08/2011 at 17:59.
Pushed by aacid into branch 'master'.

Add GUI option to switch off showing the document title

Pleasing users is not so bad
BUGS: 158401

M  +2    -0    part.cpp
M  +7    -0    conf/dlggeneralbase.ui

http://commits.kde.org/okular/9f99d536dc4946f79832d7780cc1a21f5afaf53c
Comment 29 Hannes Schniepp 2011-08-09 16:23:23 UTC
Awesome! Thanks so much to all!
Comment 30 niburu1 2011-08-09 17:52:49 UTC
Great news! Thanks!
Comment 31 Albert Astals Cid 2012-03-28 18:26:18 UTC
*** Bug 246694 has been marked as a duplicate of this bug. ***