author | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
commit | d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (side-by-side diff) | |
tree | 0764371abfdb5d663ffebf408d47d49f0ca919f3 | |
parent | e5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff) | |
download | kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2 |
config dialog changes
-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/kopiemail/germantranslation.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/pwmanager/germantranslation.txt | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 7 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.h | 1 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 15 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 1 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 5 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 1 | ||||
-rw-r--r-- | microkde/kdialogbase.cpp | 5 | ||||
-rw-r--r-- | microkde/kdialogbase.h | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 45 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.h | 1 |
15 files changed, 76 insertions, 22 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index e076e1e..d6bf118 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -767,13 +767,15 @@ { "Backup Failed!","Backup Problem!" },
{ "Try again now","Versuche jetzt nochmal" },
{ "Try again later","Versuche später nochmal" },
{ "Try again tomorrow","Versuche morgen nochmal" },
{ "Disable backup","Schalte Backup ab" },
{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
{ "Choose action","Wähle Aktion" },
+{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
+{ "Global Settings...","Globale Einstellungen..." },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
\ No newline at end of file diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 75fdd11..14e5c0b 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt @@ -270,11 +270,13 @@ { "Sending all mails","Senden aller Mails" }, { "SMTP Account:","SMTP Zugang:" }, { "Select SMTP Account","Wähle SMTP Zugang" }, { "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" }, { "Error sending mail","Fehler beim Mailversand" }, { "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." }, { "Colors","Farben" }, { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, +{ "Configure OM/Pi...","Konfiguriere OM/Pi..." }, +{ "Global Settings...","Globale Einstellungen..." }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt index 06fa727..255f2eb 100644 --- a/bin/kdepim/pwmanager/germantranslation.txt +++ b/bin/kdepim/pwmanager/germantranslation.txt @@ -362,15 +362,17 @@ { "Backup Failed!","Backup Problem!" },
{ "Try again now","Versuche jetzt nochmal" },
{ "Try again later","Versuche später nochmal" },
{ "Try again tomorrow","Versuche morgen nochmal" },
{ "Disable backup","Schalte Backup ab" },
{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
{ "Choose action","Wähle Aktion" },
+{ "&Configure PwM/Pi...","Konfiguriere PwM/Pi..." },
+{ "Global Settings...","Globale Einstellungen..." },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index cd833cf..b107e2d 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1622,19 +1622,19 @@ void KABCore::openConfigDialog() KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true); KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" ); ConfigureDialog->setMainWidget( kabcfg ); connect( ConfigureDialog, SIGNAL( applyClicked() ), this, SLOT( configurationChanged() ) ); connect( ConfigureDialog, SIGNAL( applyClicked() ), kabcfg, SLOT( save() ) ); - connect( ConfigureDialog, SIGNAL( okClicked() ), + connect( ConfigureDialog, SIGNAL( acceptClicked() ), this, SLOT( configurationChanged() ) ); - connect( ConfigureDialog, SIGNAL( okClicked() ), + connect( ConfigureDialog, SIGNAL( acceptClicked() ), kabcfg, SLOT( save() ) ); connect( ConfigureDialog, SIGNAL( defaultClicked() ), kabcfg, SLOT( defaults() ) ); saveSettings(); kabcfg->load(); #ifndef DESKTOP_VERSION if ( QApplication::desktop()->height() <= 480 ) ConfigureDialog->hideButtons(); @@ -3425,10 +3425,10 @@ QString KABCore::sentSyncFile() #else return QString( "/tmp/copysyncab.vcf" ); #endif } void KABCore::setCaptionBack() { mMessageTimer->stop(); - topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); + topLevelWidget()->setCaption( i18n("KA/Pi") ); } diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 7de7064..017f1f7 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -100,20 +100,17 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : #include "kpimglobalprefs.h" KOPrefsDialog::~KOPrefsDialog() { } void KOPrefsDialog::setupGlobalTab() { - QFrame *topFrame = addPage(i18n("Global"),0,0); - kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame); - topLayout->addWidget( kdelibcfg ); + } void KOPrefsDialog::setupMainTab() { QFrame *topFrame = addPage(i18n("General"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,6,2); @@ -223,24 +220,22 @@ void KOPrefsDialog::setupFontsTab() } void KOPrefsDialog::usrReadConfig() { mNameEdit->setText(KOPrefs::instance()->mName); mEmailEdit->setText(KOPrefs::instance()->mEmail); //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); - kdelibcfg->readConfig(); } void KOPrefsDialog::usrWriteConfig() { KOPrefs::instance()->mName = mNameEdit->text(); KOPrefs::instance()->mEmail = mEmailEdit->text(); //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); - kdelibcfg->writeConfig(); } #if 0 void KOPrefsDialog::setupLocaleDateTab() { QFrame *topFrame = addPage(i18n("Date Format"),0,0); diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index a0416ae..7fa9261 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/koprefsdialog.h @@ -56,17 +56,16 @@ protected: void usrReadConfig(); void usrWriteConfig(); void setupMainTab(); void setupGlobalTab(); void setupMailTab(); void setupFontsTab(); private: - KDEPIMConfigWidget* kdelibcfg; QLineEdit *mNameEdit; QLineEdit *mCodecEdit; QLineEdit *mEmailEdit; QLabel *mNameLabel; QLabel *mEmailLabel; #if 0 /* public slots: diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 9a52d1b..e3c5ec3 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -90,21 +90,31 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) */ deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); deleteMails->addTo( toolBar ); deleteMails->addTo( mailMenu ); connect( deleteMails, SIGNAL( activated() ), SLOT( slotDeleteAllMail() ) ); - editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , + editSettings = new QAction( i18n( "Configure OM/Pi..." ), SmallIcon("SettingsIcon") , 0, 0, this ); editSettings->addTo( settingsMenu ); connect( editSettings, SIGNAL( activated() ), SLOT( slotEditSettings() ) ); + + + QAction * editSettings2 = new QAction( i18n( "Global Settings..." ), SmallIcon("SettingsIcon") , + 0, 0, this ); + editSettings2->addTo( settingsMenu ); + connect( editSettings2, SIGNAL( activated() ), + SLOT( slotEditGlobalSettings() ) ); + + + editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 0, 0, this ); editAccounts->addTo( settingsMenu ); codecMenu = new QPopupMenu( menuBar ); codecMenu->insertItem( "Western (iso-8859-1)",0,0); codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); codecMenu->insertItem( "Western (iso-8859-15)",2,2); codecMenu->insertItem( "Chinese (big-5)",3,3); @@ -364,16 +374,19 @@ void MainWindow::slotAdjustColumns() mailView->setColumnWidth( 4, 120 ); if ( KOPrefs::instance()->mShowToField ) mailView->setColumnWidth( 5, 100 ); } void MainWindow::slotEditSettings() { } +void MainWindow::slotEditGlobalSettings() +{ +} void MainWindow::slotShowFolders( bool ) { qDebug("not implemented: "); } void MainWindow::refreshMailView(const QValueList<RecMailP>&) { diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index ddb3fca..6894039 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h @@ -47,16 +47,17 @@ protected slots: virtual void slotGetMail() = 0; virtual void slotGetAllMail() = 0; virtual void slotDeleteMail(); virtual void slotDeleteAllMail() = 0; virtual void slotSetCodec(int); virtual void mailHold(int, QListViewItem *,const QPoint&,int); virtual void slotAdjustLayout(); virtual void slotEditSettings(); + virtual void slotEditGlobalSettings(); virtual void mailLeftClicked( QListViewItem * ); void showLicence(); void showAbout(); void showEtpanLicence(); protected: QToolBar *toolBar; StatusWidget *statusWidget; diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 4436ad6..8ac3451 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -239,16 +239,21 @@ void OpieMail::slotSendQueued() } folderView->refreshOutgoing(); } void OpieMail::slotSearchMails() { qDebug("OpieMail::slotSearchMails():not implemented "); } +void OpieMail::slotEditGlobalSettings() +{ + KPimPrefsGlobalDialog gc ( this ); + gc.exec(); +} void OpieMail::slotEditSettings() { KOPrefsDialog settingsDialog( this, "koprefs", true ); #ifndef DESKTOP_VERSION settingsDialog.showMaximized(); #endif diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 4f75b3f..48c5dda 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -30,16 +30,17 @@ public slots: virtual void message(const QCString &msg, const QByteArray &data); void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); protected slots: virtual void deleteAndDisplayNextMail(ViewMail * vm); virtual void displayNextMail(ViewMail * vm); virtual void slotSendQueued(); virtual void slotSearchMails(); virtual void slotEditSettings(); + virtual void slotEditGlobalSettings(); virtual void slotEditAccounts(); virtual void displayMail(); virtual void replyMail(); virtual void slotDeleteMail(); virtual void slotGetMail(); virtual void slotGetAllMail(); virtual void slotDeleteAllMail(); virtual void mailHold(int, QListViewItem *,const QPoint&,int); diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index 11635e1..d5c7e61 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp @@ -281,16 +281,21 @@ void KDialogBase::slotCancel() } void KDialogBase::slotClose() { emit closeClicked(); reject(); } +void KDialogBase::accept () +{ + emit acceptClicked(); + KDialog::accept(); +} void KDialogBase::slotUser1() { emit user1Clicked(); } void KDialogBase::slotUser2() { emit user2Clicked(); } diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h index a2fc2dc..17c186b 100644 --- a/microkde/kdialogbase.h +++ b/microkde/kdialogbase.h @@ -102,24 +102,26 @@ class KDialogBase : public KDialog /** * The Close button was pressed. This signal is only emitted if * @ref slotClose() is not replaced. */ void closeClicked(); void defaultClicked(); + void acceptClicked(); + protected slots: virtual void slotOk(); virtual void slotApply(); virtual void slotCancel(); virtual void slotClose(); virtual void slotUser1(); virtual void slotUser2(); - + virtual void accept (); protected: QPushButton *findButton( ButtonCode ); QTabWidget *tabWidget(); private: void init( const QString &caption, int buttonMask, const QString &user1=QString::null, const QString &user2=QString::null ); void initLayout(); diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h index b9ea6b8..2d19680 100644 --- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h +++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h @@ -31,16 +31,17 @@ class PWMPrefs; class KCMPwmConfig : public KCModule { Q_OBJECT public: KCMPwmConfig(QWidget *parent = 0, const char *name = 0 ); + public slots: virtual void load(); virtual void save(); virtual void defaults(); private: PWMConfigWidget *mConfigWidget; }; diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 9c8d12d..e12dc49 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp @@ -32,16 +32,17 @@ #include <dcopclient.h> #include "configwndimpl.h" #include "configuration.h" #else #include <qmenubar.h> #include <qmessagebox.h> #include <pwmprefs.h> #include <kpimglobalprefs.h> +#include <kprefsdialog.h> #include <kcmconfigs/kcmpwmconfig.h> #include <kcmconfigs/kcmkdepimconfig.h> #include <kcmultidialog.h> #include "editcategory.h" #endif #ifndef DESKTOP_VERSION @@ -69,17 +70,16 @@ #ifdef CONFIG_KWALLETIF # include "kwalletif.h" # include "kwalletemu.h" #endif #ifdef CONFIG_KEYCARD # include "pwmkeycard.h" #endif - #define DEFAULT_SIZE (QSize(700, 400)) // Button IDs for "file" popup menu enum { BUTTON_POPUP_FILE_NEW = 0, BUTTON_POPUP_FILE_OPEN, BUTTON_POPUP_FILE_CLOSE, BUTTON_POPUP_FILE_SAVE, @@ -112,17 +112,18 @@ enum { enum { BUTTON_POPUP_VIEW_FIND = 0, BUTTON_POPUP_VIEW_LOCK, BUTTON_POPUP_VIEW_DEEPLOCK, BUTTON_POPUP_VIEW_UNLOCK }; // Button IDs for "options" popup menu enum { - BUTTON_POPUP_OPTIONS_CONFIG = 0 + BUTTON_POPUP_OPTIONS_CONFIG = 0, + BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG #ifdef PWM_EMBEDDED ,BUTTON_POPUP_OPTIONS_CATEGORY #endif }; // Button IDs for "export" popup menu (in "file" popup menu) enum { BUTTON_POPUP_EXPORT_TEXT = 0, BUTTON_POPUP_EXPORT_GPASMAN, @@ -354,19 +355,23 @@ void PwM::initMenubar() BUTTON_POPUP_VIEW_DEEPLOCK); viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), i18n("&Unlock all entries"), this, SLOT(unlockWnd_slot()), 0, BUTTON_POPUP_VIEW_UNLOCK); menuBar()->insertItem(i18n("&View"), viewPopup); // "options" popup menu optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), - i18n("&Configure..."), this, + i18n("&Configure PwM/Pi..."), this, SLOT(config_slot()),0, BUTTON_POPUP_OPTIONS_CONFIG); + optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + i18n("Global Settings..."), this, + SLOT(config_global_slot()),0, + BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); if ( QApplication::desktop()->width() <= 240 ) { managePopup->insertSeparator(); managePopup->insertItem(i18n("&Options"), optionsPopup); } else menuBar()->insertItem(i18n("&Options"), optionsPopup); // "help" popup menu #ifndef PWM_EMBEDDED helpPopup = helpMenu(QString::null, false); @@ -846,41 +851,61 @@ void PwM::deepLockWnd_slot() curDoc()->deepLock(); } void PwM::unlockWnd_slot() { PWM_ASSERT(curDoc()); curDoc()->lockAll(false); } - +void PwM::config_global_slot() +{ + KPimPrefsGlobalDialog gc ( this ); + gc.exec(); +} void PwM::config_slot() { int oldStyle = conf()->confWndMainViewStyle(); -#ifdef PWM_EMBEDDED + +#if 0 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); ConfigureDialog->addModule(pwmcfg ); KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); ConfigureDialog->addModule(kdelibcfg ); +#endif + + + KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true); + + KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" ); + ConfigureDialog->setMainWidget( kabcfg ); + connect( ConfigureDialog, SIGNAL( applyClicked() ), + kabcfg, SLOT( save() ) ); + connect( ConfigureDialog, SIGNAL( acceptClicked() ), + kabcfg, SLOT( save() ) ); + connect( ConfigureDialog, SIGNAL( defaultClicked() ), + kabcfg, SLOT( defaults() ) ); + //saveSettings(); + kabcfg->load(); #ifndef DESKTOP_VERSION + if ( QApplication::desktop()->height() <= 480 ) + ;// ConfigureDialog->hideButtons(); ConfigureDialog->showMaximized(); #endif + + if ( ConfigureDialog->exec() ) KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); delete ConfigureDialog; -#else //PWM_EMBEDDED - // display the configuration window (modal mode) - if (!conf()->showConfWnd(this)) - return; -#endif + int newStyle = conf()->confWndMainViewStyle(); // reinitialize tray init->initTray(); // reinitialize KWallet emulation init->initKWalletEmu(); PwMDocList *_dl = PwMDoc::getOpenDocList(); diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h index 9fa9edc..2d1b854 100644 --- a/pwmanager/pwmanager/pwm.h +++ b/pwmanager/pwmanager/pwm.h @@ -160,16 +160,17 @@ public slots: /** deeplock current document */ void deepLockWnd_slot(); /** window/unlock triggered */ void unlockWnd_slot(); /** find item */ void find_slot(); /** configure clicked */ void config_slot(); + void config_global_slot(); /** (de)activate the "change master pw" button in the menu-bar */ void activateMpButton(bool activate = true); /** generate a new chipcard */ void genNewCard_slot(); /** completely erase the current card */ void eraseCard_slot(); /** returns the ID number of the current card */ void readCardId_slot(); |