libical, expat, and libsieve are now *required*.
[citadel.git] / webcit / webserver.c
index c5f30c2ad7c0e4122e9ffec14b26195cf0d29e0e..c99cff762eb57bcba2cb2f12322c2c78a2100755 100644 (file)
@@ -39,10 +39,12 @@ char socket_dir[PATH_MAX];                  /* where to talk to our citadel server */
 static const char editor_absolut_dir[PATH_MAX]=EDITORDIR;      /* nailed to what configure gives us. */
 static char static_dir[PATH_MAX];              /* calculated on startup */
 static char static_local_dir[PATH_MAX];                /* calculated on startup */
+static char static_icon_dir[PATH_MAX];          /* where should we find our mime icons? */
 char  *static_dirs[]={                         /* needs same sort order as the web mapping */
        (char*)static_dir,                      /* our templates on disk */
        (char*)static_local_dir,                /* user provided templates disk */
-       (char*)editor_absolut_dir               /* the editor on disk */
+       (char*)editor_absolut_dir,              /* the editor on disk */
+       (char*)static_icon_dir                  /* our icons... */
 };
 
 /*
@@ -800,7 +802,9 @@ int main(int argc, char **argv)
        /* initialize the International Bright Young Thing */
 #ifdef ENABLE_NLS
        initialize_locales();
+
        locale = setlocale(LC_ALL, "");
+
        mo = malloc(strlen(webcitdir) + 20);
        lprintf(9, "Message catalog directory: %s\n", bindtextdomain("webcit", LOCALEDIR"/locale"));
        free(mo);
@@ -826,6 +830,8 @@ int main(int argc, char **argv)
        COMPUTE_DIRECTORY(socket_dir);
        basedir=WWWDIR "/static";
        COMPUTE_DIRECTORY(static_dir);
+       basedir=WWWDIR "/static/icons";
+       COMPUTE_DIRECTORY(static_icon_dir);
        basedir=WWWDIR "/static.local";
        COMPUTE_DIRECTORY(static_local_dir);
 
@@ -846,7 +852,8 @@ int main(int argc, char **argv)
        lprintf(9, "Changing directory to %s\n", socket_dir);
        if (chdir(webcitdir) != 0) {
                perror("chdir");
-       }       
+       }
+       LoadIconDir(static_icon_dir);
        initialize_viewdefs();
        initialize_axdefs();
 
@@ -987,12 +994,10 @@ void worker_entry(void)
                                sleeeeeeeeeep(1); // wait so some others might finish...
                                lprintf(2, "master shutdown: cleaning up sessions\n");
                                do_housekeeping();
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
                                lprintf(2, "master shutdown: cleaning up libical\n");
                                free_zone_directory ();
                                icaltimezone_release_zone_tab ();
                                icalmemory_free_ring ();
-#endif
                                lprintf(2, "master shutdown exiting!.\n");                              
                                exit(0);
                        }