# HG changeset patch
# User Xeli
# Date 1326658095 -3600
# Node ID ad83229a7d98ae1cc72e608aad28eb07b5fbf828
# Parent 30e042398411130582de040160541c7fb4e6d1e1# Parent 54e19cefcdac0c62bc756edf86ad54ebed77b6bc
changed error message
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/AndroidManifest.xml
--- a/project_files/Android-build/SDL-android-project/AndroidManifest.xml Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/AndroidManifest.xml Sun Jan 15 21:08:15 2012 +0100
@@ -30,8 +30,8 @@
-
+ android:screenOrientation='landscape'
+ android:launchMode="singleTop"/>
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/ant.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/ant.properties Sun Jan 15 21:08:15 2012 +0100
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/project.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/project.properties Sun Jan 15 21:08:15 2012 +0100
@@ -0,0 +1,2 @@
+# Project target.
+target=android-4
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/res/values/strings.xml
--- a/project_files/Android-build/SDL-android-project/res/values/strings.xml Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/res/values/strings.xml Sun Jan 15 21:08:15 2012 +0100
@@ -21,7 +21,7 @@
Done
Back to main menu
Try again
- The download has failed, check the internet connectivity and please try again
+ The download has failed because of:
Before starting the game we must download some extra files...
Are you sure you want to download this package?
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadDialogFragment.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadDialogFragment.java Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadDialogFragment.java Sun Jan 15 21:08:15 2012 +0100
@@ -60,7 +60,7 @@
public void onClick(DialogInterface dialog, int which) {
if(which == Dialog.BUTTON_POSITIVE){
- Intent i = new Intent(getActivity(), DownloadFragment.class);
+ Intent i = new Intent(getActivity(), DownloadListActivity.class);
i.putExtra(DownloadFragment.EXTRA_TASK, task);
getActivity().startActivity(i);
}
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadFragment.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadFragment.java Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadFragment.java Sun Jan 15 21:08:15 2012 +0100
@@ -32,7 +32,6 @@
import android.os.Messenger;
import android.os.RemoteException;
import android.support.v4.app.Fragment;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -199,10 +198,14 @@
break;
case MSG_FAILED:
progress.setProgress(progress.getMax());
- progress_sub.setText(R.string.download_failed);
- // positive.setText(R.string.download_back);
- // positive.setOnClickListener(doneClicker);
-
+
+ String errorMsg = getString(R.string.download_failed);
+ switch(msg.arg1){
+ case DownloadAsyncTask.EXIT_CONNERROR: progress_sub.setText(errorMsg + " " + "Connection error"); break;
+ case DownloadAsyncTask.EXIT_FNF: progress_sub.setText(errorMsg + " " + "File not found"); break;
+ case DownloadAsyncTask.EXIT_MD5: progress_sub.setText(errorMsg + " " + "MD5 check failed"); break;
+ case DownloadAsyncTask.EXIT_URLFAIL: progress_sub.setText(errorMsg + " " + "Invalid url"); break;
+ }
negative.setText(R.string.download_tryagain);
negative.setOnClickListener(tryAgainClicker);
break;
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadService.java Sun Jan 15 21:08:15 2012 +0100
@@ -175,7 +175,7 @@
contentView.setProgressBar(R.id.notification_progress, 100, 34, false);
progressNotification.contentView = contentView;
- PendingIntent contentIntent = PendingIntent.getActivity(DownloadService.this, 0, new Intent(DownloadService.this, DownloadFragment.class), Intent.FLAG_ACTIVITY_NEW_TASK);
+ PendingIntent contentIntent = PendingIntent.getActivity(DownloadService.this, 0, new Intent(DownloadService.this, DownloadListActivity.class), Intent.FLAG_ACTIVITY_NEW_TASK);
progressNotification.contentIntent = contentIntent;
startForeground(NOTIFICATION_PROCESSING, progressNotification);
@@ -199,10 +199,10 @@
public void done(int result){
switch(result){
case DownloadAsyncTask.EXIT_SUCCESS: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_DONE)); break;
- case DownloadAsyncTask.EXIT_CONNERROR: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED)); break;
- case DownloadAsyncTask.EXIT_FNF: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED)); break;
- case DownloadAsyncTask.EXIT_MD5: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED)); break;
- case DownloadAsyncTask.EXIT_URLFAIL: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED)); break;
+ case DownloadAsyncTask.EXIT_CONNERROR: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED, DownloadAsyncTask.EXIT_CONNERROR, 0)); break;
+ case DownloadAsyncTask.EXIT_FNF: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED, DownloadAsyncTask.EXIT_FNF, 0)); break;
+ case DownloadAsyncTask.EXIT_MD5: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED, DownloadAsyncTask.EXIT_MD5, 0)); break;
+ case DownloadAsyncTask.EXIT_URLFAIL: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_FAILED, DownloadAsyncTask.EXIT_URLFAIL, 0)); break;
case DownloadAsyncTask.EXIT_CANCELLED: sendMessageToClients(Message.obtain(handler, DownloadFragment.MSG_DONE)); break;
}
diff -r 30e042398411 -r ad83229a7d98 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java Sun Jan 15 12:40:48 2012 -0500
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java Sun Jan 15 21:08:15 2012 +0100
@@ -67,8 +67,12 @@
private boolean saved = false;
private String fileName = null;
- private List> flagsData, typesData, gravesData, hatsData;
- private List voicesData, fortsData;
+ private final List> flagsData = new ArrayList>();
+ private final List> typesData = new ArrayList>();
+ private final List> gravesData = new ArrayList>();
+ private final List> hatsData = new ArrayList>();
+ private final List voicesData = new ArrayList();
+ private final List fortsData = new ArrayList();
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -104,7 +108,6 @@
.findViewById(R.id.txtTeam1));
}
- gravesData = new ArrayList>();
SimpleAdapter sa = new SimpleAdapter(this, gravesData,
R.layout.spinner_textimg_entry, new String[] { "txt", "img" },
new int[] { R.id.spinner_txt, R.id.spinner_img });
@@ -113,7 +116,6 @@
grave.setAdapter(sa);
grave.setOnFocusChangeListener(focusser);
- flagsData = new ArrayList>();
sa = new SimpleAdapter(this, flagsData, R.layout.spinner_textimg_entry,
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt,
R.id.spinner_img });
@@ -122,7 +124,6 @@
flag.setAdapter(sa);
flag.setOnFocusChangeListener(focusser);
- typesData = new ArrayList>();
sa = new SimpleAdapter(this, typesData, R.layout.spinner_textimg_entry,
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt,
R.id.spinner_img });
@@ -130,7 +131,6 @@
difficulty.setAdapter(sa);
difficulty.setOnFocusChangeListener(focusser);
- hatsData = new ArrayList>();
sa = new SimpleAdapter(this, hatsData, R.layout.spinner_textimg_entry,
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt,
R.id.spinner_img });
@@ -140,14 +140,12 @@
spin.setAdapter(sa);
}
- voicesData = new ArrayList();
ArrayAdapter adapter = new ArrayAdapter(this, R.layout.listview_item, voicesData);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
voice.setAdapter(adapter);
voice.setOnFocusChangeListener(focusser);
voiceButton.setOnClickListener(voiceClicker);
- fortsData = new ArrayList();
adapter = new ArrayAdapter(this, R.layout.listview_item, fortsData);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
fort.setAdapter(adapter);
@@ -158,28 +156,33 @@
}
public void run(){
- ArrayList> gravesData = FrontendDataUtils.getGraves(this);
- ArrayList> flagsData = FrontendDataUtils.getFlags(this);
- ArrayList> typesData = FrontendDataUtils.getTypes(this);
- ArrayList> hatsData = FrontendDataUtils.getHats(this);
- ArrayList voicesData = FrontendDataUtils.getVoices(this);
- ArrayList fortsData = FrontendDataUtils.getForts(this);
+ final ArrayList> gravesDataNew = FrontendDataUtils.getGraves(this);
+ final ArrayList> flagsDataNew = FrontendDataUtils.getFlags(this);
+ final ArrayList> typesDataNew = FrontendDataUtils.getTypes(this);
+ final ArrayList> hatsDataNew = FrontendDataUtils.getHats(this);
+ final ArrayList voicesDataNew = FrontendDataUtils.getVoices(this);
+ final ArrayList fortsDataNew = FrontendDataUtils.getForts(this);
- copy(this.gravesData, gravesData);
- copy(this.flagsData, flagsData);
- copy(this.typesData, typesData);
- copy(this.hatsData, hatsData);
- copy(this.voicesData, voicesData);
- copy(this.fortsData, fortsData);
this.runOnUiThread(new Runnable(){
public void run() {
+ copy(gravesData, gravesDataNew);
((SimpleAdapter)grave.getAdapter()).notifyDataSetChanged();
+
+ copy(flagsData, flagsDataNew);
((SimpleAdapter)flag.getAdapter()).notifyDataSetChanged();
+
+ copy(typesData, typesDataNew);
((SimpleAdapter)difficulty.getAdapter()).notifyDataSetChanged();
- ((SimpleAdapter)hogHat.get(0).getAdapter()).notifyDataSetChanged();
+
+ copy(hatsData, hatsDataNew);
+ ((SimpleAdapter)hogHat.get(0).getAdapter()).notifyDataSetChanged();
+
+ copy(voicesData, voicesDataNew);
((ArrayAdapter)fort.getAdapter()).notifyDataSetChanged();
- ((ArrayAdapter)voice.getAdapter()).notifyDataSetChanged();
+
+ copy(fortsData, fortsDataNew);
+ ((ArrayAdapter)voice.getAdapter()).notifyDataSetChanged();
}
});
diff -r 30e042398411 -r ad83229a7d98 project_files/promotional_art/Icon.png
Binary file project_files/promotional_art/Icon.png has changed
diff -r 30e042398411 -r ad83229a7d98 project_files/promotional_art/Marketplace-header.png
Binary file project_files/promotional_art/Marketplace-header.png has changed
diff -r 30e042398411 -r ad83229a7d98 project_files/promotional_art/Promo-graphic.png
Binary file project_files/promotional_art/Promo-graphic.png has changed