1
////////////////////////////////////////////////////////////////////////////
2
// NoteCase notes manager project <http://notecase.sf.net>
4
// This code is licensed under BSD license.See "license.txt" for more details.
6
// File: Window class for Password input
7
////////////////////////////////////////////////////////////////////////////
9
#ifndef PASSWORDDIALOG_H_
10
#define PASSWORDDIALOG_H_
14
#endif // _MSC_VER > 1000
16
#include "gui/Dialog.h"
19
#define MODE_PASS_VERIFY 0 // type the password once (up to X unsuccessful tries)
20
#define MODE_PASS_NEW 1 // type the new password twice (two entry widgets) to eliminate typing errors
21
#define MODE_PASS_CHANGE 2 // type the old password once, new password twice (three entry widgets)
23
class PasswordDialog : public Dialog
26
PasswordDialog(int nMode = MODE_PASS_VERIFY, int nTries = 1);
27
virtual ~PasswordDialog();
29
void SetLabel(const char *szText);
32
const char *GetPassword();
34
virtual void Create();
37
GtkWidget* create_password_dialog (GtkWidget* parent1 = NULL);
40
int m_nDialogMode; // see defines above
41
int m_nNumTries; // how much times can user fail entering pass
43
std::string m_strOldPass; // when changing password
46
#endif // PASSWORDDIALOG_H_
1
////////////////////////////////////////////////////////////////////////////
2
// NoteCase notes manager project <http://notecase.sf.net>
4
// This code is licensed under BSD license.See "license.txt" for more details.
6
// File: Window class for Password input
7
////////////////////////////////////////////////////////////////////////////
9
#ifndef PASSWORDDIALOG_H_
10
#define PASSWORDDIALOG_H_
14
#endif // _MSC_VER > 1000
16
#include "gui/Dialog.h"
19
#define MODE_PASS_VERIFY 0 // type the password once (up to X unsuccessful tries)
20
#define MODE_PASS_NEW 1 // type the new password twice (two entry widgets) to eliminate typing errors
21
#define MODE_PASS_CHANGE 2 // type the old password once, new password twice (three entry widgets)
23
class PasswordDialog : public Dialog
26
PasswordDialog(int nMode = MODE_PASS_VERIFY, int nTries = 1);
27
virtual ~PasswordDialog();
29
void SetLabel(const char *szText);
32
const char *GetPassword();
34
virtual void Create();
37
GtkWidget* create_password_dialog (GtkWidget* parent1 = NULL);
40
int m_nDialogMode; // see defines above
41
int m_nNumTries; // how much times can user fail entering pass
43
std::string m_strOldPass; // when changing password
46
#endif // PASSWORDDIALOG_H_