+ /* check if folder_store is an remote account */
+ if (TNY_IS_ACCOUNT (folder_store)) {
+ TnyAccount *local_account = NULL;
+ ModestTnyAccountStore *account_store = NULL;
+
+ account_store = modest_runtime_get_account_store ();
+ local_account = modest_tny_account_store_get_local_folders_account (account_store);
+
+ if ((gpointer) local_account != (gpointer) folder_store)
+ is_remote_account = TRUE;
+ g_object_unref (local_account);
+ }
+
+ /* New button should be dimmed on remote account root folder
+ * and on inbox folder. */
+ if (is_remote_account)
+ new_sensitive = FALSE;
+
+ /* check if folder_store is an rmeote inbox folder */
+ if (TNY_IS_FOLDER (folder_store))
+ if (tny_folder_get_folder_type(TNY_FOLDER(folder_store))
+ == TNY_FOLDER_TYPE_INBOX)
+ new_sensitive = FALSE;
+