[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    [Konsole-devel] Fwd: Changing konsole font size via dbus
From:       Robert Knight <robertknight () gmail ! com>
Date:       2011-09-27 17:13:55
Message-ID: CAJGrnh3-c9zG+fW+JdZZDaR0fDy6Z4Ya=MH-h7PszkNTqM4B6g () mail ! gmail ! com
[Download RAW message or body]

Hello Michal,

I am no longer involved with Konsole development, I'm forwarding this
to the Konsole project mailing list.

Regards,
Rob.

On 27 September 2011 12:59, Michal Svec <rebel@atrey.karlin.mff.cuni.cz> wrote:
>
> Hi,
>
> Not having found anything on this, I looked into the code, would something
> like the attached patch be acceptable?
>
> Thanks
> Michal
>
>
> On Tue, 10 May 2011, Michal Svec wrote:
>
>>
>> Hello,
>>
>> is it possible to alter session font size via dbus (what can be done using
>> Ctrl++ and Ctrl+-, Menu-View-Enlarge Font, etc)? Nothing like that is listed
>> among Session methods, I wonder if there is any other way to do that.
>>
>> Thanks
>> Michal
>

["konsole-dbus-font.patch" (TEXT/X-DIFF)]

diff -ruw /tmp/kdebase-4.6.5-orig//konsole/src/SessionController.h \
                /tmp/kdebase-4.6.5/konsole/src/SessionController.h
--- /tmp/kdebase-4.6.5-orig//konsole/src/SessionController.h	2011-07-19 \
                17:45:16.000000000 +0200
+++ /tmp/kdebase-4.6.5/konsole/src/SessionController.h	2011-09-27 13:45:47.000000000 \
+0200 @@ -158,6 +158,16 @@
      */
     void openUrl( const KUrl& url ); 
 
+    /**
+     * Increases session font size
+     */
+    void increaseTextSize();
+
+    /**
+     * Descreases session font size
+     */
+    void decreaseTextSize();
+
 private slots:
     // menu item handlers
     void openBrowser();
@@ -179,8 +189,6 @@
     void closeSession();
     void monitorActivity(bool monitor);
     void monitorSilence(bool monitor);
-    void increaseTextSize();
-    void decreaseTextSize();
     void renameSession();
     void saveSession();
     void changeProfile(Profile::Ptr profile);
diff -ruw /tmp/kdebase-4.6.5-orig//konsole/src/ViewManager.cpp \
                /tmp/kdebase-4.6.5/konsole/src/ViewManager.cpp
--- /tmp/kdebase-4.6.5-orig//konsole/src/ViewManager.cpp	2011-07-19 \
                17:45:16.000000000 +0200
+++ /tmp/kdebase-4.6.5/konsole/src/ViewManager.cpp	2011-09-27 13:37:26.000000000 \
+0200 @@ -1097,5 +1097,15 @@
         controller->session()->close();
 }
 
+void ViewManager::enlargeFont()
+{
+    activeViewController()->increaseTextSize();
+}
+
+void ViewManager::shrinkFont()
+{
+    activeViewController()->decreaseTextSize();
+}
+
 #include "ViewManager.moc"
 
diff -ruw /tmp/kdebase-4.6.5-orig//konsole/src/ViewManager.h \
                /tmp/kdebase-4.6.5/konsole/src/ViewManager.h
--- /tmp/kdebase-4.6.5-orig//konsole/src/ViewManager.h	2011-07-19 17:45:16.000000000 \
                +0200
+++ /tmp/kdebase-4.6.5/konsole/src/ViewManager.h	2011-09-27 13:43:53.000000000 +0200
@@ -250,6 +250,14 @@
       */
     void moveSessionRight();
 
+    /** DBus slot that enlarges the font in the current session
+      */
+    void enlargeSessionFont();
+
+    /** DBus slot that shrinks the font in the current session
+      */
+    void shrinkSessionFont();
+
 private slots:
     // called when the "Split View Left/Right" menu item is selected
     void splitLeftRight();



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic