diff options
author | Stijn Buys <ingar@osirion.org> | 2012-12-09 18:01:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-12-09 18:01:27 +0000 |
commit | 688817e65a5460b1d776b5c3dccbc45c7f94fec0 (patch) | |
tree | 07aadb0142ff2cbee253d670c390b67711dff180 /src/client | |
parent | ca25a580f17f05ca2548b4d51f31639dfb0a4fda (diff) |
Replaced mount indicator with an unmount button.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/inventorywindow.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/inventorywindow.cc b/src/client/inventorywindow.cc index 1483325..0d91b4d 100644 --- a/src/client/inventorywindow.cc +++ b/src/client/inventorywindow.cc @@ -141,10 +141,13 @@ void InventoryWindow::update_inventory() const float icon_size = 24.0f; // small icons const float padding = ui::root()->font_large()->height(); - ui::Bitmap *icon = new ui::Bitmap(listitem, "bitmaps/icons/button_unmount"); - icon->set_background(true); - icon->set_size(icon_size, icon_size); - icon->set_location(ui::UI::elementsize.width() - icon_size - padding, padding); + ui::IconButton *unmount_button = new ui::IconButton(listitem, "bitmaps/icons/button_unmount"); + std::ostringstream strcmd; + strcmd << "remote mount " << item->id(); + unmount_button->set_command(strcmd.str()); + unmount_button->set_background(true); + unmount_button->set_size(icon_size, icon_size); + unmount_button->set_location(ui::UI::elementsize.width() - icon_size - padding, padding); } // preserve previous selection during update |