Bug 262089

Summary: Tab title set by dbus method "setTitle" does not stick
Product: [Applications] konsole Reporter: David Palacio <dpalacio>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: atkin901
Priority: NOR    
Version: 0.9   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.8

Description David Palacio 2011-01-04 16:43:03 UTC
Version:           0.9 (using Devel) 
OS:                Linux

I set the tab title when editing files with Vim to a string that includes the filename. DBus method:
org.kde.konsole.Session.setTitle(1, "title")

Shortly after the title is replaced by Konsole to the formatted string or the profile name.

Reproducible: Didn't try

Steps to Reproduce:
Add
silent !qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTitle 1 "vi:%"
to your .vimrc and edit a file.


Expected Results:  
The tab title should remain unchanged.

OS: Linux (x86_64) release 2.6.36-gentoo-r5
Compiler: gcc
Comment 1 Mark Atkinson 2011-03-11 19:15:05 UTC
I use something like so.    Setting the tab with rename-tab works, but this will reset to the default after any activity in the shell:

dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${session} org.kde.konsole.Session.setTitle int32:1 string:"console"

probably because setUserTitle() is not available to use via dbus?
Comment 2 Mark Atkinson 2011-03-29 17:18:15 UTC
Found a way to do this on 4.6.1.   I noticed that ctrl-alt-s now brings up the tab title format dialog rather than the set title dialog, so, the following shell script can force the current tabs title by forcing the format for local (int32:0) and remote (int32:1) and setting the title (so it takes effect immediately):

dbus-send --session --dest=$KONSOLE_DBUS_SERVICE --type=method_call --print-reply $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTabTitleFormat int32:0 string:"$1"
dbus-send --session --dest=$KONSOLE_DBUS_SERVICE --type=method_call --print-reply $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTabTitleFormat int32:1 string:"$1"
dbus-send --session --dest=$KONSOLE_DBUS_SERVICE --type=method_call --print-reply $KONSOLE_DBUS_SESSION org.kde.konsole.Session.setTitle int32:1 string:"$1"
Comment 3 Jekyll Wu 2011-10-22 11:08:43 UTC
Git commit 841206fb1349cbc16e49c941d382c618df0e8206 by Jekyll Wu.
Committed on 22/10/2011 at 12:16.
Pushed by jekyllwu into branch 'master'.

Title set by dbus method setTitle() should be sticky by default

It is not intuitive and easy for users to find they need also
call dbus method setTabTitleFormat() to avoid that title being
replaced on session activity.

BUG: 262089
FIXED-IN: 4.8

M  +6    -0    src/Session.cpp

http://commits.kde.org/konsole/841206fb1349cbc16e49c941d382c618df0e8206