Bug 169054

Summary: checkbox for hiding size widget
Product: [Applications] konsole Reporter: Chali Ahmul M.P.U <chali.ahmul>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: wishlist CC: bluedzins, hugo.pereira.da.costa, kollix
Priority: NOR    
Version: 2.1   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 4.8
Attachments: Patch to add hiding
Disallow window size popup
checkbox for disable terminal size hint

Description Chali Ahmul M.P.U 2008-08-13 19:23:30 UTC
Version:           2.1 (using KDE 4.1.0)
Installed from:    Debian testing/unstable Packages

Like in Kde3 konsole, there should be a option to hide the size widget.

---------- patch ---------

diff -bu kdebase-4.1.0/apps/konsole/src/EditProfileDialog.cpp kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.cpp
--- kdebase-4.1.0/apps/konsole/src/EditProfileDialog.cpp	2008-06-26 03:33:07.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.cpp	2008-08-13 18:47:34.000000000 +0200
@@ -253,6 +253,7 @@
 
     // window options
     _ui->showMenuBarButton->setChecked( info->property<bool>(Profile::ShowMenuBar) );
+    _ui->showSizeWidgetButton->setChecked( info->property<bool>(Profile::ShowSizeWidget) );
 
     // signals and slots
     connect( _ui->dirSelectButton , SIGNAL(clicked()) , this , SLOT(selectInitialDir()) );
@@ -269,6 +270,9 @@
     connect(_ui->showMenuBarButton , SIGNAL(toggled(bool)) , this , 
             SLOT(showMenuBar(bool)) );
 
+    connect(_ui->showSizeWidgetButton , SIGNAL(toggled(bool)) , this ,
+            SLOT(showSizeWidget(bool)) );
+
     connect(_ui->environmentEditButton , SIGNAL(clicked()) , this , 
             SLOT(showEnvironmentEditor()) );
 }
@@ -369,6 +373,10 @@
 {
     _tempProfile->setProperty(Profile::ShowMenuBar,show);
 }
