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))); }