summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-17 13:25:15 (UTC)
committer zautrix <zautrix>2004-09-17 13:25:15 (UTC)
commit603ad0a623dc72b8ccb9535f9907e0f2aa536328 (patch) (unidiff)
treec6a33f468891b65b184d4b0d10971dc0eb40aa13
parent053b3550aa2b987d7aeaf74cc458754d7e80a67b (diff)
downloadkdepimpi-603ad0a623dc72b8ccb9535f9907e0f2aa536328.zip
kdepimpi-603ad0a623dc72b8ccb9535f9907e0f2aa536328.tar.gz
kdepimpi-603ad0a623dc72b8ccb9535f9907e0f2aa536328.tar.bz2
Fixed time settings bug
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp2
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 4f48850..10b1013 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -1,176 +1,176 @@
1#ifndef DESKTOP_VERSION 1#ifndef DESKTOP_VERSION
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#else 4#else
5#include <qapplication.h> 5#include <qapplication.h>
6#include <qwindowsstyle.h> 6#include <qwindowsstyle.h>
7#include <qplatinumstyle.h> 7#include <qplatinumstyle.h>
8#include <qmainwindow.h> 8#include <qmainwindow.h>
9#endif 9#endif
10 10
11#include <kstandarddirs.h> 11#include <kstandarddirs.h>
12#include <qregexp.h> 12#include <qregexp.h>
13#include <kglobal.h> 13#include <kglobal.h>
14#include <stdio.h> 14#include <stdio.h>
15#include <qdir.h> 15#include <qdir.h>
16#include "kaddressbookmain.h" 16#include "kaddressbookmain.h"
17#include "externalapphandler.h" 17#include "externalapphandler.h"
18 18
19int main( int argc, char **argv ) 19int main( int argc, char **argv )
20{ 20{
21#ifndef DESKTOP_VERSION 21#ifndef DESKTOP_VERSION
22 QPEApplication a( argc, argv ); 22 QPEApplication a( argc, argv );
23 a.setKeepRunning (); 23 a.setKeepRunning ();
24#else 24#else
25 QApplication a( argc, argv ); 25 QApplication a( argc, argv );
26 QApplication::setStyle( new QPlatinumStyle ()); 26 QApplication::setStyle( new QPlatinumStyle ());
27 QString hdir = QDir::homeDirPath(); 27 QString hdir = QDir::homeDirPath();
28 // there is a bug when creating dirs for WIN 98 28 // there is a bug when creating dirs for WIN 98
29 // it is difficult to fix, because we have no WIN 98 runnung 29 // it is difficult to fix, because we have no WIN 98 runnung
30 // such that we try it to create the dirs at startup here 30 // such that we try it to create the dirs at startup here
31 if ( hdir == "C:\\" ) { // win 98 or ME 31 if ( hdir == "C:\\" ) { // win 98 or ME
32 QDir app_dir; 32 QDir app_dir;
33 if ( !app_dir.exists("C:\\kdepim") ) 33 if ( !app_dir.exists("C:\\kdepim") )
34 app_dir.mkdir ("C:\\kdepim"); 34 app_dir.mkdir ("C:\\kdepim");
35 if ( !app_dir.exists("C:\\kdepim\\apps") ) 35 if ( !app_dir.exists("C:\\kdepim\\apps") )
36 app_dir.mkdir ("C:\\kdepim\\apps"); 36 app_dir.mkdir ("C:\\kdepim\\apps");
37 if ( !app_dir.exists("C:\\kdepim\\config") ) 37 if ( !app_dir.exists("C:\\kdepim\\config") )
38 app_dir.mkdir ("C:\\kdepim\\config"); 38 app_dir.mkdir ("C:\\kdepim\\config");
39 if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") ) 39 if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") )
40 app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook"); 40 app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook");
41 } 41 }
42#endif 42#endif
43 43
44 bool exitHelp = false; 44 bool exitHelp = false;
45 if ( argc > 1 ) { 45 if ( argc > 1 ) {
46 QString command = argv[1]; 46 QString command = argv[1];
47 if ( command == "-help" ){ 47 if ( command == "-help" ){
48 printf("KA/E command line commands:\n"); 48 printf("KA/E command line commands:\n");
49 printf(" no command: Start KA/E in usual way\n"); 49 printf(" no command: Start KA/E in usual way\n");
50 printf(" -help: This output\n"); 50 printf(" -help: This output\n");
51 printf(" KA/E is exiting now. Bye!\n"); 51 printf(" KA/E is exiting now. Bye!\n");
52 exitHelp = true; 52 exitHelp = true;
53 } 53 }
54 } 54 }
55 if ( ! exitHelp ) { 55 if ( ! exitHelp ) {
56 56
57 KGlobal::setAppName( "kaddressbook" ); 57 KGlobal::setAppName( "kaddressbook" );
58#ifndef DESKTOP_VERSION 58#ifndef DESKTOP_VERSION
59 if ( QApplication::desktop()->width() > 320 ) 59 if ( QApplication::desktop()->width() > 320 )
60 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 60 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
61 else 61 else
62 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 62 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
63#else 63#else
64 QString fileName ; 64 QString fileName ;
65 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 65 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
66 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 66 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
67 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 67 QApplication::addLibraryPath ( qApp->applicationDirPath () );
68 68
69#endif 69#endif
70 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 70 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
71 KAddressBookMain m ; 71 KAddressBookMain m ;
72//US MainWindow m; 72//US MainWindow m;
73 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 73 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
74 74
75 { 75 {
76 KConfig kon ( locateLocal( "config", "korganizerrc" ) ); 76 KConfig kon ( locateLocal( "config", "korganizerrc" ) );
77 kon.setGroup("Locale"); 77 kon.setGroup("Locale");
78 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); 78 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) );
79 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); 79 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( "");
80 KGlobal::locale()->setHore24Format( !kon.readBoolEntry( "PreferredTime",0 ) ); 80 KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) );
81 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 81 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
82 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); 82 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" );
83 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 83 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
84 kon.setGroup("Time & Date"); 84 kon.setGroup("Time & Date");
85 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), 85 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ),
86 kon.readNumEntry( "DaylightsavingStart", 90), 86 kon.readNumEntry( "DaylightsavingStart", 90),
87 kon.readNumEntry( "DaylightsavingEnd",304) ); 87 kon.readNumEntry( "DaylightsavingEnd",304) );
88 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); 88 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") );
89 } 89 }
90#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
91 a.showMainWidget( &m ); 91 a.showMainWidget( &m );
92#else 92#else
93 a.setMainWidget( &m ); 93 a.setMainWidget( &m );
94 m.resize (640, 480 ); 94 m.resize (640, 480 );
95 m.show(); 95 m.show();
96#endif 96#endif
97 a.exec(); 97 a.exec();
98 98
99 } 99 }
100 qDebug("KA: Bye! "); 100 qDebug("KA: Bye! ");
101} 101}
102 102
103/* 103/*
104#include <stdlib.h> 104#include <stdlib.h>
105 105
106#include <qstring.h> 106#include <qstring.h>
107 107
108#include <kabc/stdaddressbook.h> 108#include <kabc/stdaddressbook.h>
109#include <kaboutdata.h> 109#include <kaboutdata.h>
110#include <kcmdlineargs.h> 110#include <kcmdlineargs.h>
111#include <kcrash.h> 111#include <kcrash.h>
112#include <kdebug.h> 112#include <kdebug.h>
113#include <klocale.h> 113#include <klocale.h>
114#include <kstartupinfo.h> 114#include <kstartupinfo.h>
115#include <kuniqueapplication.h> 115#include <kuniqueapplication.h>
116#include <kwin.h> 116#include <kwin.h>
117 117
118#include "kaddressbookmain.h" 118#include "kaddressbookmain.h"
119#include "kabcore.h" 119#include "kabcore.h"
120 120
121extern "C" { 121extern "C" {
122 122
123void crashHandler( int ) 123void crashHandler( int )
124{ 124{
125 KABC::StdAddressBook::handleCrash(); 125 KABC::StdAddressBook::handleCrash();
126 ::exit( 0 ); 126 ::exit( 0 );
127} 127}
128 128
129} 129}
130 130
131class KAddressBookApp : public KUniqueApplication { 131class KAddressBookApp : public KUniqueApplication {
132 public: 132 public:
133 KAddressBookApp() : mMainWin( 0 ) {} 133 KAddressBookApp() : mMainWin( 0 ) {}
134 ~KAddressBookApp() {} 134 ~KAddressBookApp() {}
135 135
136 int newInstance(); 136 int newInstance();
137 137
138 private: 138 private:
139 KAddressBookMain *mMainWin; 139 KAddressBookMain *mMainWin;
140}; 140};
141 141
142int KAddressBookApp::newInstance() 142int KAddressBookApp::newInstance()
143{ 143{
144 if ( isRestored() ) { 144 if ( isRestored() ) {
145 // There can only be one main window 145 // There can only be one main window
146 if ( KMainWindow::canBeRestored( 1 ) ) { 146 if ( KMainWindow::canBeRestored( 1 ) ) {
147 mMainWin = new KAddressBookMain; 147 mMainWin = new KAddressBookMain;
148 mMainWin->show(); 148 mMainWin->show();
149 mMainWin->restore( 1 ); 149 mMainWin->restore( 1 );
150 } 150 }
151 } else { 151 } else {
152 KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); 152 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
153 153
154 QCString addrStr = args->getOption( "addr" ); 154 QCString addrStr = args->getOption( "addr" );
155 QCString uidStr = args->getOption( "uid" ); 155 QCString uidStr = args->getOption( "uid" );
156 QString addr; 156 QString addr;
157 QString uid; 157 QString uid;
158 if ( !addrStr.isEmpty() ) 158 if ( !addrStr.isEmpty() )
159 addr = QString::fromLocal8Bit( addrStr ); 159 addr = QString::fromLocal8Bit( addrStr );
160 if ( !uidStr.isEmpty() ) 160 if ( !uidStr.isEmpty() )
161 uid = QString::fromLocal8Bit( uidStr ); 161 uid = QString::fromLocal8Bit( uidStr );
162 162
163 163
164 if ( args->isSet( "editor-only" ) ) { 164 if ( args->isSet( "editor-only" ) ) {
165 if ( !mMainWin ) 165 if ( !mMainWin )
166 mMainWin = new KAddressBookMain; 166 mMainWin = new KAddressBookMain;
167 KStartupInfo::appStarted(); 167 KStartupInfo::appStarted();
168 mMainWin->hide(); 168 mMainWin->hide();
169 } else { 169 } else {
170 if ( mMainWin ) { 170 if ( mMainWin ) {
171 mMainWin->show(); 171 mMainWin->show();
172 KWin::setActiveWindow( mMainWin->winId() ); 172 KWin::setActiveWindow( mMainWin->winId() );
173 } else { 173 } else {
174 mMainWin = new KAddressBookMain; 174 mMainWin = new KAddressBookMain;
175 mMainWin->show(); 175 mMainWin->show();
176 } 176 }
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index d99c6a3..09a6447 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -1,134 +1,134 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#include "genericwrapper.h" 2#include "genericwrapper.h"
3#include <libetpan/libetpan.h> 3#include <libetpan/libetpan.h>
4#include "mailtypes.h" 4#include "mailtypes.h"
5 5
6#include <kconfig.h> 6#include <kconfig.h>
7#include <kglobal.h> 7#include <kglobal.h>
8#include <kstandarddirs.h> 8#include <kstandarddirs.h>
9 9
10 10
11using namespace Opie::Core; 11using namespace Opie::Core;
12Genericwrapper::Genericwrapper() 12Genericwrapper::Genericwrapper()
13 : AbstractMail() 13 : AbstractMail()
14{ 14{
15 bodyCache.clear(); 15 bodyCache.clear();
16 m_storage = 0; 16 m_storage = 0;
17 m_folder = 0; 17 m_folder = 0;
18} 18}
19 19
20Genericwrapper::~Genericwrapper() 20Genericwrapper::~Genericwrapper()
21{ 21{
22 if (m_folder) { 22 if (m_folder) {
23 mailfolder_free(m_folder); 23 mailfolder_free(m_folder);
24 } 24 }
25 if (m_storage) { 25 if (m_storage) {
26 mailstorage_free(m_storage); 26 mailstorage_free(m_storage);
27 } 27 }
28 cleanMimeCache(); 28 cleanMimeCache();
29} 29}
30const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date ) 30const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date )
31{ 31{
32 static bool init = false ; 32 static bool init = false ;
33 if ( ! init ) { 33 if ( ! init ) {
34 KConfig kon ( locateLocal( "config", "korganizerrc" ) ); 34 KConfig kon ( locateLocal( "config", "korganizerrc" ) );
35 kon.setGroup("Locale"); 35 kon.setGroup("Locale");
36 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); 36 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) );
37 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); 37 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( "");
38 KGlobal::locale()->setHore24Format( !kon.readBoolEntry( "PreferredTime",0 ) ); 38 KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) );
39 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 39 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
40 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); 40 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" );
41 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 41 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
42 kon.setGroup("Time & Date"); 42 kon.setGroup("Time & Date");
43 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), 43 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ),
44 kon.readNumEntry( "DaylightsavingStart", 90), 44 kon.readNumEntry( "DaylightsavingStart", 90),
45 kon.readNumEntry( "DaylightsavingEnd",304) ); 45 kon.readNumEntry( "DaylightsavingEnd",304) );
46 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); 46 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") );
47 47
48 init = true; 48 init = true;
49 49
50 } 50 }
51 QDate da (date->dt_year,date->dt_month, date->dt_day ); 51 QDate da (date->dt_year,date->dt_month, date->dt_day );
52 QTime ti ( date->dt_hour, date->dt_min, date->dt_sec ); 52 QTime ti ( date->dt_hour, date->dt_min, date->dt_sec );
53 QDateTime dt ( da ,ti ); 53 QDateTime dt ( da ,ti );
54 int addsec = -date->dt_zone*36; 54 int addsec = -date->dt_zone*36;
55 //qDebug("adsec1 %d ",addsec ); 55 //qDebug("adsec1 %d ",addsec );
56 dt = dt.addSecs( addsec ); 56 dt = dt.addSecs( addsec );
57 int off = KGlobal::locale()->localTimeOffset( dt ); 57 int off = KGlobal::locale()->localTimeOffset( dt );
58 //qDebug("adsec2 %d ",off*60 ); 58 //qDebug("adsec2 %d ",off*60 );
59 59
60 dt = dt.addSecs( off*60 ); 60 dt = dt.addSecs( off*60 );
61 return dt; 61 return dt;
62#if 0 62#if 0
63 QString ret; 63 QString ret;
64 if ( dt.date() == QDate::currentDate () ) 64 if ( dt.date() == QDate::currentDate () )
65 ret = KGlobal::locale()->formatTime( dt.time(),true); 65 ret = KGlobal::locale()->formatTime( dt.time(),true);
66 66
67 else { 67 else {
68 ret = KGlobal::locale()->formatDateTime( dt,true,true); 68 ret = KGlobal::locale()->formatDateTime( dt,true,true);
69 } 69 }
70#endif 70#endif
71#if 0 71#if 0
72 if ( off < 0 ) 72 if ( off < 0 )
73 ret += " -"; 73 ret += " -";
74 else 74 else
75 ret += " +"; 75 ret += " +";
76 ret += QString::number( off / 60 ); 76 ret += QString::number( off / 60 );
77 ret += "h"; 77 ret += "h";
78#endif 78#endif
79#if 0 79#if 0
80 char tmp[23]; 80 char tmp[23];
81 81
82 // snprintf( tmp, 23, "%02i.%02i.%04i %02i:%02i:%02i %+05i", 82 // snprintf( tmp, 23, "%02i.%02i.%04i %02i:%02i:%02i %+05i",
83 // date->dt_day, date->dt_month, date->dt_year, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone ); 83 // date->dt_day, date->dt_month, date->dt_year, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone );
84 snprintf( tmp, 23, "%04i-%02i-%02i %02i:%02i:%02i %+05i", 84 snprintf( tmp, 23, "%04i-%02i-%02i %02i:%02i:%02i %+05i",
85 date->dt_year,date->dt_month, date->dt_day, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone ); 85 date->dt_year,date->dt_month, date->dt_day, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone );
86 86
87 87
88 return QString( tmp ); 88 return QString( tmp );
89#endif 89#endif
90 //return ret; 90 //return ret;
91} 91}
92 92
93void Genericwrapper::fillSingleBody(RecPartP&target,mailmessage*,mailmime*mime) 93void Genericwrapper::fillSingleBody(RecPartP&target,mailmessage*,mailmime*mime)
94{ 94{
95 if (!mime) { 95 if (!mime) {
96 return; 96 return;
97 } 97 }
98 mailmime_field*field = 0; 98 mailmime_field*field = 0;
99 mailmime_single_fields fields; 99 mailmime_single_fields fields;
100 memset(&fields, 0, sizeof(struct mailmime_single_fields)); 100 memset(&fields, 0, sizeof(struct mailmime_single_fields));
101 if (mime->mm_mime_fields != NULL) { 101 if (mime->mm_mime_fields != NULL) {
102 mailmime_single_fields_init(&fields, mime->mm_mime_fields, 102 mailmime_single_fields_init(&fields, mime->mm_mime_fields,
103 mime->mm_content_type); 103 mime->mm_content_type);
104 } 104 }
105 105
106 mailmime_content*type = fields.fld_content; 106 mailmime_content*type = fields.fld_content;
107 clistcell*current; 107 clistcell*current;
108 if (!type) { 108 if (!type) {
109 target->setType("text"); 109 target->setType("text");
110 target->setSubtype("plain"); 110 target->setSubtype("plain");
111 } else { 111 } else {
112 target->setSubtype(type->ct_subtype); 112 target->setSubtype(type->ct_subtype);
113 switch(type->ct_type->tp_data.tp_discrete_type->dt_type) { 113 switch(type->ct_type->tp_data.tp_discrete_type->dt_type) {
114 case MAILMIME_DISCRETE_TYPE_TEXT: 114 case MAILMIME_DISCRETE_TYPE_TEXT:
115 target->setType("text"); 115 target->setType("text");
116 break; 116 break;
117 case MAILMIME_DISCRETE_TYPE_IMAGE: 117 case MAILMIME_DISCRETE_TYPE_IMAGE:
118 target->setType("image"); 118 target->setType("image");
119 break; 119 break;
120 case MAILMIME_DISCRETE_TYPE_AUDIO: 120 case MAILMIME_DISCRETE_TYPE_AUDIO:
121 target->setType("audio"); 121 target->setType("audio");
122 break; 122 break;
123 case MAILMIME_DISCRETE_TYPE_VIDEO: 123 case MAILMIME_DISCRETE_TYPE_VIDEO:
124 target->setType("video"); 124 target->setType("video");
125 break; 125 break;
126 case MAILMIME_DISCRETE_TYPE_APPLICATION: 126 case MAILMIME_DISCRETE_TYPE_APPLICATION:
127 target->setType("application"); 127 target->setType("application");
128 break; 128 break;
129 case MAILMIME_DISCRETE_TYPE_EXTENSION: 129 case MAILMIME_DISCRETE_TYPE_EXTENSION:
130 default: 130 default:
131 if (type->ct_type->tp_data.tp_discrete_type->dt_extension) { 131 if (type->ct_type->tp_data.tp_discrete_type->dt_extension) {
132 target->setType(type->ct_type->tp_data.tp_discrete_type->dt_extension); 132 target->setType(type->ct_type->tp_data.tp_discrete_type->dt_extension);
133 } 133 }
134 break; 134 break;