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

« back to all changes in this revision

Viewing changes to src/editor/temple-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
#include "temple-dialog.h"
25
25
 
26
26
#include "glade-helpers.h"
27
 
#include "../ucompose.hpp"
28
 
#include "../CreateScenarioRandomize.h"
29
 
#include "../defs.h"
30
 
#include "../temple.h"
 
27
#include "ucompose.hpp"
 
28
#include "CreateScenarioRandomize.h"
 
29
#include "defs.h"
 
30
#include "temple.h"
31
31
#include "RenamableLocation.h"
32
32
 
33
33
TempleDialog::TempleDialog(Temple *t, CreateScenarioRandomize *randomizer)
46
46
    xml->get_widget("name_entry", name_entry);
47
47
    name_entry->set_text(temple->getName());
48
48
 
 
49
    xml->get_widget("description_entry", description_entry);
 
50
    description_entry->set_text(temple->getDescription());
 
51
 
49
52
    xml->get_widget("type_entry", type_entry);
50
53
    type_entry->set_value(temple->getType());
51
54
    xml->get_widget("randomize_name_button", randomize_name_button);
70
73
      RenamableLocation *renamable_temple = static_cast<RenamableLocation*>(l);
71
74
      renamable_temple->setName(name_entry->get_text());
72
75
      temple->setType(type_entry->get_value_as_int());
 
76
      renamable_temple->setDescription(description_entry->get_text());
73
77
    }
74
78
    else
75
79
      {
76
 
        if (name_entry->get_text() != DEFAULT_TEMPLE_NAME)
 
80
        if (name_entry->get_text() != Temple::getDefaultName())
77
81
          d_randomizer->pushRandomTempleName(name_entry->get_text());
78
82
      }
79
83
}
81
85
void TempleDialog::on_randomize_name_clicked()
82
86
{
83
87
  std::string existing_name = name_entry->get_text();
84
 
  if (existing_name == "Shrine")
 
88
  if (existing_name == Temple::getDefaultName())
85
89
    name_entry->set_text(d_randomizer->popRandomTempleName());
86
90
  else
87
91
    {