aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupvoting.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpanelgroupvoting.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llpanelgroupvoting.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupvoting.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/linden/indra/newview/llpanelgroupvoting.cpp b/linden/indra/newview/llpanelgroupvoting.cpp
index 58a4842..d0e513c 100644
--- a/linden/indra/newview/llpanelgroupvoting.cpp
+++ b/linden/indra/newview/llpanelgroupvoting.cpp
@@ -234,8 +234,8 @@ void LLPanelGroupVoting::impl::setEnableListProposals()
234 return; 234 return;
235 235
236 236
237 mPanel.childSetText("proposal_header", mPanel.childGetText("proposals_header_view_txt")); 237 mPanel.childSetText("proposal_header", mPanel.getString("proposals_header_view_txt"));
238 mPanel.childSetText("proposal_instructions", mPanel.childGetText("proposals_header_view_inst")); 238 mPanel.childSetText("proposal_instructions", mPanel.getString("proposals_header_view_inst"));
239 mPanel.childSetVisible("proposal_lbl", FALSE); 239 mPanel.childSetVisible("proposal_lbl", FALSE);
240 mPanel.childSetVisible("proposal_voting_lbl", TRUE); 240 mPanel.childSetVisible("proposal_voting_lbl", TRUE);
241 mProposals->setVisible(TRUE); 241 mProposals->setVisible(TRUE);
@@ -389,7 +389,7 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal()
389 389
390 if (already_voted == "Yes") 390 if (already_voted == "Yes")
391 { 391 {
392 LLUIString votestr = mPanel.childGetText("proposals_header_voted_inst"); 392 LLUIString votestr = mPanel.getString("proposals_header_voted_inst");
393 votestr.setArg("[VOTE]", vote_cast); 393 votestr.setArg("[VOTE]", vote_cast);
394 mPanel.childSetText("proposal_instructions", votestr.getString()); 394 mPanel.childSetText("proposal_instructions", votestr.getString());
395 395
@@ -399,14 +399,14 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal()
399 } 399 }
400 else 400 else
401 { 401 {
402 mPanel.childSetText("proposal_instructions", mPanel.childGetText("proposals_header_vote_inst")); 402 mPanel.childSetText("proposal_instructions", mPanel.getString("proposals_header_vote_inst"));
403 403
404 mBtnYes->setEnabled(TRUE); 404 mBtnYes->setEnabled(TRUE);
405 mBtnNo->setEnabled(TRUE); 405 mBtnNo->setEnabled(TRUE);
406 mBtnAbstain->setEnabled(TRUE); 406 mBtnAbstain->setEnabled(TRUE);
407 } 407 }
408 408
409 mPanel.childSetText("proposal_header", mPanel.childGetText("proposals_header_vote_txt")); 409 mPanel.childSetText("proposal_header", mPanel.getString("proposals_header_vote_txt"));
410 mPanel.childSetVisible("proposal_lbl", TRUE); 410 mPanel.childSetVisible("proposal_lbl", TRUE);
411 mPanel.childSetVisible("proposal_voting_lbl", FALSE); 411 mPanel.childSetVisible("proposal_voting_lbl", FALSE);
412 mProposals->setVisible(FALSE); 412 mProposals->setVisible(FALSE);
@@ -453,8 +453,8 @@ void LLPanelGroupVoting::impl::setEnableCreateProposal()
453 if ( !gAgent.hasPowerInGroup(mGroupID, GP_PROPOSAL_START) ) 453 if ( !gAgent.hasPowerInGroup(mGroupID, GP_PROPOSAL_START) )
454 return; 454 return;
455 455
456 mPanel.childSetText("proposal_header", mPanel.childGetText("proposals_header_create_txt")); 456 mPanel.childSetText("proposal_header", mPanel.getString("proposals_header_create_txt"));
457 mPanel.childSetText("proposal_instructions", mPanel.childGetText("proposals_header_create_inst")); 457 mPanel.childSetText("proposal_instructions", mPanel.getString("proposals_header_create_inst"));
458 mPanel.childSetVisible("proposal_lbl", TRUE); 458 mPanel.childSetVisible("proposal_lbl", TRUE);
459 mPanel.childSetVisible("proposal_voting_lbl", FALSE); 459 mPanel.childSetVisible("proposal_voting_lbl", FALSE);
460 mProposals->setVisible(FALSE); 460 mProposals->setVisible(FALSE);
@@ -634,11 +634,11 @@ void LLPanelGroupVoting::handleResponse(
634 634
635 if (success) 635 if (success)
636 { 636 {
637 args["[MESSAGE]"] = self->mPanel.childGetText("vote_recorded"); 637 args["[MESSAGE]"] = self->mPanel.getString("vote_recorded");
638 } 638 }
639 else 639 else
640 { 640 {
641 args["[MESSAGE]"] = self->mPanel.childGetText("vote_previously_recorded"); 641 args["[MESSAGE]"] = self->mPanel.getString("vote_previously_recorded");
642 } 642 }
643 643
644 LLNotifyBox::showXml("SystemMessage", args); 644 LLNotifyBox::showXml("SystemMessage", args);
@@ -1284,7 +1284,7 @@ void LLPanelGroupVoting::impl::onClickYes(void *userdata)
1284 1284
1285 if ( self ) 1285 if ( self )
1286 { 1286 {
1287 self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_yes_txt")); 1287 self->mPanel.childSetText("proposal_instructions", self->mPanel.getString("proposals_submit_yes_txt"));
1288 self->sendGroupProposalBallot("Yes"); 1288 self->sendGroupProposalBallot("Yes");
1289 } 1289 }
1290} 1290}
@@ -1296,7 +1296,7 @@ void LLPanelGroupVoting::impl::onClickNo(void *userdata)
1296 1296
1297 if ( self ) 1297 if ( self )
1298 { 1298 {
1299 self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_no_txt")); 1299 self->mPanel.childSetText("proposal_instructions", self->mPanel.getString("proposals_submit_no_txt"));
1300 self->sendGroupProposalBallot("No"); 1300 self->sendGroupProposalBallot("No");
1301 } 1301 }
1302} 1302}
@@ -1308,7 +1308,7 @@ void LLPanelGroupVoting::impl::onClickAbstain(void *userdata)
1308 1308
1309 if ( self ) 1309 if ( self )
1310 { 1310 {
1311 self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_abstain_txt")); 1311 self->mPanel.childSetText("proposal_instructions", self->mPanel.getString("proposals_submit_abstain_txt"));
1312 self->sendGroupProposalBallot("Abstain"); 1312 self->sendGroupProposalBallot("Abstain");
1313 } 1313 }
1314} 1314}
@@ -1328,12 +1328,12 @@ void LLPanelGroupVoting::impl::onClickSubmitProposal(void *userdata)
1328 { 1328 {
1329 //throw up an error dialog 1329 //throw up an error dialog
1330 LLString::format_map_t args; 1330 LLString::format_map_t args;
1331 args["[MESSAGE]"] = self->mPanel.childGetText("empty_proposal_txt"); 1331 args["[MESSAGE]"] = self->mPanel.getString("empty_proposal_txt");
1332 gViewerWindow->alertXml("GenericAlert", args); 1332 gViewerWindow->alertXml("GenericAlert", args);
1333 return; 1333 return;
1334 } 1334 }
1335 1335
1336 self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_new_txt")); 1336 self->mPanel.childSetText("proposal_instructions", self->mPanel.getString("proposals_submit_new_txt"));
1337 self->sendStartGroupProposal(); 1337 self->sendStartGroupProposal();
1338 } 1338 }
1339} 1339}
@@ -1458,54 +1458,54 @@ BOOL LLPanelGroupVoting::postBuild()
1458{ 1458{
1459 bool recurse = true; 1459 bool recurse = true;
1460 1460
1461 mImpl->mDurationText = (LLTextBox*) getChildByName("duration_text", 1461 mImpl->mDurationText = getChild<LLTextBox>("duration_text",
1462 recurse); 1462 recurse);
1463 mImpl->mQuorum = (LLSpinCtrl*) getChildByName("quorum", recurse); 1463 mImpl->mQuorum = getChild<LLSpinCtrl>("quorum", recurse);
1464 mImpl->mQuorumLbl = (LLTextBox*) getChildByName("quorum_lbl", recurse); 1464 mImpl->mQuorumLbl = getChild<LLTextBox>("quorum_lbl", recurse);
1465 mImpl->mDuration = (LLSpinCtrl*) getChildByName("duration", recurse); 1465 mImpl->mDuration = getChild<LLSpinCtrl>("duration", recurse);
1466 mImpl->mDurationLbl = (LLTextBox*) getChildByName("duration_lbl", recurse); 1466 mImpl->mDurationLbl = getChild<LLTextBox>("duration_lbl", recurse);
1467 mImpl->mMajority = (LLRadioGroup*) getChildByName("majority", recurse); 1467 mImpl->mMajority = getChild<LLRadioGroup>("majority", recurse);
1468 mImpl->mMajorityLbl = (LLTextBox*) getChildByName("majority_lbl", recurse); 1468 mImpl->mMajorityLbl = getChild<LLTextBox>("majority_lbl", recurse);
1469 1469
1470 mImpl->mStartLbl = (LLTextBox*) getChildByName("start_lbl", recurse); 1470 mImpl->mStartLbl = getChild<LLTextBox>("start_lbl", recurse);
1471 mImpl->mEndLbl = (LLTextBox*) getChildByName("end_lbl", recurse); 1471 mImpl->mEndLbl = getChild<LLTextBox>("end_lbl", recurse);
1472 mImpl->mStartDate = (LLTextBox*) getChildByName("start_date", recurse); 1472 mImpl->mStartDate = getChild<LLTextBox>("start_date", recurse);
1473 mImpl->mEndDate = (LLTextBox*) getChildByName("end_date", recurse); 1473 mImpl->mEndDate = getChild<LLTextBox>("end_date", recurse);
1474 1474
1475 mImpl->mBtnYes = (LLButton*) getChildByName("btn_yes", recurse); 1475 mImpl->mBtnYes = getChild<LLButton>("btn_yes", recurse);
1476 mImpl->mBtnNo = (LLButton*) getChildByName("btn_no", recurse); 1476 mImpl->mBtnNo = getChild<LLButton>("btn_no", recurse);
1477 mImpl->mBtnAbstain = (LLButton*) getChildByName("btn_abstain", recurse); 1477 mImpl->mBtnAbstain = getChild<LLButton>("btn_abstain", recurse);
1478 1478
1479 mImpl->mProposals = 1479 mImpl->mProposals =
1480 (LLScrollListCtrl*) getChildByName("proposals", recurse); 1480 getChild<LLScrollListCtrl>("proposals", recurse);
1481 mImpl->mProposalText = 1481 mImpl->mProposalText =
1482 (LLTextEditor*) getChildByName("proposal_text", recurse); 1482 getChild<LLTextEditor>("proposal_text", recurse);
1483 1483
1484 mImpl->mBtnCreateProposal = (LLButton*) getChildByName("btn_proposal", 1484 mImpl->mBtnCreateProposal = getChild<LLButton>("btn_proposal",
1485 recurse); 1485 recurse);
1486 mImpl->mBtnSubmitProposal = (LLButton*) getChildByName("btn_submit", 1486 mImpl->mBtnSubmitProposal = getChild<LLButton>("btn_submit",
1487 recurse); 1487 recurse);
1488 mImpl->mBtnCancelProposal = (LLButton*) getChildByName("btn_cancel", 1488 mImpl->mBtnCancelProposal = getChild<LLButton>("btn_cancel",
1489 recurse); 1489 recurse);
1490 1490
1491 mImpl->mBtnViewProposalList = 1491 mImpl->mBtnViewProposalList =
1492 (LLButton*) getChildByName("btn_view_proposal_list", recurse); 1492 getChild<LLButton>("btn_view_proposal_list", recurse);
1493 mImpl->mBtnViewProposalItem = 1493 mImpl->mBtnViewProposalItem =
1494 (LLButton*) getChildByName("btn_view_proposal_item", recurse); 1494 getChild<LLButton>("btn_view_proposal_item", recurse);
1495 1495
1496 mImpl->mVotesHistory = (LLScrollListCtrl*)getChildByName("history_list", 1496 mImpl->mVotesHistory = getChild<LLScrollListCtrl>("history_list",
1497 recurse); 1497 recurse);
1498 mImpl->mVotesHistoryLbl = (LLTextBox*) getChildByName("history_list_lbl", 1498 mImpl->mVotesHistoryLbl = getChild<LLTextBox>("history_list_lbl",
1499 recurse); 1499 recurse);
1500 mImpl->mVoteHistoryText = (LLTextEditor*) getChildByName("vote_text", 1500 mImpl->mVoteHistoryText = getChild<LLTextEditor>("vote_text",
1501 recurse); 1501 recurse);
1502 mImpl->mVoteHistoryTextLbl = (LLTextBox*) getChildByName("vote_text_lbl", 1502 mImpl->mVoteHistoryTextLbl = getChild<LLTextBox>("vote_text_lbl",
1503 recurse); 1503 recurse);
1504 1504
1505 mImpl->mBtnViewHistoryList = 1505 mImpl->mBtnViewHistoryList =
1506 (LLButton*)getChildByName("btn_view_history_list", recurse); 1506 getChild<LLButton>("btn_view_history_list", recurse);
1507 mImpl->mBtnViewHistoryItem = 1507 mImpl->mBtnViewHistoryItem =
1508 (LLButton*)getChildByName("btn_view_history_item", recurse); 1508 getChild<LLButton>("btn_view_history_item", recurse);
1509 1509
1510 mImpl->updateQuorumText(); 1510 mImpl->updateQuorumText();
1511 1511