summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/mainwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/src/mainwidget.cpp')
-rw-r--r--kitchensync/src/mainwidget.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kitchensync/src/mainwidget.cpp b/kitchensync/src/mainwidget.cpp
index d04542f9..02b279b3 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 );
}