diff options
4 files changed, 17 insertions, 7 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/app/VdrManagerApp.java b/vdrmanager/src/de/bjusystems/vdrmanager/app/VdrManagerApp.java index c04b55b..12620d2 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/app/VdrManagerApp.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/app/VdrManagerApp.java @@ -56,7 +56,6 @@ public class VdrManagerApp extends Application { Preferences.init(this); } - public void clear() { this.currentEvent = null; this.currentTimer = null; @@ -72,11 +71,6 @@ public class VdrManagerApp extends Application { public void setCurrentEvent(final Event currentEvent) { this.currentEvent = currentEvent; - //if (currentEvent.getTimer() != null) { - //this.currentTimer = currentEvent.getTimer(); - //} else { - //this.currentTimer = new Timer(currentEvent); - //} } public Timer getCurrentTimer() { diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java index 269ace9..412b4de 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java @@ -4,6 +4,7 @@ import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.net.ConnectivityManager; +import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -15,6 +16,7 @@ import android.widget.ViewFlipper; import de.bjusystems.vdrmanager.R; import de.bjusystems.vdrmanager.app.VdrManagerApp; import de.bjusystems.vdrmanager.data.Channel; +import de.bjusystems.vdrmanager.data.Preferences; import de.bjusystems.vdrmanager.utils.svdrp.SvdrpAsyncListener; import de.bjusystems.vdrmanager.utils.svdrp.SvdrpEvent; import de.bjusystems.vdrmanager.utils.svdrp.SvdrpException; @@ -58,6 +60,12 @@ public abstract class BaseActivity<Result, T extends ListView> extends Activity } } + @Override + protected void onResume() { + Preferences.init(this); + super.onResume(); + } + protected void initFlipper() { this.flipper = (ViewFlipper) findViewById(R.id.flipper); retry = (Button) findViewById(R.id.retry_button); @@ -89,6 +97,12 @@ public abstract class BaseActivity<Result, T extends ListView> extends Activity // } @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Preferences.setLocale(this); + } + + @Override public boolean onCreateOptionsMenu(final Menu menu) { MenuItem item; item = menu.add(MENU_GROUP_REFRESH, MENU_REFRESH, 0, R.string.refresh); diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java index 094e5be..a2037f2 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java @@ -83,6 +83,7 @@ public class TimerListActivity extends BaseTimerEditActivity<Timer> implements progress = new SvdrpProgressDialog(this, timerClient); // attach listener + task.addListener(progress); task.addListener(this); // start task diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java index d3fbcb6..87f960e 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java @@ -18,7 +18,8 @@ public class VdrManagerActivity extends Activity implements OnClickListener { @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); - + + Preferences.setLocale(this); // attach view setContentView(R.layout.vdrmanager); |