~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to gui/password_frame.cc

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include "../simwin.h"
12
12
#include "../simworld.h"
13
13
 
 
14
#include "../dataobj/translator.h"
 
15
 
14
16
#include "../utils/cbuffer_t.h"
15
17
#include "../utils/sha1.h"
16
18
#include "../utils/simstring.h"
23
25
 
24
26
 
25
27
password_frame_t::password_frame_t( spieler_t *sp ) :
26
 
        gui_frame_t("Enter Password",sp)
 
28
        gui_frame_t( translator::translate("Enter Password"), sp )
27
29
{
28
30
        this->sp = sp;
29
31
 
88
90
                        sp->get_welt()->set_player_password_hash( sp->get_player_nr(), hash );
89
91
                        // and change player password
90
92
                        werkzeug_t *w = create_tool( WKZ_PWDHASH_TOOL | SIMPLE_TOOL );
91
 
                        cbuffer_t buf(512);
 
93
                        cbuffer_t buf;
92
94
                        for(  int i=0;  i<20;  i++  ) {
93
95
                                buf.printf( "%02X", hash[i] );
94
96
                        }
110
112
 
111
113
        if(  komp == &player_name  ) {
112
114
                // rename a player
113
 
                cbuffer_t buf(300);
 
115
                cbuffer_t buf;
114
116
                buf.printf( "p%u,%s", sp->get_player_nr(), player_name.get_text() );
115
117
                werkzeug_t *w = create_tool( WKZ_RENAME_TOOL | SIMPLE_TOOL );
116
118
                w->set_default_param( buf );