Bugfixes for Phoenix Support Groups chat prefix.

Sun, 18 Mar 2012 12:21:30 -0400

author
Techwolf Lupindo
date
Sun, 18 Mar 2012 12:21:30 -0400
changeset 1685
05f2eb53f1b1
parent 1684
a598a1e33a7e
child 1686
e1500a5d2c63
child 1687
54d0e6f6e432

Bugfixes for Phoenix Support Groups chat prefix.
Fix checkbox not updating after clicking "yes" to the dialog popup.
Fix dialog poping up even after clicking "yes" on a second group that has this chat prefix option.
Some whitespace cleanup to make codeflow more clearer.

indra/newview/llimpanel.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llimpanel.cpp	Sun Mar 18 11:03:33 2012 -0500
     1.2 +++ b/indra/newview/llimpanel.cpp	Sun Mar 18 12:21:30 2012 -0400
     1.3 @@ -1521,16 +1521,22 @@
     1.4  		childSetVisible("prefixViewerExtraText",TRUE);
     1.5  		prefixViewer->setValue(gSavedSettings.getBOOL("PhoenixSupportGroupchatPrefix2"));
     1.6          
     1.7 -        // <FS:Zi> Viewer version popup
     1.8 -        // check if the dialog was set to ignore
     1.9 -        LLNotificationTemplatePtr templatep=LLNotifications::instance().getTemplate("FirstJoinSupportGroup");
    1.10 -        if(templatep.get()->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
    1.11 -        {
    1.12 -            // if not, give the user a choice, whether to enable the version prefix or not
    1.13 -            LLSD args;
    1.14 -            LLNotifications::instance().add("FirstJoinSupportGroup",args,LLSD(),boost::bind(&LLFloaterIMPanel::enableViewerVersionCallback,this,_1,_2));
    1.15 -        }
    1.16 -        // </FS:Zi> Viewer version popup
    1.17 +		// Don't popup the dialog if the user allready set prefix to true -- TW
    1.18 +		if (gSavedSettings.getBOOL("PhoenixSupportGroupchatPrefix2"))
    1.19 +		{
    1.20 +			return;
    1.21 +		}
    1.22 +		
    1.23 +		// <FS:Zi> Viewer version popup
    1.24 +		// check if the dialog was set to ignore
    1.25 +		LLNotificationTemplatePtr templatep=LLNotifications::instance().getTemplate("FirstJoinSupportGroup");
    1.26 +		if(templatep.get()->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
    1.27 +		{
    1.28 +		    // if not, give the user a choice, whether to enable the version prefix or not
    1.29 +		    LLSD args;
    1.30 +		    LLNotifications::instance().add("FirstJoinSupportGroup",args,LLSD(),boost::bind(&LLFloaterIMPanel::enableViewerVersionCallback,this,_1,_2));
    1.31 +		}
    1.32 +		// </FS:Zi> Viewer version popup
    1.33  	}
    1.34  }
    1.35  
    1.36 @@ -3735,6 +3741,11 @@
    1.37      }
    1.38  
    1.39      gSavedSettings.setBOOL("PhoenixSupportGroupchatPrefix2",result);
    1.40 +
    1.41 +    // update the checkbox -- TW
    1.42 +    LLCheckBoxCtrl* prefixViewer = getChild<LLCheckBoxCtrl>("prefixViewerToggle");
    1.43 +    prefixViewer->setValue(result);
    1.44 +
    1.45      return result;
    1.46  }
    1.47  // </FS:Zi>

mercurial