68 std::string *
const updateHost) :
80 mKeepCheck(
new CheckBox(this,
_(
"Remember user and password"),
85 mLoginData->remember,
nullptr,
std::string())),
87 mUpdateTypeLabel(
new Label(this,
_(
"Update:"))),
89 mUpdateTypeDropDown(
new DropDown(this, mUpdateTypeModel,
92 mServerButton(
new Button(this,
_(
"Change Server"),
"server",
95 mLoginButton(
new Button(this,
_(
"Login"),
"login",
98 mRegisterButton(
new Button(this,
_(
"Register"),
"register",
101 mCustomUpdateHost(
new CheckBox(this,
_(
"Custom update host"),
103 this,
"customhost")),
105 "customUpdateHost",
""),
110 mServerName(server->hostname)
121 Label *
const serverLabel1 =
new Label(
this,
_(
"Server:"));
125 Label *
const userLabel =
new Label(
this,
_(
"Name:"));
127 Label *
const passLabel =
new Label(
this,
_(
"Password:"));
165 place(0, 0, serverLabel1, 1, 1);
166 place(1, 0, serverLabel2, 8, 1);
167 place(0, 1, userLabel, 1, 1);
169 place(0, 2, passLabel, 1, 1);
243 const std::string &eventId =
event.getId();
250 else if (eventId ==
"server")
254 else if (eventId ==
"register")
267 _(
"Open register url"),
276 else if (eventId ==
"customhost")
281 else if (eventId ==
"updateselect")
347 (*mUpdateHost).clear();
359 if (!group.
hosts.empty())
361 str = group.
hosts[0];
385 (*mUpdateHost).clear();
414 if (group.
name.empty())
417 group.
name =
_(
"default updates");
#define fromBool(val, name)
Net::CharServerHandler * charServerHandler
void setSelected(const bool selected)
void setState(const StateT state)
std::string getValue(const std::string &key, const std::string &deflt) const
void setValue(const std::string &key, const std::string &value)
void hideDrop(bool event)
void setSelected(int selected)
void setSelectedString(const std::string &str)
LayoutCell & setHAlign(const Alignment a)
void keyPressed(KeyEvent &event)
UpdateListModel * mUpdateListModel
static std::string savedPasswordKey
static std::string savedPassword
std::string * mUpdateHost
LoginDialog(LoginData &data, ServerInfo *const server, std::string *const updateHost)
CheckBox * mCustomUpdateHost
TextField * mUpdateHostText
UpdateTypeModel * mUpdateTypeModel
DropDown * mUpdateHostDropDown
DropDown * mUpdateTypeDropDown
void action(const ActionEvent &event)
virtual void clear() const =0
virtual bool isRegistrationEnabled() const =0
std::vector< HostsGroup > updateHosts
std::string defaultHostName
const std::string & getText() const
void setText(const std::string &text)
virtual void setVisible(Visible visible)
void setContentSize(int width, int height)
void reflowLayout(int w, int h)
void setWindowName(const std::string &name)
void setCloseButton(const bool flag)
LayoutCell & place(const int x, const int y, Widget *const wg, const int w, const int h)
Configuration serverConfig
Net::LoginHandler * loginHandler
const bool LoseFocusOnTab_true
bool url(InputEvent &event)
OpenUrlListener urlListener
bool checkPath(const std::string &path)
ConfirmDialog * confirmDlg
static const std::string SOUND_REQUEST
UpdateType ::T UpdateTypeT