[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kroupware_branch: kdepim/korganizer
From: Steffen Hansen <hansen () kde ! org>
Date: 2003-06-16 14:55:12
[Download RAW message or body]
CVS commit by steffen:
dont allow notes to be edited while syncing
M +3 -0 kogroupware.cpp 1.1.2.24
M +1 -1 kogroupware.h 1.1.2.14
M +12 -1 notes/knote.cpp 1.1.2.7
M +2 -0 notes/knote.h 1.1.2.5
M +10 -1 notes/konotesview.cpp 1.1.2.15
M +3 -1 notes/konotesview.h 1.1.2.9
--- kdepim/korganizer/kogroupware.cpp #1.1.2.23:1.1.2.24
@@ -997,4 +997,7 @@ void KOGroupware::slotSyncRunning( const
else if( type == "Task" || type == "Todo" )
mCanEditTodos = !running;
+ else if( type == "Note" ) {
+ emit notesSync(running);
+ }
}
--- kdepim/korganizer/kogroupware.h #1.1.2.13:1.1.2.14
@@ -169,5 +169,5 @@ class KOGroupware : public QObject
void dialogsUp( const QString& type, bool up );
void conflict( const QString& );
-
+ void notesSync( bool );
protected:
KOGroupware( QObject* kmailTarget, CalendarView*,
--- kdepim/korganizer/notes/knote.cpp #1.1.2.6:1.1.2.7
@@ -161,5 +161,5 @@ KNote::KNote( const Note& note, KONotesV
KNote::~KNote()
{
-kdDebug(5500) << k_funcinfo << endl;
+ kdDebug(5500) << k_funcinfo << endl;
if( m_editor->isModified() ) {
@@ -180,4 +180,15 @@ void KNote::saveData()
m_editor->setModified( false );
}
+}
+
+void KNote::setReadOnly( bool ro )
+{
+ if( m_editor->isReadOnly() == ro ) return;
+ if( ro ) {
+ if( m_editor->isModified() ) {
+ saveData();
+ }
+ }
+ m_editor->setReadOnly(ro);
}
--- kdepim/korganizer/notes/knote.h #1.1.2.4:1.1.2.5
@@ -60,4 +60,6 @@ public:
void setNote( const Note& note );
+ void setReadOnly( bool );
+
public slots:
void slotNewNote();
--- kdepim/korganizer/notes/konotesview.cpp #1.1.2.14:1.1.2.15
@@ -152,4 +152,6 @@ KONotesView::KONotesView(Calendar *calen
connect( KOGroupware::instance(), SIGNAL( notesUpdated() ),
this, SLOT( updateView() ) );
+ connect( KOGroupware::instance(), SIGNAL( notesSync(bool) ),
+ this, SLOT( slotSync(bool) ) );
}
@@ -333,4 +335,11 @@ void KONotesView::deleteNote( const Note
return;
}
+ }
+}
+
+void KONotesView::slotSync( bool start )
+{
+ for( QPtrListIterator<KNote> it(mOpenNotes); it.current(); ++it ) {
+ it.current()->setReadOnly(start);
}
}
--- kdepim/korganizer/notes/konotesview.h #1.1.2.8:1.1.2.9
@@ -101,4 +101,6 @@ public slots:
void slotClose();
+ void slotSync(bool);
+
protected slots:
void processSelectionChange();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic