-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 13 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notes.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index cc5245c..81864c6 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -123,5 +123,6 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) connect(view,SIGNAL( textChanged() ), this, SLOT(slotViewEdited() ) ); connect(newButton, SIGNAL(clicked()), this, SLOT(slotNewButton())); - connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteButton())); + connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteButtonClicked())); + populateBox(); load(); @@ -130,4 +131,13 @@ NotesControl::NotesControl( QWidget *parent, const char *name ) } +void NotesControl::slotDeleteButtonClicked() { + switch ( QMessageBox::warning(this,tr("Delete?"),tr("Do you really want to<BR><B> delete</B> this note ?") + ,tr("Yes"),tr("No"),0,1,1) ) { + case 0: + slotDeleteButton(); + break; + }; +} + void NotesControl::slotDeleteButton() { @@ -136,4 +146,5 @@ void NotesControl::slotDeleteButton() { if( !selectedText.isEmpty()) { + Config cfg("Notes"); cfg.setGroup("Docs"); diff --git a/noncore/applets/notesapplet/notes.h b/noncore/applets/notesapplet/notes.h index c589f81..473a89a 100644 --- a/noncore/applets/notesapplet/notes.h +++ b/noncore/applets/notesapplet/notes.h @@ -55,4 +55,5 @@ private: private slots: void slotDeleteButton(); + void slotDeleteButtonClicked(); void slotNewButton(); void boxPressed(int, QListBoxItem *, const QPoint&); |