author | zautrix <zautrix> | 2004-07-05 09:24:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-05 09:24:56 (UTC) |
commit | 5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0 (patch) (unidiff) | |
tree | f41b695d2b18bf7d7ff84d0d8b39faf15d229669 /kaddressbook/addresseeeditordialog.cpp | |
parent | c2d4beeaeda44694a3e1c0b72a5808d2f518b286 (diff) | |
download | kdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.zip kdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.tar.gz kdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.tar.bz2 |
Removed strange handling of addresseeeditor
Diffstat (limited to 'kaddressbook/addresseeeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/addresseeeditordialog.cpp | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index 102138e..790f148 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp | |||
@@ -21,8 +21,9 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qapplication.h> | ||
25 | 26 | ||
26 | #include <kdebug.h> | 27 | #include <kdebug.h> |
27 | #include <klocale.h> | 28 | #include <klocale.h> |
28 | #include <kglobal.h> | 29 | #include <kglobal.h> |
@@ -35,15 +36,11 @@ | |||
35 | AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | 36 | AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, |
36 | const char *name ) | 37 | const char *name ) |
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(); |
48 | 45 | ||
49 | QVBoxLayout *layout = new QVBoxLayout( page ); | 46 | QVBoxLayout *layout = new QVBoxLayout( page ); |
@@ -53,15 +50,17 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | |||
53 | SLOT( widgetModified() ) ); | 50 | SLOT( widgetModified() ) ); |
54 | layout->addWidget( mEditorWidget ); | 51 | layout->addWidget( mEditorWidget ); |
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 | ||
66 | void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) | 65 | void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) |
67 | { | 66 | { |
@@ -91,20 +90,19 @@ void AddresseeEditorDialog::slotApply() | |||
91 | 90 | ||
92 | KDialogBase::slotApply(); | 91 | KDialogBase::slotApply(); |
93 | } | 92 | } |
94 | 93 | ||
94 | void AddresseeEditorDialog:: accept () | ||
95 | { | ||
96 | slotOk(); | ||
97 | |||
98 | } | ||
95 | void AddresseeEditorDialog::slotOk() | 99 | void AddresseeEditorDialog::slotOk() |
96 | { | 100 | { |
97 | slotApply(); | 101 | slotApply(); |
98 | 102 | ||
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 | ||
109 | void AddresseeEditorDialog::widgetModified() | 107 | void AddresseeEditorDialog::widgetModified() |
110 | { | 108 | { |
@@ -114,15 +112,9 @@ void AddresseeEditorDialog::widgetModified() | |||
114 | void AddresseeEditorDialog::slotCancel() | 112 | void AddresseeEditorDialog::slotCancel() |
115 | { | 113 | { |
116 | KDialogBase::slotCancel(); | 114 | KDialogBase::slotCancel(); |
117 | 115 | ||
118 | // Destroy this dialog | 116 | |
119 | #ifndef KAB_EMBEDDED | ||
120 | delayedDestruct(); | ||
121 | #else //KAB_EMBEDDED | ||
122 | delete this; | ||
123 | #endif //KAB_EMBEDDED | ||
124 | |||
125 | } | 117 | } |
126 | 118 | ||
127 | #ifndef KAB_EMBEDDED | 119 | #ifndef KAB_EMBEDDED |
128 | #include "addresseeeditordialog.moc" | 120 | #include "addresseeeditordialog.moc" |