00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
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