summaryrefslogtreecommitdiffstats
path: root/libkcal/resourcelocaldirconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcal/resourcelocaldirconfig.cpp')
-rw-r--r--libkcal/resourcelocaldirconfig.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libkcal/resourcelocaldirconfig.cpp b/libkcal/resourcelocaldirconfig.cpp
index 2c8d89838..df2412b3d 100644
--- a/libkcal/resourcelocaldirconfig.cpp
+++ b/libkcal/resourcelocaldirconfig.cpp
@@ -26,6 +26,7 @@
#include <klocale.h>
#include <kdebug.h>
+#include <kmessagebox.h>
#include <kstandarddirs.h>
#include "vcaldrag.h"
@@ -41,7 +42,7 @@ using namespace KCal;
ResourceLocalDirConfig::ResourceLocalDirConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- resize( 245, 115 );
+ resize( 245, 115 );
TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
TQLabel *label = new TQLabel( i18n( "Location:" ), this );
@@ -65,6 +66,14 @@ void ResourceLocalDirConfig::saveSettings( KRES::Resource *resource )
ResourceLocalDir* res = static_cast<ResourceLocalDir*>( resource );
if (res) {
res->mURL = mURL->url();
+ if ( mURL->url().isEmpty() && !resource->readOnly() ) {
+ KMessageBox::information(
+ this,
+ i18n( "No location specified. The calendar will be read-only." ),
+ TQString(),
+ "ResourceLocalDirUrl" );
+ resource->setReadOnly( true );
+ }
} else
kdDebug(5700) << "ERROR: ResourceLocalDirConfig::saveSettings(): no ResourceLocalDir, cast failed" << endl;
}