[PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

View: New views
5 Messages — Rating Filter:   Alert me  

[PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

by Bugzilla from mkyral@email.cz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
the attached patch adds a possibility to permanent rename session via dbus interface. It is for KDE 4.3.3.

Regards,
Marián Kyral

diff -Naurb konsole-4.3.3.orig/konsole/src/org.kde.konsole.Session.xml konsole-4.3.3/konsole/src/org.kde.konsole.Session.xml
--- konsole-4.3.3.orig/konsole/src/org.kde.konsole.Session.xml 2009-11-03 20:45:36.000000000 +0100
+++ konsole-4.3.3/konsole/src/org.kde.konsole.Session.xml 2009-11-04 18:45:37.000000000 +0100
@@ -61,5 +61,8 @@
             <arg type="s" direction="out"/>
             <arg name="role" type="i" direction="in"/>
         </method>
+        <method name="renameSession">
+            <arg name="sessionName" type="s" direction="in"/>
+        </method>
     </interface>
 </node>
diff -Naurb konsole-4.3.3.orig/konsole/src/Session.cpp konsole-4.3.3/konsole/src/Session.cpp
--- konsole-4.3.3.orig/konsole/src/Session.cpp 2009-11-03 20:45:36.000000000 +0100
+++ konsole-4.3.3/konsole/src/Session.cpp 2009-11-04 18:45:18.000000000 +0100
@@ -795,6 +795,13 @@
         return QString();
 }
 
+void Session::renameSession(const QString& sessionName)
+{
+    setTabTitleFormat(Session::LocalTabTitle,sessionName);
+    setTabTitleFormat(Session::RemoteTabTitle,sessionName);
+    setTitle(Session::DisplayedTitleRole,sessionName);
+}
+
 ProcessInfo* Session::getProcessInfo()
 {
     ProcessInfo* process;
diff -Naurb konsole-4.3.3.orig/konsole/src/Session.h konsole-4.3.3/konsole/src/Session.h
--- konsole-4.3.3.orig/konsole/src/Session.h 2009-11-03 20:45:36.000000000 +0100
+++ konsole-4.3.3/konsole/src/Session.h 2009-11-04 18:57:42.000000000 +0100
@@ -466,6 +466,11 @@
    */
   Q_SCRIPTABLE QString title(int role) const;
 
+  /**
+   * Rename session to @p sessionName.
+   */
+  Q_SCRIPTABLE void renameSession(const QString& sessionName);
+
 signals:
 
   /** Emitted when the terminal process starts. */

_______________________________________________
konsole-devel mailing list
konsole-devel@...
https://mail.kde.org/mailman/listinfo/konsole-devel

Re: [PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

by Bugzilla from robertknight@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Please post the patch on reviewboard.kde.org so that we can keep track
of the status of proposed patches.
Regarding the patch itself, rather than setting the two tab title
formats to a particular value and DisplayedTitle - which should be
redundant since
Konsole will update that value based on the tab title format
automatically, it would be better to set the name of the session
to a value and then set the tab title format to display the session name.

Regards,
Robert.

2009/11/5 Marián Kyral <mkyral@...>:

> Hi,
> the attached patch adds a possibility to permanent rename session via dbus interface. It is for KDE 4.3.3.
>
> Regards,
> Marián Kyral
>
> _______________________________________________
> konsole-devel mailing list
> konsole-devel@...
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
>
_______________________________________________
konsole-devel mailing list
konsole-devel@...
https://mail.kde.org/mailman/listinfo/konsole-devel

Re: [PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

by Bugzilla from mkyral@email.cz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dne 7.11.2009 14:41, Robert Knight napsal(a):
> Hello,
>
> Please post the patch on reviewboard.kde.org so that we can keep track
> of the status of proposed patches.
>    
How? There is no create account option :-(

> Regarding the patch itself, rather than setting the two tab title
> formats to a particular value and DisplayedTitle - which should be
> redundant since
> Konsole will update that value based on the tab title format
> automatically, it would be better to set the name of the session
> to a value and then set the tab title format to display the session name.
>
>    
Sorry, don't understand much. I started with function
SessionController::renameSession(), used two lines for set the name.
Than I looked for something to "immediately" show changed name and
I found setTitle(). Maybe there is some better function. Feel free to
update
it. For me is important "permanent" and "immediately" session rename.

Regards,
Marián

> Regards,
> Robert.
>
> 2009/11/5 Marián Kyral<mkyral@...>:
>    
>> Hi,
>> the attached patch adds a possibility to permanent rename session via dbus interface. It is for KDE 4.3.3.
>>
>> Regards,
>> Marián Kyral
>>
>> _______________________________________________
>> konsole-devel mailing list
>> konsole-devel@...
>> https://mail.kde.org/mailman/listinfo/konsole-devel
>>
>>
>>      
> _______________________________________________
> konsole-devel mailing list
> konsole-devel@...
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
>    

_______________________________________________
konsole-devel mailing list
konsole-devel@...
https://mail.kde.org/mailman/listinfo/konsole-devel

Re: [PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

by Bugzilla from robertknight@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> How? There is no create account option :-(

I'm sorry about that.  It appears that account registration was
disabled at some point today - I'll try to find out what happened.  In
the meantime we'll stick to this mailing list.

Regards,
Robert.

2009/11/7 Marián Kyral <mkyral@...>:

> Dne 7.11.2009 14:41, Robert Knight napsal(a):
>> Hello,
>>
>> Please post the patch on reviewboard.kde.org so that we can keep track
>> of the status of proposed patches.
>>
> How? There is no create account option :-(
>
>> Regarding the patch itself, rather than setting the two tab title
>> formats to a particular value and DisplayedTitle - which should be
>> redundant since
>> Konsole will update that value based on the tab title format
>> automatically, it would be better to set the name of the session
>> to a value and then set the tab title format to display the session name.
>>
>>
> Sorry, don't understand much. I started with function
> SessionController::renameSession(), used two lines for set the name.
> Than I looked for something to "immediately" show changed name and
> I found setTitle(). Maybe there is some better function. Feel free to
> update
> it. For me is important "permanent" and "immediately" session rename.
>
> Regards,
> Marián
>> Regards,
>> Robert.
>>
>> 2009/11/5 Marián Kyral<mkyral@...>:
>>
>>> Hi,
>>> the attached patch adds a possibility to permanent rename session via dbus interface. It is for KDE 4.3.3.
>>>
>>> Regards,
>>> Marián Kyral
>>>
>>> _______________________________________________
>>> konsole-devel mailing list
>>> konsole-devel@...
>>> https://mail.kde.org/mailman/listinfo/konsole-devel
>>>
>>>
>>>
>> _______________________________________________
>> konsole-devel mailing list
>> konsole-devel@...
>> https://mail.kde.org/mailman/listinfo/konsole-devel
>>
>>
>
> _______________________________________________
> konsole-devel mailing list
> konsole-devel@...
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
_______________________________________________
konsole-devel mailing list
konsole-devel@...
https://mail.kde.org/mailman/listinfo/konsole-devel

Re: [PATCH] dbus - method void org.kde.konsole.Session.renameSession(QString sessionName)

by Bugzilla from mkyral@email.cz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Done
http://reviewboard.kde.org/r/2126/

Regards,
Marian

> ------------ Původní zpráva ------------
> Od: Robert Knight <robertknight@...>
> Předmět: Re: [Konsole-devel] [PATCH] dbus - method void
> org.kde.konsole.Session.renameSession(QString sessionName)
> Datum: 08.11.2009 00:38:21
> ----------------------------------------
> > How? There is no create account option :-(
>
> I'm sorry about that.  It appears that account registration was
> disabled at some point today - I'll try to find out what happened.  In
> the meantime we'll stick to this mailing list.
>
> Regards,
> Robert.
>
> 2009/11/7 Marián Kyral <mkyral@...>:
> > Dne 7.11.2009 14:41, Robert Knight napsal(a):
> >> Hello,
> >>
> >> Please post the patch on reviewboard.kde.org so that we can keep track
> >> of the status of proposed patches.
> >>
> > How? There is no create account option :-(
> >
> >> Regarding the patch itself, rather than setting the two tab title
> >> formats to a particular value and DisplayedTitle - which should be
> >> redundant since
> >> Konsole will update that value based on the tab title format
> >> automatically, it would be better to set the name of the session
> >> to a value and then set the tab title format to display the session name.
> >>
> >>
> > Sorry, don't understand much. I started with function
> > SessionController::renameSession(), used two lines for set the name.
> > Than I looked for something to "immediately" show changed name and
> > I found setTitle(). Maybe there is some better function. Feel free to
> > update
> > it. For me is important "permanent" and "immediately" session rename.
> >
> > Regards,
> > Marián
> >> Regards,
> >> Robert.
> >>
> >> 2009/11/5 Marián Kyral<mkyral@...>:
> >>
> >>> Hi,
> >>> the attached patch adds a possibility to permanent rename session via dbus
> interface. It is for KDE 4.3.3.
> >>>
> >>> Regards,
> >>> Marián Kyral
> >>>
> >>> _______________________________________________
> >>> konsole-devel mailing list
> >>> konsole-devel@...
> >>> https://mail.kde.org/mailman/listinfo/konsole-devel
> >>>
> >>>
> >>>
> >> _______________________________________________
> >> konsole-devel mailing list
> >> konsole-devel@...
> >> https://mail.kde.org/mailman/listinfo/konsole-devel
> >>
> >>
> >
> > _______________________________________________
> > konsole-devel mailing list
> > konsole-devel@...
> > https://mail.kde.org/mailman/listinfo/konsole-devel
> >
> _______________________________________________
> konsole-devel mailing list
> konsole-devel@...
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
>
>
_______________________________________________
konsole-devel mailing list
konsole-devel@...
https://mail.kde.org/mailman/listinfo/konsole-devel