Changeset 19
- Timestamp:
- 02/08/06 00:42:12
- Files:
-
- trunk/libtinymail-camel/tny-account-priv.h (moved) (moved from trunk/libtinymail-camel/tny-msg-account-priv.h)
- trunk/libtinymail-camel/tny-camel-session.c (modified) (6 diffs)
- trunk/libtinymail-camel/tny-camel-session.h (modified) (2 diffs)
- trunk/libtinymail-camel/tny-msg-folder-priv.h (modified) (2 diffs)
- trunk/libtinymail-camel/tny-msg-folder.c (modified) (5 diffs)
- trunk/libtinymail/Makefile.am (modified) (2 diffs)
- trunk/libtinymail/tny-account-iface.c (modified) (4 diffs)
- trunk/libtinymail/tny-account-iface.h (modified) (2 diffs)
- trunk/libtinymail/tny-msg-folder-iface.c (modified) (2 diffs)
- trunk/libtinymail/tny-msg-folder-iface.h (modified) (3 diffs)
- trunk/libtinymail/tny-shared.h (modified) (1 diff)
- trunk/libtinymailui/Makefile.am (modified) (1 diff)
- trunk/tinymail/Makefile.in (modified) (4 diffs)
- trunk/tinymail/tny-main.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-session.c
r15 r19 39 39 CamelSession *session; 40 40 GetPassFunc func; 41 Tny MsgAccountIface *account;41 TnyAccountIface *account; 42 42 43 43 } PrivPassFunc; … … 47 47 CamelSession *session; 48 48 ForgetPassFunc func; 49 Tny MsgAccountIface *account;49 TnyAccountIface *account; 50 50 51 51 } PrivForgetPassFunc; … … 53 53 54 54 void 55 tny_camel_session_set_forget_pass_func (TnyCamelSession *self, Tny MsgAccountIface *account, ForgetPassFunc get_forget_pass_func)55 tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyAccountIface *account, ForgetPassFunc get_forget_pass_func) 56 56 { 57 57 GList *copy = forget_password_funcs, *mark_del = NULL; … … 102 102 103 103 void 104 tny_camel_session_set_pass_func (TnyCamelSession *self, Tny MsgAccountIface *account, GetPassFunc get_pass_func)104 tny_camel_session_set_pass_func (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func) 105 105 { 106 106 GList *copy = password_funcs, *mark_del = NULL; … … 169 169 GList *copy = password_funcs; 170 170 GetPassFunc func; 171 Tny MsgAccountIface *account;171 TnyAccountIface *account; 172 172 gboolean found = FALSE; 173 173 … … 198 198 GList *copy = forget_password_funcs; 199 199 ForgetPassFunc func; 200 Tny MsgAccountIface *account;200 TnyAccountIface *account; 201 201 gboolean found = FALSE; 202 202 trunk/libtinymail-camel/tny-camel-session.h
r15 r19 49 49 CamelSessionClass parent_class; 50 50 51 void (*set_pass_func_func) (TnyCamelSession *self, Tny MsgAccountIface *account, GetPassFunc get_pass_func);51 void (*set_pass_func_func) (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func); 52 52 GetPassFunc (*get_pass_func_func) (TnyCamelSession *self); 53 53 }; … … 56 56 TnyCamelSession* tny_camel_session_new (void); 57 57 58 void tny_camel_session_set_pass_func (TnyCamelSession *self, Tny MsgAccountIface *account, GetPassFunc get_pass_func);58 void tny_camel_session_set_pass_func (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func); 59 59 GetPassFunc tny_camel_session_get_pass_func (TnyCamelSession *self); 60 60 61 61 62 void tny_camel_session_set_forget_pass_func (TnyCamelSession *self, Tny MsgAccountIface *account, ForgetPassFunc get_forget_pass_func);62 void tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyAccountIface *account, ForgetPassFunc get_forget_pass_func); 63 63 ForgetPassFunc tny_camel_session_get_forget_pass_func (TnyCamelSession *self); 64 64 trunk/libtinymail-camel/tny-msg-folder-priv.h
r5 r19 22 22 #include <glib.h> 23 23 #include <camel/camel-folder.h> 24 #include <tny- msg-account-iface.h>24 #include <tny-account-iface.h> 25 25 #include <tny-msg-folder-iface.h> 26 26 … … 34 34 CamelFolder *folder; 35 35 gchar *folder_name; 36 Tny MsgAccountIface *account;36 TnyAccountIface *account; 37 37 GList *folders; 38 38 }; trunk/libtinymail-camel/tny-msg-folder.c
r12 r19 24 24 #include <tny-msg.h> 25 25 #include <tny-msg-header.h> 26 #include <tny- msg-account-iface.h>27 #include <tny- msg-account.h>26 #include <tny-account-iface.h> 27 #include <tny-account.h> 28 28 29 29 #include <camel/camel-folder.h> … … 37 37 38 38 #include <tny-camel-session.h> 39 #include "tny- msg-account-priv.h"39 #include "tny-account-priv.h" 40 40 #include "tny-msg-folder-priv.h" 41 41 #include <camel/camel.h> … … 55 55 { 56 56 CamelException ex; 57 CamelStore *store = (CamelStore*) _tny_ msg_account_get_service58 (TNY_ MSG_ACCOUNT (priv->account));57 CamelStore *store = (CamelStore*) _tny_account_get_service 58 (TNY_ACCOUNT (priv->account)); 59 59 60 60 priv->folder = camel_store_get_folder (store, priv->folder_name, 0, &ex); … … 92 92 } 93 93 94 const Tny MsgAccountIface*94 const TnyAccountIface* 95 95 tny_msg_folder_get_account (TnyMsgFolderIface *self) 96 96 { … … 101 101 102 102 void 103 tny_msg_folder_set_account (TnyMsgFolderIface *self, const Tny MsgAccountIface *account)104 { 105 TnyMsgFolderPriv *priv = TNY_MSG_FOLDER_GET_PRIVATE (TNY_MSG_FOLDER (self)); 106 107 priv->account = TNY_ MSG_ACCOUNT_IFACE (account);103 tny_msg_folder_set_account (TnyMsgFolderIface *self, const TnyAccountIface *account) 104 { 105 TnyMsgFolderPriv *priv = TNY_MSG_FOLDER_GET_PRIVATE (TNY_MSG_FOLDER (self)); 106 107 priv->account = TNY_ACCOUNT_IFACE (account); 108 108 109 109 return; trunk/libtinymail/Makefile.am
r6 r19 10 10 tny-msg-header-iface.h \ 11 11 tny-msg-iface.h \ 12 tny- msg-account-iface.h \12 tny-account-iface.h \ 13 13 tny-msg-header-proxy.h 14 14 … … 22 22 tny-msg-attachment-iface.c \ 23 23 tny-msg-folder-iface.c \ 24 tny- msg-account-iface.c \24 tny-account-iface.c \ 25 25 tny-msg-header-proxy.c 26 26 trunk/libtinymail/tny-account-iface.c
r17 r19 18 18 */ 19 19 20 #include <tny- msg-account-iface.h>20 #include <tny-account-iface.h> 21 21 22 22 void 23 tny_ msg_account_iface_set_forget_pass_func (TnyMsgAccountIface *self, ForgetPassFunc get_forget_pass_func)23 tny_account_iface_set_forget_pass_func (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func) 24 24 { 25 TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_forget_pass_func_func (self, get_forget_pass_func);25 TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_forget_pass_func_func (self, get_forget_pass_func); 26 26 return; 27 27 } 28 28 29 29 ForgetPassFunc 30 tny_ msg_account_iface_get_forget_pass_func (TnyMsgAccountIface *self)30 tny_account_iface_get_forget_pass_func (TnyAccountIface *self) 31 31 { 32 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_forget_pass_func_func (self);32 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_forget_pass_func_func (self); 33 33 } 34 34 35 35 const GList* 36 tny_ msg_account_iface_get_folders (TnyMsgAccountIface *self)36 tny_account_iface_get_folders (TnyAccountIface *self) 37 37 { 38 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_folders_func (self);38 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_folders_func (self); 39 39 } 40 40 41 41 void 42 tny_ msg_account_iface_set_proto (TnyMsgAccountIface *self, const gchar *proto)42 tny_account_iface_set_proto (TnyAccountIface *self, const gchar *proto) 43 43 { 44 TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_proto_func (self, proto);44 TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_proto_func (self, proto); 45 45 return; 46 46 } 47 47 48 48 void 49 tny_ msg_account_iface_set_user (TnyMsgAccountIface *self, const gchar *user)49 tny_account_iface_set_user (TnyAccountIface *self, const gchar *user) 50 50 { 51 TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_user_func (self, user);51 TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_user_func (self, user); 52 52 return; 53 53 } 54 54 55 55 void 56 tny_ msg_account_iface_set_hostname (TnyMsgAccountIface *self, const gchar *host)56 tny_account_iface_set_hostname (TnyAccountIface *self, const gchar *host) 57 57 { 58 TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_hostname_func (self, host);58 TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_hostname_func (self, host); 59 59 return; 60 60 } 61 61 62 62 void 63 tny_ msg_account_iface_set_pass_func (TnyMsgAccountIface *self, GetPassFunc get_pass_func)63 tny_account_iface_set_pass_func (TnyAccountIface *self, GetPassFunc get_pass_func) 64 64 { 65 TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_pass_func_func (self, get_pass_func);65 TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_pass_func_func (self, get_pass_func); 66 66 return; 67 67 } 68 68 69 69 const gchar* 70 tny_ msg_account_iface_get_proto (TnyMsgAccountIface *self)70 tny_account_iface_get_proto (TnyAccountIface *self) 71 71 { 72 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_proto_func (self);72 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_proto_func (self); 73 73 } 74 74 75 75 const gchar* 76 tny_ msg_account_iface_get_user (TnyMsgAccountIface *self)76 tny_account_iface_get_user (TnyAccountIface *self) 77 77 { 78 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_user_func (self);78 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_user_func (self); 79 79 } 80 80 81 81 const gchar* 82 tny_ msg_account_iface_get_hostname (TnyMsgAccountIface *self)82 tny_account_iface_get_hostname (TnyAccountIface *self) 83 83 { 84 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_hostname_func (self);84 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_hostname_func (self); 85 85 } 86 86 87 87 GetPassFunc 88 tny_ msg_account_iface_get_pass_func (TnyMsgAccountIface *self)88 tny_account_iface_get_pass_func (TnyAccountIface *self) 89 89 { 90 return TNY_ MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_pass_func_func (self);90 return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_pass_func_func (self); 91 91 } 92 92 93 93 94 94 static void 95 tny_ msg_account_iface_base_init (gpointer g_class)95 tny_account_iface_base_init (gpointer g_class) 96 96 { 97 97 static gboolean initialized = FALSE; … … 104 104 105 105 GType 106 tny_ msg_account_iface_get_type (void)106 tny_account_iface_get_type (void) 107 107 { 108 108 static GType type = 0; … … 111 111 static const GTypeInfo info = 112 112 { 113 sizeof (Tny MsgAccountIfaceClass),114 tny_ msg_account_iface_base_init, /* base_init */113 sizeof (TnyAccountIfaceClass), 114 tny_account_iface_base_init, /* base_init */ 115 115 NULL, /* base_finalize */ 116 116 NULL, /* class_init */ … … 122 122 }; 123 123 type = g_type_register_static (G_TYPE_INTERFACE, 124 "Tny MsgAccountIface", &info, 0);124 "TnyAccountIface", &info, 0); 125 125 126 126 g_type_interface_add_prerequisite (type, G_TYPE_OBJECT); trunk/libtinymail/tny-account-iface.h
r17 r19 1 #ifndef TNY_ MSG_ACCOUNT_IFACE_H2 #define TNY_ MSG_ACCOUNT_IFACE_H1 #ifndef TNY_ACCOUNT_IFACE_H 2 #define TNY_ACCOUNT_IFACE_H 3 3 4 4 /* libtinymail - The Tiny Mail base library … … 27 27 G_BEGIN_DECLS 28 28 29 #define TNY_ MSG_ACCOUNT_IFACE_TYPE (tny_msg_account_iface_get_type ())30 #define TNY_ MSG_ACCOUNT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIface))31 #define TNY_ MSG_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIfaceClass))32 #define TNY_IS_MSG_ACCOUNT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_ MSG_ACCOUNT_IFACE_TYPE))33 #define TNY_IS_MSG_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_ MSG_ACCOUNT_IFACE_TYPE))34 #define TNY_ MSG_ACCOUNT_IFACE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIfaceClass))29 #define TNY_ACCOUNT_IFACE_TYPE (tny_account_iface_get_type ()) 30 #define TNY_ACCOUNT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIface)) 31 #define TNY_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIfaceClass)) 32 #define TNY_IS_MSG_ACCOUNT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_ACCOUNT_IFACE_TYPE)) 33 #define TNY_IS_MSG_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_ACCOUNT_IFACE_TYPE)) 34 #define TNY_ACCOUNT_IFACE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIfaceClass)) 35 35 36 struct _Tny MsgAccountIfaceClass36 struct _TnyAccountIfaceClass 37 37 { 38 38 GTypeInterface parent; 39 39 40 const GList* (*get_folders_func) (Tny MsgAccountIface *self);40 const GList* (*get_folders_func) (TnyAccountIface *self); 41 41 42 void (*set_proto_func) (Tny MsgAccountIface *self, const gchar *proto);43 void (*set_user_func) (Tny MsgAccountIface *self, const gchar *user);44 void (*set_hostname_func) (Tny MsgAccountIface *self, const gchar *host);45 void (*set_pass_func_func) (Tny MsgAccountIface *self, GetPassFunc get_pass_func);46 void (*set_forget_pass_func_func) (Tny MsgAccountIface *self, ForgetPassFunc get_forget_pass_func);42 void (*set_proto_func) (TnyAccountIface *self, const gchar *proto); 43 void (*set_user_func) (TnyAccountIface *self, const gchar *user); 44 void (*set_hostname_func) (TnyAccountIface *self, const gchar *host); 45 void (*set_pass_func_func) (TnyAccountIface *self, GetPassFunc get_pass_func); 46 void (*set_forget_pass_func_func) (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func); 47 47 48 const gchar* (*get_proto_func ) (Tny MsgAccountIface *self);49 const gchar* (*get_user_func) (Tny MsgAccountIface *self);50 const gchar* (*get_hostname_func) (Tny MsgAccountIface *self);51 GetPassFunc (*get_pass_func_func) (Tny MsgAccountIface *self);52 ForgetPassFunc (*get_forget_pass_func_func) (Tny MsgAccountIface *self);48 const gchar* (*get_proto_func ) (TnyAccountIface *self); 49 const gchar* (*get_user_func) (TnyAccountIface *self); 50 const gchar* (*get_hostname_func) (TnyAccountIface *self); 51 GetPassFunc (*get_pass_func_func) (TnyAccountIface *self); 52 ForgetPassFunc (*get_forget_pass_func_func) (TnyAccountIface *self); 53 53 }; 54 54 55 GType tny_ msg_account_iface_get_type (void);56 const GList* tny_ msg_account_iface_get_folders (TnyMsgAccountIface *self);55 GType tny_account_iface_get_type (void); 56 const GList* tny_account_iface_get_folders (TnyAccountIface *self); 57 57 58 void tny_ msg_account_iface_set_proto (TnyMsgAccountIface *self, const gchar *proto);59 void tny_ msg_account_iface_set_user (TnyMsgAccountIface *self, const gchar *user);60 void tny_ msg_account_iface_set_hostname (TnyMsgAccountIface *self, const gchar *host);61 void tny_ msg_account_iface_set_pass_func (TnyMsgAccountIface *self, GetPassFunc get_pass_func);58 void tny_account_iface_set_proto (TnyAccountIface *self, const gchar *proto); 59 void tny_account_iface_set_user (TnyAccountIface *self, const gchar *user); 60 void tny_account_iface_set_hostname (TnyAccountIface *self, const gchar *host); 61 void tny_account_iface_set_pass_func (TnyAccountIface *self, GetPassFunc get_pass_func); 62 62 63 const gchar* tny_ msg_account_iface_get_proto (TnyMsgAccountIface *self);64 const gchar* tny_ msg_account_iface_get_user (TnyMsgAccountIface *self);65 const gchar* tny_ msg_account_iface_get_hostname (TnyMsgAccountIface *self);66 GetPassFunc tny_ msg_account_iface_get_pass_func (TnyMsgAccountIface *self);63 const gchar* tny_account_iface_get_proto (TnyAccountIface *self); 64 const gchar* tny_account_iface_get_user (TnyAccountIface *self); 65 const gchar* tny_account_iface_get_hostname (TnyAccountIface *self); 66 GetPassFunc tny_account_iface_get_pass_func (TnyAccountIface *self); 67 67 68 void tny_ msg_account_iface_set_forget_pass_func (TnyMsgAccountIface *self, ForgetPassFunc get_forget_pass_func);69 ForgetPassFunc tny_ msg_account_iface_get_forget_pass_func (TnyMsgAccountIface *self);68 void tny_account_iface_set_forget_pass_func (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func); 69 ForgetPassFunc tny_account_iface_get_forget_pass_func (TnyAccountIface *self); 70 70 71 71 G_END_DECLS trunk/libtinymail/tny-msg-folder-iface.c
r12 r19 22 22 23 23 24 const Tny MsgAccountIface*24 const TnyAccountIface* 25 25 tny_msg_folder_iface_get_account (TnyMsgFolderIface *self) 26 26 { … … 29 29 30 30 void 31 tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const Tny MsgAccountIface *account)31 tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const TnyAccountIface *account) 32 32 { 33 33 TNY_MSG_FOLDER_IFACE_GET_CLASS (self)->set_account_func (self, account); trunk/libtinymail/tny-msg-folder-iface.h
r12 r19 26 26 #include <tny-msg-iface.h> 27 27 #include <tny-msg-header-iface.h> 28 #include <tny- msg-account-iface.h>28 #include <tny-account-iface.h> 29 29 30 30 G_BEGIN_DECLS … … 50 50 const gchar* (*get_name_func) (TnyMsgFolderIface *self); 51 51 const gchar* (*get_id_func) (TnyMsgFolderIface *self); 52 const Tny MsgAccountIface*52 const TnyAccountIface* 53 53 (*get_account_func) (TnyMsgFolderIface *self); 54 54 55 55 void (*set_name_func) (TnyMsgFolderIface *self, const gchar *name); 56 56 void (*set_id_func) (TnyMsgFolderIface *self, const gchar *id); 57 void (*set_account_func) (TnyMsgFolderIface *self, const Tny MsgAccountIface *account);57 void (*set_account_func) (TnyMsgFolderIface *self, const TnyAccountIface *account); 58 58 59 59 void (*uncache_func) (TnyMsgFolderIface *self); … … 70 70 const GList* tny_msg_folder_iface_get_headers (TnyMsgFolderIface *self); 71 71 72 const Tny MsgAccountIface*72 const TnyAccountIface* 73 73 tny_msg_folder_iface_get_account (TnyMsgFolderIface *self); 74 74 const gchar* tny_msg_folder_iface_get_id (TnyMsgFolderIface *self); 75 75 const gchar* tny_msg_folder_iface_get_name (TnyMsgFolderIface *self); 76 76 77 void tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const Tny MsgAccountIface *account);77 void tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const TnyAccountIface *account); 78 78 void tny_msg_folder_iface_set_id (TnyMsgFolderIface *self, const gchar *id); 79 79 void tny_msg_folder_iface_set_name (TnyMsgFolderIface *self, const gchar *name); trunk/libtinymail/tny-shared.h
r15 r19 35 35 typedef struct _TnyMsgAttachmentIface TnyMsgAttachmentIface; 36 36 typedef struct _TnyMsgAttachmentIfaceClass TnyMsgAttachmentIfaceClass; 37 typedef struct _Tny MsgAccountIface TnyMsgAccountIface;38 typedef struct _Tny MsgAccountIfaceClass TnyMsgAccountIfaceClass;37 typedef struct _TnyAccountIface TnyAccountIface; 38 typedef struct _TnyAccountIfaceClass TnyAccountIfaceClass; 39 39 typedef struct _TnyMsgHeaderProxy TnyMsgHeaderProxy; 40 40 typedef struct _TnyMsgHeaderProxyClass TnyMsgHeaderProxyClass; 41 typedef gchar* (*GetPassFunc) (Tny MsgAccountIface *self);42 typedef gchar* (*ForgetPassFunc) (Tny MsgAccountIface *self);41 typedef gchar* (*GetPassFunc) (TnyAccountIface *self); 42 typedef gchar* (*ForgetPassFunc) (TnyAccountIface *self); 43 43 44 44 G_END_DECLS trunk/libtinymailui/Makefile.am
r1 r19 7 7 libtinymailui_1_0_headers = \ 8 8 tny-msg-header-list-model.h \ 9 tny- msg-account-tree-model.h9 tny-account-tree-model.h 10 10 11 11 libtinymailui_1_0_la_SOURCES = \ 12 12 $(libtinymailui_1_0_headers) \ 13 13 tny-msg-header-list-model.c \ 14 tny- msg-account-tree-model.c14 tny-account-tree-model.c 15 15 16 16 libtinymailui_1_0_la_LIBADD = \ trunk/tinymail/Makefile.in
r1 r19 152 152 153 153 tinymail_SOURCES = \ 154 tny-main.c 154 tny-main.c \ 155 tny-account-factory.c \ 156 tny-account-factory.h 155 157 156 158 … … 171 173 PROGRAMS = $(bin_PROGRAMS) 172 174 173 am_tinymail_OBJECTS = tny-main.$(OBJEXT) 175 am_tinymail_OBJECTS = tny-main.$(OBJEXT) tny-account-factory.$(OBJEXT) 174 176 tinymail_OBJECTS = $(am_tinymail_OBJECTS) 175 177 tinymail_DEPENDENCIES = \ … … 182 184 depcomp = $(SHELL) $(top_srcdir)/depcomp 183 185 am__depfiles_maybe = depfiles 184 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tny-main.Po 186 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tny-account-factory.Po \ 187 @AMDEP_TRUE@ ./$(DEPDIR)/tny-main.Po 185 188 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 186 189 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) … … 260 263 -rm -f *.tab.c 261 264 265 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tny-account-factory.Po@am__quote@ 262 266 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tny-main.Po@am__quote@ 263 267 trunk/tinymail/tny-main.c
r15 r19 21 21 #include <gtk/gtk.h> 22 22 23 #include <tny- msg-account-iface.h>24 #include <tny- msg-account.h>23 #include <tny-account-iface.h> 24 #include <tny-account.h> 25 25 26 26 #include <tny-msg-folder-iface.h> 27 #include <tny- msg-account-tree-model.h>27 #include <tny-account-tree-model.h> 28 28 #include <tny-msg-header-iface.h> 29 29 #include <tny-msg-header-list-model.h> … … 45 45 46 46 gtk_tree_model_get (model, &iter, 47 TNY_ MSG_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN,47 TNY_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN, 48 48 &folder, -1); 49 49 … … 163 163 164 164 static gchar* 165 get_password (Tny MsgAccountIface *account)165 get_password (TnyAccountIface *account) 166 166 { 167 167 if (!pwd) … … 173 173 174 174 static gchar* 175 forget_password (Tny MsgAccountIface *account)175 forget_password (TnyAccountIface *account) 176 176 { 177 177 g_print ("Forgetting password\n"); … … 180 180 } 181 181 182 static Tny MsgAccountIface*182 static TnyAccountIface* 183 183 create_account (void) 184 184 { 185 Tny MsgAccountIface* retval = TNY_MSG_ACCOUNT_IFACE (tny_msg_account_new ());186 187 tny_ msg_account_iface_set_hostname (retval, PERSONAL_HOSTNAME);188 tny_ msg_account_iface_set_user (retval, PERSONAL_USERNAME);189 tny_ msg_account_iface_set_proto (retval, PERSONAL_PROTOCOL);190 191 tny_ msg_account_iface_set_pass_func (retval, get_password);192 tny_ msg_account_iface_set_forget_pass_func (retval, forget_password);185 TnyAccountIface* retval = TNY_ACCOUNT_IFACE (tny_account_new ()); 186 187 tny_account_iface_set_hostname (retval, PERSONAL_HOSTNAME); 188 tny_account_iface_set_user (retval, PERSONAL_USERNAME); 189 tny_account_iface_set_proto (retval, PERSONAL_PROTOCOL); 190 191 tny_account_iface_set_pass_func (retval, get_password); 192 tny_account_iface_set_forget_pass_func (retval, forget_password); 193 193 194 194 return retval; … … 209 209 GtkTreeSelection *select; 210 210 gint t = 0, i = 0; 211 Tny MsgAccountIface *account;211 TnyAccountIface *account; 212 212 213 213 gtk_init (&argc, &argv); … … 244 244 renderer = gtk_cell_renderer_text_new (); 245 245 column = gtk_tree_view_column_new_with_attributes ("Folder", renderer, 246 "text", TNY_ MSG_ACCOUNT_TREE_MODEL_NAME_COLUMN, NULL);246 "text", TNY_ACCOUNT_TREE_MODEL_NAME_COLUMN, NULL); 247 247 gtk_tree_view_append_column (GTK_TREE_VIEW(mailbox_view), column); 248 248 249 249 renderer = gtk_cell_renderer_text_new (); 250 250 column = gtk_tree_view_column_new_with_attributes ("Folder", renderer, 251 "text", TNY_ MSG_ACCOUNT_TREE_MODEL_UNREAD_COLUMN, NULL);251 "text", TNY_ACCOUNT_TREE_MODEL_UNREAD_COLUMN, NULL); 252 252 gtk_tree_view_append_column (GTK_TREE_VIEW(mailbox_view), column); 253 253 … … 278 278 gtk_tree_view_append_column (GTK_TREE_VIEW(header_view), column); 279 279 280 mailbox_model = GTK_TREE_MODEL (tny_ msg_account_tree_model_new ());280 mailbox_model = GTK_TREE_MODEL (tny_account_tree_model_new ()); 281 281 282 282 account = create_account (); 283 283 284 tny_ msg_account_tree_model_add (TNY_MSG_ACCOUNT_TREE_MODEL284 tny_account_tree_model_add (TNY_ACCOUNT_TREE_MODEL 285 285 (mailbox_model), account); 286 286
