[Konsole-devel] [Bug 77528] Resize tab size when the number of tabs does not with on the toolbar

Kurt V.Hindenburg kurt.hindenburg at kdemail.net
Mon Jan 31 19:00:43 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=77528         
kurt.hindenburg kdemail net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From kurt.hindenburg kdemail net  2005-01-31 20:00 -------
CVS commit by hindenburg: 

BUG: 77528
Allow user to set automatic resizing of tabs.


  M +18 -1     konsole.cpp   1.504
  M +2 -0      konsole.h   1.194


--- kdebase/konsole/konsole/konsole.cpp  #1.503:1.504
 @ -248,4 +248,5  @ Konsole::Konsole(const char* name, int h
 ,m_tabViewMode(ShowIconAndText)
 ,b_dynamicTabHide(false)
+,b_autoResizeTabs(false)
 ,b_fullscreen(false)
 ,m_menuCreated(false)
 @ -837,4 +838,9  @ void Konsole::makeGUI()
    dynamicTabHideOption->setChecked(b_dynamicTabHide);
    dynamicTabHideOption->plug(m_tabbarPopupMenu);
+
+   KToggleAction *m_autoResizeTabs = new KToggleAction( i18n("Auto Resize Tabs"),
+                 0, this, SLOT( slotToggleAutoResizeTabs() ), this);
+   m_autoResizeTabs->setChecked(b_autoResizeTabs);
+   m_autoResizeTabs->plug(m_tabbarPopupMenu);
  }
 
 @ -868,5 +874,6  @ void Konsole::makeTabWidget()
   tabwidget = new KTabWidget(this);
   tabwidget->setTabReorderingEnabled(true);
-  tabwidget->setAutomaticResizeTabs(true);
+  tabwidget->setAutomaticResizeTabs( b_autoResizeTabs );
+
   if (n_tabbar==TabTop)
     tabwidget->setTabPosition(QTabWidget::Top);
 @ -1342,4 +1349,11  @ void Konsole::slotTabSetViewOptions(int 
 }
 
+void Konsole::slotToggleAutoResizeTabs()
+{
+  b_autoResizeTabs = !b_autoResizeTabs;
+
+  tabwidget->setAutomaticResizeTabs( b_autoResizeTabs );
+}
+
 void Konsole::slotTabbarToggleDynamicHide()
 {
 @ -1444,4 +1458,5  @ void Konsole::saveProperties(KConfig* co
   config->writeEntry("TabViewMode", int(m_tabViewMode));
   config->writeEntry("DynamicTabHide", b_dynamicTabHide);
+  config->writeEntry("AutoResizeTabs", b_autoResizeTabs);
 
   if (se) {
 @ -1571,4 +1586,5  @ void Konsole::readProperties(KConfig* co
       m_tabViewMode = TabViewModes(config->readNumEntry("TabViewMode", ShowIconAndText));
       b_dynamicTabHide = config->readBoolEntry("DynamicTabHide", false);
+      b_autoResizeTabs = config->readBoolEntry("AutoResizeTabs", false);
    }
 
 @ -1594,4 +1610,5  @ void Konsole::applySettingsToGUI()
    }
    updateKeytabMenu();
+   tabwidget->setAutomaticResizeTabs( b_autoResizeTabs );
 }
 

--- kdebase/konsole/konsole/konsole.h  #1.193:1.194
 @ -234,4 +234,5  @ private slots:
   void slotTabSetViewOptions(int);
   void slotTabbarToggleDynamicHide();
+  void slotToggleAutoResizeTabs();
 
   void slotSetEncoding();
 @ -387,4 +388,5  @ private:
   TabViewModes m_tabViewMode;
   bool        b_dynamicTabHide;
+  bool        b_autoResizeTabs;
 
   bool        b_framevis:1;



More information about the konsole-devel mailing list