summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwm.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp45
1 files changed, 35 insertions, 10 deletions
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
@@ -39,2 +39,3 @@
39#include <kpimglobalprefs.h> 39#include <kpimglobalprefs.h>
40#include <kprefsdialog.h>
40#include <kcmconfigs/kcmpwmconfig.h> 41#include <kcmconfigs/kcmpwmconfig.h>
@@ -76,3 +77,2 @@
76 77
77
78 #define DEFAULT_SIZE (QSize(700, 400)) 78 #define DEFAULT_SIZE (QSize(700, 400))
@@ -119,3 +119,4 @@ enum {
119enum { 119enum {
120 BUTTON_POPUP_OPTIONS_CONFIG = 0 120 BUTTON_POPUP_OPTIONS_CONFIG = 0,
121 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG
121#ifdef PWM_EMBEDDED 122#ifdef PWM_EMBEDDED
@@ -361,5 +362,9 @@ void PwM::initMenubar()
361 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 362 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
362 i18n("&Configure..."), this, 363 i18n("&Configure PwM/Pi..."), this,
363 SLOT(config_slot()),0, 364 SLOT(config_slot()),0,
364 BUTTON_POPUP_OPTIONS_CONFIG); 365 BUTTON_POPUP_OPTIONS_CONFIG);
366 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
367 i18n("Global Settings..."), this,
368 SLOT(config_global_slot()),0,
369 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
365 if ( QApplication::desktop()->width() <= 240 ) { 370 if ( QApplication::desktop()->width() <= 240 ) {
@@ -853,3 +858,7 @@ void PwM::unlockWnd_slot()
853} 858}
854 859void PwM::config_global_slot()
860{
861 KPimPrefsGlobalDialog gc ( this );
862 gc.exec();
863}
855void PwM::config_slot() 864void PwM::config_slot()
@@ -857,3 +866,4 @@ void PwM::config_slot()
857 int oldStyle = conf()->confWndMainViewStyle(); 866 int oldStyle = conf()->confWndMainViewStyle();
858#ifdef PWM_EMBEDDED 867
868#if 0
859 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); 869 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true );
@@ -865,6 +875,25 @@ void PwM::config_slot()
865 ConfigureDialog->addModule(kdelibcfg ); 875 ConfigureDialog->addModule(kdelibcfg );
876#endif
877
866 878
879
880 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
881
882 KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" );
883 ConfigureDialog->setMainWidget( kabcfg );
884 connect( ConfigureDialog, SIGNAL( applyClicked() ),
885 kabcfg, SLOT( save() ) );
886 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
887 kabcfg, SLOT( save() ) );
888 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
889 kabcfg, SLOT( defaults() ) );
890 //saveSettings();
891 kabcfg->load();
867#ifndef DESKTOP_VERSION 892#ifndef DESKTOP_VERSION
893 if ( QApplication::desktop()->height() <= 480 )
894 ;// ConfigureDialog->hideButtons();
868 ConfigureDialog->showMaximized(); 895 ConfigureDialog->showMaximized();
869#endif 896#endif
897
898
870 if ( ConfigureDialog->exec() ) 899 if ( ConfigureDialog->exec() )
@@ -873,7 +902,3 @@ void PwM::config_slot()
873 902
874#else //PWM_EMBEDDED 903
875 // display the configuration window (modal mode)
876 if (!conf()->showConfWnd(this))
877 return;
878#endif
879 904