~ubuntu-branches/ubuntu/raring/kdepimlibs/raring-proposed

« back to all changes in this revision

Viewing changes to akonadi/standardactionmanager.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 17:13:11 UTC
  • mfrom: (1.1.81)
  • Revision ID: package-import@ubuntu.com-20120726171311-j2heoxylb6lbhg4w
Tags: 4:4.9.0-0ubuntu1
* New upstream release
* Use direct build-depends versions rather than kde-sc-dev-latest

Show diffs side-by-side

added added

removed removed

Lines of Context:
568
568
      if ( !canCreateCollection( parentCollection ) )
569
569
        return;
570
570
 
571
 
      const QString name = KInputDialog::getText( contextText( StandardActionManager::CreateCollection, StandardActionManager::DialogTitle ),
 
571
      QString name = KInputDialog::getText( contextText( StandardActionManager::CreateCollection, StandardActionManager::DialogTitle ),
572
572
                                                  contextText( StandardActionManager::CreateCollection, StandardActionManager::DialogText ),
573
573
                                                  QString(), 0, parentWidget );
 
574
      name = name.trimmed();
574
575
      if ( name.isEmpty() )
575
576
        return;
576
577
 
578
579
        KMessageBox::error( parentWidget,
579
580
                            i18n( "We can not add \"/\" in folder name." ),
580
581
                            i18n( "Create new folder error" ) );
581
 
 
 
582
        return;
 
583
      }
 
584
      if ( name.startsWith( QLatin1Char('.') ) ||
 
585
           name.endsWith( QLatin1Char('.') ) ) {
 
586
          kDebug()<<" We can not add \".\" at begin or end of folder name ";
582
587
        return;
583
588
      }
584
589
 
768
773
    {
769
774
      Akonadi::AgentInstance instance = Akonadi::AgentManager::self()->instance( collection.resource() );
770
775
      if ( !instance.isOnline() ) {
771
 
        if ( KMessageBox::questionYesNo( parentWidget, i18n( "Before to sync folder \"%1\" it's necessary to have resource online. Do you want to make it online?" , collection.name()  ), i18n( "Account \"%1\" is offline", instance.name() ) ) != KMessageBox::Yes )
 
776
        if ( KMessageBox::questionYesNo( parentWidget, i18n( "Before syncing folder \"%1\" it's necessary to have resource online. Do you want to make it online?" , collection.name()  ), i18n( "Account \"%1\" is offline", instance.name() ) ) != KMessageBox::Yes )
772
777
          return false;
773
778
        instance.setIsOnline( true );
774
779
      }
882
887
    void slotLocalSubscription()
883
888
    {
884
889
      SubscriptionDialog* dlg = new SubscriptionDialog( mMimeTypeFilter, parentWidget );
 
890
      dlg->showHiddenCollection(true);
885
891
      dlg->show();
886
892
    }
887
893