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

List:       kde-commits
Subject:    playground/network/kcall
From:       George Kiagiadakis <gkiagiad () csd ! uoc ! gr>
Date:       2009-08-03 20:16:24
Message-ID: 1249330584.797937.20759.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1006492 by gkiagia:

Bugfix: Correctly set the label of the Connect/Disconnect action when the mainwindow opens and an account \
is already connected.

 M  +8 -4      mainwindow.cpp  


--- trunk/playground/network/kcall/mainwindow.cpp #1006491:1006492
@@ -67,11 +67,15 @@
     KStandardAction::quit(KCallApplication::instance(), SLOT(quit()), actionCollection());
     KStandardAction::preferences(this, SLOT(showSettingsDialog()), actionCollection());
 
-    d->goOnlineAction = new KAction(KIcon("network-connect"), i18nc("@action", "Connect"), this);
+    d->goOnlineAction = new KAction(this);
+    d->goOnlineAction->setIcon(KIcon("network-connect"));
+    actionCollection()->addAction("go-online", d->goOnlineAction);
+
+    AccountManager *accountManager = KCallApplication::instance()->accountManager();
+    onGlobalConnectionStatusChanged(accountManager->globalConnectionStatus());
+
     connect(d->goOnlineAction, SIGNAL(triggered()), this, SLOT(onGoOnlineTriggered()));
-    actionCollection()->addAction("go-online", d->goOnlineAction);
-    connect(KCallApplication::instance()->accountManager(),
-            SIGNAL(globalConnectionStatusChanged(Tp::ConnectionStatus)),
+    connect(accountManager, SIGNAL(globalConnectionStatusChanged(Tp::ConnectionStatus)),
             this, SLOT(onGlobalConnectionStatusChanged(Tp::ConnectionStatus)));
 }
 


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

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