Pull in Dullahan 1.1.925 with fix for onFileDialogCallback(..) handling that fixes MAINT-8083

Wed, 13 Dec 2017 13:55:33 -0800

author
callum_linden <callum@lindenlab.com>
date
Wed, 13 Dec 2017 13:55:33 -0800
changeset 55044
3516b95e9d6c
parent 55043
4746dc195835
child 55045
0d923cae762e

Pull in Dullahan 1.1.925 with fix for onFileDialogCallback(..) handling that fixes MAINT-8083

autobuild.xml file | annotate | diff | revisions
indra/media_plugins/cef/media_plugin_cef.cpp file | annotate | diff | revisions
     1.1 --- a/autobuild.xml	Wed Dec 13 12:39:37 2017 -0800
     1.2 +++ b/autobuild.xml	Wed Dec 13 13:55:33 2017 -0800
     1.3 @@ -556,9 +556,9 @@
     1.4              <key>archive</key>
     1.5              <map>
     1.6                <key>hash</key>
     1.7 -              <string>92703992ed6ce4e93326744b91e20cfc</string>
     1.8 +              <string>1937f9f84f0f33563b9d33cf1c8e695a</string>
     1.9                <key>url</key>
    1.10 -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11557/66312/dullahan-1.1.920_3.3202.1686.gd665578-darwin64-511302.tar.bz2</string>
    1.11 +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11646/67094/dullahan-1.1.925_3.3202.1686.gd665578-darwin64-511376.tar.bz2</string>
    1.12              </map>
    1.13              <key>name</key>
    1.14              <string>darwin64</string>
    1.15 @@ -568,9 +568,9 @@
    1.16              <key>archive</key>
    1.17              <map>
    1.18                <key>hash</key>
    1.19 -              <string>fd0d6d9e70dd9b811c72866f8285b79b</string>
    1.20 +              <string>08edc9fa2dc586e7a1c7c4b7a6b6c548</string>
    1.21                <key>url</key>
    1.22 -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11559/66324/dullahan-1.1.920_3.3202.1686.gd665578-windows-511302.tar.bz2</string>
    1.23 +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11648/67101/dullahan-1.1.925_3.3202.1686.gd665578-windows-511376.tar.bz2</string>
    1.24              </map>
    1.25              <key>name</key>
    1.26              <string>windows</string>
    1.27 @@ -580,16 +580,16 @@
    1.28              <key>archive</key>
    1.29              <map>
    1.30                <key>hash</key>
    1.31 -              <string>5e3defb1f2fc98e23d940c321ee360c2</string>
    1.32 +              <string>b220e427ade837e45a92fffab02c068f</string>
    1.33                <key>url</key>
    1.34 -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11558/66318/dullahan-1.1.920_3.3202.1686.gd665578-windows64-511302.tar.bz2</string>
    1.35 +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11649/67106/dullahan-1.1.925_3.3202.1686.gd665578-windows64-511376.tar.bz2</string>
    1.36              </map>
    1.37              <key>name</key>
    1.38              <string>windows64</string>
    1.39            </map>
    1.40          </map>
    1.41          <key>version</key>
    1.42 -        <string>1.1.920_3.3202.1686.gd665578</string>
    1.43 +        <string>1.1.925_3.3202.1686.gd665578</string>
    1.44        </map>
    1.45        <key>elfio</key>
    1.46        <map>
     2.1 --- a/indra/media_plugins/cef/media_plugin_cef.cpp	Wed Dec 13 12:39:37 2017 -0800
     2.2 +++ b/indra/media_plugins/cef/media_plugin_cef.cpp	Wed Dec 13 13:55:33 2017 -0800
     2.3 @@ -68,8 +68,7 @@
     2.4  	void onNavigateURLCallback(std::string url, std::string target);
     2.5  	bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
     2.6  	void onCursorChangedCallback(dullahan::ECursorType type);
     2.7 -	void onFileDownloadCallback(std::string filename);
     2.8 -	const std::string onFileDialogCallback();
     2.9 +	const std::string onFileDialog(dullahan::EFileDialogType dialog_type, const std::string dialog_title, const std::string default_file, const std::string dialog_accept_filter, bool& use_default);
    2.10  
    2.11  	void postDebugMessage(const std::string& msg);
    2.12  	void authResponse(LLPluginMessage &message);
    2.13 @@ -285,30 +284,39 @@
    2.14  
    2.15  ////////////////////////////////////////////////////////////////////////////////
    2.16  //
    2.17 -void MediaPluginCEF::onFileDownloadCallback(const std::string filename)
    2.18 +const std::string MediaPluginCEF::onFileDialog(dullahan::EFileDialogType dialog_type, const std::string dialog_title, const std::string default_file, std::string dialog_accept_filter, bool& use_default)
    2.19  {
    2.20 -	mAuthOK = false;
    2.21 +	// do not use the default CEF file picker
    2.22 +	use_default = false;
    2.23  
    2.24 -	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "file_download");
    2.25 -	message.setValue("filename", filename);
    2.26 +	if (dialog_type == dullahan::FD_OPEN_FILE)
    2.27 +	{
    2.28 +		mPickedFile.clear();
    2.29  
    2.30 -	sendMessage(message);
    2.31 +		LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file");
    2.32 +		message.setValueBoolean("blocking_request", true);
    2.33 +
    2.34 +		sendMessage(message);
    2.35 +
    2.36 +		return mPickedFile;
    2.37 +	}
    2.38 +	else if (dialog_type == dullahan::FD_SAVE_FILE)
    2.39 +	{
    2.40 +		mAuthOK = false;
    2.41 +
    2.42 +		LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "file_download");
    2.43 +		message.setValue("filename", default_file);
    2.44 +
    2.45 +		sendMessage(message);
    2.46 +
    2.47 +		return std::string();
    2.48 +	}
    2.49 +
    2.50 +	return std::string();
    2.51  }
    2.52  
    2.53  ////////////////////////////////////////////////////////////////////////////////
    2.54  //
    2.55 -const std::string MediaPluginCEF::onFileDialogCallback()
    2.56 -{
    2.57 -	mPickedFile.clear();
    2.58 -
    2.59 -	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file");
    2.60 -	message.setValueBoolean("blocking_request", true);
    2.61 -
    2.62 -	sendMessage(message);
    2.63 -
    2.64 -	return mPickedFile;
    2.65 -}
    2.66 -
    2.67  void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type)
    2.68  {
    2.69  	std::string name = "";
    2.70 @@ -341,6 +349,8 @@
    2.71  	sendMessage(message);
    2.72  }
    2.73  
    2.74 +////////////////////////////////////////////////////////////////////////////////
    2.75 +//
    2.76  void MediaPluginCEF::authResponse(LLPluginMessage &message)
    2.77  {
    2.78  	mAuthOK = message.getValueBoolean("ok");
    2.79 @@ -442,8 +452,7 @@
    2.80  				mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1));
    2.81  				mCEFLib->setOnNavigateURLCallback(std::bind(&MediaPluginCEF::onNavigateURLCallback, this, std::placeholders::_1, std::placeholders::_2));
    2.82  				mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
    2.83 -				mCEFLib->setOnFileDownloadCallback(std::bind(&MediaPluginCEF::onFileDownloadCallback, this, std::placeholders::_1));
    2.84 -				mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialogCallback, this));
    2.85 +				mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialog, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
    2.86  				mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1));
    2.87  				mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this));
    2.88  

mercurial