~ubuntu-branches/ubuntu/maverick/notecase/maverick

« back to all changes in this revision

Viewing changes to src/PasswordDialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Handler
  • Date: 2008-12-21 13:09:58 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081221130958-0ri77h0x7j1dclkq
Tags: 1.9.8-0ubuntu1
New upstream release (LP: #307752)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
////////////////////////////////////////////////////////////////////////////
2
 
// NoteCase notes manager project <http://notecase.sf.net>
3
 
//
4
 
// This code is licensed under BSD license.See "license.txt" for more details.
5
 
//
6
 
// File: Window class for Password input
7
 
////////////////////////////////////////////////////////////////////////////
8
 
 
9
 
#ifndef PASSWORDDIALOG_H_
10
 
#define PASSWORDDIALOG_H_
11
 
 
12
 
#if _MSC_VER > 1000
13
 
#pragma once
14
 
#endif // _MSC_VER > 1000
15
 
 
16
 
#include "gui/Dialog.h"
17
 
#include <string>
18
 
 
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)
22
 
 
23
 
class PasswordDialog : public Dialog
24
 
{
25
 
public:
26
 
        PasswordDialog(int nMode = MODE_PASS_VERIFY, int nTries = 1);
27
 
        virtual ~PasswordDialog();
28
 
 
29
 
        void SetLabel(const char *szText);
30
 
        void Destroy();
31
 
 
32
 
        const char *GetPassword();
33
 
 
34
 
        virtual void Create();
35
 
 
36
 
protected:
37
 
        GtkWidget* create_password_dialog (GtkWidget* parent1 = NULL);
38
 
 
39
 
public:
40
 
        int  m_nDialogMode;             // see defines above
41
 
        int      m_nNumTries;           // how much times can user fail entering pass
42
 
        int      m_nEntryCount;
43
 
        std::string m_strOldPass;       // when changing password
44
 
};
45
 
 
46
 
#endif // PASSWORDDIALOG_H_
 
1
////////////////////////////////////////////////////////////////////////////
 
2
// NoteCase notes manager project <http://notecase.sf.net>
 
3
//
 
4
// This code is licensed under BSD license.See "license.txt" for more details.
 
5
//
 
6
// File: Window class for Password input
 
7
////////////////////////////////////////////////////////////////////////////
 
8
 
 
9
#ifndef PASSWORDDIALOG_H_
 
10
#define PASSWORDDIALOG_H_
 
11
 
 
12
#if _MSC_VER > 1000
 
13
#pragma once
 
14
#endif // _MSC_VER > 1000
 
15
 
 
16
#include "gui/Dialog.h"
 
17
#include <string>
 
18
 
 
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)
 
22
 
 
23
class PasswordDialog : public Dialog
 
24
{
 
25
public:
 
26
        PasswordDialog(int nMode = MODE_PASS_VERIFY, int nTries = 1);
 
27
        virtual ~PasswordDialog();
 
28
 
 
29
        void SetLabel(const char *szText);
 
30
        void Destroy();
 
31
 
 
32
        const char *GetPassword();
 
33
 
 
34
        virtual void Create();
 
35
 
 
36
protected:
 
37
        GtkWidget* create_password_dialog (GtkWidget* parent1 = NULL);
 
38
 
 
39
public:
 
40
        int  m_nDialogMode;             // see defines above
 
41
        int      m_nNumTries;           // how much times can user fail entering pass
 
42
        int      m_nEntryCount;
 
43
        std::string m_strOldPass;       // when changing password
 
44
};
 
45
 
 
46
#endif // PASSWORDDIALOG_H_