Changeset 857


Ignore:
Timestamp:
02/07/14 14:49:07 (10 years ago)
Author:
ngw8
Message:

Forgot to commit changes to classpath after adding library

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r557 r857  
    1818        <classpathentry kind="lib" path="releases/jars/jazzy-core.jar"/>
    1919        <classpathentry kind="lib" path="releases/jars/PDFRenderer-0.9.1.jar"/>
     20        <classpathentry kind="lib" path="releases/json-simple-1.1.1.jar"/>
    2021        <classpathentry kind="output" path="bin/src"/>
    2122</classpath>
  • trunk/src/org/expeditee/actions/JfxBrowserActions.java

    r855 r857  
    188188                                        String queryForUrl = URLEncoder.encode(query.trim(), "UTF-8");
    189189
    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());
    191191
    192192                                        Object parsedObject = parser.parse(new InputStreamReader(connection.getInputStream()));
     
    269269                                        ddgLink.setFontStyle("italic");
    270270
    271                                         titleItem.setPosition(FrameMouseActions.getPosition());
     271
     272                                        Picture pic = null;
    272273
    273274                                        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,
    275276                                                                null, null, null, 0, 0);
    276277                                                items.add(pic);
     
    278279                                        }
    279280
     281                                        titleItem.setPosition(FrameMouseActions.getPosition());
    280282                                        mainTextItem.setPosition(titleItem.getX(), titleItem.getY() + titleItem.getBoundsHeight());
    281283                                        sourceItem.setPosition(mainTextItem.getX(), mainTextItem.getY() + mainTextItem.getBoundsHeight());
    282284                                        ddgLink.setPosition(sourceItem.getX() + sourceItem.getBoundsWidth(), sourceItem.getY());
     285
     286                                        if (pic != null) {
     287                                                pic.getSource().setPosition(titleItem.getX() - 55, titleItem.getY() - 14);
     288                                        }
    283289
    284290                                        items.add(titleItem);
     
    287293                                        items.add(ddgLink);
    288294                                        FrameMouseActions.pickup(items);
    289                                 } catch (MalformedURLException e) {
    290                                         // TODO Auto-generated catch block
    291                                         e.printStackTrace();
    292295                                } catch (IOException e) {
    293                                         // TODO Auto-generated catch block
     296                                        MessageBay.displayMessage("Problem loading results");
    294297                                        e.printStackTrace();
    295298                                } catch (ParseException e) {
    296                                         // TODO Auto-generated catch block
    297299                                        e.printStackTrace();
    298300                                }
Note: See TracChangeset for help on using the changeset viewer.