]> code.citadel.org Git - citadel.git/commitdiff
* Added icons to the new room list
authorArt Cancro <ajc@citadel.org>
Thu, 1 Dec 2005 19:35:39 +0000 (19:35 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 1 Dec 2005 19:35:39 +0000 (19:35 +0000)
webcit/ChangeLog
webcit/roomops.c

index be3a1929deff47c4d5af3bdf76ba96da43b30428..68dbaa23e17dbce73a031200434569dbad9bb36f 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Thu Dec  1 14:35:09 EST 2005 ajc
+* Added icons to the new room list
+
 Thu Dec  1 00:42:01 EST 2005 ajc
 * The iconbar roomlist, when selected, is now persistent across page loads
   and even between sessions.  We also cache the list for up to 5 minutes so
index 0ac9ee1344e064b33fb3c0ffc41fa5de83c8b10f..9492ece75a1ac371a2101dec9b8df72d4650a360 100644 (file)
@@ -2532,6 +2532,7 @@ void do_iconbar_view(struct folder *fold, int max_folders, int num_floors) {
        int levels, oldlevels;
        int i, t;
        int num_drop_targets = 0;
+       char *icon = NULL;
 
        strcpy(floor_name, "");
        strcpy(old_floor_name, "");
@@ -2566,11 +2567,33 @@ void do_iconbar_view(struct folder *fold, int max_folders, int num_floors) {
                if (levels > 1) {
                        wprintf("<div id=\"roomdiv%d\">", i);
                        wprintf("&nbsp;");
-                       if (levels>2) for (t=0; t<(levels-2); ++t) wprintf("&nbsp;&nbsp;&nbsp;");
+                       if (levels>2) for (t=0; t<(levels-2); ++t) wprintf("&nbsp;");
+
+                       /* choose the icon */
+                       if (fold[i].view == VIEW_ADDRESSBOOK) {
+                               icon = "viewcontacts_16x.gif" ;
+                       }
+                       else if (fold[i].view == VIEW_CALENDAR) {
+                               icon = "calarea_16x.gif" ;
+                       }
+                       else if (fold[i].view == VIEW_TASKS) {
+                               icon = "taskmanag_16x.gif" ;
+                       }
+                       else if (fold[i].view == VIEW_NOTES) {
+                               icon = "storenotes_16x.gif" ;
+                       }
+                       else if (fold[i].view == VIEW_MAILBOX) {
+                               icon = "privatemess_16x.gif" ;
+                       }
+                       else {
+                               icon = "chatrooms_16x.gif" ;
+                       }
+
                        if (fold[i].selectable) {
                                wprintf("<a href=\"dotgoto?room=");
                                urlescputs(fold[i].room);
                                wprintf("\">");
+                               wprintf("<img align=\"middle\" border=0 src=\"static/%s\" alt=\"\"> ", icon);
                        }
                        else {
                                wprintf("<i>");