void SevenZipArch::addFile( const TQStringList & urls ) { TDEProcess *kp = m_currentProcess = new TDEProcess; kp->clearArguments(); *kp << m_archiver_program << "a" ; if ( !m_password.isEmpty() ) *kp << "-p" + m_password; KURL url( urls.first() ); TQDir::setCurrent( url.directory() ); *kp << m_filename; TQStringList::ConstIterator iter; for ( iter = urls.begin(); iter != urls.end(); ++iter ) { KURL url( *iter ); *kp << url.fileName(); } connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), TQT_SLOT( slotAddExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); emit sigAdd( false ); } }
void KFindDialog::setFindHistory(const TQStringList &strings) { if (strings.count() > 0) { m_find->setHistoryItems(strings, true); m_find->lineEdit()->setText( strings.first() ); m_find->lineEdit()->selectAll(); } else m_find->clearHistory(); }
void ZipArch::addFile( const TQStringList &urls ) { TDEProcess *kp = m_currentProcess = new TDEProcess; kp->clearArguments(); *kp << m_archiver_program; if ( !m_password.isEmpty() ) *kp << "-P" << m_password; if ( ArkSettings::rarRecurseSubdirs() ) *kp << "-r"; if ( ArkSettings::rarStoreSymlinks() ) *kp << "-y"; if ( ArkSettings::forceMSDOS() ) *kp << "-k"; if ( ArkSettings::convertLF2CRLF() ) *kp << "-l"; if ( ArkSettings::replaceOnlyWithNewer() ) *kp << "-u"; *kp << m_filename; TQStringList::ConstIterator iter; KURL url( urls.first() ); TQDir::setCurrent( url.directory() ); for ( iter = urls.begin(); iter != urls.end(); ++iter ) { KURL fileURL( *iter ); *kp << fileURL.fileName(); } connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), TQT_SLOT( slotAddExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); emit sigAdd( false ); } }
void KSMServer::restoreLegacySessionInternal( TDEConfig* config, char sep ) { int count = config->readNumEntry( "count" ); for ( int i = 1; i <= count; i++ ) { TQString n = TQString::number(i); TQStringList wmCommand = config->readListEntry( TQString("command")+n, sep ); if( wmCommand.isEmpty()) continue; if( isWM( wmCommand.first())) continue; startApplication( wmCommand, config->readEntry( TQString("clientMachine")+n ), config->readEntry( TQString("userId")+n )); } }
TQStringList KSMServer::windowWmCommand(WId w) { TQStringList ret = getQStringListProperty(w, XA_WM_COMMAND); // hacks here if( ret.count() == 1 ) { TQString command = ret.first(); // Mozilla is launched using wrapper scripts, so it's launched using "mozilla", // but the actual binary is "mozilla-bin" or "<path>/mozilla-bin", and that's what // will be also in WM_COMMAND - using this "mozilla-bin" doesn't work at all though if( command.endsWith( "mozilla-bin" )) return TQStringList() << "mozilla"; if( command.endsWith( "firefox-bin" )) return TQStringList() << "firefox"; if( command.endsWith( "thunderbird-bin" )) return TQStringList() << "thunderbird"; if( command.endsWith( "sunbird-bin" )) return TQStringList() << "sunbird"; } return ret; }
void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg ) { kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl; kdDebug(6100) << "arg count = " << arg.count() << endl; if ( cmd == TQString::fromLatin1("showstatus") && !arg.empty() ) { TQString tmp = arg.first(); tmp.replace(TQRegExp("[\n\r]"), ""); kdDebug(6100) << "status message = " << tmp << endl; emit showStatus( tmp ); } else if ( cmd == TQString::fromLatin1( "showurlinframe" ) && arg.count() > 1 ) { kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl; emit showDocument( arg[0], arg[1] ); } else if ( cmd == TQString::fromLatin1( "showdocument" ) && !arg.empty() ) { kdDebug(6100) << "url = " << arg.first() << endl; emit showDocument( arg.first(), "_top" ); } else if ( cmd == TQString::fromLatin1( "resizeapplet" ) && arg.count() > 2 ) { //arg[1] should be appletID //arg[2] should be new width //arg[3] should be new height bool ok; const int appletID = arg[0].toInt( &ok ); const int width = arg[1].toInt( &ok ); const int height = arg[2].toInt( &ok ); if( !ok ) { kdError(DEBUGAREA) << "could not parse out parameters for resize" << endl; } else { KJavaApplet* const tmp = d->applets[appletID]; if (tmp) tmp->resizeAppletWidget( width, height ); } } else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) { kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl; } else if ( cmd == TQString::fromLatin1( "JS_Event" ) && arg.count() > 2 ) { bool ok; const int appletID = arg.first().toInt(&ok); KJavaApplet * applet; if (ok && (applet = d->applets[appletID])) { TQStringList js_args(arg); js_args.pop_front(); applet->jsData(js_args); } else kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl; } else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); if (ok) { KJavaApplet* const applet = d->applets[appletID]; if ( applet ) { const int newState = arg[1].toInt(&ok); if (ok) { applet->stateChange(newState); if (newState == KJavaApplet::INITIALIZED) { kdDebug(DEBUGAREA) << "emit appletLoaded" << endl; emit appletLoaded(); } } else kdError(DEBUGAREA) << "AppletStateNotification: status is not numerical" << endl; } else kdWarning(DEBUGAREA) << "AppletStateNotification: No such Applet with ID=" << arg[0] << endl; } else kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl; } else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); if (ok) { KJavaApplet* const applet = d->applets[appletID]; /* TQString errorDetail(arg[1]); errorDetail.replace(TQRegExp(":\\s*"), ":\n"); KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail); */ if (applet) applet->setFailed(); emit appletLoaded(); } } }
void TDMAppearanceWidget::load() { config->setGroup("X-*-Greeter"); // Read the greeting string greetstr_lined->setText(config->readEntry("GreetString", i18n("Welcome to %n"))); // Regular logo or clock TQString logoArea = config->readEntry("LogoArea", "Logo" ); if (logoArea == "Clock") { clockRadio->setChecked(true); slotAreaRadioClicked(KdmClock); } else if (logoArea == "Logo") { logoRadio->setChecked(true); slotAreaRadioClicked(KdmLogo); } else { noneRadio->setChecked(true); slotAreaRadioClicked(KdmNone); } // See if we use alternate logo setLogo(config->readEntry("LogoPixmap")); // Check the current compositor type compositorcombo->setCurrentId(config->readEntry("Compositor")); // Check the GUI type guicombo->setCurrentId(config->readEntry("GUIStyle")); // Check the Color Scheme colcombo->setCurrentId(config->readEntry("ColorScheme")); // Check the echo mode echocombo->setCurrentId(config->readEntry("EchoMode", "OneStar")); TQStringList sl = config->readListEntry( "GreeterPos" ); if (sl.count() != 2) { xLineEdit->setText( "50" ); yLineEdit->setText( "50" ); } else { xLineEdit->setText( sl.first() ); yLineEdit->setText( sl.last() ); } // get the language langcombo->setCurrentItem(config->readEntry("Language", "C")); // See if the SAK is enabled if (!sakwarning) { if (config->hasGroup("X-:*-Greeter")) { config->setGroup("X-:*-Greeter"); } else { config->setGroup("X-*-Greeter"); } sakbox->setChecked(config->readBoolEntry("UseSAK", false)); } else { sakbox->setChecked(false); } }