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

List:       kde-commits
Subject:    kdenetwork/kppp
From:       Carsten Wolff <wolff () kde ! org>
Date:       2004-12-17 15:30:33
Message-ID: 20041217153033.0323E1BBBB () office ! kde ! org
[Download RAW message or body]

CVS commit by wolff: 

correctly hide/show the modem-combobox


  M +5 -2      kpppwidget.cpp   1.40
  M +2 -1      kpppwidget.h   1.10


--- kdenetwork/kppp/kpppwidget.cpp  #1.39:1.40
@@ -113,4 +113,5 @@ KPPPWidget::KPPPWidget( QWidget *parent,
   modem_c = new QComboBox(false, this);
   label7->setBuddy(connectto_c);
+  m_bModemCShown = false;
 
   connect(modem_c, SIGNAL(activated(int)),
@@ -488,11 +489,13 @@ void KPPPWidget::resetmodems() {
 
   int newState = -1;
-  if (count > 1 && modem_c->isHidden()) {
+  if (count > 1 && !m_bModemCShown) {
       l1->addWidget(label7, 1, 1);
       l1->addWidget(modem_c, 1, 2);
+      m_bModemCShown = true;
       newState = 1;
-  } else if (modem_c->isShown()){
+  } else if (count <= 1 && m_bModemCShown){
       l1->remove(label7);
       l1->remove(modem_c);
+      m_bModemCShown = false;
       newState = 0;
   }

--- kdenetwork/kppp/kpppwidget.h  #1.9:1.10
@@ -162,4 +162,5 @@ private:
   bool m_bQuitOnDisconnect;
   bool m_bCmdlAccount;
+  bool m_bModemCShown;
 
 


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

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