]> code.citadel.org Git - citadel.git/blobdiff - webcit/roomops.c
* Installed the final batch of new icons
[citadel.git] / webcit / roomops.c
index d859aa2bc12d4c1ee654943a365291e64b0efac6..ad23c2c75d57c0487de35321b533b25515444d25 100644 (file)
@@ -256,9 +256,9 @@ void readinfo(void)
 
 
 
-/* Display room graphic.  The server doesn't actually
+/* Display room banner icon.  The server doesn't actually
  * need the room name, but we supply it in order to
- * keep the browser from using a cached graphic from 
+ * keep the browser from using a cached icon from 
  * another room.
  */
 void embed_room_graphic(void) {
@@ -267,13 +267,48 @@ void embed_room_graphic(void) {
        serv_puts("OIMG _roompic_");
        serv_getln(buf, sizeof buf);
        if (buf[0] == '2') {
-               wprintf("<TD BGCOLOR=\"#444455\">");
                wprintf("<IMG HEIGHT=64 SRC=\"/image&name=_roompic_&room=");
                urlescputs(WC->wc_roomname);
-               wprintf("\"></TD>");
+               wprintf("\">");
                serv_puts("CLOS");
                serv_getln(buf, sizeof buf);
        }
+       else if (WC->wc_view == VIEW_ADDRESSBOOK) {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/viewcontacts_48x.gif"
+                       "\">"
+               );
+       }
+       else if (WC->wc_view == VIEW_CALENDAR) {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/calarea_48x.gif"
+                       "\">"
+               );
+       }
+       else if (WC->wc_view == VIEW_TASKS) {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/taskmanag_48x.gif"
+                       "\">"
+               );
+       }
+       else if (WC->wc_view == VIEW_NOTES) {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/storenotes_48x.gif"
+                       "\">"
+               );
+       }
+       else if (WC->wc_view == VIEW_MAILBOX) {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/privatemess_48x.gif"
+                       "\">"
+               );
+       }
+       else {
+               wprintf("<img height=48 width=48 src=\""
+                       "static/chatrooms_48x.gif"
+                       "\">"
+               );
+       }
 
 }
 
