--- rppppoek/rppppoek.cpp.orig 2003-02-18 02:43:35.000000000 +0900 +++ rppppoek/rppppoek.cpp 2003-02-23 03:08:53.000000000 +0900 @@ -30,6 +30,15 @@ QString script = "rppppoek.sh"; KActionCollection* actionCollection = new KActionCollection(this); + stat = new KProcess; + *stat << "/sbin/ifconfig" << "ppp0"; + stat->start(KProcess::Block, KProcess::Stdout); + if (stat->exitStatus()) { + setPixmap(Icon("connect_no")); + } else { + setPixmap(Icon("connect_established")); + } + start = new KProcess; *start << script << "connect"; @@ -40,7 +49,7 @@ *stop << script << "dconnect"; ipFound=false; - setPixmap(Icon("kppp")); +/* setPixmap(Icon("kppp")); */ KAction* about = KStdAction::aboutApp(this, SLOT (showAbout()), actionCollection); conToProv = new KAction(i18n("Connect"), Icon("connect_established"), 0, 0, 0, actionCollection, 0); @@ -116,7 +125,8 @@ void RPPPPoEK::connected(void){ if (start->normalExit()){ if (start->exitStatus() == 0) - KMessageBox::information(this, i18n("Connected successfully")); + setPixmap(Icon("connect_established")); +/* KMessageBox::information(this, i18n("Connected successfully")); */ else KMessageBox::sorry(this, i18n("Couldn't connect")); } @@ -126,7 +136,8 @@ void RPPPPoEK::disconnected(void){ if (stop->normalExit()){ if (stop->exitStatus() == 0) - KMessageBox::information(this, i18n("Disconnected successfully")); + setPixmap(Icon("connect_no")); +/* KMessageBox::information(this, i18n("Disconnected successfully")); */ else KMessageBox::sorry(this, i18n("Couldn't disconnect")); }