diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 22:30:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 22:30:29 +0000 |
commit | d8b40941f9d1a221add0b9094eb09405a91a8aab (patch) | |
tree | 0b8e9b6347f6e75925bb3c386a47c5300b1a4775 /kitchensync/src/mainwidget.cpp | |
parent | 009631d0fc83f471d6c515e2a5001337a5a2ea21 (diff) | |
download | tdepim-d8b40941f9d1a221add0b9094eb09405a91a8aab.tar.gz tdepim-d8b40941f9d1a221add0b9094eb09405a91a8aab.zip |
Part 2/2 of Chakra patch commit
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1172727 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 d04542f9d..02b279b3e 100644 --- a/kitchensync/src/mainwidget.cpp +++ b/kitchensync/src/mainwidget.cpp @@ -26,7 +26,7 @@ #include "syncprocess.h" #include "syncprocessmanager.h" -#include <libqopensync/environment.h> +#include <libqopensync/result.h> #include <kaboutdata.h> #include <kaction.h> @@ -46,13 +46,6 @@ 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() ), @@ -125,12 +118,19 @@ void MainWidget::addGroup() { bool ok; TQString name = KInputDialog::getText( i18n("Create Synchronization Group"), - i18n("Name for new synchronization group."), TQString::null, &ok, this ); + i18n("Name for new synchronization group."), i18n( "Default" ), &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(); - SyncProcess *process = SyncProcessManager::self()->byGroupName( name ); + process = SyncProcessManager::self()->byGroupName( name ); if ( process ) editGroup( process ); } |