aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupvoting.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/newview/llpanelgroupvoting.cpp
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/newview/llpanelgroupvoting.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupvoting.cpp225
1 files changed, 142 insertions, 83 deletions
diff --git a/linden/indra/newview/llpanelgroupvoting.cpp b/linden/indra/newview/llpanelgroupvoting.cpp
index ebe99b1..eca188e 100644
--- a/linden/indra/newview/llpanelgroupvoting.cpp
+++ b/linden/indra/newview/llpanelgroupvoting.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2003-2007, Linden Research, Inc. 5 * Copyright (c) 2003-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -76,16 +77,14 @@ public:
76 void setEnableHistoryList(); 77 void setEnableHistoryList();
77 78
78 void updateQuorumText(); 79 void updateQuorumText();
79 void addPendingActiveScrollListItem(LLFontGL* font, 80 void addPendingActiveScrollListItem(unsigned int current,
80 unsigned int current,
81 unsigned int expected, 81 unsigned int expected,
82 EAddPosition pos); 82 EAddPosition pos);
83 void addPendingHistoryScrollListItem(LLFontGL* font, 83 void addPendingHistoryScrollListItem(unsigned int current,
84 unsigned int current,
85 unsigned int expected, 84 unsigned int expected,
86 EAddPosition pos); 85 EAddPosition pos);
87 void addNoActiveScrollListItem(LLFontGL* font, EAddPosition pos); 86 void addNoActiveScrollListItem(EAddPosition pos);
88 void addNoHistoryScrollListItem(LLFontGL* font, EAddPosition pos); 87 void addNoHistoryScrollListItem(EAddPosition pos);
89 88
90 89
91 static void processGroupActiveProposalItemReply(LLMessageSystem* msg, 90 static void processGroupActiveProposalItemReply(LLMessageSystem* msg,
@@ -139,8 +138,8 @@ public:
139 138
140 int mNumGroupMembers; 139 int mNumGroupMembers;
141 140
142 std::vector<LLScrollListItem*> mActiveReceived; 141 std::vector<LLSD> mActiveReceived;
143 std::vector<LLScrollListItem*> mHistoryReceived; 142 std::vector<LLSD> mHistoryReceived;
144 143
145 int mProposalColumnWidths[10]; 144 int mProposalColumnWidths[10];
146 int mHistoryColumnWidths[10]; 145 int mHistoryColumnWidths[10];
@@ -331,7 +330,7 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal()
331 if (already_voted == "Yes") 330 if (already_voted == "Yes")
332 { 331 {
333 char message[MAX_STRING]; /*Flawfinder: ignore*/ 332 char message[MAX_STRING]; /*Flawfinder: ignore*/
334 snprintf(message, MAX_STRING, "You have voted: %s ", vote_cast.c_str()); /*Flawfinder: ignore*/ 333 snprintf(message, MAX_STRING, "You have voted: %s ", vote_cast.c_str()); /* Flawfinder: ignore */
335 mInstructions->setText(message); 334 mInstructions->setText(message);
336 335
337 mBtnYes->setEnabled(FALSE); 336 mBtnYes->setEnabled(FALSE);
@@ -523,8 +522,7 @@ void LLPanelGroupVoting::impl::sendGroupProposalsRequest(const LLUUID& group_id)
523 522
524 //fill in some text so the user will at least know that 523 //fill in some text so the user will at least know that
525 //we're pining the server in high latency situations 524 //we're pining the server in high latency situations
526 LLFontGL* font = LLFontGL::sSansSerifSmall; 525 addPendingActiveScrollListItem(0, 0, ADD_BOTTOM);
527 addPendingActiveScrollListItem(font, 0, 0, ADD_BOTTOM);
528 mProposals->setCanSelect(FALSE); 526 mProposals->setCanSelect(FALSE);
529 527
530 LLMessageSystem *msg = gMessageSystem; 528 LLMessageSystem *msg = gMessageSystem;
@@ -620,8 +618,7 @@ void LLPanelGroupVoting::impl::sendGroupVoteHistoryRequest(const LLUUID& group_i
620 mHistoryReceived.clear(); 618 mHistoryReceived.clear();
621 619
622 //add some text so the user knows we're doing something 620 //add some text so the user knows we're doing something
623 LLFontGL* font = LLFontGL::sSansSerifSmall; 621 addPendingHistoryScrollListItem(0, 0, ADD_BOTTOM);
624 addPendingHistoryScrollListItem(font, 0, 0, ADD_BOTTOM);
625 mVotesHistory->setCanSelect(FALSE); 622 mVotesHistory->setCanSelect(FALSE);
626 623
627 LLMessageSystem *msg = gMessageSystem; 624 LLMessageSystem *msg = gMessageSystem;
@@ -642,65 +639,58 @@ void LLPanelGroupVoting::impl::updateQuorumText()
642 { 639 {
643 //update the quorum count 640 //update the quorum count
644 char quorum_text[MAX_STRING]; /*Flawfinder: ignore*/ 641 char quorum_text[MAX_STRING]; /*Flawfinder: ignore*/
645 snprintf(quorum_text, MAX_STRING, /*Flawfinder: ignore*/ 642 snprintf(quorum_text, MAX_STRING, /* Flawfinder: ignore */
646 " out of %d members must vote", 643 " out of %d members must vote",
647 mNumGroupMembers); 644 mNumGroupMembers);
648 mQuorumText->setText(quorum_text); 645 mQuorumText->setText(quorum_text);
649 } 646 }
650} 647}
651 648
652void LLPanelGroupVoting::impl::addPendingActiveScrollListItem(LLFontGL* font, 649void LLPanelGroupVoting::impl::addPendingActiveScrollListItem(unsigned int current,
653 unsigned int current,
654 unsigned int expected, 650 unsigned int expected,
655 EAddPosition pos) 651 EAddPosition pos)
656{ 652{
657 LLScrollListItem* row = new LLScrollListItem( TRUE, NULL, LLUUID::null);
658 if (!row) return;
659
660 std::stringstream pending; 653 std::stringstream pending;
661 pending << "Retrieving active proposals (" 654 pending << "Retrieving active proposals ("
662 << current 655 << current
663 << "\\" << expected << ")"; 656 << "\\" << expected << ")";
664 row->addColumn(pending.str(), font);
665 657
666 mProposals->addItem(row, pos); 658 LLSD row;
659 row["columns"][0]["value"] = pending.str();
660 row["columns"][0]["font"] = "SANSSERIF_SMALL";
661 mProposals->addElement(row, pos);
667} 662}
668 663
669void LLPanelGroupVoting::impl::addNoActiveScrollListItem(LLFontGL* font, 664void LLPanelGroupVoting::impl::addNoActiveScrollListItem(EAddPosition pos)
670 EAddPosition pos)
671{ 665{
672 LLScrollListItem* row = new LLScrollListItem( TRUE, NULL, LLUUID::null); 666 LLSD row;
673 if (!row) return; 667 row["columns"][0]["value"] = "There are currently no active proposals";
674 668 row["columns"][0]["font"] = "SANSSERIF_SMALL";
675 row->addColumn("There are currently no active proposals", font); 669 mProposals->addElement(row, pos);
676 mProposals->addItem(row, pos);
677} 670}
678 671
679void LLPanelGroupVoting::impl::addNoHistoryScrollListItem(LLFontGL* font, 672void LLPanelGroupVoting::impl::addNoHistoryScrollListItem(EAddPosition pos)
680 EAddPosition pos)
681{ 673{
682 LLScrollListItem* row = new LLScrollListItem( TRUE, NULL, LLUUID::null); 674 LLSD row;
683 if (!row) return; 675 row["columns"][0]["value"] = "There are currently no archived proposals";
684 676 row["columns"][0]["font"] = "SANSSERIF_SMALL";
685 row->addColumn("There are currently no archived proposals", font); 677 mVotesHistory->addElement(row, pos);
686 mVotesHistory->addItem(row, pos);
687} 678}
688 679
689void LLPanelGroupVoting::impl::addPendingHistoryScrollListItem(LLFontGL* font, 680void LLPanelGroupVoting::impl::addPendingHistoryScrollListItem(unsigned int current,
690 unsigned int current,
691 unsigned int expected, 681 unsigned int expected,
692 EAddPosition pos) 682 EAddPosition pos)
693{ 683{
694 LLScrollListItem* row = new LLScrollListItem( TRUE, NULL, LLUUID::null);
695 if (!row) return;
696
697 std::stringstream pending; 684 std::stringstream pending;
698 pending << "Retrieving archived proposals (" 685 pending << "Retrieving archived proposals ("
699 << current 686 << current
700 << "\\" << expected << ")"; 687 << "\\" << expected << ")";
701 row->addColumn(pending.str(), font);
702 688
703 mVotesHistory->addItem(row, pos); 689 LLSD row;
690 row["columns"][0]["value"] = pending.str();
691 row["columns"][0]["font"] = "SANSSERIF_SMALL";
692
693 mVotesHistory->addElement(row, pos);
704} 694}
705 695
706 696
@@ -753,7 +743,6 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
753 F32 majority; 743 F32 majority;
754 S32 quorum; 744 S32 quorum;
755 BOOL already_voted; 745 BOOL already_voted;
756 LLFontGL* font = LLFontGL::sSansSerifSmall;
757 S32 num_proposals = msg->getNumberOfBlocksFast(_PREHASH_ProposalData); 746 S32 num_proposals = msg->getNumberOfBlocksFast(_PREHASH_ProposalData);
758 747
759 msg->getU32Fast(_PREHASH_TransactionData, 748 msg->getU32Fast(_PREHASH_TransactionData,
@@ -762,7 +751,9 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
762 751
763 //the first item should be indicative that we 752 //the first item should be indicative that we
764 //are currently receiving information or have it all 753 //are currently receiving information or have it all
765 self->mProposals->deleteSingleItem(0); 754 self->mProposals->deleteAllItems();
755 // make sure column indices are correct when populating with real data
756 self->mProposals->clearColumns();
766 757
767 for (int i = 0; i < num_proposals; i++) 758 for (int i = 0; i < num_proposals; i++)
768 { 759 {
@@ -778,23 +769,62 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
778 msg->getS32Fast(_PREHASH_ProposalData, _PREHASH_Quorum, quorum, i ); 769 msg->getS32Fast(_PREHASH_ProposalData, _PREHASH_Quorum, quorum, i );
779 770
780 vote_initiator.toString(vote_initiator_string); 771 vote_initiator.toString(vote_initiator_string);
781 snprintf(majority_text, MAX_STRING_NUM_LEN, "%f", majority); /*Flawfinder: ignore*/ 772 snprintf(majority_text, MAX_STRING_NUM_LEN, "%f", majority); /* Flawfinder: ignore */
782 snprintf(quorum_text, MAX_STRING_NUM_LEN, "%i", quorum); /*Flawfinder: ignore*/ 773 snprintf(quorum_text, MAX_STRING_NUM_LEN, "%i", quorum); /* Flawfinder: ignore */
783 774
784 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, vote_id ); 775 LLSD row;
785 if (!row) return;
786 S32 index = 0; 776 S32 index = 0;
787 777 row["id"] = vote_id;
788 row->addColumn(item_num_string, font, self->mProposalColumnWidths[index++]); // Use less readable datatime for sorting... 778 row["columns"][0]["column"] = "item_num";
789 row->addColumn(proposal_text, font, self->mProposalColumnWidths[index++]); 779 row["columns"][0]["value"] = item_num_string;
790 row->addColumn(end_datetime, font, self->mProposalColumnWidths[index++]); 780 row["columns"][0]["font"] = "SANSSERIF_SMALL";
791 row->addColumn(vote_type, font, self->mProposalColumnWidths[index++]); 781 row["columns"][0]["width"] = self->mProposalColumnWidths[index++];
792 row->addColumn(already_voted ? "Yes" : "No", font, self->mProposalColumnWidths[index++]); 782
793 row->addColumn(start_datetime, font, self->mProposalColumnWidths[index++]); 783 row["columns"][1]["column"] = "proposal_text";
794 row->addColumn(vote_cast, font, self->mProposalColumnWidths[index++]); 784 row["columns"][1]["value"] = proposal_text;
795 row->addColumn(vote_initiator_string, font, self->mProposalColumnWidths[index++]); 785 row["columns"][1]["font"] = "SANSSERIF_SMALL";
796 row->addColumn(quorum_text, font, self->mProposalColumnWidths[index++]); 786 row["columns"][1]["width"] = self->mProposalColumnWidths[index++];
797 row->addColumn(majority_text, font, self->mProposalColumnWidths[index++]); 787
788 row["columns"][2]["column"] = "end_datetime";
789 row["columns"][2]["value"] = end_datetime;
790 row["columns"][2]["font"] = "SANSSERIF_SMALL";
791 row["columns"][2]["width"] = self->mProposalColumnWidths[index++];
792
793 row["columns"][3]["column"] = "vote_type";
794 row["columns"][3]["value"] = vote_type;
795 row["columns"][3]["font"] = "SANSSERIF_SMALL";
796 row["columns"][3]["width"] = self->mProposalColumnWidths[index++];
797
798 row["columns"][4]["column"] = "already_voted";
799 row["columns"][4]["value"] = already_voted ? "Yes" : "No";
800 row["columns"][4]["font"] = "SANSSERIF_SMALL";
801 row["columns"][4]["width"] = self->mProposalColumnWidths[index++];
802
803 row["columns"][5]["column"] = "start_datetime";
804 row["columns"][5]["value"] = start_datetime;
805 row["columns"][5]["font"] = "SANSSERIF_SMALL";
806 row["columns"][5]["width"] = self->mProposalColumnWidths[index++];
807
808 row["columns"][6]["column"] = "vote_cast";
809 row["columns"][6]["value"] = vote_cast;
810 row["columns"][6]["font"] = "SANSSERIF_SMALL";
811 row["columns"][6]["width"] = self->mProposalColumnWidths[index++];
812
813 row["columns"][7]["column"] = "vote_initator_string";
814 row["columns"][7]["value"] = vote_initiator_string;
815 row["columns"][7]["font"] = "SANSSERIF_SMALL";
816 row["columns"][7]["width"] = self->mProposalColumnWidths[index++];
817
818 row["columns"][8]["column"] = "quorum_text";
819 row["columns"][8]["value"] = quorum_text;
820 row["columns"][8]["font"] = "SANSSERIF_SMALL";
821 row["columns"][8]["width"] = self->mProposalColumnWidths[index++];
822
823 row["columns"][9]["column"] = "majority_text";
824 row["columns"][9]["value"] = majority_text;
825 row["columns"][9]["font"] = "SANSSERIF_SMALL";
826 row["columns"][9]["width"] = self->mProposalColumnWidths[index++];
827
798 self->mActiveReceived.push_back(row); 828 self->mActiveReceived.push_back(row);
799 } 829 }
800 830
@@ -803,13 +833,12 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
803 { 833 {
804 //we are expecting 0 items, put up a message indicating tehre are 834 //we are expecting 0 items, put up a message indicating tehre are
805 //no active proposals and make the scroll list unselectable 835 //no active proposals and make the scroll list unselectable
806 self->addNoActiveScrollListItem(font, ADD_BOTTOM); 836 self->addNoActiveScrollListItem(ADD_BOTTOM);
807 self->mProposals->setCanSelect(FALSE); 837 self->mProposals->setCanSelect(FALSE);
808 } 838 }
809 else if ( (U32)received != num_expected ) 839 else if ( (U32)received != num_expected )
810 { 840 {
811 self->addPendingActiveScrollListItem(font, 841 self->addPendingActiveScrollListItem(received,
812 received,
813 num_expected, 842 num_expected,
814 ADD_BOTTOM); 843 ADD_BOTTOM);
815 self->mProposals->setCanSelect(FALSE); 844 self->mProposals->setCanSelect(FALSE);
@@ -817,12 +846,12 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
817 else 846 else
818 { 847 {
819 //all done display all of the items 848 //all done display all of the items
820 std::vector<LLScrollListItem*>::iterator it = self->mActiveReceived.begin(); 849 std::vector<LLSD>::iterator it = self->mActiveReceived.begin();
821 std::vector<LLScrollListItem*>::iterator end = self->mActiveReceived.end(); 850 std::vector<LLSD>::iterator end = self->mActiveReceived.end();
822 851
823 for (; it != end; it++) 852 for (; it != end; it++)
824 { 853 {
825 self->mProposals->addItem((*it), ADD_SORTED); 854 self->mProposals->addElement((*it), ADD_SORTED);
826 } 855 }
827 856
828 self->mProposals->setCanSelect(TRUE); 857 self->mProposals->setCanSelect(TRUE);
@@ -832,7 +861,6 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
832//static 861//static
833void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem *msg, void**) 862void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem *msg, void**)
834{ 863{
835 LLFontGL *font = LLFontGL::sSansSerifSmall;
836 LLUUID agent_id; 864 LLUUID agent_id;
837 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 865 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
838 if (gAgent.getID() != agent_id) 866 if (gAgent.getID() != agent_id)
@@ -866,13 +894,15 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
866 //explaining that we are attempting to receive information 894 //explaining that we are attempting to receive information
867 //or are currently receiving information, so we should clear out 895 //or are currently receiving information, so we should clear out
868 //the first line 896 //the first line
869 self->mVotesHistory->deleteSingleItem(0); 897 self->mVotesHistory->deleteAllItems();
898 // make sure column indices are correct when populating with real data
899 self->mVotesHistory->clearColumns();
870 900
871 if ( num_expected == 0 ) 901 if ( num_expected == 0 )
872 { 902 {
873 //we are expecting 0 items, put up a message indicating tehre are 903 //we are expecting 0 items, put up a message indicating tehre are
874 //no active proposals and make the scroll list unselectable 904 //no active proposals and make the scroll list unselectable
875 self->addNoHistoryScrollListItem(font, ADD_BOTTOM); 905 self->addNoHistoryScrollListItem(ADD_BOTTOM);
876 self->mVotesHistory->setCanSelect(FALSE); 906 self->mVotesHistory->setCanSelect(FALSE);
877 907
878 return; 908 return;
@@ -911,10 +941,15 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
911 { 941 {
912 if (!strcmp(vote_type, "Proposal")) 942 if (!strcmp(vote_type, "Proposal"))
913 { 943 {
914 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, vote_id ); 944 LLSD row;
915 if (!row) return; 945 row["id"] = vote_id;
916 row->addColumn(item_num_string, font, self->mHistoryColumnWidths[0]); 946
917 947 S32 index = 0;
948 row["columns"][0]["column"] = "item_num";
949 row["columns"][0]["value"] = item_num_string;
950 row["columns"][0]["font"] = "SANSSERIF_SMALL";
951 row["columns"][0]["width"] = self->mHistoryColumnWidths[index++];
952
918 vote_text.assign(proposal_text); 953 vote_text.assign(proposal_text);
919 vote_text.append("\n\n--\n"); 954 vote_text.append("\n\n--\n");
920 if (!strcmp(vote_result, "Success")) 955 if (!strcmp(vote_result, "Success"))
@@ -935,7 +970,7 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
935 { 970 {
936 msg->getStringFast(_PREHASH_VoteItem, _PREHASH_VoteCast, DB_VOTE_RESULT_BUF_SIZE, vote_result, i); 971 msg->getStringFast(_PREHASH_VoteItem, _PREHASH_VoteCast, DB_VOTE_RESULT_BUF_SIZE, vote_result, i);
937 msg->getS32Fast(_PREHASH_VoteItem, _PREHASH_NumVotes, num_votes, i); 972 msg->getS32Fast(_PREHASH_VoteItem, _PREHASH_NumVotes, num_votes, i);
938 snprintf(result_msg, MAX_STRING, /*Flawfinder: ignore*/ 973 snprintf(result_msg, MAX_STRING, /* Flawfinder: ignore */
939 " %s: %d\n", 974 " %s: %d\n",
940 vote_result, 975 vote_result,
941 num_votes); 976 num_votes);
@@ -947,11 +982,36 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
947 LLString vote_text_stripped = vote_text; 982 LLString vote_text_stripped = vote_text;
948 LLString::stripNonprintable(vote_text_stripped); 983 LLString::stripNonprintable(vote_text_stripped);
949 984
950 row->addColumn(vote_text_stripped, font, self->mHistoryColumnWidths[1]); 985 row["columns"][1]["column"] = "vote_text_stripped";
951 row->addColumn(end_datetime, font, self->mHistoryColumnWidths[2]); 986 row["columns"][1]["value"] = vote_text_stripped;
952 row->addColumn(vote_type, font, self->mHistoryColumnWidths[3]); 987 row["columns"][1]["font"] = "SANSSERIF_SMALL";
953 row->addColumn(vote_result, font, self->mHistoryColumnWidths[4]); 988 row["columns"][1]["width"] = self->mHistoryColumnWidths[index++];
954 row->addColumn(vote_text, font, self->mHistoryColumnWidths[5]); 989
990 row["columns"][2]["column"] = "end_datetime";
991 row["columns"][2]["value"] = end_datetime;
992 row["columns"][2]["font"] = "SANSSERIF_SMALL";
993 row["columns"][2]["width"] = self->mHistoryColumnWidths[index++];
994
995 row["columns"][3]["column"] = "vote_type";
996 row["columns"][3]["value"] = vote_type;
997 row["columns"][3]["font"] = "SANSSERIF_SMALL";
998 row["columns"][3]["width"] = self->mHistoryColumnWidths[index++];
999
1000 row["columns"][4]["column"] = "vote_result";
1001 row["columns"][4]["value"] = vote_result;
1002 row["columns"][4]["font"] = "SANSSERIF_SMALL";
1003 row["columns"][4]["width"] = self->mHistoryColumnWidths[index++];
1004
1005 row["columns"][5]["column"] = "vote_text";
1006 row["columns"][5]["value"] = vote_text;
1007 row["columns"][5]["font"] = "SANSSERIF_SMALL";
1008 row["columns"][5]["width"] = self->mHistoryColumnWidths[index++];
1009
1010 //row->addColumn(vote_text_stripped, font, self->mHistoryColumnWidths[1]);
1011 //row->addColumn(end_datetime, font, self->mHistoryColumnWidths[2]);
1012 //row->addColumn(vote_type, font, self->mHistoryColumnWidths[3]);
1013 //row->addColumn(vote_result, font, self->mHistoryColumnWidths[4]);
1014 //row->addColumn(vote_text, font, self->mHistoryColumnWidths[5]);
955 1015
956 self->mHistoryReceived.push_back(row); 1016 self->mHistoryReceived.push_back(row);
957 } //end if proposal 1017 } //end if proposal
@@ -960,8 +1020,7 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
960 int received = self->mHistoryReceived.size(); 1020 int received = self->mHistoryReceived.size();
961 if ( (U32)received != num_expected ) 1021 if ( (U32)received != num_expected )
962 { 1022 {
963 self->addPendingHistoryScrollListItem(font, 1023 self->addPendingHistoryScrollListItem(received,
964 received,
965 num_expected, 1024 num_expected,
966 ADD_BOTTOM); 1025 ADD_BOTTOM);
967 self->mVotesHistory->setCanSelect(FALSE); 1026 self->mVotesHistory->setCanSelect(FALSE);
@@ -969,12 +1028,12 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
969 else 1028 else
970 { 1029 {
971 //all done display all of the items 1030 //all done display all of the items
972 std::vector<LLScrollListItem*>::iterator it = self->mHistoryReceived.begin(); 1031 std::vector<LLSD>::iterator it = self->mHistoryReceived.begin();
973 std::vector<LLScrollListItem*>::iterator end = self->mHistoryReceived.end(); 1032 std::vector<LLSD>::iterator end = self->mHistoryReceived.end();
974 1033
975 for (; it != end; it++) 1034 for (; it != end; it++)
976 { 1035 {
977 self->mVotesHistory->addItem((*it), ADD_SORTED); 1036 self->mVotesHistory->addElement((*it), ADD_SORTED);
978 } 1037 }
979 1038
980 self->mVotesHistory->setCanSelect(TRUE); 1039 self->mVotesHistory->setCanSelect(TRUE);