~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/gui/item-bonus-dialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include "glade-helpers.h"
26
26
#include "image-helpers.h"
27
 
#include "../ucompose.hpp"
28
 
#include "../defs.h"
29
 
#include "../Item.h"
30
 
#include "../Itemlist.h"
 
27
#include "ucompose.hpp"
 
28
#include "defs.h"
 
29
#include "ItemProto.h"
 
30
#include "Itemlist.h"
31
31
 
32
32
ItemBonusDialog::ItemBonusDialog()
33
33
{
38
38
    Gtk::Dialog *d = 0;
39
39
    xml->get_widget("dialog", d);
40
40
    dialog.reset(d);
 
41
    decorate(dialog.get());
 
42
    window_closed.connect(sigc::mem_fun(dialog.get(), &Gtk::Dialog::hide));
41
43
 
42
44
    items_list = Gtk::ListStore::create(items_columns);
43
45
    xml->get_widget("treeview", items_treeview);
47
49
 
48
50
    Itemlist::iterator iter = Itemlist::getInstance()->begin();
49
51
    for (;iter != Itemlist::getInstance()->end(); iter++)
50
 
      addItem((*iter).second);
 
52
      addItemProto((*iter).second);
51
53
}
52
54
 
53
55
void ItemBonusDialog::set_parent_window(Gtk::Window &parent)
75
77
 
76
78
}
77
79
 
78
 
void ItemBonusDialog::addItem(Item *item)
 
80
void ItemBonusDialog::addItemProto(ItemProto *itemproto)
79
81
{
80
 
    if (item->isPlantable())
81
 
      return;
82
82
    Gtk::TreeIter i = items_list->append();
83
 
    (*i)[items_columns.name] = item->getName();
84
 
    (*i)[items_columns.bonus] = item->getBonusDescription();
 
83
    (*i)[items_columns.name] = itemproto->getName();
 
84
    (*i)[items_columns.bonus] = itemproto->getBonusDescription();
85
85
}