Common subdirectories: ksirc-orig/CVS and ksirc/CVS Common subdirectories: ksirc-orig/KSColourPicker and ksirc/KSColourPicker Common subdirectories: ksirc-orig/KSOpenkSirc and ksirc/KSOpenkSirc Common subdirectories: ksirc-orig/KSPrefs and ksirc/KSPrefs Common subdirectories: ksirc-orig/KSPrefsTNG and ksirc/KSPrefsTNG Common subdirectories: ksirc-orig/KSProgress and ksirc/KSProgress Common subdirectories: ksirc-orig/KSTicker and ksirc/KSTicker Common subdirectories: ksirc-orig/KSircListBox and ksirc/KSircListBox diff -u ksirc-orig/config.h ksirc/config.h --- ksirc-orig/config.h Fri Oct 12 23:51:00 2001 +++ ksirc/config.h Fri Oct 12 23:49:37 2001 @@ -36,6 +36,7 @@ QString pukeSocket; bool timestamp; + bool beep; QString nickName; }; Common subdirectories: ksirc-orig/img and ksirc/img diff -u ksirc-orig/ksirc.cpp ksirc/ksirc.cpp --- ksirc-orig/ksirc.cpp Fri Oct 12 23:51:01 2001 +++ ksirc/ksirc.cpp Fri Oct 12 23:49:52 2001 @@ -118,6 +118,7 @@ kSircConfig->BackgroundPix = kConfig->readBoolEntry("BackgroundPix", false); kSircConfig->BackgroundFile = kConfig->readEntry("BackgroundFile", ""); kSircConfig->timestamp = kConfig->readBoolEntry("TimeStamp", false); + kSircConfig->beep = kConfig->readBoolEntry("Beep", false); kConfig->setGroup( "StartUp" ); kSircConfig->nickName = kConfig->readEntry( "Nick" ); Common subdirectories: ksirc-orig/puke and ksirc/puke Common subdirectories: ksirc-orig/test and ksirc/test diff -u ksirc-orig/toplevel.cpp ksirc/toplevel.cpp --- ksirc-orig/toplevel.cpp Fri Oct 12 23:51:00 2001 +++ ksirc/toplevel.cpp Fri Oct 12 23:49:37 2001 @@ -65,6 +65,7 @@ #include #include #include +#include #include @@ -160,6 +161,8 @@ tsitem = file->insertItem(i18n("Time St&"), this, SLOT(toggleTimestamp()), CTRL + Key_A); file->setItemChecked(tsitem, kSircConfig->timestamp); + beepitem = file->insertItem(i18n("Bee&p on Change"), this, SLOT(toggleBeep()), CTRL + Key_P); + file->setItemChecked(beepitem, kSircConfig->beep); file->insertSeparator(); file->insertItem(i18n("&Close"), this, SLOT(terminate()), CTRL + Key_W ); @@ -352,6 +355,8 @@ f->mainw->setAcceptFiles( isPrivateChat() ); resize(600, 360); + + connect( this, SIGNAL( changed() ), this, SLOT( beep() )); } @@ -611,6 +616,13 @@ } +void KSircTopLevel::beep() +{ + if (kSircConfig->beep) { + KNotifyClient::beep(); + } +} + void KSircTopLevel::sirc_write(QString str) { /* @@ -1006,6 +1018,16 @@ kConfig->writeEntry("TimeStamp", kSircConfig->timestamp); kConfig->sync(); mainw->repaint(FALSE); // Repaint, but not need to erase and cause fliker. +} + +void KSircTopLevel::toggleBeep() +{ + kSircConfig->beep = !kSircConfig->beep; + file->setItemChecked(beepitem,kSircConfig->beep); + kConfig->setGroup("General"); + kConfig->writeEntry("Beep", kSircConfig->beep); + kConfig->sync(); +// mainw->repaint(FALSE); // Repaint, but not need to erase and cause fliker. } void KSircTopLevel::unHide() diff -u ksirc-orig/toplevel.h ksirc/toplevel.h --- ksirc-orig/toplevel.h Fri Oct 12 23:51:01 2001 +++ ksirc/toplevel.h Fri Oct 12 23:49:52 2001 @@ -163,7 +163,10 @@ * after processing via emitting outputLine. */ virtual void sirc_line_return(); - +/** + * Added + */ + void beep(); protected slots: /** @@ -226,6 +229,10 @@ */ void toggleTimestamp(); /** + * toggle the beep from the channel window menu (and with keyaccel) + */ + void toggleBeep(); + /** * Delete the ticker and ppoup the main window */ void unHide(); @@ -474,6 +481,11 @@ * ID of the timestamp menu item, to use in (un)checking it from slot */ int tsitem; + + /** + * ID of the beep menu item, to use in (un)checking it from slot + */ + int beepitem; /** * List of nicks already used in nick completion to give them