* Fixed some compilation warnings
authorSergio Villar Senin <svillar@igalia.com>
Mon, 15 Jan 2007 16:47:30 +0000 (16:47 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 15 Jan 2007 16:47:30 +0000 (16:47 +0000)
* Added the TnyLockable support to the account store

pmo-trunk-r628

src/modest-tny-account-store.c
src/modest-tny-folder.c
src/modest-widget-factory.c
src/widgets/modest-header-view.c

index 4d837a8..ca0d113 100644 (file)
@@ -44,9 +44,8 @@
 #include "modest-account-mgr.h"
 #include "modest-tny-account-store.h"
 #include "modest-tny-platform-factory.h"
-
+#include <tny-gtk-lockable.h>
 #include <camel/camel.h>
-#include <gdk/gdk.h>
 
 /* 'private'/'protected' functions */
 static void modest_tny_account_store_class_init   (ModestTnyAccountStoreClass *klass);
@@ -222,8 +221,6 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
        gchar *pwd = NULL;
        gboolean already_asked;
        
-       gdk_threads_enter ();
-
        key           = tny_account_get_id (account);
        account_store = TNY_ACCOUNT_STORE(get_account_store_for_account (account));
 
@@ -272,8 +269,6 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
        } else
                *cancel = FALSE;
 
-       gdk_threads_leave ();
-
        return pwd;
 }
 
@@ -520,7 +515,6 @@ modest_tny_account_store_new (ModestAccountMgr *account_mgr) {
                g_object_unref (obj);
                return NULL;
        }
-/*     tny_device_force_online (priv->device); */
        
        priv->tny_session_camel = tny_session_camel_new (TNY_ACCOUNT_STORE(obj));
 
@@ -530,6 +524,8 @@ modest_tny_account_store_new (ModestAccountMgr *account_mgr) {
                return NULL;
        }
 
+       tny_session_camel_set_ui_locker (priv->tny_session_camel, tny_gtk_lockable_new ());
+
        return MODEST_TNY_ACCOUNT_STORE(obj);
 }
 
index e42d3e3..6dc7799 100644 (file)
@@ -86,8 +86,12 @@ modest_tny_folder_guess_folder_type (const TnyFolder *folder)
 
        type = tny_folder_get_folder_type ((TnyFolder*)folder); /* FIXME: cast tinymail */
        
-       if (type == TNY_FOLDER_TYPE_UNKNOWN)
-               type =  modest_tny_folder_guess_folder_type_from_name (tny_folder_get_name (folder));
+       if (type == TNY_FOLDER_TYPE_UNKNOWN) {
+               const gchar *folder_name;
+
+               folder_name = tny_folder_get_name (TNY_FOLDER (folder));
+               type =  modest_tny_folder_guess_folder_type_from_name (folder_name);
+       }
 
        return type;
 }
index 350c60f..41b5453 100644 (file)
@@ -369,7 +369,7 @@ modest_widget_factory_get_combo_box (ModestWidgetFactory *self, ModestComboBoxTy
                protos = modest_protocol_info_get_protocol_pair_list (MODEST_PROTOCOL_TYPE_AUTH);
                break;
        case MODEST_COMBO_BOX_TYPE_TRANSPORTS:
-               protos = get_transports (self);
+               protos = (ModestPairList *) get_transports (self);
                break;
 /*     case MODEST_COMBO_BOX_TYPE_REMOTE_STORES: */
 /*             // FIXME */
index 6b174d8..ed666fc 100644 (file)
@@ -372,8 +372,8 @@ set_state (ModestHeaderView *self, ModestHeaderViewState state)
                MODEST_HEADER_VIEW_GET_PRIVATE(self)->state;
        
        if (oldstate != state) {
-               if (oldstate & MODEST_HEADER_VIEW_STATE_IS_EMPTY !=
-                   state & MODEST_HEADER_VIEW_STATE_IS_EMPTY)
+               if ((oldstate & MODEST_HEADER_VIEW_STATE_IS_EMPTY) !=
+                   (state & MODEST_HEADER_VIEW_STATE_IS_EMPTY))
                        set_empty (self);
                
                MODEST_HEADER_VIEW_GET_PRIVATE(self)->state = state;