X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=ca0e50ed71ef85b14bdf9ab21ab92b592a3fe1bd;hb=bc17ed696720ce8a4726f6aaa70171f061319763;hp=f61670f4c89d169b4ffe4310f0a32ca39e89dc79;hpb=b41f479fe8b96cabe0897ab02e85f2a1a8b18002;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index f61670f4c..ca0e50ed7 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -4,25 +4,6 @@ * Lots of different room-related operations. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "webcit.h" struct folder { @@ -115,7 +96,7 @@ void room_tree_list(struct roomlisting *rp) strcpy(rmname, rp->rlname); f = rp->rlflags; - wprintf(""); @@ -225,15 +206,15 @@ void listrms(char *variety) */ void zapped_list(void) { - output_headers(1, 1, 0, 0, 0, 0, 0); + output_headers(1, 1, 0, 0, 0, 0); - svprintf("BOXTITLE", WCS_STRING, "Zapped (forgotten) rooms"); + svprintf("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms")); do_template("beginbox"); listrms("LZRM -1"); wprintf("

\n"); - wprintf("Click on any room to un-zap it and goto that room.\n"); + wprintf(_("Click on any room to un-zap it and goto that room.\n")); do_template("endbox"); wDumpContent(1); } @@ -249,7 +230,7 @@ void readinfo(void) serv_puts("RINF"); serv_getln(buf, sizeof buf); if (buf[0] == '1') { - fmout(NULL, "CENTER"); + fmout("CENTER"); } } @@ -267,7 +248,7 @@ void embed_room_graphic(void) { serv_puts("OIMG _roompic_"); serv_getln(buf, sizeof buf); if (buf[0] == '2') { - wprintf("wc_roomname); wprintf("\">"); serv_puts("CLOS"); @@ -275,7 +256,7 @@ void embed_room_graphic(void) { } else if (WC->wc_view == VIEW_ADDRESSBOOK) { wprintf("" ); } @@ -313,21 +294,6 @@ void embed_room_graphic(void) { } -/* Let the user know if new mail has arrived - */ -void embed_newmail_button(void) { - if ( (WC->new_mail > WC->remember_new_mail) && (WC->new_mail>0) ) { - wprintf( - "
" - "" - "
" - "%d new mail
", WC->new_mail); - WC->remember_new_mail = WC->new_mail; - } -} - - /* * Display the current view and offer an option to change it @@ -335,7 +301,7 @@ void embed_newmail_button(void) { void embed_view_o_matic(void) { int i; - wprintf("
\n" + wprintf("\n" "View as: " "\n", er_name); + wprintf("
  • "); + wprintf(_("Name of room: ")); + wprintf("\n", + er_name, + (sizeof(er_name)-1) + ); - wprintf("
  • Resides on floor: "); + wprintf("
  • "); + wprintf(_("Resides on floor: ")); wprintf("\n"); - wprintf("
  • Type of room:
      \n"); + wprintf("
    • "); + wprintf(_("Type of room:")); + wprintf("
        \n"); wprintf("
      • Public room\n"); + wprintf("> "); + wprintf(_("Public room")); + wprintf("\n"); wprintf("
      • Private - guess name\n"); + wprintf("> "); + wprintf(_("Private - guess name")); - wprintf("
      • Private - require password:\n"); - wprintf("\n", er_password); + wprintf("> "); + wprintf(_("Private - require password:")); + wprintf("\n\n", + er_password); wprintf("
      • Private - invitation only\n"); + wprintf("> "); + wprintf(_("Private - invitation only")); - wprintf("
      • If private, cause current users to forget room\n"); + wprintf("\n
      • "); + wprintf(_("If private, cause current users to forget room")); - wprintf("
      \n"); + wprintf("\n
    \n"); wprintf("
  • Preferred users only\n"); + wprintf("> "); + wprintf(_("Preferred users only")); - wprintf("
  • Read-only room\n"); + wprintf("> "); + wprintf(_("Read-only room")); /* directory stuff */ - wprintf("
  • File directory room\n"); + wprintf("> "); + wprintf(_("File directory room")); - wprintf("
    • Directory name: "); - wprintf("\n", er_dirname); + wprintf("\n
      • "); + wprintf(_("Directory name: ")); + wprintf("\n", + er_dirname); wprintf("
      • Uploading allowed\n"); + wprintf("> "); + wprintf(_("Uploading allowed")); - wprintf("
      • Downloading allowed\n"); + wprintf("> "); + wprintf(_("Downloading allowed")); - wprintf("
      • Visible directory
      \n"); + wprintf("> "); + wprintf(_("Visible directory")); + wprintf("
    \n"); /* end of directory stuff */ wprintf("
  • Network shared room\n"); + wprintf("> "); + wprintf(_("Network shared room")); - wprintf("
  • Permanent (does not auto-purge)\n"); + wprintf("> "); + wprintf(_("Permanent (does not auto-purge)")); /* start of anon options */ - wprintf("
  • Anonymous messages
      \n"); + wprintf("\n
    • "); + wprintf(_("Anonymous messages")); + wprintf("
        \n"); wprintf("
      • No anonymous messages\n"); + wprintf("> "); + wprintf(_("No anonymous messages")); - wprintf("
      • All messages are anonymous\n"); + wprintf("> "); + wprintf(_("All messages are anonymous")); - wprintf("
      • Prompt user when entering messages
      \n"); + wprintf("> "); + wprintf(_("Prompt user when entering messages")); + wprintf("
    \n"); /* end of anon options */ - wprintf("
  • Room aide: \n"); + wprintf("
  • "); + wprintf(_("Room aide: ")); serv_puts("GETA"); serv_getln(buf, sizeof buf); if (buf[0] != '2') { @@ -1148,10 +1161,12 @@ void display_editroom(void) wprintf("
\n"); wprintf("\n" - "" + "" " " - "" - "
\n" + "" + "\n", + _("Save changes"), + _("Cancel") ); } @@ -1205,16 +1220,21 @@ void display_editroom(void) /* Display the stuff */ wprintf("

" "" - "" - "\n" + "" + "\n" "" "
Shared withNot shared with
"); + wprintf(_("Shared with")); + wprintf(""); + wprintf(_("Not shared with")); + wprintf("
\n"); - wprintf("" - "" - "" - "" - "\n" - ); + wprintf("
Remote node nameRemote room nameActions
\n"); for (i=0; i 0) { wprintf("" + "action=\"netedit\">" "\n", node); wprintf("\n"); } } wprintf("
"); + wprintf(_("Remote node name")); + wprintf(""); + wprintf(_("Remote room name")); + wprintf(""); + wprintf(_("Actions")); + wprintf("
%s"); @@ -1246,25 +1266,26 @@ void display_editroom(void) wprintf("\n"); wprintf(""); + "NAME=\"unshare_button\" VALUE=\"%s\">", _("Unshare")); wprintf("
\n"); wprintf("
\n"); - wprintf("" - "" - "" - "" - "\n" - ); + wprintf("
Remote node nameRemote room nameActions
\n"); for (i=0; i 0) { wprintf("
" + "action=\"netedit\">" "
\n"); } } @@ -1290,17 +1311,18 @@ void display_editroom(void) wprintf("
"); + wprintf(_("Remote node name")); + wprintf(""); + wprintf(_("Remote room name")); + wprintf(""); + wprintf(_("Actions")); + wprintf("
"); escputs(node); wprintf("" @@ -1282,7 +1303,7 @@ void display_editroom(void) wprintf("\n"); wprintf(""); + "NAME=\"add_button\" VALUE=\"%s\">", _("Share")); wprintf("
\n"); wprintf("

\n" - "Notes:
  • When sharing a room, " + "%s
    • ", _("Notes:")); + wprintf(_("When sharing a room, " "it must be shared from both ends. Adding a node to " "the 'shared' list sends messages out, but in order to" " receive messages, the other nodes must be configured" - " to send messages out to your system as well.\n" + " to send messages out to your system as well. " "
    • If the remote room name is blank, it is assumed " "that the room name is identical on the remote node." "
    • If the remote room name is different, the remote " "node must also configure the name of the room here." "

    \n" - ); + )); } @@ -1311,10 +1333,10 @@ void display_editroom(void) "" "
    "); - wprintf("The contents of this room are being " + wprintf(_("The contents of this room are being " "mailed as individual messages " "to the following list recipients:" - "

    \n"); + "


    \n")); serv_puts("GNET"); serv_getln(buf, sizeof buf); @@ -1324,26 +1346,27 @@ void display_editroom(void) extract_token(recp, buf, 1, '|', sizeof recp); escputs(recp); - wprintf(" (remove)
    "); - + wprintf("&tab=listserv\">"); + wprintf(_("(remove)")); + wprintf("
    "); } } - wprintf("
    \n" + wprintf("
    \n" "\n" "\n"); wprintf("\n"); - wprintf(""); + wprintf("", _("Add")); wprintf("
    \n"); wprintf("
    \n"); - wprintf("The contents of this room are being " + wprintf(_("The contents of this room are being " "mailed in digest form " "to the following list recipients:" - "

    \n"); + "


    \n")); serv_puts("GNET"); serv_getln(buf, sizeof buf); @@ -1353,40 +1376,41 @@ void display_editroom(void) extract_token(recp, buf, 1, '|', sizeof recp); escputs(recp); - wprintf(" (remove)
    "); - + wprintf("&tab=listserv\">"); + wprintf(_("(remove)")); + wprintf("
    "); } } - wprintf("
    \n" + wprintf("
    \n" "\n" "\n"); wprintf("\n"); - wprintf(""); + wprintf("", _("Add")); wprintf("
    \n"); wprintf("

    \n"); if (self_service(999) == 1) { - wprintf("This room is configured to allow " - "self-service subscribe/unsubscribe requests." - " " - "Click to disable.
    \n" - "The URL for subscribe/unsubscribe is: " - "http://%s/listsub
    \n", - WC->http_host - ); + wprintf(_("This room is configured to allow " + "self-service subscribe/unsubscribe requests.")); + wprintf(""); + wprintf(_("Click to disable.")); + wprintf("
    \n"); + wprintf(_("The URL for subscribe/unsubscribe is: ")); + wprintf("%s://%s/listsub
    \n", + (is_https ? "https" : "http"), + WC->http_host); } else { - wprintf("This room is not configured to allow " - "self-service subscribe/unsubscribe requests." - " " - "Click to enable.
    \n" - ); + wprintf(_("This room is not configured to allow " + "self-service subscribe/unsubscribe requests.")); + wprintf(" "); + wprintf(_("Click to enable.")); + wprintf("
    \n"); } @@ -1411,54 +1435,65 @@ void display_editroom(void) floorvalue = extract_int(&buf[4], 1); } - wprintf("
    \n"); + wprintf("
    \n"); wprintf("\n"); - wprintf("\n"); if (WC->axlevel >= 6) { wprintf("\n"); - wprintf("\n"); wprintf("
    Message expire policy for this room
    ("); + wprintf("
    "); + wprintf(_("Message expire policy for this room")); + wprintf("
    ("); escputs(WC->wc_roomname); wprintf(")
    "); wprintf("", ((roompolicy == 0) ? "CHECKED" : "") ); - wprintf("Use the default policy for this floor
    \n"); + wprintf(_("Use the default policy for this floor")); + wprintf("
    \n"); wprintf("", ((roompolicy == 1) ? "CHECKED" : "") ); - wprintf("Never automatically expire messages
    \n"); + wprintf(_("Never automatically expire messages")); + wprintf("
    \n"); wprintf("", ((roompolicy == 2) ? "CHECKED" : "") ); wprintf("Expire by message count
    \n"); wprintf("", ((roompolicy == 3) ? "CHECKED" : "") ); - wprintf("Expire by message age
    "); - wprintf("Number of messages or days: "); + wprintf(_("Expire by message age")); + wprintf("
    "); + wprintf(_("Number of messages or days: ")); wprintf("", roomvalue); wprintf("

    Message expire policy for this floor
    ("); + wprintf("
    "); + wprintf(_("Message expire policy for this floor")); + wprintf("
    ("); escputs(floorlist[WC->wc_floor]); wprintf(")
    "); wprintf("", ((floorpolicy == 0) ? "CHECKED" : "") ); - wprintf("Use the system default
    \n"); + wprintf(_("Use the system default")); + wprintf("
    \n"); wprintf("", ((floorpolicy == 1) ? "CHECKED" : "") ); - wprintf("Never automatically expire messages
    \n"); + wprintf(_("Never automatically expire messages")); + wprintf("
    \n"); wprintf("", ((floorpolicy == 2) ? "CHECKED" : "") ); - wprintf("Expire by message count
    \n"); + wprintf(_("Expire by message count")); + wprintf("
    \n"); wprintf("", ((floorpolicy == 3) ? "CHECKED" : "") ); - wprintf("Expire by message age
    "); - wprintf("Number of messages or days: "); + wprintf(_("Expire by message age")); + wprintf("
    "); + wprintf(_("Number of messages or days: ")); wprintf("", floorvalue); } wprintf("
    \n"); wprintf("

    \n"); - wprintf(""); + wprintf("", _("Save changes")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
    \n" @@ -1499,7 +1534,7 @@ void toggle_self_service(void) { void editroom(void) { char buf[SIZ]; - char er_name[20]; + char er_name[128]; char er_password[10]; char er_dirname[15]; char er_roomaide[26]; @@ -1508,9 +1543,9 @@ void editroom(void) int bump; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. Changes were not saved."); + _("Cancelled. Changes were not saved.")); display_editroom(); return; } @@ -1538,9 +1573,10 @@ void editroom(void) } } strcpy(buf, bstr("er_name")); - buf[20] = 0; - if (strlen(buf) > 0) + buf[128] = 0; + if (strlen(buf) > 0) { strcpy(er_name, buf); + } strcpy(buf, bstr("er_password")); buf[10] = 0; @@ -1648,7 +1684,7 @@ void editroom(void) } } gotoroom(er_name); - strcpy(WC->ImportantMessage, "Your changes have been saved."); + strcpy(WC->ImportantMessage, _("Your changes have been saved.")); display_editroom(); return; } @@ -1671,7 +1707,7 @@ void do_invt_kick(void) { strcpy(username, bstr("username")); - if (!strcmp(bstr("sc"), "Kick")) { + if (strlen(bstr("kick_button")) > 0) { sprintf(buf, "KICK %s", username); serv_puts(buf); serv_getln(buf, sizeof buf); @@ -1680,12 +1716,12 @@ void do_invt_kick(void) { strcpy(WC->ImportantMessage, &buf[4]); } else { sprintf(WC->ImportantMessage, - "User %s kicked out of room %s.\n", + _("User %s kicked out of room %s.\n"), username, room); } } - if (!strcmp(bstr("sc"), "Invite")) { + if (strlen(bstr("invite_button")) > 0) { sprintf(buf, "INVT %s", username); serv_puts(buf); serv_getln(buf, sizeof buf); @@ -1694,7 +1730,7 @@ void do_invt_kick(void) { strcpy(WC->ImportantMessage, &buf[4]); } else { sprintf(WC->ImportantMessage, - "User %s invited to room %s.\n", + _("User %s invited to room %s.\n"), username, room); } } @@ -1721,12 +1757,13 @@ void display_whok(void) extract_token(room, &buf[4], 0, '|', sizeof room); - wprintf("" - "
    The users listed below have access to this room. " + wprintf("
    "); + wprintf(_("The users listed below have access to this room. " "To remove a user from the access list, select the user " - "name from the list and click 'Kick'.

    "); + "name from the list and click 'Kick'.")); + wprintf("

    "); - wprintf("
    \n"); + wprintf("
    \n"); wprintf("\n"); wprintf("
    \n"); - wprintf(""); + wprintf("", _("Kick")); wprintf("
    \n"); - wprintf("
    " - "To grant another user access to this room, enter the " - "user name in the box below and click 'Invite'.

    "); + wprintf("
    "); + wprintf(_("To grant another user access to this room, enter the " + "user name in the box below and click 'Invite'.")); + wprintf("

    "); - wprintf("
    \n"); + wprintf("
    \n"); wprintf("\n"); wprintf("Invite: "); wprintf("
    \n" - "" - "" - "
    \n"); + "" + "" + "
    \n", _("Invite")); wprintf("
    \n"); wDumpContent(1); @@ -1779,10 +1817,12 @@ void display_entroom(void) return; } - output_headers(1, 1, 2, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0); wprintf("
    \n" "
    " - "Create a new room" + ""); + wprintf(_("Create a new room")); + wprintf("" "
    \n" "
    \n
    \n" ); @@ -1790,12 +1830,14 @@ void display_entroom(void) wprintf("
    " "
    \n"); - wprintf("
    \n"); + wprintf("\n"); - wprintf("
    • Name of room: "); + wprintf("
      • "); + wprintf(_("Name of room: ")); wprintf("\n"); - wprintf("
      • Resides on floor: "); + wprintf("
      • "); + wprintf(_("Resides on floor: ")); load_floorlist(); wprintf("\n"); - wprintf("
      • Type of room:
          \n"); + wprintf("
        • "); + wprintf(_("Type of room:")); + wprintf("
            \n"); wprintf("
          • Public (automatically appears to everyone)\n"); + "\"> "); + wprintf(_("Public (automatically appears to everyone)")); - wprintf("
          • Private - hidden (accessible to anyone who knows its name)\n"); + "\"> "); + wprintf(_("Private - hidden (accessible to anyone who knows its name)")); - wprintf("
          • Private - require password:\n"); + "\"> "); + wprintf(_("Private - require password: ")); wprintf("\n"); wprintf("
          • Private - invitation only\n"); + "\"> "); + wprintf(_("Private - invitation only")); - wprintf("
          • Personal (mailbox for you only)\n"); + "\"> "); + wprintf(_("Personal (mailbox for you only)")); - wprintf("
          \n"); + wprintf("\n
        \n"); wprintf("
        \n"); - wprintf(""); + wprintf("", _("Create new room")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
        \n"); wprintf("
      • \n
        "); serv_printf("MESG roomaccess"); serv_getln(buf, sizeof buf); if (buf[0] == '1') { - fmout(NULL, "CENTER"); + fmout("CENTER"); } wprintf("
    \n"); wDumpContent(1); @@ -1935,9 +1985,9 @@ void entroom(void) int er_num_type; int er_view; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. No new room was created."); + _("Cancelled. No new room was created.")); display_main_menu(); return; } @@ -1976,10 +2026,12 @@ void entroom(void) */ void display_private(char *rname, int req_pass) { - output_headers(1, 1, 2, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0); wprintf("
    \n" "
    " - "Go to a hidden room" + ""); + wprintf(_("Go to a hidden room")); + wprintf("" "
    \n" "
    \n
    \n" ); @@ -1988,32 +2040,38 @@ void display_private(char *rname, int req_pass) "
    \n"); wprintf("
    \n"); - wprintf("
    If you know the name of a hidden (guess-name) or\n"); - wprintf("passworded room, you can enter that room by typing\n"); - wprintf("its name below. Once you gain access to a private\n"); - wprintf("room, it will appear in your regular room listings\n"); - wprintf("so you don't have to keep returning here.\n"); - wprintf("

    "); + wprintf("
    "); + wprintf(_("If you know the name of a hidden (guess-name) or " + "passworded room, you can enter that room by typing " + "its name below. Once you gain access to a private " + "room, it will appear in your regular room listings " + "so you don't have to keep returning here.")); + wprintf("\n

    "); - wprintf("
    \n"); + wprintf("\n"); wprintf("\n" - "
    " - "Enter room name:" + "
    "); + wprintf(_("Enter room name:")); + wprintf("" "\n", rname); + "VALUE=\"%s\" MAXLENGTH=\"128\">\n", rname); if (req_pass) { wprintf("
    "); - wprintf("Enter room password:"); + wprintf(_("Enter room password:")); + wprintf(""); wprintf("\n"); } wprintf("

    \n"); - wprintf("" + wprintf("" " " - ""); + "", + _("Go there"), + _("Cancel") + ); wprintf("
    \n"); wprintf("
    \n"); wDumpContent(1); @@ -2027,7 +2085,7 @@ void goto_private(void) char hold_rm[SIZ]; char buf[SIZ]; - if (strcasecmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { display_main_menu(); return; } @@ -2047,7 +2105,7 @@ void goto_private(void) display_private(bstr("gr_name"), 1); return; } - output_headers(1, 1, 1, 0, 0, 0, 0); + output_headers(1, 1, 1, 0, 0, 0); wprintf("%s\n", &buf[4]); wDumpContent(1); return; @@ -2059,22 +2117,24 @@ void goto_private(void) */ void display_zap(void) { - output_headers(1, 1, 2, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0); wprintf("
    \n"); wprintf("
    "); - wprintf("Zap (forget/unsubscribe) the current room\n"); + wprintf(""); + wprintf(_("Zap (forget/unsubscribe) the current room")); + wprintf("\n"); wprintf("
    \n"); wprintf("
    \n
    \n"); - wprintf("If you select this option, %s will ", WC->wc_roomname); - wprintf("disappear from your room list. Is this what you wish "); - wprintf("to do?
    \n"); + wprintf(_("If you select this option, %s will " + "disappear from your room list. Is this what you wish " + "to do?
    \n"), WC->wc_roomname); - wprintf("
    \n"); - wprintf(""); + wprintf("\n"); + wprintf("", _("Zap this room")); wprintf(" "); - wprintf(""); + wprintf("", _("Cancel")); wprintf("
    \n"); wDumpContent(1); } @@ -2093,7 +2153,7 @@ void zap(void) */ strcpy(final_destination, WC->wc_roomname); - if (!strcasecmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) > 0) { serv_printf("GOTO %s", WC->wc_roomname); serv_getln(buf, sizeof buf); if (buf[0] == '2') { @@ -2190,7 +2250,7 @@ void netedit(void) { serv_puts(buf); } - if (!strcasecmp(bstr("cmd"), "add")) { + if (strlen(bstr("add_button")) > 0) { serv_puts(line); } @@ -2308,7 +2368,7 @@ void do_folder_view(struct folder *fold, int max_folders, int num_floors) { wprintf("var node%d = new TreeNode(%d, '", i, i); if (fold[i].selectable) { - wprintf(""); } @@ -2331,7 +2391,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'"); @@ -2373,8 +2433,10 @@ void do_folder_view(struct folder *fold, int max_folders, int num_floors) { * Boxes and rooms and lists ... oh my! */ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) { - char buf[SIZ]; - char boxtitle[SIZ]; + char buf[256]; + char floor_name[256]; + char old_floor_name[256]; + char boxtitle[256]; int levels, oldlevels; int i, t; int num_boxes = 0; @@ -2383,6 +2445,9 @@ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) { int current_column = 0; int nf; + strcpy(floor_name, ""); + strcpy(old_floor_name, ""); + nf = num_floors; while (nf % columns != 0) ++nf; boxes_per_column = (nf / columns); @@ -2397,9 +2462,11 @@ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) { for (i=0; i 1)) { - + if ( (strcasecmp(floor_name, old_floor_name)) + && (strlen(old_floor_name) > 0) ) { /* End inner box */ do_template("endbox"); @@ -2411,15 +2478,13 @@ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) { } } } + strcpy(old_floor_name, floor_name); if (levels == 1) { - /* Begin inner box */ - extract_token(buf, fold[i].name, levels-1, '|', sizeof buf); - stresc(boxtitle, buf, 1, 0); + stresc(boxtitle, floor_name, 1, 0); svprintf("BOXTITLE", WCS_STRING, boxtitle); do_template("beginbox"); - } oldlevels = levels; @@ -2428,7 +2493,7 @@ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) { wprintf(" "); if (levels>2) for (t=0; t<(levels-2); ++t) wprintf("   "); if (fold[i].selectable) { - wprintf(""); } @@ -2582,13 +2647,13 @@ void list_all_rooms_by_floor(char *viewpref) { void knrooms() { char listviewpref[SIZ]; - output_headers(1, 1, 2, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0); load_floorlist(); /* 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); } } @@ -2652,9 +2717,9 @@ void knrooms() { void set_room_policy(void) { char buf[SIZ]; - if (strcmp(bstr("sc"), "OK")) { + if (strlen(bstr("ok_button")) == 0) { strcpy(WC->ImportantMessage, - "Cancelled. Changes were not saved."); + _("Cancelled. Changes were not saved.")); display_editroom(); return; }