Zi Ree's FIRE-5504 PFVS group version notification, ported to Phoenix by Kadah Coba.

Sun, 18 Mar 2012 09:27:03 -0500

author
Tonya Souther <tonya.souther@gmail.com>
date
Sun, 18 Mar 2012 09:27:03 -0500
changeset 1683
d34f0f4cb8a4
parent 1682
89234d0de3a6
child 1684
a598a1e33a7e

Zi Ree's FIRE-5504 PFVS group version notification, ported to Phoenix by Kadah Coba.

indra/newview/llimpanel.cpp file | annotate | diff | revisions
indra/newview/llimpanel.h file | annotate | diff | revisions
indra/newview/skins/default/xui/en-us/notifications.xml file | annotate | diff | revisions
     1.1 --- a/indra/newview/llimpanel.cpp	Sun Mar 18 12:52:47 2012 +0100
     1.2 +++ b/indra/newview/llimpanel.cpp	Sun Mar 18 09:27:03 2012 -0500
     1.3 @@ -1116,7 +1116,8 @@
     1.4  	mOtrSmpDialog(NULL),
     1.5      mOtrSmpProgress(NULL),
     1.6  	mFirstKeystrokeTimer(),
     1.7 -	mLastKeystrokeTimer()
     1.8 +	mLastKeystrokeTimer(),
     1.9 +	mPFVS(FALSE)
    1.10  {
    1.11      // [Ansariel/Henri: Display name support]
    1.12      sFloaterIMPanels.insert(this);
    1.13 @@ -1156,7 +1157,8 @@
    1.14      mOtrSmpProgress(NULL),
    1.15  // [/$PLOTR$]
    1.16  	mFirstKeystrokeTimer(),
    1.17 -	mLastKeystrokeTimer()
    1.18 +	mLastKeystrokeTimer(),
    1.19 +    mPFVS(FALSE)
    1.20  {
    1.21      // [Ansariel/Henri: Display name support]
    1.22      sFloaterIMPanels.insert(this);
    1.23 @@ -1510,8 +1512,7 @@
    1.24  void LLFloaterIMPanel::checkPFVS()
    1.25  // AO: PVFS custom viewer prefix support
    1.26  {
    1.27 -	mPFVS = FALSE;
    1.28 -	if (PhoenixViewerLink::isSupportGroup(mSessionUUID))
    1.29 +	if (!mPFVS && PhoenixViewerLink::isSupportGroup(mSessionUUID))
    1.30  	{
    1.31  		mPFVS = TRUE;
    1.32  		LLCheckBoxCtrl* prefixViewer = getChild<LLCheckBoxCtrl>("prefixViewerToggle");
    1.33 @@ -1519,6 +1520,17 @@
    1.34  		childSetVisible("prefixViewerToggle",TRUE);
    1.35  		childSetVisible("prefixViewerExtraText",TRUE);
    1.36  		prefixViewer->setValue(gSavedSettings.getBOOL("PhoenixSupportGroupchatPrefix2"));
    1.37 +        
    1.38 +        // <FS:Zi> Viewer version popup
    1.39 +        // check if the dialog was set to ignore
    1.40 +        LLNotificationTemplatePtr templatep=LLNotifications::instance().getTemplate("FirstJoinSupportGroup");
    1.41 +        if(templatep.get()->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
    1.42 +        {
    1.43 +            // if not, give the user a choice, whether to enable the version prefix or not
    1.44 +            LLSD args;
    1.45 +            LLNotifications::instance().add("FirstJoinSupportGroup",args,LLSD(),boost::bind(&LLFloaterIMPanel::enableViewerVersionCallback,this,_1,_2));
    1.46 +        }
    1.47 +        // </FS:Zi> Viewer version popup
    1.48  	}
    1.49  }
    1.50  
    1.51 @@ -3710,3 +3722,19 @@
    1.52  	}
    1.53  	return FALSE;
    1.54  }
    1.55 +
    1.56 +// <FS:Zi> Viewer version popup
    1.57 +BOOL LLFloaterIMPanel::enableViewerVersionCallback(const LLSD& notification,const LLSD& response)
    1.58 +{
    1.59 +    S32 option=LLNotification::getSelectedOption(notification,response);
    1.60 +
    1.61 +    BOOL result=FALSE;
    1.62 +    if(option==0)		// "yes"
    1.63 +    {
    1.64 +        result=TRUE;
    1.65 +    }
    1.66 +
    1.67 +    gSavedSettings.setBOOL("PhoenixSupportGroupchatPrefix2",result);
    1.68 +    return result;
    1.69 +}
    1.70 +// </FS:Zi>
     2.1 --- a/indra/newview/llimpanel.h	Sun Mar 18 12:52:47 2012 +0100
     2.2 +++ b/indra/newview/llimpanel.h	Sun Mar 18 09:27:03 2012 -0500
     2.3 @@ -366,6 +366,7 @@
     2.4      void endSmpProgress();
     2.5      void endSmpDialog();
     2.6      void handleOtrTlvs(OtrlTLV *tlvs);
     2.7 +    BOOL enableViewerVersionCallback(const LLSD& notification,const LLSD& response);		// <FS:Zi> Viewer version popup
     2.8  private:
     2.9      void startSmpDialog(LLUUID session_id, LLUUID other_id,
    2.10                          std::string my_fingerprint, std::string other_fingerprint);
     3.1 --- a/indra/newview/skins/default/xui/en-us/notifications.xml	Sun Mar 18 12:52:47 2012 +0100
     3.2 +++ b/indra/newview/skins/default/xui/en-us/notifications.xml	Sun Mar 18 09:27:03 2012 -0500
     3.3 @@ -7823,5 +7823,26 @@
     3.4  	 text="Open Link"/>
     3.5     </form>
     3.6    </notification>
     3.7 +  
     3.8 +  <!-- <FS:Zi> Viewer version popup -->
     3.9 +  <notification
    3.10 +   icon="alertmodal.tga"
    3.11 +   name="FirstJoinSupportGroup"
    3.12 +   type="alertmodal">
    3.13 +Welcome to the Phoenix/Firestorm Viewer Support Group!
    3.14 +
    3.15 +To make support easier, it is recommended to announce your viewer's version to the group. You can choose to display your viewer's version in front of any chat you send to the group. Our support members can give you more meaningful advice right away if they know the viewer version you are on.
    3.16 +
    3.17 +You can enable and disable this function at any time using the checkbox in the group chat floater.
    3.18 +
    3.19 +Do you want to enable the automatic viewer version display?
    3.20 +    <usetemplate
    3.21 +     save_option="true"
    3.22 +     ignoretext="The Phoenix/Firestorm Support Group was joined"
    3.23 +     name="okcancelignore"
    3.24 +     notext="No"
    3.25 +     yestext="Yes"/>
    3.26 +  </notification>
    3.27 +  <!-- <FS:Zi> Viewer version popup -->
    3.28  
    3.29  </notifications>

mercurial