Bug 131954 - open log in kate/favorite editing program
Summary: open log in kate/favorite editing program
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-06 14:23 UTC by Niek Beernink
Modified: 2009-04-21 01:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Adds external log viewer to preferences under behavior > general (5.23 KB, patch)
2009-04-05 19:03 UTC, Mickey Roberts
Details
Adds external log viewer to preferences under behavior > logging (3.08 KB, patch)
2009-04-19 22:28 UTC, Mickey Roberts
Details
Try 3 of adding external log viewing :) (2.34 KB, patch)
2009-04-21 01:12 UTC, Mickey Roberts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niek Beernink 2006-08-06 14:23:46 UTC
Version:           revision 570312 (using KDE KDE 3.5.4)
Installed from:    Compiled From Sources

Instead of opening the channel log in a tab (which grossly lags konversation and only shows a part of the log), I would like logs to open in kate or any other text editor. 

This would involve creating an option in Behavior => Logging. For example a checkbox for "open logfile in custom text editor" would work. Enabling it would enable a previously disabled input line where you could type the name of your favorite texteditor's executable. (similar to how you define a custom web browser)

When this option is enabled, pressing ctrl+o or right-clicking the channel and selecting open log file for $channel would then open the log in an external editor instead of konversation.

Perhaps this could even be a default option?
Comment 1 Jaka Kranjc 2007-01-20 15:48:53 UTC
I further suggest that a button that will start the external app be added to the current log tab.
Comment 2 Mickey Roberts 2009-04-05 19:03:54 UTC
Created attachment 32628 [details]
Adds external log viewer to preferences under behavior > general

You should be able to use this patch to get the functionality you want.  This is my first time dabbling with the konversation source code, but it seems like an easy enough addition.
Comment 3 Eike Hein 2009-04-05 19:18:02 UTC
Hi Mickey,

thank you for your patch, but unfortunately Konversation 1.1 was the last feature release developed for KDE 3, and thus we cannot accept patches that add new features or strings to that development branch (it accepts fixes only). If you want your work to be included, I'd ask you to update it for the KDE 4 port, which you may currently find under branches/work/konvi-kde4 in SVN (and soon again in trunk/extragear/network).

However, I wonder if a more user-friendly approach here would be to make the option a selection between "Built-in log viewer" and "My KDE text editor", and in the latter case, run the app associated with the text/plain MIME type via the respective kdelibs API.
Comment 4 Mickey Roberts 2009-04-19 22:28:05 UTC
Created attachment 32939 [details]
Adds external log viewer to preferences under behavior > logging

This should add the option to the svn version.  Should it be under logging? or under general?
Comment 5 Eike Hein 2009-04-20 15:41:36 UTC
Under Logging seems fine, thanks.
Comment 6 Eike Hein 2009-04-20 16:43:54 UTC
Patch comments:

- Please don't use tabs for indentation - the patch contains a whole section that does nothing except change space to tabs. Konvi uses spaces for indentation.

- Rather than use KRun::run(), it would probably be better to just use the regular KRun constructor, since you can then pass it useful parameters like isLocalFile=true and showProgressInfo=false to improve speed and appearance. Note that KRun auto-deletes itself when it's done, so there's no need to handle that.

- "Use system text editor to view logs." would be a nicer/clearer option label than "Use external log viewer".
Comment 7 Eike Hein 2009-04-20 16:45:28 UTC
s/space /spaces / and no, the dot at the end wasn't supposed to be part of the suggested better option label, sorry.
Comment 8 Eike Hein 2009-04-20 16:50:32 UTC
Actually not sure about the isLocalFile, though - I guess technically we do allow the user to pick a remote location as log file folder.
Comment 9 Mickey Roberts 2009-04-21 01:12:55 UTC
Created attachment 32969 [details]
Try 3 of adding external log viewing :)

Here's try 3.

Thanks for the feedback on the other patch.  I'm just getting started in working with KDE projects, so I'm still learning the API and such :)
Comment 10 Eike Hein 2009-04-21 01:48:08 UTC
Committed as SVN revision 956927, with the tiny change of "open" rather than "view" in the option label, as that should better indicate that this isn't a read-only operation. Thanks!