2006-03-29 [colin] 2.0.0cvs181
[claws.git] / src / folderview.c
index 4ba3e61dce6a7d01e76eed45ce1e49371bb5de49..d000a0051d06db83ae7e52aa1c663c16c3cb98ed 100644 (file)
@@ -923,11 +923,29 @@ void folderview_append_item(FolderItem *item)
 static void folderview_set_folders(FolderView *folderview)
 {
        GList *list;
-
+       static gboolean missing_imap_warning = TRUE;
        list = folder_get_list();
 
-       for (; list != NULL; list = list->next)
+       for (; list != NULL; list = list->next) {
+#ifndef HAVE_LIBETPAN
+               if ((FOLDER(list->data))
+               &&  (FOLDER(list->data))->klass
+               &&  (FOLDER(list->data))->klass->type == F_IMAP
+               &&  missing_imap_warning) {
+                       missing_imap_warning = FALSE;
+                       alertpanel_error(
+                               _("You have one or more IMAP accounts "
+                                 "defined. However this version of "
+                                 "Sylpheed-Claws has been built without "
+                                 "IMAP support; your IMAP account(s) are "
+                                 "disabled.\n\n"
+                                 "You probably need to "
+                                 "install libetpan and recompile "
+                                 "Sylpheed-Claws."));
+               }
+#endif
                folderview_append_folder(folderview, FOLDER(list->data));
+       }
 }
 
 static void folderview_scan_tree_func(Folder *folder, FolderItem *item,