mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 726204 - Offer a button to go back to Awesome screen from Sync setup. r=rnewman
This commit is contained in:
parent
03ce34e73c
commit
fc4f974eb0
@ -44,9 +44,9 @@
|
||||
|
||||
<!-- Setup Success -->
|
||||
<!ENTITY sync.title.success.label 'Setup Complete'>
|
||||
<!ENTITY sync.subtitle.success.label 'Your data is now being downloaded in the background. You can go to Settings to manage your account.'>
|
||||
<!ENTITY sync.subtitle.success.label1 'Your data is now being downloaded in the background. You can go to Settings to manage your account, or start browsing with &brandShortName;.'>
|
||||
<!ENTITY sync.settings.label 'Settings'>
|
||||
<!ENTITY sync.subtitle.manage.label 'Your &syncBrand.fullName.label; account is already set up. Go to Settings to manage your account.'>
|
||||
<!ENTITY sync.subtitle.manage.label1 'Your &syncBrand.fullName.label; account is already set up. You can go to Settings to manage your account, or launch &brandShortName;.'>
|
||||
|
||||
<!-- Pair Device -->
|
||||
<!ENTITY sync.pair.tryagain.label 'Please try again.'>
|
||||
|
@ -24,10 +24,15 @@
|
||||
android:text="@string/sync_subtitle_success" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SyncBottom" >
|
||||
style="@style/SyncBottom"
|
||||
android:orientation="horizontal" >
|
||||
<Button
|
||||
style="@style/SyncButton"
|
||||
android:onClick="settingsClickHandler"
|
||||
android:text="@string/sync_settings" />
|
||||
<Button
|
||||
style="@style/SyncButton"
|
||||
android:onClick="launchBrowser"
|
||||
android:text="@string/brand_short_name" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
@ -14,4 +14,6 @@ public class GlobalConstants {
|
||||
|
||||
public static final String USER_AGENT = "Firefox AndroidSync " + SYNC_VERSION_STRING +
|
||||
" (" + PRODUCT_NAME + ")";
|
||||
public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@";
|
||||
public static final String BROWSER_INTENT_CLASS = BROWSER_INTENT_PACKAGE + ".App";
|
||||
}
|
||||
|
@ -5,11 +5,11 @@
|
||||
package org.mozilla.gecko.sync.setup.activities;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.sync.GlobalConstants;
|
||||
import org.mozilla.gecko.sync.Logger;
|
||||
import org.mozilla.gecko.sync.setup.Constants;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
@ -19,13 +19,11 @@ import android.widget.TextView;
|
||||
public class SetupSuccessActivity extends Activity {
|
||||
private final static String LOG_TAG = "SetupSuccessActivity";
|
||||
private TextView setupSubtitle;
|
||||
private Context mContext;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(R.style.SyncTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
mContext = getApplicationContext();
|
||||
Bundle extras = this.getIntent().getExtras();
|
||||
setContentView(R.layout.sync_setup_success);
|
||||
setupSubtitle = ((TextView) findViewById(R.id.setup_success_subtitle));
|
||||
@ -46,14 +44,15 @@ public class SetupSuccessActivity extends Activity {
|
||||
/* Click Handlers */
|
||||
public void settingsClickHandler(View target) {
|
||||
Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void pairClickHandler(View target) {
|
||||
Intent intent = new Intent(mContext, SetupSyncActivity.class);
|
||||
intent.setFlags(Constants.FLAG_ACTIVITY_REORDER_TO_FRONT_NO_ANIMATION);
|
||||
intent.putExtra(Constants.INTENT_EXTRA_IS_SETUP, false);
|
||||
public void launchBrowser(View target) {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.setClassName(GlobalConstants.BROWSER_INTENT_PACKAGE, GlobalConstants.BROWSER_INTENT_CLASS);
|
||||
// Start Fennec as a new task. If Fennec is already running, bring it to the front.
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
- 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/. -->
|
||||
|
||||
<!-- Used for setup success. -->
|
||||
<string name="brand_short_name">&brandShortName;</string>
|
||||
|
||||
<string name="sync_app_name">&sync.app.name.label;</string>
|
||||
<string name="sync_title_connect">&sync.title.adddevice.label;</string>
|
||||
<string name="sync_title_pair">&sync.title.pair.label;</string>
|
||||
@ -35,9 +38,9 @@
|
||||
|
||||
<!-- Setup Success -->
|
||||
<string name="sync_title_success">&sync.title.success.label;</string>
|
||||
<string name="sync_subtitle_success">&sync.subtitle.success.label;</string>
|
||||
<string name="sync_subtitle_success">&sync.subtitle.success.label1;</string>
|
||||
<string name="sync_settings">&sync.settings.label;</string>
|
||||
<string name="sync_subtitle_manage">&sync.subtitle.manage.label;</string>
|
||||
<string name="sync_subtitle_manage">&sync.subtitle.manage.label1;</string>
|
||||
|
||||
<!-- Pair Device -->
|
||||
<string name="sync_pair_tryagain">&sync.pair.tryagain.label;</string>
|
||||
|
Loading…
Reference in New Issue
Block a user