From 1fe4e9b6420204db06b95f305424548842f60112 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Tue, 4 Mar 2014 09:28:08 +0100 Subject: [PATCH] Added options to use a RSS item as new search, to follow its link or to view the item description. Fixes #45. --- .../res/drawable-hdpi/ic_action_info_dark.png | Bin 0 -> 911 bytes .../drawable-hdpi/ic_action_info_light.png | Bin 0 -> 994 bytes .../res/drawable-mdpi/ic_action_info_dark.png | Bin 0 -> 550 bytes .../drawable-mdpi/ic_action_info_light.png | Bin 0 -> 656 bytes .../drawable-xhdpi/ic_action_info_dark.png | Bin 0 -> 1223 bytes .../drawable-xhdpi/ic_action_info_light.png | Bin 0 -> 1348 bytes .../drawable-xxhdpi/ic_action_info_dark.png | Bin 0 -> 1968 bytes .../drawable-xxhdpi/ic_action_info_light.png | Bin 0 -> 2229 bytes core/res/menu/fragment_rssitems_cab.xml | 18 ++++++++ core/res/menu/fragment_searchresults_cab.xml | 12 ++--- core/res/values/attrs.xml | 3 +- core/res/values/strings.xml | 3 ++ core/res/values/styles.xml | 2 + .../core/gui/rss/RssitemsFragment.java | 41 ++++++++++++++++++ .../core/service/AppUpdateService.java | 2 +- 15 files changed, 73 insertions(+), 8 deletions(-) create mode 100755 core/res/drawable-hdpi/ic_action_info_dark.png create mode 100755 core/res/drawable-hdpi/ic_action_info_light.png create mode 100755 core/res/drawable-mdpi/ic_action_info_dark.png create mode 100755 core/res/drawable-mdpi/ic_action_info_light.png create mode 100755 core/res/drawable-xhdpi/ic_action_info_dark.png create mode 100755 core/res/drawable-xhdpi/ic_action_info_light.png create mode 100755 core/res/drawable-xxhdpi/ic_action_info_dark.png create mode 100755 core/res/drawable-xxhdpi/ic_action_info_light.png diff --git a/core/res/drawable-hdpi/ic_action_info_dark.png b/core/res/drawable-hdpi/ic_action_info_dark.png new file mode 100755 index 0000000000000000000000000000000000000000..2bc2c0c1ff1f3ac42e297c2a979e968f25199687 GIT binary patch literal 911 zcmV;A191F_P)94_$VoQ{r+{XZnyW|`#kq!UN`rtfA{@3=RD{CJm)#*+^5l1@zJQb|6MhK zPVZp71N9E%T!A`-!VB1HwPx^r1y};+fm!zdH=ZBCYcSquG=An>_`m9f>;R6h#^O$} z7R*d>?g#%r1tSo7o|i~20yw@H2ljzAAxD1k`7QVWzS!@xdCmum!1R#p7@vnAGLe-? zW&${`6+ZwJHX7sLE_i}NpW8Wv&K!PU2eyLcCZlk=gw9A765a%GVj2@22itAJNpnD9 z;XJUTaMJ=TG^N`-2O#p>*$9GJ2%HExKg#DpCjIU+X&?&;9rB}~Cm?~Xeji(21T1W{ z`WiQxY|v-2I9cq4%Cl3&cI=P{;HE-U9ENd1jypUN=&(ca{-GO3T2_q1Mk-oY%bKV3>YvzoEZ##Vm zy=|7mRYNW$N=06)sLRzWq{h@-tAutU>&4c3Y-|CYx!8)FiMXr9cgVd5Nmq+H z)XzX?t`;Lis(HB^O>_4Ctk75r!q@9x`Thy~o7d|u`MN9_uR2hc6M5{`1oEt25xVsb l6tRkVY}7lDXZ4EE{R1CRqCkVA$#4Jw002ovPDHLkV1kR1s>1*P literal 0 HcmV?d00001 diff --git a/core/res/drawable-hdpi/ic_action_info_light.png b/core/res/drawable-hdpi/ic_action_info_light.png new file mode 100755 index 0000000000000000000000000000000000000000..3e1f5b43d674163ce072c187e2cf7c53ed1f942d GIT binary patch literal 994 zcmV<810DQ{P)U1_E|=RH2n046hOv%sHR}71VzKy@@uj-DdSYm3 zDCg4f^V2=?Kr|ZN77PZP(Yk}NN&{||?_>FVzBiRheR5006@jLvrj3O{;V_onUIK#U z^ZYl37qa}$$p5^r=4U-4f^5(vJI=S~gM)*UPKh`s(9qD(%;GI99FoNWJ^{G?P$-ld z7#R5eH$aI*Vhte{MRpIebxI}&(Vmf!kzOYxoDc}aVzCo|*sFj~^V>sQkJ$mhevxo% zfyf3m?`<-f?B=~-M~`g+fNw8>XYu#hZ1zbyo&ITO(UNQ=5~&G?!^hFL%S7U_9bL8v zsIX~MmhZ*tVlmeb-e|)Z&7z2K>b4V3mI=s)C39Snm>0_r4-Y@oAPP3cZ^H~!b z2A(~QClbiz$Y`BbH@0O0Sm}af8y1<)WHKGPu!+axM*wqBk$g#fKU<2hgi~#8?N!zY zv&J~yy<^3-mI$ake@TVTT`LO8az5-F%0D zq~~_VEC#r!Ydf?AO5r0FmOke4Vnu2pXg1|O=KQYE7+{=D|HcY247L`zPN~?0(M??# zX$g=z4@kuY%p}&hVFiT9m{TKjZKYi1UWb6RDN>Be5-}bw`NXNR=e%AWG~6(^7QKplCSNwAaHP?Sy<(Z zOBAF(4m5Lfa~-3jqiHKeQ`<_ImH2d|Gzgtm-;b0fB0e1ITh&ogmXMnX{|@zvgqPPU zN972q^e)e}O34%De6cmZEf%|4L|}@cyIL#~Iv-c;YSFy8%l2}2VVaY+gA`bYWjC9z z*Lk1eboK3@y0@?kEP)Ky% zh@>Q`=Qla(b01fNpReKI7L4QUIp~j+9J>mZ zRS*SZwoDia$eC~ApcD-2f}^AAA%bk%PYhWldmG>l#7s3|BhW9YoY1A605!-DBycY} zcN!AvIF`XY@?Bl_Yy`G2c*k(mly*oAeJ8+6SajBrm7p^intcRLAh^L#J3B zjR+FxeHip&?8iZmu1{z)fb&ij9E@OeVQ^f=eo|x|=)D^Bnxq!u=p6fXOaxSMO@S_q zo^m9hitz|6=!*5v5^#P5YS;u7Vb~hTya?5qQ;61Uh&(KT%&(yk2x>%u1Y|B`-H6oq zHMU}D)$MXalKxhkb1RlCs4<+)Fj7}<1w=u1!|3PkI~~VqB-}kn(nz>_lKES)lSip; o9^_*$@J*PHAT}Qb0?sq=1$I3QFzvAYTL1t607*qoM6N<$f)ZZt%K!iX literal 0 HcmV?d00001 diff --git a/core/res/drawable-mdpi/ic_action_info_light.png b/core/res/drawable-mdpi/ic_action_info_light.png new file mode 100755 index 0000000000000000000000000000000000000000..715ffcc34d4ae607e90bd43316a34e889595275c GIT binary patch literal 656 zcmV;B0&o3^P)vkADV_fGBYzjJay{STT;^$DIvgYXlQ7|$jImj zv_u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Aa{G8B-qDDgI$KpO& zXuR))KNdFvbdD%)VZ=yKMYx!yu_z=7N4@UyHIjF6bOf7kux@0k5PKbm$C|T7f-1zx z@_4sz%^+#Rwz_0_JV<3&wt^5~(_tFdcah?~AQ77mBD9#V$RxI@8GPS_6ze6a8uPc9 zugTR~EUl_E){ByQKj1QQf4wM~Hq*;fFW4@Sr_&*Al>~%jvk|e%2x!E+7SiW30z$Ic lh*)I=G~!(g>2u*D;5HJfEMMOO;I#k%002ovPDHLkV1jDAMNR+! literal 0 HcmV?d00001 diff --git a/core/res/drawable-xhdpi/ic_action_info_light.png b/core/res/drawable-xhdpi/ic_action_info_light.png new file mode 100755 index 0000000000000000000000000000000000000000..13490fd0b20a7641943d01b9c50e1b352f95b82b GIT binary patch literal 1348 zcmV-K1-tr*P)_XE#ajy>PkvG3U&G z{^!g&XJ&3>SHQ1Gz{kHUBp~#FfHM$Ifq*+e7zD#95Ke)BGf=lFFfcH%FA|B|1>gI* z_i^uOXlQ5_{@2&nukiSj`xowu#bWX2nVA{+T=T1@1oZd!-^`#7H8wUT7-YL~&? zZEY^XT}lP$-<8pP&ERkFH9x zt_g@>^}|^F2%uwjhYTdgZ$I(dBG1cBO-;Y8uCC^#4WFZYzLhq2@U@fY!AkOY#96%I z9BqoOh;T;0;NV~k&`$zvs0`c^-_NhCtR%D9>_1+BcXV{@Zf$K9J@;`RD3eJ-(CO*v z>6{l`*J|U0fZ^fcy;$cZ2)Mn}At1AS{sN$L*8;KG|A|DR4_yzVyTj7GjF-JTH8u6C zAKfDBn}7;~7x$cG&VI(6mFVvKBBnIAw6r{CJYoYgq&OkL7Xjk-U>UJ2e+6KtuzJe( zs4FO-zXW|f&0iboQ%K-3;b%JdAs~W#J_CT#oUiHNOMH}*!0*XaD)kZ1ssdxx1Q6{X zAk95$fEBUEhg!>bc6PRi{NmzbLE|xogl9`r7_T@(;Uw8XeN{z(M z(YvI}V-PqXG89QOq_>YXR>b=x;~X+mA(zkRN2{q5sv>~0_HitJzv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6W`LOy~GDs>fHa)>oV(j>$o@mgxo1TVnQj1_ajks^~q*Wo6r9$?Oac)KRdot zrZ9Chh-%dG+(S0(3p0EMy$4>u?8(=20~&ADvJ?V4Rd3bk;XlWFx#|O8u~7H*LX1}z zQevG>(>d5790n%7ZQeuX^1f-!AA&AKWm;gxPgsrf>!Y&bCo_N7Z-Uwt8sXb16}0S( z!=3jK^l&%X?Zn4%+Sc141;=VOwWP@zYoq=tr*L(>NHBmLi&!tASAD_<)Ox^W=>_Xt zqoQiMr&5exvf=tJVtc3D!*u$GSJrYcRWpg86*O7h2X>y!K<6DWq`l_nbtBb84OrsO zQnjz$t|+_|(*MxU9=wEVELm;o+G-Y7XZ4&o521!@Qjj9j3@xg-TXkZs4F(zJEFp)C zcw?zL*Iam_cnFoQfwH$ba*Tgbzc*Z}@}swQK;a&*96kUAgpU=10crVA<(MEjGp#M= zGr>OjX0`Zi5a+tcygB>N(j<|fE+pmD4fNaj|Q!>HG;5`5&^#*CL1q0EEu!PH=89o)B_ z(NNZr!ZvkU8o53aoUK27$aUC;V)e{S<4nIxWW<%#4SvL9~q?h)@qDt z=*ZoH&e3(M4r_d2=U^3wmIax*4@9rt53)1QWLp}t%TiO)9qzXygrjz`Q z6Uo#PC18xp;58*;X49oKR_>EtUrw=o6&^hCn+-Cu-);YIuGO9+lWzO;hgHC-FTrsA zoQ!BC$)Z-m?L{m0%Dlh5Js$u)2%}tm<*PiS*s#%+t;WU!3(<4{*_N_fkIPB6o|OqxqQ24pe*^a4#vRDzqy!X& T!RL#Alo*_L_H=4+h|KvnR_%#d literal 0 HcmV?d00001 diff --git a/core/res/drawable-xxhdpi/ic_action_info_light.png b/core/res/drawable-xxhdpi/ic_action_info_light.png new file mode 100755 index 0000000000000000000000000000000000000000..26bd07681f1564565e8ac281feaf1dd3f4e873ef GIT binary patch literal 2229 zcma)8SvVB>1O3gSK_()`wJ%wcwX78x#xj}1K<88cV5E^{@Z zB&KvRMD|@0p+T10|NTDv&-a~kUe4qB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MTxz*0tTj%GO3t4Uv6P*gg{&OH$g|3gsWt$iExM9sWx#y)b%~TFyJH&p1|lZ>8R-l z?$*efuglB$GCe#@q6@Lq`!(1nLx7Lz`(r=k8Xq`z+JDo>qhR#r6AFaBAOH0@YIX-s z?q}1n?35ojmXg$=o(K&<0!a_GytVvV#Iv<0q5&+g3V#?M)lWY(~~-f%s{bH%o0o*08PWEfa%7+7o$mP$=GhYTsdOXQ&}yWyjwqi?ASk}Zeb z@{5){M1%Ctl$OYd2Y()?RtMjaQtaf7HZ+cz9m*=55J)}YkjBKU^pw*kz{&n{no5_I zI!G1ivLbuD+jwXn4NbK{)GKPu?tH?$0;cav5{Q!o?QF$4v45Hn)6SH=p?_3B+7Ew9 zeD~LxrP$b5bV?a*5-!_iHSXi*m)*SN$nT_@+vBSE+0CqFW~l?l+GRu9VOn}Sw$9&X z9?zJKLK^~As=SdO(JT;+Tj@0q|8#%y4`6H8LOk&%{U_z*w0HIFFK_MOh%H*V7snW_ zQa44C;00+P#a~s`gciaiRv7N0Ptj{^#N+0wLxXsZ7(bBQ%Q4?x-h*BfCc3VEam#V=|4&C8y zMJT@kOf&pfbCv*Vwht|eYF3CC)fKou`c;+_lKrrx-c(&W+WX z_QbVJ4Gonr(qBU5EQcRCI~NrcL@~cbIOuV?XBf5rC2fy;w`0RtEh)&Kwi literal 0 HcmV?d00001 diff --git a/core/res/menu/fragment_rssitems_cab.xml b/core/res/menu/fragment_rssitems_cab.xml index 0edbe7ed..07ca6b1a 100644 --- a/core/res/menu/fragment_rssitems_cab.xml +++ b/core/res/menu/fragment_rssitems_cab.xml @@ -22,4 +22,22 @@ android:showAsAction="always" android:title="@string/action_addall" /> + + + + + + diff --git a/core/res/menu/fragment_searchresults_cab.xml b/core/res/menu/fragment_searchresults_cab.xml index e80c76c8..5bdbe14c 100644 --- a/core/res/menu/fragment_searchresults_cab.xml +++ b/core/res/menu/fragment_searchresults_cab.xml @@ -16,16 +16,16 @@ --> - - + + diff --git a/core/res/values/attrs.xml b/core/res/values/attrs.xml index 820371c5..71ca0075 100644 --- a/core/res/values/attrs.xml +++ b/core/res/values/attrs.xml @@ -23,7 +23,9 @@ + + @@ -43,7 +45,6 @@ - diff --git a/core/res/values/strings.xml b/core/res/values/strings.xml index 8190c96f..227dacc1 100644 --- a/core/res/values/strings.xml +++ b/core/res/values/strings.xml @@ -62,8 +62,11 @@ Remote play in VLC Download using FTP(S) Show details + Open website + Use as new search Remove settings Visit transdroid.org + Close %1$s allows you to monitor and manage the torrent client you run at home or on your seedbox. Setting things up can be a bit tricky, but we offer step-by-step guides and promise it\'ll be worth it! Connected, but no torrents are active within the current filter diff --git a/core/res/values/styles.xml b/core/res/values/styles.xml index 35ef04d7..5362cc78 100644 --- a/core/res/values/styles.xml +++ b/core/res/values/styles.xml @@ -24,6 +24,7 @@ @drawable/ic_action_discard_light @drawable/ic_action_done_light @drawable/ic_action_filter_light + @drawable/ic_action_info_light @drawable/ic_action_labels_light @drawable/ic_action_new_light @drawable/ic_action_pause_light @@ -58,6 +59,7 @@ @drawable/ic_action_discard_dark @drawable/ic_action_done_dark @drawable/ic_action_filter_dark + @drawable/ic_action_info_dark @drawable/ic_action_labels_dark @drawable/ic_action_new_dark @drawable/ic_action_pause_dark diff --git a/core/src/org/transdroid/core/gui/rss/RssitemsFragment.java b/core/src/org/transdroid/core/gui/rss/RssitemsFragment.java index 6a92b40b..f8a265aa 100644 --- a/core/src/org/transdroid/core/gui/rss/RssitemsFragment.java +++ b/core/src/org/transdroid/core/gui/rss/RssitemsFragment.java @@ -27,13 +27,23 @@ import org.androidannotations.annotations.ItemClick; import org.androidannotations.annotations.ViewById; import org.transdroid.core.R; import org.transdroid.core.gui.TorrentsActivity_; +import org.transdroid.core.gui.navigation.NavigationHelper; import org.transdroid.core.gui.navigation.SelectionManagerMode; +import org.transdroid.core.gui.search.SearchActivity_; import org.transdroid.core.rssparser.Channel; import org.transdroid.core.rssparser.Item; +import android.app.AlertDialog; +import android.app.Dialog; +import android.app.SearchManager; import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.support.v4.app.DialogFragment; +import android.text.TextUtils; import android.view.View; import android.widget.TextView; +import android.widget.Toast; import com.actionbarsherlock.app.SherlockFragment; import com.actionbarsherlock.view.ActionMode; @@ -42,6 +52,8 @@ import com.actionbarsherlock.view.MenuItem; import com.actionbarsherlock.view.SherlockListView; import com.actionbarsherlock.view.SherlockListView.MultiChoiceModeListenerCompat; +import de.keyboardsurfer.android.widget.crouton.Crouton; + /** * Fragment that lists the items in a specific RSS feed * @author Eric Kok @@ -151,6 +163,35 @@ public class RssitemsFragment extends SherlockFragment { mode.finish(); return true; } else { + // The other items only operate on one (the first) selected item + if (checked.size() < 1) + return false; + final Item first = checked.get(0); + if (itemId == R.id.action_showdetails) { + // Show a dialog box with the RSS item description text + new DialogFragment() { + public Dialog onCreateDialog(Bundle savedInstanceState) { + return new AlertDialog.Builder(getActivity()).setMessage(first.getDescription()) + .setPositiveButton(R.string.action_close, null).create(); + }; + }.show(getFragmentManager(), "RssItemDescription"); + } else if (itemId == R.id.action_openwebsite) { + // Open the browser to show the website contained in the item's link tag + Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first.getTitle()), + Toast.LENGTH_LONG).show(); + if (!TextUtils.isEmpty(first.getLink())) { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(first.getLink()))); + } else { + // No URL was specified in the RSS feed item link tag (or no link tag was present) + Crouton.showText(getActivity(), R.string.error_no_link, NavigationHelper.CROUTON_ERROR_STYLE); + } + } else if (itemId == R.id.action_useassearch) { + // Use the RSS item title to start a new search (mimicking the search manager style) + Intent search = SearchActivity_.intent(getActivity()).get(); + search.setAction(Intent.ACTION_SEARCH); + search.putExtra(SearchManager.QUERY, first.getTitle()); + startActivity(search); + } return false; } } diff --git a/core/src/org/transdroid/core/service/AppUpdateService.java b/core/src/org/transdroid/core/service/AppUpdateService.java index 1180442d..381deed0 100644 --- a/core/src/org/transdroid/core/service/AppUpdateService.java +++ b/core/src/org/transdroid/core/service/AppUpdateService.java @@ -87,7 +87,7 @@ public class AppUpdateService extends IntentService { Calendar lastDay = Calendar.getInstance(); lastDay.add(Calendar.DAY_OF_MONTH, -1); if (lastChecked != null && lastChecked.after(lastDay.getTime())) { - Log.d(this, "Ship the update service, as we already checked the last 24 hours (or to be exact at " + Log.d(this, "Skip the update service, as we already checked the last 24 hours (or to be exact at " + lastChecked.toString() + ")."); return; }