17
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
/******************************************************************************
22
This file is a part of the cairo-dock program,
23
released under the terms of the GNU General Public License.
25
Written by Christophe Chapuis (for any bug report, please mail me to tofe@users.berlios.de)
27
******************************************************************************/
29
20
#include <string.h>
30
21
#include <cairo-dock.h>
31
22
#include <libetpan/libetpan.h>
37
28
#define _add_icon(pMailAccount)\
38
29
pIcon = g_new0 (Icon, 1);\
39
pIcon->acName = g_strdup (pMailAccount->name);\
40
pIcon->acFileName = g_strdup (myConfig.cNoMailUserImage);\
30
pIcon->cName = g_strdup (pMailAccount->name);\
31
pIcon->cFileName = g_strdup (myConfig.cNoMailUserImage);\
41
32
pIcon->cQuickInfo = g_strdup ("...");\
42
33
pIcon->fOrder = i;\
43
34
pIcon->fScale = 1.;\
44
35
pIcon->fAlpha = 1.;\
45
36
pIcon->fWidthFactor = 1.;\
46
37
pIcon->fHeightFactor = 1.;\
47
pIcon->acCommand = g_strdup ("none");\
48
pIcon->cParentDockName = g_strdup (myIcon->acName);\
49
cd_debug (" + %s (%s)\n", pIcon->acName, pIcon->acFileName);\
38
pIcon->cCommand = g_strdup ("none");\
39
pIcon->cParentDockName = g_strdup (myIcon->cName);\
40
cd_debug (" + %s (%s)\n", pIcon->cName, pIcon->cFileName);\
50
41
pIconList = g_list_append (pIconList, pIcon);\
51
42
pMailAccount->icon = pIcon;
472
463
r = pop3_mailstorage_init(pMailAccount->storage, pMailAccount->server, pMailAccount->port,
473
464
NULL, pMailAccount->connection_type,
474
465
pMailAccount->auth_type, pMailAccount->user, pMailAccount->password,
475
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
466
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);
478
469
case IMAP_STORAGE:
479
470
r = imap_mailstorage_init(pMailAccount->storage, pMailAccount->server, pMailAccount->port,
480
471
NULL, pMailAccount->connection_type,
481
472
IMAP_AUTH_TYPE_PLAIN, pMailAccount->user, pMailAccount->password,
482
FALSE /*cached*/, NULL /*cache_directory*/);
473
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/);
485
476
case NNTP_STORAGE:
486
477
r = nntp_mailstorage_init(pMailAccount->storage, pMailAccount->server, pMailAccount->port,
487
478
NULL, pMailAccount->connection_type,
488
479
NNTP_AUTH_TYPE_PLAIN, pMailAccount->user, pMailAccount->password,
489
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
480
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);
492
483
case MBOX_STORAGE:
493
484
r = mbox_mailstorage_init(pMailAccount->storage, pMailAccount->path,
494
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
485
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);
498
489
r = mh_mailstorage_init(pMailAccount->storage, pMailAccount->path,
499
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
490
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);
502
493
case MAILDIR_STORAGE:
503
494
r = maildir_mailstorage_init(pMailAccount->storage, pMailAccount->path,
504
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
495
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);
507
498
case FEED_STORAGE:
508
499
r = feed_mailstorage_init(pMailAccount->storage, pMailAccount->path,
509
FALSE /*cached*/, NULL /*cache_directory*/, NULL /*flags_directory*/);
500
myData.cWorkingDirPath!=NULL?TRUE:FALSE /*cached*/, myData.cWorkingDirPath /*cache_directory*/, myData.cWorkingDirPath /*flags_directory*/);