author | gints <gints> | 2005-05-13 17:30:15 (UTC) |
---|---|---|
committer | gints <gints> | 2005-05-13 17:30:15 (UTC) |
commit | 4451abf402aa1dd967ef8b70a7eba1192f13afb0 (patch) (unidiff) | |
tree | 985405c7a3fe121103114eaebf3f87603894672d | |
parent | b010c50f099d197c0a89755eeef4dc1e40559a83 (diff) | |
download | opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.zip opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.tar.gz opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.tar.bz2 |
Remove latinism in today owner information - bug 1655
-rw-r--r-- | core/pim/today/today.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 67b23e1..450ecb7 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -19,38 +19,40 @@ | |||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "today.h" | 31 | #include "today.h" |
32 | 32 | ||
33 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
34 | #include <opie2/opluginloader.h> | 34 | #include <opie2/opluginloader.h> |
35 | #include <opie2/opimcontact.h> | ||
36 | #include <opie2/ocontactaccessbackend_vcard.h> | ||
37 | #include <opie2/ocontactaccess.h> | ||
35 | #include <opie2/oconfig.h> | 38 | #include <opie2/oconfig.h> |
36 | #include <opie2/oresource.h> | 39 | #include <opie2/oresource.h> |
37 | 40 | ||
38 | #include <qpe/qcopenvelope_qws.h> | 41 | #include <qpe/qcopenvelope_qws.h> |
39 | #include <qpe/qpeapplication.h> | 42 | #include <qpe/qpeapplication.h> |
40 | #include <qpe/contact.h> | ||
41 | 43 | ||
42 | #include <qdir.h> | 44 | #include <qdir.h> |
43 | #include <qtimer.h> | 45 | #include <qtimer.h> |
44 | #include <qwhatsthis.h> | 46 | #include <qwhatsthis.h> |
45 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
46 | 48 | ||
47 | using namespace Opie::Ui; | 49 | using namespace Opie::Ui; |
48 | using Opie::Core::OPluginItem; | 50 | using Opie::Core::OPluginItem; |
49 | using Opie::Core::OPluginLoader; | 51 | using Opie::Core::OPluginLoader; |
50 | using Opie::Core::OPluginManager; | 52 | using Opie::Core::OPluginManager; |
51 | using Opie::Core::OConfig; | 53 | using Opie::Core::OConfig; |
52 | 54 | ||
53 | 55 | ||
54 | struct TodayPlugin { | 56 | struct TodayPlugin { |
55 | TodayPlugin() : iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} | 57 | TodayPlugin() : iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} |
56 | QInterfacePtr<TodayPluginInterface> iface; | 58 | QInterfacePtr<TodayPluginInterface> iface; |
@@ -119,35 +121,37 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | |||
119 | 121 | ||
120 | void Today::setRefreshTimer( int interval ) { | 122 | void Today::setRefreshTimer( int interval ) { |
121 | 123 | ||
122 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 124 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
123 | // 0 is "never" case | 125 | // 0 is "never" case |
124 | if ( !interval == 0 ) { | 126 | if ( !interval == 0 ) { |
125 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 127 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
126 | m_refreshTimer->changeInterval( interval ); | 128 | m_refreshTimer->changeInterval( interval ); |
127 | } | 129 | } |
128 | } | 130 | } |
129 | 131 | ||
130 | 132 | ||
131 | /** | 133 | /** |
132 | * Initialises the owner field with the default value, the username | 134 | * Initialises the owner field with the default value, the username |
133 | */ | 135 | */ |
134 | void Today::setOwnerField() { | 136 | void Today::setOwnerField() { |
135 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); | 137 | QString vfilename = Global::applicationFileName("addressbook", "businesscard.vcf"); |
136 | if ( QFile::exists( file ) ) { | 138 | Opie::OPimContactAccess acc( "today", vfilename, |
137 | Contact cont = Contact::readVCard( file )[0]; | 139 | new Opie::OPimContactAccessBackend_VCard("today", vfilename ) ); |
140 | if ( acc.load() ) { | ||
141 | Opie::OPimContact cont = acc.allRecords()[0]; | ||
138 | QString returnString = cont.fullName(); | 142 | QString returnString = cont.fullName(); |
139 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); | 143 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); |
140 | } else { | 144 | } else { |
141 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); | 145 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); |
142 | } | 146 | } |
143 | } | 147 | } |
144 | 148 | ||
145 | /** | 149 | /** |
146 | * Set the owner field with a given QString, for example per qcop. | 150 | * Set the owner field with a given QString, for example per qcop. |
147 | */ | 151 | */ |
148 | void Today::setOwnerField( QString &message ) { | 152 | void Today::setOwnerField( QString &message ) { |
149 | if ( !message.isEmpty() ) { | 153 | if ( !message.isEmpty() ) { |
150 | OwnerField->setText( "<b>" + message + "</b>" ); | 154 | OwnerField->setText( "<b>" + message + "</b>" ); |
151 | } | 155 | } |
152 | } | 156 | } |
153 | 157 | ||