Bug 151682 - Untitled tab always there
Summary: Untitled tab always there
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
: 156667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-01 10:10 UTC by Vanya
Modified: 2008-02-05 18:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vanya 2007-11-01 10:10:11 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Gentoo Packages
OS:                Linux

When I open Quanta without any documents - there is an Untitled1 tab. When I open some file - the tab stays there. This wasn't the case in Quanta 3.5.5 (and earlier too I think) - Untitled1 tab was closed after opening some file in previous versions.
Comment 1 dusan nedeljkovic [dootzky] 2007-12-17 22:21:08 UTC
i have this same problem, it's very annoying.. :(

can somebody help us? :|
Comment 2 Xiong Chiamiov 2008-01-03 21:51:18 UTC
Agreed, even when I open Quanta and it loads the files I had open previously, it still tacks on an empty file to the left of those that I actually _had_ open.  If I wanted a stinkin' new file, I would have created it!
Comment 3 dusan nedeljkovic [dootzky] 2008-01-04 09:05:46 UTC
i read somewhere that the problem with this is that some part of some KDE default editor is a bit confused, and thinks that that new file was changed, and that's why he's not closing it instantly. so that would mean this is a KDE problem, not Quanta's?! :P anyhow, we all still have a problem. :(
Comment 4 András Manţia 2008-01-04 14:51:38 UTC
Quanta must have an open file (empty or not) everytime. This is a design 
limitation that is hard to fix. Katepart (the editor part used in 
Quanta) has a problem with syntax highlighting if the same document is 
reused for different filetype, eg. you have an empty document and load 
in that a PHP file, it will not have PHP syntax highlighting.
Having this issues (plus the fact that it was impossible to have 2 or 
more empty documents opened at the same time), not so long ago I 
changed the behavior to not reuse an existing opened (and empty) 
document, but always load each file in a new tab. This is what you see 
now.
 I'm not sure if it's better to go back to the old, confusing behavior.
Comment 5 Vanya 2008-01-04 15:28:36 UTC
How about just closing the empty tab after opening a new one? This is the thing I'm always doing myself :o)
Also, maybe we should post bug report regarding highligting? Or vote for it? I don't know..

By the way highlighting for newly created and saved PHP document doesn't work. Is this the same issue?
Comment 6 András Manţia 2008-01-04 15:34:46 UTC
 I will have to verify the idea to close the empty document after 
opening a new one, as it sounds simple, but maybe it will have some 
drawback.
 Reporting the highlighting problem to the kate developers doesn't make 
sense, as KDE3 is not developed anymore, and they were already notified 
long time ago.
 The other problem you mention is different and cannot be solved: Quanta 
simply cannot know what you will type in an empty document, so you need 
to change it manually. The fact that you save as PHP and it still 
doesn't change the highlighting is related to the katepart bug. Quanta 
would need to close and reopen the document, which isn't a good 
solution if you have more than one open documents (the order of the 
opened tabs will change).
Comment 7 dusan nedeljkovic [dootzky] 2008-01-04 15:51:19 UTC
hmmmmmmm!! now I understand! :)

first off - thank you for so detailed information about the problem, respect for that! :)

secondly - well - the syntax highlighting is a less pain then this. 
i work full time job in Qunta, on Linux ofcourse, and I do part-time job at home, using the same BEST app - Quanta! :) 
the point is - when i switch projects, files, whatever - the problem is not that there is 'one blank new file at all times'. that's ok dude, seriously. i like that, i can start typing instantly etc.

but - when i open a project, and then click on some file in the project, it pops out in a new tab, as it should, all is cool, but the 'new empty file' is still there? :P 

ok - if i have 2 or 3 opened files - that's ok, even if it's annoying. :-/
but - when I have 6-7 files, and i keep moving between them with ctrl+tab, the empty one keeps poping up every now and then. daaaaamn that sux! >.< :P

ofcourse, i go and close it, manually, and it's ok then. but - i finish all of the 6 files, close them all - the new empty tab shows again - and when i open new 6 files for editing ..... you get the picture.

if it's possible, and not too much of a hassle to you - it would be great if you could at least give us a choice, setting of any sort, so we can choose between these two different behaviours. if now - well - the logic before was much much better for me eariler, but hey - you're the boss, you have the last word! ;)

cheers again, 
and thanks for the detailed information about the problem,
dootzky

p.s. is there an easy config way that I could personaly 'hack' this desired old behavior, just for my Quanta, even if it's not going to be 'public' tweak? :)
Comment 8 András Manţia 2008-01-04 16:18:07 UTC
SVN commit 757250 by amantia:

Do not keep an empty, Untitled document opened when opening new files.

BUG: 151682


 M  +1 -0      ChangeLog  
 M  +2 -1      components/debugger/dbgp/dbgpnetwork.cpp  
 M  +7 -2      components/debugger/dbgp/quantadebuggerdbgp.cpp  
 M  +4 -0      src/quantadoc.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=757250
Comment 9 András Manţia 2008-01-04 16:19:56 UTC
So there you have a fix for this. Please let me know if there are 
problems with that. Our web page has information about how to compile 
the latest source: http://quanta.kdewebdev.org/faq.php#svn_version

You need the 3.5 branch. We also have a donation page on that site. ;)
Comment 10 Vanya 2008-01-04 16:23:27 UTC
András, thank you for your support. I will donate for such a great product surely! :)
Can you also produce some diff for patching quanta on my Gentoo system? I will also try to submit modified build and patch to Gentoo's bugzilla :)
Comment 11 András Manţia 2008-01-04 16:29:07 UTC
Here is a visual diff:
http://websvn.kde.org/branches/KDE/3.5/kdewebdev/quanta/src/quantadoc.cpp?r1=757250&r2=757249&pathrev=757250

Should be easy to apply "manually".
Comment 12 dusan nedeljkovic [dootzky] 2008-01-09 12:36:51 UTC
i can't compile the SVN version :(
i do everything by the tutorial from your site, and everything works, but when i try to do the last step "su -c make install", it won't work.

i'm using ubuntu, so i figure i should do:
"sudo make install"

and the thing goes, but ends up with several errors after few seconds, and it stops. and i don't get any quanta executable file :|

any thoughts?
do you need the precise error, or is it some ubuntu-centric problem? :-S
Comment 13 Vanya 2008-01-09 12:40:40 UTC
Bug fixed in Gentoo's CVS:

http://bugs.gentoo.org/show_bug.cgi?id=204289

dusan nedeljkovic, I think this is offtopic for this bug report - try reaching author using other methods.
Comment 14 András Manţia 2008-01-09 12:42:10 UTC
Please post the problem and the output of the error to the quanta user 
list (https://mail.kde.org/mailman/listinfo/quanta).
Comment 15 András Manţia 2008-01-25 20:40:28 UTC
*** Bug 156667 has been marked as a duplicate of this bug. ***
Comment 16 dusan nedeljkovic [dootzky] 2008-02-05 18:13:47 UTC
dudes!! i did it! :) 

took me a while, but i compiled it, and everything works now! GREAT! :D
i love it! \o/

for the future refference, if someone has a similar compile problem, mine was that i didn't have all of the "Kommander" files, and since I'm using Ubuntu, and Kommander was already installed, I installed additionally the "Kommander-dev" package (30kb), and tried to do "make" again. 

this time it worked, and now i have brand new Quanta, which is working perfectly, and the bug has been fixed.

I LOVE THE WAY OPEN SOURCE WORKS!! :) 

cheers, and thanks again,
dootzky

p.s. I've just made a MoneyBookers account, and I'm sending you guys an email about the small but warm donation! ^_^