+void EditProfileDialog::showSizeWidget(bool show)
+{
+  _tempProfile->setProperty(Profile::ShowSizeWidget,show);
+}
 void EditProfileDialog::tabTitleFormatChanged(const QString& format)
 {
     _tempProfile->setProperty(Profile::LocalTabTitleFormat,format);
diff -bu kdebase-4.1.0/apps/konsole/src/EditProfileDialog.h kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.h
--- kdebase-4.1.0/apps/konsole/src/EditProfileDialog.h	2008-06-26 03:33:07.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.h	2008-08-13 17:59:35.000000000 +0200
@@ -120,6 +120,7 @@
     void insertRemoteTabTitleText(const QString& text);
 
     void showMenuBar(bool);
+    void showSizeWidget(bool);
     void showEnvironmentEditor();
     void tabBarVisibilityChanged(int);
     void tabBarPositionChanged(int);
diff -bu kdebase-4.1.0/apps/konsole/src/EditProfileDialog.ui kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.ui
--- kdebase-4.1.0/apps/konsole/src/EditProfileDialog.ui	2008-06-03 11:34:24.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/EditProfileDialog.ui	2008-08-13 17:59:07.000000000 +0200
@@ -32,8 +32,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -222,6 +222,16 @@
             </property>
            </widget>
           </item>
+          <item>
+           <widget class="QCheckBox" name="showSizeWidgetButton" >
+            <property name="toolTip" >
+             <string>Show new size of the terminal after resizing</string>
+            </property>
+            <property name="text" >
+             <string>Show terminal size after resizing</string>
+            </property>
+           </widget>
+          </item>
          </layout>
         </widget>
        </item>
@@ -245,8 +255,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -401,8 +411,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -584,8 +594,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -762,8 +772,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -852,8 +862,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>429</width>
-        <height>476</height>
+        <width>437</width>
+        <height>486</height>
        </rect>
       </property>
       <attribute name="title" >
@@ -897,7 +907,6 @@
              <string>Allow the output to be suspended by pressing Ctrl+S</string>
             </property>
             <property name="text" >
-             <!-- STRINGFREEZE - Remove extra space after 'Ctrl+S' !-->
              <string>Enable flow control using Ctrl+S , Ctrl+Q</string>
             </property>
            </widget>
diff -bu kdebase-4.1.0/apps/konsole/src/Profile.cpp kdebase-4.1.0-new/apps/konsole/src/Profile.cpp
--- kdebase-4.1.0/apps/konsole/src/Profile.cpp	2008-06-26 03:33:07.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/Profile.cpp	2008-08-13 18:10:56.000000000 +0200
@@ -76,6 +76,7 @@
     , { LocalTabTitleFormat , "tabtitle" , 0 , QVariant::String }
     , { RemoteTabTitleFormat , "RemoteTabTitleFormat" , GENERAL_GROUP , QVariant::String }
     , { ShowMenuBar , "ShowMenuBar" , GENERAL_GROUP , QVariant::Bool }
+    , { ShowSizeWidget , "ShowSizeWidget" , GENERAL_GROUP , QVariant::Bool }
     , { TabBarMode , "TabBarMode" , GENERAL_GROUP , QVariant::Int }
     , { TabBarPosition , "TabBarPosition" , GENERAL_GROUP , QVariant::Int }
 	, { StartInCurrentSessionDir , "StartInCurrentSessionDir" , GENERAL_GROUP , QVariant::Bool }
@@ -153,6 +154,7 @@
     setProperty(TabBarMode,AlwaysShowTabBar);
     setProperty(TabBarPosition,TabBarBottom);
     setProperty(ShowMenuBar,true);
+    setProperty(ShowSizeWidget,true);
     setProperty(StartInCurrentSessionDir,true);
     setProperty(ShowNewAndCloseTabButtons,false);
 
diff -bu kdebase-4.1.0/apps/konsole/src/Profile.h kdebase-4.1.0-new/apps/konsole/src/Profile.h
--- kdebase-4.1.0/apps/konsole/src/Profile.h	2008-06-26 03:33:07.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/Profile.h	2008-08-13 18:03:00.000000000 +0200
@@ -113,6 +113,8 @@
         RemoteTabTitleFormat,   
         /** (bool) Specifies whether the menu bar should be shown in the main application window. */
         ShowMenuBar,    
+        /** (bool) Specifies whether show size information after resizing the application window. */
+        ShowSizeWidget,
         /** (TabBarModeEnum) Specifies when the tab bar should be shown in
          * the main application window. */ 
         TabBarMode,    
diff -bu kdebase-4.1.0/apps/konsole/src/TerminalDisplay.cpp kdebase-4.1.0-new/apps/konsole/src/TerminalDisplay.cpp
--- kdebase-4.1.0/apps/konsole/src/TerminalDisplay.cpp	2008-06-03 11:34:24.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/TerminalDisplay.cpp	2008-08-13 18:27:57.000000000 +0200
@@ -304,6 +304,7 @@
 ,_scrollbarLocation(NoScrollBar)
 ,_wordCharacters(":@-./_~")
 ,_bellMode(SystemBeepBell)
+,_visible_size_widget(true)
 ,_blinking(false)
 ,_hasBlinker(false)
 ,_cursorBlinking(false)
@@ -1510,7 +1511,9 @@
 
   if ( _resizing )
   {
+    if (_visible_size_widget)
   	showResizeNotification();
+
     emit changedContentSizeSignal(_contentHeight, _contentWidth); // expose resizeEvent
   }
   
@@ -2269,6 +2272,11 @@
 }
 
 
