Changeset 857
- Timestamp:
- 02/07/14 14:49:07 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.classpath
r557 r857 18 18 <classpathentry kind="lib" path="releases/jars/jazzy-core.jar"/> 19 19 <classpathentry kind="lib" path="releases/jars/PDFRenderer-0.9.1.jar"/> 20 <classpathentry kind="lib" path="releases/json-simple-1.1.1.jar"/> 20 21 <classpathentry kind="output" path="bin/src"/> 21 22 </classpath> -
trunk/src/org/expeditee/actions/JfxBrowserActions.java
r855 r857 188 188 String queryForUrl = URLEncoder.encode(query.trim(), "UTF-8"); 189 189 190 HttpURLConnection connection = (HttpURLConnection) (new URL("http://api.duckduckgo.com/?q=" + queryForUrl + "&format=json&no_html=1& t=expeditee").openConnection());190 HttpURLConnection connection = (HttpURLConnection) (new URL("http://api.duckduckgo.com/?q=" + queryForUrl + "&format=json&no_html=1&no_redirect=1&t=expeditee").openConnection()); 191 191 192 192 Object parsedObject = parser.parse(new InputStreamReader(connection.getInputStream())); … … 269 269 ddgLink.setFontStyle("italic"); 270 270 271 titleItem.setPosition(FrameMouseActions.getPosition()); 271 272 Picture pic = null; 272 273 273 274 if (!picSource.equals("")) { 274 Picture pic = WebParser.getImageFromUrl(picSource, null, DisplayIO.getCurrentFrame(), titleItem.getX() - 55, titleItem.getY() - 14, 50, null, null,275 pic = WebParser.getImageFromUrl(picSource, null, DisplayIO.getCurrentFrame(), 0, 0, 50, null, null, 275 276 null, null, null, 0, 0); 276 277 items.add(pic); … … 278 279 } 279 280 281 titleItem.setPosition(FrameMouseActions.getPosition()); 280 282 mainTextItem.setPosition(titleItem.getX(), titleItem.getY() + titleItem.getBoundsHeight()); 281 283 sourceItem.setPosition(mainTextItem.getX(), mainTextItem.getY() + mainTextItem.getBoundsHeight()); 282 284 ddgLink.setPosition(sourceItem.getX() + sourceItem.getBoundsWidth(), sourceItem.getY()); 285 286 if (pic != null) { 287 pic.getSource().setPosition(titleItem.getX() - 55, titleItem.getY() - 14); 288 } 283 289 284 290 items.add(titleItem); … … 287 293 items.add(ddgLink); 288 294 FrameMouseActions.pickup(items); 289 } catch (MalformedURLException e) {290 // TODO Auto-generated catch block291 e.printStackTrace();292 295 } catch (IOException e) { 293 // TODO Auto-generated catch block296 MessageBay.displayMessage("Problem loading results"); 294 297 e.printStackTrace(); 295 298 } catch (ParseException e) { 296 // TODO Auto-generated catch block297 299 e.printStackTrace(); 298 300 }
Note:
See TracChangeset
for help on using the changeset viewer.