author | zautrix <zautrix> | 2004-07-24 21:31:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-24 21:31:41 (UTC) |
commit | dc4632b03f9e4108f3e2ae8b5f7ff43c7c2208bb (patch) (unidiff) | |
tree | be38db1fa6d1bead40f2e51a3a598916382795d2 /libkdepim | |
parent | f0d0803312ea5607d9ba85454d39787ab626b86e (diff) | |
download | kdepimpi-dc4632b03f9e4108f3e2ae8b5f7ff43c7c2208bb.zip kdepimpi-dc4632b03f9e4108f3e2ae8b5f7ff43c7c2208bb.tar.gz kdepimpi-dc4632b03f9e4108f3e2ae8b5f7ff43c7c2208bb.tar.bz2 |
Bugfix for:Added connection to kphone, if kphone is available
-rw-r--r-- | libkdepim/addresseeview.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index e9dc1e9..aa9b7f3 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp | |||
@@ -32,25 +32,25 @@ | |||
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qapplication.h> | 33 | #include <qapplication.h> |
34 | 34 | ||
35 | 35 | ||
36 | #include "addresseeview.h" | 36 | #include "addresseeview.h" |
37 | 37 | ||
38 | 38 | ||
39 | #ifndef DESKTOP_VERSION | 39 | #ifndef DESKTOP_VERSION |
40 | #include <qtopia/qcopenvelope_qws.h> | 40 | #include <qtopia/qcopenvelope_qws.h> |
41 | #include <qpe/qpeapplication.h> | 41 | #include <qpe/qpeapplication.h> |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | int kphoneInstalled = 0; | 44 | static int kphoneInstalled = 0; |
45 | 45 | ||
46 | using namespace KPIM; | 46 | using namespace KPIM; |
47 | 47 | ||
48 | AddresseeView::AddresseeView( QWidget *parent, const char *name ) | 48 | AddresseeView::AddresseeView( QWidget *parent, const char *name ) |
49 | //US : KTextBrowser( parent, name ) | 49 | //US : KTextBrowser( parent, name ) |
50 | : QTextBrowser( parent, name ) | 50 | : QTextBrowser( parent, name ) |
51 | 51 | ||
52 | 52 | ||
53 | { | 53 | { |
54 | //US setWrapPolicy( QTextEdit::AtWordBoundary ); | 54 | //US setWrapPolicy( QTextEdit::AtWordBoundary ); |
55 | setLinkUnderline( false ); | 55 | setLinkUnderline( false ); |
56 | // setVScrollBarMode( QScrollView::AlwaysOff ); | 56 | // setVScrollBarMode( QScrollView::AlwaysOff ); |
@@ -77,30 +77,34 @@ void AddresseeView::setSource(const QString& n) | |||
77 | 77 | ||
78 | } | 78 | } |
79 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) | 79 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) |
80 | { | 80 | { |
81 | bool kphoneAvail = false; | 81 | bool kphoneAvail = false; |
82 | 82 | ||
83 | #ifndef DESKTOP_VERSION | 83 | #ifndef DESKTOP_VERSION |
84 | if ( ! kphoneInstalled ) { | 84 | if ( ! kphoneInstalled ) { |
85 | if ( QFile::exists( QPEApplication::qpeDir() + "/bin/kppi" ) ) | 85 | if ( QFile::exists( QPEApplication::qpeDir() + "/bin/kppi" ) ) |
86 | kphoneInstalled = 1; | 86 | kphoneInstalled = 1; |
87 | else | 87 | else |
88 | kphoneInstalled = -1; | 88 | kphoneInstalled = -1; |
89 | } else { | 89 | } |
90 | if ( kphoneInstalled > 0 ) | 90 | if ( kphoneInstalled > 0 ) |
91 | kphoneAvail = true; | 91 | kphoneAvail = true; |
92 | } | 92 | #if 0 |
93 | //if ( kphoneAvail ) | 93 | if ( kphoneAvail ) |
94 | // qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); | 94 | qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); |
95 | else | ||
96 | qDebug("NOOOOOOOOOOOo KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); | ||
97 | #endif | ||
98 | |||
95 | #endif | 99 | #endif |
96 | mAddressee = addr; | 100 | mAddressee = addr; |
97 | // clear view | 101 | // clear view |
98 | setText( QString::null ); | 102 | setText( QString::null ); |
99 | 103 | ||
100 | if ( mAddressee.isEmpty() ) | 104 | if ( mAddressee.isEmpty() ) |
101 | return; | 105 | return; |
102 | 106 | ||
103 | QString name = ( mAddressee.formattedName().isEmpty() ? | 107 | QString name = ( mAddressee.formattedName().isEmpty() ? |
104 | mAddressee.assembledName() : mAddressee.formattedName() ); | 108 | mAddressee.assembledName() : mAddressee.formattedName() ); |
105 | 109 | ||
106 | QString dynamicPart; | 110 | QString dynamicPart; |