+modest_folder_view_dispose (GObject *obj)
+{
+ static gboolean disposed = FALSE;
+ ModestFolderViewPrivate *priv;
+
+ if (disposed)
+ return;
+
+ priv = MODEST_FOLDER_VIEW_GET_PRIVATE (obj);
+
+#ifdef MODEST_TOOLKIT_HILDON2
+ modest_signal_mgr_disconnect_all_and_destroy (priv->signal_handlers);
+#endif
+
+ /* Free external references */
+ if (priv->account_store) {
+ g_signal_handler_disconnect (G_OBJECT(priv->account_store),
+ priv->account_inserted_signal);
+ g_signal_handler_disconnect (G_OBJECT(priv->account_store),
+ priv->account_removed_signal);
+ g_signal_handler_disconnect (G_OBJECT(priv->account_store),
+ priv->account_changed_signal);
+ g_object_unref (G_OBJECT(priv->account_store));
+ priv->account_store = NULL;
+ }
+
+ if (priv->query) {
+ g_object_unref (G_OBJECT (priv->query));
+ priv->query = NULL;
+ }
+
+ if (priv->folder_to_select) {
+ g_object_unref (G_OBJECT(priv->folder_to_select));
+ priv->folder_to_select = NULL;
+ }
+
+ if (priv->cur_folder_store) {
+ g_object_unref (priv->cur_folder_store);
+ priv->cur_folder_store = NULL;
+ }
+
+ if (priv->list_to_move) {
+ g_object_unref (priv->list_to_move);
+ priv->list_to_move = NULL;
+ }
+}
+
+static void