Ejemplo n.º 1
0
void KfmServIpc::parse_refreshDesktop( char *, int )
{
	// int pos = 0;

	// Calling function
	emit refreshDesktop(  );
}
Ejemplo n.º 2
0
void KFMClient::slotAuth( const char *_password )
{
    if ( KFMClient::password == 0L )
        KFMClient::password = new QString;

    if ( KFMClient::password->isNull() )
    {
        QString fn = kapp->localkdedir().copy();
        fn += "/share/apps/kfm/magic";
        FILE *f = fopen( fn.data(), "rb" );
        if ( f == 0L )
        {
            QMessageBox::warning( (QWidget*)0, i18n( "KFM Error" ),
                                  i18n( "You dont have the file ~/.kde/share/apps/kfm/magic\nAuthorization failed" ) );
            return;
        }
        char buffer[ 1024 ];
        char *p = fgets( buffer, 1023, f );
        fclose( f );
        if ( p == 0L )
        {
            QMessageBox::warning( (QWidget*)0, i18n( "KFM Error" ),
                                  i18n( "The file ~/.kde/share/apps/kfm/magic is corrupted\nAuthorization failed" ) );
            return;
        }
        *( KFMClient::password ) = buffer;
    }
    if ( *( KFMClient::password ) != _password )
    {
        QMessageBox::warning( (QWidget*)0, i18n( "KFM Error" ),
                              i18n( "Someone tried to authorize himself\nusing a wrong password" ) );
        bAuth = false;
        return;
    }

    bAuth = true;
    connect( this, SIGNAL( list( const char* ) ),
             this, SLOT( slotList( const char* ) ) );
    connect( this, SIGNAL( copy( const char*, const char* ) ),
             this, SLOT( slotCopy( const char*, const char* ) ) );
    connect( this, SIGNAL( move( const char*, const char* ) ),
             this, SLOT( slotMove( const char*, const char* ) ) );
    connect( this, SIGNAL( copyClient( const char*, const char* ) ),
             server, SLOT( slotCopyClients( const char*, const char* ) ) );
    connect( this, SIGNAL( moveClient( const char*, const char* ) ),
             server, SLOT( slotMoveClients( const char*, const char* ) ) );
    connect( this, SIGNAL( refreshDesktop() ), server, SLOT( slotRefreshDesktop() ) );
    connect( this, SIGNAL( openURL( const char* ) ), server, SLOT( slotOpenURL( const char *) ) );
    connect( this, SIGNAL( refreshDirectory( const char* ) ), server, SLOT( slotRefreshDirectory( const char *) ) );
    connect( this, SIGNAL( openProperties( const char* ) ), server, SLOT( slotOpenProperties( const char *) ) );
    connect( this, SIGNAL( exec( const char*, const char* ) ),
             server, SLOT( slotExec( const char *, const char*) ) );
    connect( this, SIGNAL( sortDesktop() ), server, SLOT( slotSortDesktop() ) );
    connect( this, SIGNAL( configure() ), server, SLOT( slotConfigure() ) );
    connect( this, SIGNAL( selectRootIcons( int, int, int, int, bool ) ),
             server, SLOT( slotSelectRootIcons( int, int, int, int, bool ) ) );
}
Ejemplo n.º 3
0
void MConfig::refresh() {
  int i = tabWidget->currentIndex();
  switch (i) {

    case 1:
      refreshRestore();
      buttonApply->setEnabled(false);
      buttonOk->setEnabled(true);
      break;

    case 2:
      refreshDesktop();
      buttonApply->setEnabled(true);
      buttonOk->setEnabled(false);
      break;

    case 3:
      refreshGroups();
      buttonApply->setEnabled(false);
      buttonOk->setEnabled(true);
      break;

    case 4:
      refreshMembership();
      buttonApply->setEnabled(false);
      buttonOk->setEnabled(true);
      break;

    default:
      refreshAdd();
      refreshDelete();
      buttonApply->setEnabled(false);
      buttonOk->setEnabled(true);
      break;
  }
}