Bug 101409 - Pre-populate source field if passed one file
Summary: Pre-populate source field if passed one file
Status: CONFIRMED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 3.3
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-13 04:00 UTC by Joshua C Gilbert
Modified: 2009-01-23 18:38 UTC (History)
2 users (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 Joshua C Gilbert 2005-03-13 04:00:34 UTC
Version:           3.3 (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

$ kompare file.txt
This results in an error: Could not parse diff output.
The expected result is to to pre-populate the source field with file.txt.

This would save a bit of time when using Kompare, which is always good. 

This is also a bit of a stop-gap measure until we can Kompare two files using Konqueror directly. Open one of the files using Kompare, then you only need to find one file to compare them.
Comment 1 Otto Bruggeman 2005-03-13 11:43:54 UTC
This is pretty hard to implement therefore someone contributed a patch to at least make the second filedialog start in the same directory so it saves a bit of time.

Your wish at the end is also pretty hard it implement. I gave it a shot about 1.5 years ago but stopped because it involved a lot of code and I did not have enough time to make it work properly and then I lost all my changes due to a harddisk crash so I got a little demotivated. But yes it that is the only right way to do it.
Comment 2 Joshua C Gilbert 2005-03-13 19:27:45 UTC
I must admit, C++ is not my language of choice, but why would it be difficult to pre-populate the first text box? Please don't misunderstand, I don't doubt you, I just don't see why.
Comment 3 Joshua C Gilbert 2005-03-13 19:48:28 UTC
OK, I just grabbed the Kompare source and I see the difficulty. Currently, we handle the case where a single file is passed. This file is assumed to be a diff. 

What about handling the two cases differently? If we recognize the single argument as a diff file we do what Kompare already does. If it doesn't look like a diff, pre-populate the source box. 
Comment 4 Otto Bruggeman 2005-03-27 00:06:27 UTC
Your suggestion means moving code from the part into the shell application to detect what kind fo file it is. I'll have to consider doing that at some point but I am not entirely sure why I chose to put the detection code inside the part. I'll see what I can do for the 3.5/4.0 development cycle but my work is killing me atm so dont expect much from me in the coming months.
Comment 5 Jeff Snyder 2005-06-06 21:43:22 UTC
This is gonna be a little spammy... I'm reassigning everything that's currently 
assigned to bruggie (who's been the default assignee for bugs since time began) 
to the new list address. 
 
Bruggie: if you're working on one or more of these atm, please snatch 'em 
back.. 
 
Everyone, esp. Joshua and Bruggie: if this genrates 33 mails, my sincere 
apologies.. 
Comment 6 FiNeX 2009-01-04 16:07:05 UTC
The "bug" is still reproducible on KDE 4 version.