diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/updatewindow.cpp | 15 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index bf23a419..0ef1ab35 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -65,7 +65,7 @@ InventoryWindow::InventoryWindow(): mDropButton = new Button(_("Drop"), "drop", this); mSplitButton = new Button(_("Split"), "split", this); - mItems = new ItemContainer(player_node->mInventory.get(), 10, 5); + mItems = new ItemContainer(player_node->mInventory, 10, 5); mItems->addSelectionListener(this); mInvenScroll = new ScrollArea(mItems); diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index ffa4d116..e6d3c516 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -114,10 +114,10 @@ void ShopListBox::setSelected(int selected) std::max(-1, selected)); gcn::Widget *parent = getParent(); - if (parent) + if (parent && mSelected >= 0) { gcn::Rectangle scroll; - scroll.y = (mSelected < 0) ? 0 : mRowHeight * mSelected; + scroll.y = mRowHeight * mSelected; scroll.height = mRowHeight; parent->showWidgetPart(this, scroll); } diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 5d81bb9c..abae69f6 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -307,17 +307,20 @@ int UpdaterWindow::downloadThread(void *ptr) switch (res) { case CURLE_COULDNT_CONNECT: - // give more debug info on that error - std::cerr << "curl error " << res << ": " - << uw->mCurlError << " " << url.c_str() - << std::endl; - break; - default: std::cerr << "curl error " << res << ": " << uw->mCurlError << " host: " << url.c_str() << std::endl; + break; + } + + if (!uw->mStoreInMemory) + { + fclose(outfile); + ::remove(outFilename.c_str()); } + attempts++; + continue; } curl_easy_cleanup(curl); |