SourceForge Logo
Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GpgGtkPasswordEntryDialog.h

Go to the documentation of this file.
00001 /*!
00002  * \file GpgGtkPasswordEntryDialog.h
00003  * \brief Defines the dialog for the password prompt to the user
00004  *
00005  * \author Frederic RUAUDEL <grumz@users.sf.net>
00006  *
00007  * $Revision: 1.3 $
00008  * $Date: 2003/03/08 17:08:09 $
00009  *
00010  * \b GPassGuard
00011  * Copyleft (c) 2003 Frederic RUAUDEL, all rights reversed
00012  *
00013  * This program is free software which I release under the GNU General Public
00014  * License. You may redistribute and/or modify this program under the terms
00015  * of that license as published by the Free Software Foundation; either
00016  * version 2 of the License, or (at your option) any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.  Version 2 is in the
00022  * COPYING file in the top level directory of this distribution.
00023  *
00024  * To get a copy of the GNU General Public License, write to the Free Software
00025  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  **/
00027 
00028 #ifndef GPG_GTK_PASSWORD_ENTRY_DIALOG_H
00029 #define GPG_GTK_PASSWORD_ENTRY_DIALOG_H
00030 
00031 #ifndef PASSGUARD_PREFIX
00032 #       define PASSGUARD_PREFIX "/usr/local"
00033 #endif
00034 
00035 #define PIXMAP_PATH PASSGUARD_PREFIX"/share/pixmaps/passguard"
00036 #define AUTH_PIXMAP PIXMAP_PATH"/gpassguard_auth_icon.png"
00037 
00038 #define PASSGUARD_PLUGINS PASSGUARD_PREFIX"/share/passguard/plugins/"
00039 
00040 
00041 #include <string>
00042 #include <gtk/gtk.h>
00043 
00044 #include <Passguard.h>
00045 
00046 #include <GpgGtkMessageDialog.h>
00047 
00048 using namespace std;
00049 
00050 /*!
00051  * \brief the dialog for the password prompt to the user
00052  **/
00053 class GpgGtkPasswordEntryDialog
00054 {
00055         public:
00056                 GpgGtkPasswordEntryDialog ();
00057                 ~GpgGtkPasswordEntryDialog ();
00058 
00059                 bool show (void);
00060                 string getPasswordFromUser (void);
00061                 string getFilenameFromUser (void);
00062                 PasswordCodecPrototype* getPasswordCodecPrototypeFromUser (void);
00063 
00064                 string getBrowsedFile (void);
00065 
00066                 static void entry_changed_callback (GtkWidget* entry_password, GtkWidget* button_open);
00067                 static void option_menu_activated_callback (GtkWidget* option_menu_item, GpgGtkPasswordEntryDialog* password_entry_dialog);
00068                 static void checkbox_toggled_callback (GtkWidget* checkbox, GpgGtkPasswordEntryDialog* password_entry_dialog);
00069                 static void move_focus_callback (GtkWidget* next_focused_widget);
00070                 static void button_clicked_callback (GpgGtkPasswordEntryDialog* password_entry_dialog);
00071 
00072         private:
00073                 PasswordCodecPrototypeManager* _plugin_manager;
00074                 GtkTooltips* _tool_tips;
00075                 GtkWidget* _dialog_box;
00076                 GtkWidget* _default_checkbox;
00077                 GtkWidget* _filename_entry_box;
00078                 GtkWidget* _browse_button;
00079                 GtkWidget* _password_entry_box;
00080                 string _current_codec_type;
00081                 bool _init_ok;
00082 };
00083 
00084 #endif /* GPG_GTK_PASSWORD_ENTRY_DIALOG_H */

Generated on Sun Mar 9 15:36:56 2003 for GPassGuard by doxygen1.2.15