aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-11-14 22:41:45 -0800
committerScott Jackson <daneren2005@gmail.com>2013-11-14 22:41:45 -0800
commit8376ebf442d64a3baa05fa532f4c92c7407af960 (patch)
tree6bf195b77d01379acf8d4da2925280e9c19f3b51 /src
parent2b646e9342e0dd51dc3c9514ece70a8b1d8e6d21 (diff)
downloaddsub-8376ebf442d64a3baa05fa532f4c92c7407af960.tar.gz
dsub-8376ebf442d64a3baa05fa532f4c92c7407af960.tar.bz2
dsub-8376ebf442d64a3baa05fa532f4c92c7407af960.zip
#181 Temp disable secondary context menus
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/fragments/DownloadFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/EqualizerFragment.java3
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java3
-rw-r--r--src/github/daneren2005/dsub/fragments/SearchFragment.java3
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectArtistFragment.java3
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectGenreFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java3
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java4
10 files changed, 35 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
index a35e7c42..d46fbec6 100644
--- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java
+++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
@@ -523,6 +523,10 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
@Override
public void onCreateContextMenu(android.view.ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
+
if (view == playlistView) {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
DownloadFile downloadFile = (DownloadFile) playlistView.getItemAtPosition(info.position);
diff --git a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java
index 56f876cb..8b2c5313 100644
--- a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java
+++ b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java
@@ -107,6 +107,9 @@ public class EqualizerFragment extends SubsonicFragment {
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
short currentPreset;
try {
diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java
index 8aa465f7..0d865fe8 100644
--- a/src/github/daneren2005/dsub/fragments/MainFragment.java
+++ b/src/github/daneren2005/dsub/fragments/MainFragment.java
@@ -95,6 +95,9 @@ public class MainFragment extends SubsonicFragment {
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
int serverCount = Util.getServerCount(context);
int activeServer = Util.getActiveServer(context);
diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java
index 25fee43d..900872da 100644
--- a/src/github/daneren2005/dsub/fragments/SearchFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java
@@ -151,6 +151,9 @@ public class SearchFragment extends SubsonicFragment {
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
Object selectedItem = list.getItemAtPosition(info.position);
diff --git a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
index 5e2548e1..ed629a15 100644
--- a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
@@ -105,6 +105,9 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
Object entry = artistList.getItemAtPosition(info.position);
diff --git a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
index fce31414..dc892634 100644
--- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
@@ -108,6 +108,10 @@ public class SelectBookmarkFragment extends SubsonicFragment implements AdapterV
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
+
MenuInflater inflater = context.getMenuInflater();
inflater.inflate(R.menu.select_bookmark_context, menu);
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 428e20fb..0081f881 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -235,6 +235,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
+
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
MusicDirectory.Entry entry = (MusicDirectory.Entry) entryList.getItemAtPosition(info.position);
diff --git a/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java b/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
index e6bf66b6..4f0b8a03 100644
--- a/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
@@ -81,6 +81,10 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
+ if(!primaryFragment) {
+ return;
+ }
+
menuInflater.inflate(R.menu.select_genres, menu);
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
index 79889c2c..01c9d938 100644
--- a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
@@ -96,6 +96,9 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
MenuInflater inflater = context.getMenuInflater();
if (Util.isOffline(context)) {
diff --git a/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
index 3ce7917e..143ff229 100644
--- a/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
@@ -127,6 +127,10 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
+ if(!primaryFragment) {
+ return;
+ }
+
if(!Util.isOffline(context)) {
android.view.MenuInflater inflater = context.getMenuInflater();
inflater.inflate(R.menu.select_podcasts_context, menu);