mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge fx-team to mozilla-central
This commit is contained in:
commit
739c5c4658
@ -1208,7 +1208,7 @@ public class GeckoAppShell
|
|||||||
context.getResources().getString(R.string.share_title));
|
context.getResources().getString(R.string.share_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
final Uri uri = normalizeUriScheme(Uri.parse(targetURI));
|
final Uri uri = normalizeUriScheme(targetURI.indexOf(':') >= 0 ? Uri.parse(targetURI) : new Uri.Builder().scheme(targetURI).build());
|
||||||
if (mimeType.length() > 0) {
|
if (mimeType.length() > 0) {
|
||||||
Intent intent = getIntentForActionString(action);
|
Intent intent = getIntentForActionString(action);
|
||||||
intent.setDataAndType(uri, mimeType);
|
intent.setDataAndType(uri, mimeType);
|
||||||
|
@ -536,6 +536,7 @@
|
|||||||
<item name="android:textAppearance">?android:textAppearanceSmall</item>
|
<item name="android:textAppearance">?android:textAppearanceSmall</item>
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:maxWidth">160dp</item>
|
||||||
<item name="android:textColor">#fff</item>
|
<item name="android:textColor">#fff</item>
|
||||||
<item name="android:layout_gravity">center_vertical</item>
|
<item name="android:layout_gravity">center_vertical</item>
|
||||||
</style>
|
</style>
|
||||||
|
@ -116,7 +116,7 @@ public class ButtonToast {
|
|||||||
mMessageView.setText(t.message);
|
mMessageView.setText(t.message);
|
||||||
mButton.setText(t.buttonMessage);
|
mButton.setText(t.buttonMessage);
|
||||||
mButton.setCompoundDrawablePadding(mView.getContext().getResources().getDimensionPixelSize(R.dimen.toast_button_padding));
|
mButton.setCompoundDrawablePadding(mView.getContext().getResources().getDimensionPixelSize(R.dimen.toast_button_padding));
|
||||||
mButton.setCompoundDrawablesWithIntrinsicBounds(null, null, t.buttonDrawable, null);
|
mButton.setCompoundDrawablesWithIntrinsicBounds(t.buttonDrawable, null, null, null);
|
||||||
|
|
||||||
mHideHandler.removeCallbacks(mHideRunnable);
|
mHideHandler.removeCallbacks(mHideRunnable);
|
||||||
mHideHandler.postDelayed(mHideRunnable, TOAST_DURATION);
|
mHideHandler.postDelayed(mHideRunnable, TOAST_DURATION);
|
||||||
|
@ -9,6 +9,10 @@ const Cc = Components.classes;
|
|||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
|
function sendMessageToJava(aMessage) {
|
||||||
|
return Services.androidBridge.handleGeckoMessage(JSON.stringify(aMessage));
|
||||||
|
}
|
||||||
|
|
||||||
function ContentDispatchChooser() {}
|
function ContentDispatchChooser() {}
|
||||||
|
|
||||||
ContentDispatchChooser.prototype =
|
ContentDispatchChooser.prototype =
|
||||||
@ -49,13 +53,25 @@ ContentDispatchChooser.prototype =
|
|||||||
let win = this._getChromeWin();
|
let win = this._getChromeWin();
|
||||||
if (win && win.NativeWindow) {
|
if (win && win.NativeWindow) {
|
||||||
let bundle = Services.strings.createBundle("chrome://browser/locale/handling.properties");
|
let bundle = Services.strings.createBundle("chrome://browser/locale/handling.properties");
|
||||||
let text = bundle.GetStringFromName("protocol.failed");
|
let failedText = bundle.GetStringFromName("protocol.failed");
|
||||||
win.NativeWindow.toast.show(text, "long");
|
let searchText = bundle.GetStringFromName("protocol.toast.search");
|
||||||
|
|
||||||
|
win.NativeWindow.toast.show(failedText, "long", {
|
||||||
|
button: {
|
||||||
|
label: searchText,
|
||||||
|
callback: function() {
|
||||||
|
let message = {
|
||||||
|
type: "Intent:Open",
|
||||||
|
url: "market://search?q=" + aURI.scheme,
|
||||||
|
};
|
||||||
|
|
||||||
|
sendMessageToJava(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentDispatchChooser]);
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentDispatchChooser]);
|
||||||
|
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
protocol.failed=Couldn't find an application to open this link
|
protocol.failed=Couldn't find an app to open this link
|
||||||
|
# A very short string shown in the button toast when no application can open the url
|
||||||
|
protocol.toast.search=Search
|
||||||
|
Loading…
Reference in New Issue
Block a user