Diffstat (limited to 'kaddressbook/addresseeeditordialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/addresseeeditordialog.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index 102138e..790f148 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp | |||
@@ -23,4 +23,5 @@ | |||
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qapplication.h> | ||
25 | 26 | ||
26 | #include <kdebug.h> | 27 | #include <kdebug.h> |
@@ -37,11 +38,7 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | |||
37 | : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), | 38 | : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), |
38 | KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, | 39 | KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, |
39 | KDialogBase::Ok, parent, name, false ) | 40 | KDialogBase::Ok, parent, name, true ) |
40 | { | 41 | { |
41 | #ifdef KAB_EMBEDDED | ||
42 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); | ||
43 | #endif //KAB_EMBEDDED | ||
44 | 42 | ||
45 | kdDebug(5720) << "AddresseeEditorDialog()" << endl; | ||
46 | 43 | ||
47 | QWidget *page = plainPage(); | 44 | QWidget *page = plainPage(); |
@@ -55,11 +52,13 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | |||
55 | 52 | ||
56 | enableButton( KDialogBase::Apply, false ); | 53 | enableButton( KDialogBase::Apply, false ); |
54 | if ( QApplication::desktop()->width() < 480 ) { | ||
55 | hideButtons(); | ||
56 | } | ||
57 | } | 57 | } |
58 | 58 | ||
59 | AddresseeEditorDialog::~AddresseeEditorDialog() | 59 | AddresseeEditorDialog::~AddresseeEditorDialog() |
60 | { | 60 | { |
61 | kdDebug(5720) << "~AddresseeEditorDialog()" << endl; | 61 | qDebug("----------------------------------------------- "); |
62 | 62 | //emit editorDestroyed( mEditorWidget->addressee().uid() ); | |
63 | emit editorDestroyed( mEditorWidget->addressee().uid() ); | ||
64 | } | 63 | } |
65 | 64 | ||
@@ -93,4 +92,9 @@ void AddresseeEditorDialog::slotApply() | |||
93 | } | 92 | } |
94 | 93 | ||
94 | void AddresseeEditorDialog:: accept () | ||
95 | { | ||
96 | slotOk(); | ||
97 | |||
98 | } | ||
95 | void AddresseeEditorDialog::slotOk() | 99 | void AddresseeEditorDialog::slotOk() |
96 | { | 100 | { |
@@ -99,10 +103,4 @@ void AddresseeEditorDialog::slotOk() | |||
99 | KDialogBase::slotOk(); | 103 | KDialogBase::slotOk(); |
100 | 104 | ||
101 | // Destroy this dialog | ||
102 | #ifndef KAB_EMBEDDED | ||
103 | delayedDestruct(); | ||
104 | #else //KAB_EMBEDDED | ||
105 | delete this; | ||
106 | #endif //KAB_EMBEDDED | ||
107 | } | 105 | } |
108 | 106 | ||
@@ -116,10 +114,4 @@ void AddresseeEditorDialog::slotCancel() | |||
116 | KDialogBase::slotCancel(); | 114 | KDialogBase::slotCancel(); |
117 | 115 | ||
118 | // Destroy this dialog | ||
119 | #ifndef KAB_EMBEDDED | ||
120 | delayedDestruct(); | ||
121 | #else //KAB_EMBEDDED | ||
122 | delete this; | ||
123 | #endif //KAB_EMBEDDED | ||
124 | 116 | ||
125 | } | 117 | } |