From: Sergio Villar Senin Date: Tue, 31 Oct 2006 16:36:33 +0000 (+0000) Subject: configure.ac: removed dependency with camel-1.2. X-Git-Tag: git_migration_finished~4401 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=2cff393cb605994743bfd36cca323fa0be152907 configure.ac: removed dependency with camel-1.2. modest-tny-store-actions.h (modest_tny_store_actions_update_folders): replaced TnyStoreAccountIface by TnyStoreAccount in the method signature. modest-tny-store-actions.c (modest_tny_store_actions_update_folders): replaced TnyStoreAccountIface by TnyStoreAccount in the method signature. Updated the method code in order to support the new Tinymail API. pmo-trunk-r478 --- diff --git a/configure.ac b/configure.ac index 3d2e0c5..0671d98 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_CHECK_PROG([perl]) GTK_DOC_CHECK([1.0]) dnl # GLib/Gobject/Gtk/Gconf => mandatory -PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gconf-2.0 libgtkhtml-3.8 libglade-2.0 libtinymail-1.0 libtinymail-camel-1.0 libtinymailui-1.0 libtinymailui-gtk-1.0 camel-1.2) +PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gconf-2.0 libgtkhtml-3.8 libglade-2.0 libtinymail-1.0 libtinymail-camel-1.0 libtinymailui-1.0 libtinymailui-gtk-1.0) AC_SUBST(MODEST_GSTUFF_CFLAGS) AC_SUBST(MODEST_GSTUFF_LIBS) diff --git a/src/modest-tny-store-actions.c b/src/modest-tny-store-actions.c index 562f044..1903a13 100644 --- a/src/modest-tny-store-actions.c +++ b/src/modest-tny-store-actions.c @@ -28,8 +28,9 @@ */ #include -#include -#include +#include +#include +#include #include #include #include @@ -47,28 +48,34 @@ void -modest_tny_store_actions_update_folders (TnyStoreAccountIface *storage_account) +modest_tny_store_actions_update_folders (TnyStoreAccount *storage_account) { // FIXME TODO: This results in failure on folder change. - /* - const TnyListIface* folders; - TnyIteratorIface* ifolders; - const TnyMsgFolderIface *cur_folder; - folders = tny_store_account_iface_get_folders (storage_account, - TNY_STORE_ACCOUNT_FOLDER_TYPE_SUBSCRIBED); + TnyList *folders; + TnyIterator *ifolders; + const TnyFolder *cur_folder; + TnyFolderStoreQuery *query; + +/* folders = tny_store_account_get_folders (storage_account, */ +/* TNY_STORE_ACCOUNT_FOLDER_TYPE_SUBSCRIBED); */ + query = tny_folder_store_query_new (); + tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED); + tny_folder_store_get_folders (TNY_FOLDER_STORE (storage_account), + folders, NULL); + g_object_unref (query); - ifolders = tny_list_iface_create_iterator (folders); + ifolders = tny_list_create_iterator (folders); - for (cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_first (ifolders)); - tny_iterator_iface_has_next (ifolders); - tny_iterator_iface_next (ifolders)) { + for (tny_iterator_first (ifolders); + !tny_iterator_is_done (ifolders); + tny_iterator_next (ifolders)) { - cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_current (ifolders)); - tny_msg_folder_iface_refresh (cur_folder); + cur_folder = TNY_FOLDER(tny_iterator_get_current (ifolders)); + tny_folder_refresh (cur_folder); } g_object_unref (ifolders); -*/} +} diff --git a/src/modest-tny-store-actions.h b/src/modest-tny-store-actions.h index 16d618f..4751bca 100644 --- a/src/modest-tny-store-actions.h +++ b/src/modest-tny-store-actions.h @@ -38,7 +38,7 @@ G_BEGIN_DECLS -void modest_tny_store_actions_update_folders (TnyStoreAccountIface *storage_account); +void modest_tny_store_actions_update_folders (TnyStoreAccount *storage_account); G_END_DECLS