@@ -369,13 +404,13 @@ void embed_room_banner(char *got, int navbar_style) {
        if (navbar_style != navbar_none) {
 
                wprintf("<div style=\"position:absolute; bottom:0px; left:0px\">\n"
-                       "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\"><tr>\n");
+                       "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>\n");
 
 
                if (navbar_style == navbar_default) wprintf(
                        "<td>"
                        "<a href=\"/ungoto\">"
-                       "<img align=\"middle\" src=\"/static/back.gif\" border=\"0\">"
+                       "<img align=\"middle\" src=\"/static/ungoto2_24x.gif\" border=\"0\">"
                        "<span class=\"navbar_link\">Ungoto</span></A>"
                        "</td>\n"
                );
@@ -384,7 +419,7 @@ void embed_room_banner(char *got, int navbar_style) {
                        wprintf(
                                "<td>"
                                "<A HREF=\"/readnew\">"
-                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" border=\"0\">"
+                               "<img align=\"middle\" src=\"/static/newmess2_24x.gif\" border=\"0\">"
                                "<span class=\"navbar_link\">Read new messages</span></A>"
                                "</td>\n"
                        );
@@ -396,7 +431,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd\">"
-                                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" "
+                                               "<img align=\"middle\" src=\"/static/viewcontacts_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "View contacts"
@@ -407,7 +442,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd?calview=day\">"
-                                               "<img align=\"middle\" src=\"/static/day_view.gif\" "
+                                               "<img align=\"middle\" src=\"/static/taskday2_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "Day view"
@@ -416,7 +451,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd?calview=month\">"
-                                               "<img align=\"middle\" src=\"/static/month_view.gif\" "
+                                               "<img align=\"middle\" src=\"/static/monthview2_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "Month view"
@@ -427,7 +462,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd\">"
-                                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" "
+                                               "<img align=\"middle\" src=\"/static/taskmanag_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "View tasks"
@@ -438,7 +473,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd\">"
-                                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" "
+                                               "<img align=\"middle\" src=\"/static/viewnotes_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "View notes"
@@ -449,7 +484,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd\">"
-                                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" "
+                                               "<img align=\"middle\" src=\"/static/readallmess3_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "View message list"
@@ -460,7 +495,7 @@ void embed_room_banner(char *got, int navbar_style) {
                                        wprintf(
                                                "<td>"
                                                "<A HREF=\"/readfwd\">"
-                                               "<img align=\"middle\" src=\"/static/readmsgs.gif\" "
+                                               "<img align=\"middle\" src=\"/static/readallmess3_24x.gif\" "
                                                "border=\"0\">"
                                                "<span class=\"navbar_link\">"
                                                "Read all messages"
@@ -471,27 +506,51 @@ void embed_room_banner(char *got, int navbar_style) {
                }
 
                if (navbar_style == navbar_default) {
-                       wprintf(
-                               "<td>"
-                               "<A HREF=\"/display_enter\">"
-                               "<img align=\"middle\" src=\"/static/enter.gif\" border=\"0\">"
-                               "<span class=\"navbar_link\">"
-                       );
                        switch(WC->wc_view) {
                                case VIEW_ADDRESSBOOK:
-                                       wprintf("Add new contact");
+                                       wprintf(
+                                               "<td><A HREF=\"/display_enter\">"
+                                               "<img align=\"middle\" src=\"/static/addnewcontact_24x.gif\" "
+                                               "border=\"0\"><span class=\"navbar_link\">"
+                                               "Add new contact"
+                                               "</span></a></td>\n"
+                                       );
                                        break;
                                case VIEW_CALENDAR:
-                                       wprintf("Add new event");
+                                       wprintf(
+                                               "<td><A HREF=\"/display_enter\">"
+                                               "<img align=\"middle\" src=\"/static/addevent_24x.gif\" "
+                                               "border=\"0\"><span class=\"navbar_link\">"
+                                               "Add new event"
+                                               "</span></a></td>\n"
+                                       );
                                        break;
                                case VIEW_TASKS:
-                                       wprintf("Add new task");
+                                       wprintf(
+                                               "<td><A HREF=\"/display_enter\">"
+                                               "<img align=\"middle\" src=\"/static/newmess3_24x.gif\" "
+                                               "border=\"0\"><span class=\"navbar_link\">"
+                                               "Add new task"
+                                               "</span></a></td>\n"
+                                       );
                                        break;
                                case VIEW_NOTES:
-                                       wprintf("Add new note");
+                                       wprintf(
+                                               "<td><A HREF=\"/display_enter\">"
+                                               "<img align=\"middle\" src=\"/static/enternewnote_24x.gif\" "
+                                               "border=\"0\"><span class=\"navbar_link\">"
+                                               "Add new note"
+                                               "</span></a></td>\n"
+                                       );
                                        break;
                                default:
-                                       wprintf("Enter a message");
+                                       wprintf(
+                                               "<td><A HREF=\"/display_enter\">"
+                                               "<img align=\"middle\" src=\"/static/newmess3_24x.gif\" "
+                                               "border=\"0\"><span class=\"navbar_link\">"
+                                               "Enter a message"
+                                               "</span></a></td>\n"
+                                       );
                                        break;
                        }
                        wprintf("</span></a></td>\n");
@@ -501,8 +560,8 @@ void embed_room_banner(char *got, int navbar_style) {
                        "<td>"
                        "<A HREF=\"/skip\" "
                        "TITLE=\"Leave all messages marked as unread, go to next room with unread messages\">"
-                       "<span class=\"navbar_link\">Skip this room</span>"
-                       "<img align=\"middle\" src=\"/static/forward.gif\" border=\"0\"></A>"
+                       "<img align=\"middle\" src=\"/static/skipthisroom_24x.gif\" border=\"0\">"
+                       "<span class=\"navbar_link\">Skip this room</span></a>"
                        "</td>\n"
                );
 
@@ -510,8 +569,8 @@ void embed_room_banner(char *got, int navbar_style) {
                        "<td>"
                        "<A HREF=\"/gotonext\" "
                        "TITLE=\"Mark all messages as read, go to next room with unread messages\">"
-                       "<span class=\"navbar_link\">Goto next room</span>"
-                       "<img align=\"middle\" src=\"/static/forward.gif\" border=\"0\"></A>"
+                       "<img align=\"middle\" src=\"/static/markngo_24x.gif\" border=\"0\">"
+                       "<span class=\"navbar_link\">Goto next room</span></a>"
                        "</td>\n"
                );
 
@@ -952,7 +1011,7 @@ void display_editroom(void)
                        "onClick=\"return confirm('Are you sure you want to delete this room?');\">\n"
                        "Delete this room</A>\n"
                        "<LI><A HREF=\"/display_editroompic\">\n"
-                       "Set or change the graphic for this room's banner</A>\n"
+                       "Set or change the icon for this room's banner</A>\n"
                        "<LI><A HREF=\"/display_editinfo\">\n"
                        "Edit this room's Info file</A>\n"
                        "</UL>");
@@ -2272,7 +2331,7 @@ void do_folder_view(struct folder *fold, int max_folders, int num_floors) {
                        wprintf("new Array(closedGif, openGif)");
                }
                else if (fold[i].view == VIEW_ADDRESSBOOK) {
-                       wprintf("'static/savecontact_16x.gif'");
+                       wprintf("'static/viewcontacts_16x.gif'");
                }
                else if (fold[i].view == VIEW_CALENDAR) {
                        wprintf("'static/calarea_16x.gif'");
@@ -2529,7 +2588,7 @@ void knrooms() {
        /* Determine whether the user is trying to change views */
        if (bstr("view") != NULL) {
                if (strlen(bstr("view")) > 0) {
-                       set_preference("roomlistview", bstr("view"));
+                       set_preference("roomlistview", bstr("view"), 1);
                }
        }