+void Konsole::TerminalDisplay::setSizeWidgetVisibility(bool visible)
+{
+  _visible_size_widget = visible;
+}
+
 bool TerminalDisplay::focusNextPrevChild( bool next )
 {
   if (next)
diff -bu kdebase-4.1.0/apps/konsole/src/TerminalDisplay.h kdebase-4.1.0-new/apps/konsole/src/TerminalDisplay.h
--- kdebase-4.1.0/apps/konsole/src/TerminalDisplay.h	2008-05-21 10:32:54.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/TerminalDisplay.h	2008-08-13 18:27:59.000000000 +0200
@@ -117,6 +117,10 @@
     void setScroll(int cursor, int lines);
 
     /** 
+     * Sets if the size widget is going to be shown or not
+     */
+    void setSizeWidgetVisibility(bool visible);
+    /**
      * Returns the display's filter chain.  When the image for the display is updated,
      * the text is passed through each filter in the chain.  Each filter can define
      * hotspots which correspond to certain strings (such as URLs or particular words).
@@ -717,6 +721,7 @@
     QString     _wordCharacters;
     int         _bellMode;
 
+    bool _visible_size_widget; // if the size widget will be show
     bool _blinking;   // hide text in paintEvent
     bool _hasBlinker; // has characters to blink
     bool _cursorBlinking;     // hide cursor in paintEvent
Common subdirectories: kdebase-4.1.0/apps/konsole/src/tests and kdebase-4.1.0-new/apps/konsole/src/tests
diff -bu kdebase-4.1.0/apps/konsole/src/ViewManager.cpp kdebase-4.1.0-new/apps/konsole/src/ViewManager.cpp
--- kdebase-4.1.0/apps/konsole/src/ViewManager.cpp	2008-05-29 13:18:43.000000000 +0200
+++ kdebase-4.1.0-new/apps/konsole/src/ViewManager.cpp	2008-08-13 18:23:16.000000000 +0200
@@ -765,6 +765,9 @@
     else if ( scrollBarPosition == Profile::ScrollBarRight )
        view->setScrollBarPosition(TerminalDisplay::ScrollBarRight);
 
+    // set visibility of the size widget
+    view->setSizeWidgetVisibility(info->property<bool>(Profile::ShowSizeWidget));
+
     // terminal features
     bool blinkingCursor = info->property<bool>(Profile::BlinkingCursorEnabled);
     view->setBlinkingCursor(blinkingCursor);
Comment 1 Chali Ahmul M.P.U 2008-08-13 19:28:17 UTC
Created attachment 26839 [details]
Patch to add hiding
Comment 2 Kurt Hindenburg 2009-03-15 17:28:59 UTC
Comment on attachment 26839 [details]
Patch to add hiding

patch is in .gz.

In future please just use text diff
Comment 3 Kurt Hindenburg 2009-03-15 17:46:27 UTC
Created attachment 32144 [details]
Disallow window size popup

Patch for trunk.  No  real changes where made from above patch.

Robert, is this something you'd like to  see in 4.3?
Comment 4 Martin Koller 2011-07-16 21:16:24 UTC
*** Bug 164465 has been marked as a duplicate of this bug. ***
Comment 5 Martin Koller 2011-07-16 21:17:27 UTC
*** Bug 245968 has been marked as a duplicate of this bug. ***
Comment 6 Jekyll Wu 2011-07-28 16:16:38 UTC
Created attachment 62282 [details]
checkbox for disable terminal size hint

recreate the patch against master branch.

Will this patch ever be accepted?
Comment 7 Martin Koller 2011-07-28 19:47:44 UTC
The usual way to submit a patch is to put it into a review request on
https://git.reviewboard.kde.org

Try this.
Comment 8 Kurt Hindenburg 2011-08-01 01:03:49 UTC
Git commit b40a006db852bd8eeaa326588591883accd6db6f by Kurt Hindenburg.
Committed on 01/08/2011 at 02:56.
Pushed by hindenburg into branch 'master'.

Add a checkbox to hide the size widget upon resizing window.

Re-add the KDE 3 option to show/hide the size widget when the window is
changed.

Patch is years old from Chali Ahmul M.P.U <chali.ahmul@atlas.cz>
FEATURE: 169054
FIXED-IN: 4.8

M  +2    -0    src/Profile.cpp
M  +8    -0    src/EditProfileDialog.cpp
M  +10   -0    src/EditProfileDialog.ui
M  +7    -0    src/TerminalDisplay.cpp
M  +3    -0    src/ViewManager.cpp
M  +2    -0    src/Profile.h
M  +1    -0    src/EditProfileDialog.h
M  +5    -0    src/TerminalDisplay.h

http://commits.kde.org/konsole/b40a006db852bd8eeaa326588591883accd6db6f