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

List:       kde-commits
Subject:    playground/pim/mailody
From:       Frode M. Døving <frode () lnix ! net>
Date:       2008-04-07 16:48:20
Message-ID: 1207586900.327471.18721.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 794477 by fdoving:

Add checkbox to autohide the tabbar.


 M  +0 -1      TODO  
 M  +14 -19    src/setupmisc.cpp  
 M  +1 -1      src/setupmisc.h  
 M  +2 -2      src/tabwidget.cpp  


--- trunk/playground/pim/mailody/TODO #794476:794477
@@ -6,7 +6,6 @@
    extend akonadi/control with stuff from the tray application
 
 fdoving:
-    add configureable setting for autoHideTabBar
 
 ruphy:
    fix the unread count in the tray to be readable 
--- trunk/playground/pim/mailody/src/setupmisc.cpp #794476:794477
@@ -73,7 +73,8 @@
               "run out of space some day" ) );
 
     m_attachmentFolderEdit = new KLineEdit( this );
-    m_attachmentFolderEdit->setWhatsThis( i18n( "Select the folder where the \
attachements will be stored." ) ); +    m_attachmentFolderEdit->setWhatsThis( 
+            i18n( "Select the folder where the attachements will be stored." ) );
     m_changePathButton = new QPushButton( i18n( "&Change..." ), this );
 
     QHBoxLayout *lay = new QHBoxLayout( this );
@@ -85,28 +86,20 @@
              this, SLOT( slotFolderPicker() ) );
     m1->addWidget( m_storeAttachments, 1, 0, 1, 2 );
 
-    // add config thing for the autoHideTabBar key.
-//X     TODO: FRODE - finish this.
-//X     m_autoHideTabBar = new QCheckBox( this );
-//X     m_autoHideTabBar->setText( i18n( "Autohide tabbar" ) );
-//X     m_authHideTabBar->setWhatsThis(
-//X         i18n( "When enabled this feature will automatically hide "
-//X               "the tab bar when there is only one tab. Usefull if you rarely use \
                tabs."
-//X             ) );
-//X    
-//X     connect( m_autoHideTabBar, SIGNAL( stateChanged( int ) ), this,
-//X             SLOT( slotAutoHideTabBar( int ) ));
-//X     m1->addWidget( m_autoHideTabBar, 1, 0
-
-
-    QSpacerItem* spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum,
+    QSpacerItem* spacer1 = new QSpacerItem( 10,10, QSizePolicy::Minimum,
                                             QSizePolicy::Expanding );
-    m1->addItem( spacer1, 2, 1 );
+    m1->addItem( spacer1, 3, 0 );
 
-    tabWidget->addTab( page1,i18n( "Misc." ) );
+    m_autoHideTabbar = new QCheckBox( this );
+    m_autoHideTabbar->setText( i18n( "Autohide tabbar" ) );
+    m_autoHideTabbar->setWhatsThis(
+        i18n( "When enabled this feature will automatically hide "
+              "the tab bar when there is only one tab. Usefull if you rarely use \
tabs." +            ) );
+    m1->addWidget( m_autoHideTabbar, 2, 0 );
 
+    tabWidget->addTab( page1,i18n( "Misc." ) );
     mainLayout->addWidget( this );
-
     readSettings();
 }
 
@@ -123,6 +116,7 @@
     config.writeEntry( "homePage", hp );
     config.writeEntry( "storeAllAttachments", m_storeAttachments->isChecked() );
     config.writeEntry( "attachmentsFolder", m_attachmentFolderEdit->text() );
+    config.writeEntry( "AutoHideTabbar", m_autoHideTabbar->isChecked() );
     config.sync();
 }
 
@@ -132,6 +126,7 @@
     m_homePage->setText( config.readEntry( "homePage", "http://www.mailody.net" ) );
     m_storeAttachments->setChecked( config.readEntry( "storeAllAttachments", false ) \
                );
     m_attachmentFolderEdit->setText( config.readEntry( "attachmentsFolder" ) );
+    m_autoHideTabbar->setChecked( config.readEntry( "AutoHideTabbar", false ) );
 }
 
 void SetupMisc::slotFolderPicker()
--- trunk/playground/pim/mailody/src/setupmisc.h #794476:794477
@@ -62,7 +62,7 @@
     KLineEdit           *m_attachmentFolderEdit;
     QPushButton         *m_changePathButton;
     QGroupBox           *m_storeAttachments;
-//X     QCheckBox           *m_autoHideTabBar;
+    QCheckBox           *m_autoHideTabbar;
 
 private slots:
     void slotFolderPicker();
--- trunk/playground/pim/mailody/src/tabwidget.cpp #794476:794477
@@ -49,7 +49,7 @@
     connect( m_closeButton, SIGNAL( clicked() ), SLOT( slotDeleteCurrentWidget() ) \
);  
     KConfigGroup configGeneral = KGlobal::config()->group( "General" );
-    if ( configGeneral.readEntry( "AutoHideTabBar", false ) ) {
+    if ( configGeneral.readEntry( "AutoHideTabbar", false ) ) {
          setTabBarHidden( true );
     }
 }
@@ -94,7 +94,7 @@
     if ( count() == 1 ) {
         m_closeButton->setEnabled( false );
         KConfigGroup configAHT = KGlobal::config()->group( "General" );
-        if ( configAHT.readEntry( "AutoHideTabBar",false ) ) {
+        if ( configAHT.readEntry( "AutoHideTabbar",false ) ) {
             setTabBarHidden( true );
         }
     }


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

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