Browse Source

Updated turtle mode icons and fixed tutle mode status indication.

pull/11/head
Eric Kok 12 years ago
parent
commit
70ab9ef37d
  1. BIN
      core/res/drawable-hdpi/ic_action_rss.png
  2. BIN
      core/res/drawable-hdpi/ic_action_turtle_disabled.png
  3. BIN
      core/res/drawable-hdpi/ic_action_turtle_enabled.png
  4. BIN
      core/res/drawable-mdpi/ic_action_rss.png
  5. BIN
      core/res/drawable-mdpi/ic_action_turtle_disabled.png
  6. BIN
      core/res/drawable-mdpi/ic_action_turtle_enabled.png
  7. BIN
      core/res/drawable-xhdpi/ic_action_rss.png
  8. BIN
      core/res/drawable-xhdpi/ic_action_turtle_disabled.png
  9. BIN
      core/res/drawable-xhdpi/ic_action_turtle_enabled.png
  10. 4
      core/src/org/transdroid/core/app/settings/ApplicationSettings.java
  11. 13
      core/src/org/transdroid/core/gui/TorrentsActivity.java
  12. 1
      core/src/org/transdroid/core/gui/TorrentsFragment.java

BIN
core/res/drawable-hdpi/ic_action_rss.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
core/res/drawable-hdpi/ic_action_turtle_disabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
core/res/drawable-hdpi/ic_action_turtle_enabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 742 B

After

Width:  |  Height:  |  Size: 853 B

BIN
core/res/drawable-mdpi/ic_action_rss.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

After

Width:  |  Height:  |  Size: 909 B

BIN
core/res/drawable-mdpi/ic_action_turtle_disabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 690 B

BIN
core/res/drawable-mdpi/ic_action_turtle_enabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 571 B

BIN
core/res/drawable-xhdpi/ic_action_rss.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
core/res/drawable-xhdpi/ic_action_turtle_disabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
core/res/drawable-xhdpi/ic_action_turtle_enabled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

4
core/src/org/transdroid/core/app/settings/ApplicationSettings.java

@ -112,7 +112,7 @@ public class ApplicationSettings { @@ -112,7 +112,7 @@ public class ApplicationSettings {
edit.putBoolean("server_ssltrustall_" + i, prefs.getBoolean("server_ssltrustall_" + (i + 1), false));
edit.putString("server_ssltrustkey_" + i, prefs.getString("server_ssltrustkey_" + (i + 1), null));
edit.putString("server_folder_" + i, prefs.getString("server_folder_" + (i + 1), null));
edit.putBoolean("server_useauth_" + i, prefs.getBoolean("server_useauth_" + (i + 1), false));
edit.putBoolean("server_useauth_" + i, prefs.getBoolean("server_useauth_" + (i + 1), true));
edit.putString("server_user_" + i, prefs.getString("server_user_" + (i + 1), null));
edit.putString("server_pass_" + i, prefs.getString("server_pass_" + (i + 1), null));
edit.putString("server_extrapass_" + i, prefs.getString("server_extrapass_" + (i + 1), null));
@ -121,7 +121,7 @@ public class ApplicationSettings { @@ -121,7 +121,7 @@ public class ApplicationSettings {
edit.putString("server_ftpurl_" + i, prefs.getString("server_ftpurl_" + (i + 1), null));
edit.putString("server_ftppass_" + i, prefs.getString("server_ftppass_" + (i + 1), null));
edit.putString("server_timeout_" + i, prefs.getString("server_timeout_" + (i + 1), null));
edit.putBoolean("server_alarmfinished_" + i, prefs.getBoolean("server_alarmfinished_" + (i + 1), false));
edit.putBoolean("server_alarmfinished_" + i, prefs.getBoolean("server_alarmfinished_" + (i + 1), true));
edit.putBoolean("server_alarmfinished_" + i, prefs.getBoolean("server_alarmfinished_" + (i + 1), false));
}

13
core/src/org/transdroid/core/gui/TorrentsActivity.java

@ -100,6 +100,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -100,6 +100,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
protected ApplicationSettings applicationSettings;
@InstanceState
boolean firstStart = true;
boolean skipNextOnNavigationItemSelectedCall = false;
private IDaemonAdapter currentConnection = null;
@InstanceState
protected NavigationFilter currentFilter = null;
@ -154,7 +155,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -154,7 +155,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
return;
}
// Set this as selection in the action bar spinner; we can use the server setting key since we have stable ids
getSupportActionBar().setSelectedNavigationItem(lastUsed.getOrder());
getSupportActionBar().setSelectedNavigationItem(lastUsed.getOrder() + 1);
skipNextOnNavigationItemSelectedCall = true;
// Handle any start up intents
if (firstStart && getIntent() != null) {
@ -242,6 +244,10 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -242,6 +244,10 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
*/
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
if (skipNextOnNavigationItemSelectedCall) {
skipNextOnNavigationItemSelectedCall = false;
return false;
}
Object item = navigationSpinnerAdapter.getItem(itemPosition);
if (item instanceof SimpleListItem) {
// A filter item was selected form the navigation spinner
@ -297,9 +303,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -297,9 +303,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
if (fragmentDetails != null && fragmentDetails.getActivity() != null) {
fragmentDetails.clear();
}
fragmentTorrents.updateIsLoading(true);
updateFragmentVisibility(true);
refreshTorrents();
refreshScreen();
return;
}
@ -558,7 +563,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -558,7 +563,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
@Background
protected void updateTurtleMode(boolean enable) {
DaemonTaskResult result = SetAlternativeModeTask.create(currentConnection, enable).execute();
if (result instanceof GetStatsTaskSuccessResult) {
if (result instanceof DaemonTaskSuccessResult) {
// Success; no need to retrieve it again - just update the visual indicator
onTurtleModeRetrieved(enable);
} else {

1
core/src/org/transdroid/core/gui/TorrentsFragment.java

@ -91,6 +91,7 @@ public class TorrentsFragment extends SherlockFragment { @@ -91,6 +91,7 @@ public class TorrentsFragment extends SherlockFragment {
* Clears the currently visible list of torrents.
*/
public void clear() {
this.torrents = null;
this.connectionErrorMessage = null;
this.currentTextFilter = null;
this.currentNavigationFilter = null;

Loading…
Cancel
Save