diff options
Diffstat (limited to 'kitchensync/src/mainwidget.cpp')
-rw-r--r-- | kitchensync/src/mainwidget.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kitchensync/src/mainwidget.cpp b/kitchensync/src/mainwidget.cpp index 02b279b3e..d04542f9d 100644 --- a/kitchensync/src/mainwidget.cpp +++ b/kitchensync/src/mainwidget.cpp @@ -26,7 +26,7 @@ #include "syncprocess.h" #include "syncprocessmanager.h" -#include <libqopensync/result.h> +#include <libqopensync/environment.h> #include <kaboutdata.h> #include <kaction.h> @@ -46,6 +46,13 @@ MainWidget::MainWidget( KXMLGUIClient *guiClient, TQWidget *widget, const char * initGUI(); initActions(); + /** apply object type filter hack **/ + int count = SyncProcessManager::self()->count(); + for ( int i = 0; i < count; ++i ) { + SyncProcessManager::self()->at( i )->applyObjectTypeFilter(); + } + /** apply object type filter hack **/ + mGroupView->updateView(); connect( SyncProcessManager::self(), TQT_SIGNAL( changed() ), @@ -118,19 +125,12 @@ void MainWidget::addGroup() { bool ok; TQString name = KInputDialog::getText( i18n("Create Synchronization Group"), - i18n("Name for new synchronization group."), i18n( "Default" ), &ok, this ); + i18n("Name for new synchronization group."), TQString::null, &ok, this ); if ( ok ) { - SyncProcess *process = SyncProcessManager::self()->byGroupName( name ); - if ( process ) { - KMessageBox::error( this, i18n( "A group with the same name exists already.\nPlease choose another name." ), - i18n( "Duplicated Group Name" ) ); - return; - } - SyncProcessManager::self()->addGroup( name ); enableActions(); - process = SyncProcessManager::self()->byGroupName( name ); + SyncProcess *process = SyncProcessManager::self()->byGroupName( name ); if ( process ) editGroup( process ); } |