diff options
| author | Simeon Simeonov | 2018-02-28 23:51:46 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-28 23:51:46 +0100 |
| commit | 8de2d887916cbdd3c2d756e77116585babd026f2 (patch) | |
| tree | 15728a8be1602f176ac7d92b09a9eae57b354657 /src/prefs_common_dialog.c | |
| parent | 1bb2a9d33e8cd193c21f9995fb7852c7562cafcf (diff) | |
prefs_common.use_master_password added
Diffstat (limited to 'src/prefs_common_dialog.c')
| -rw-r--r-- | src/prefs_common_dialog.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c index fa4be4e..dada1b1 100644 --- a/src/prefs_common_dialog.c +++ b/src/prefs_common_dialog.c | |||
| @@ -216,6 +216,12 @@ static struct Privacy { | |||
| 216 | } privacy; | 216 | } privacy; |
| 217 | #endif | 217 | #endif |
| 218 | 218 | ||
| 219 | #if USE_SSL | ||
| 220 | static struct MasterPassword { | ||
| 221 | GtkWidget *checkbtn_use_master_password; | ||
| 222 | } master_password; | ||
| 223 | #endif | ||
| 224 | |||
| 219 | static struct Interface { | 225 | static struct Interface { |
| 220 | GtkWidget *checkbtn_always_show_msg; | 226 | GtkWidget *checkbtn_always_show_msg; |
| 221 | GtkWidget *checkbtn_always_mark_read; | 227 | GtkWidget *checkbtn_always_mark_read; |
| @@ -563,6 +569,11 @@ static PrefsUIData ui_data[] = { | |||
| 563 | prefs_set_data_from_toggle, prefs_set_toggle}, | 569 | prefs_set_data_from_toggle, prefs_set_toggle}, |
| 564 | #endif /* USE_GPGME */ | 570 | #endif /* USE_GPGME */ |
| 565 | 571 | ||
| 572 | #if USE_SSL | ||
| 573 | {"use_master_password", &master_password.checkbtn_use_master_password, | ||
| 574 | prefs_set_data_from_toggle, prefs_set_toggle}, | ||
| 575 | #endif | ||
| 576 | |||
| 566 | /* Interface */ | 577 | /* Interface */ |
| 567 | {"always_show_message_when_selected", | 578 | {"always_show_message_when_selected", |
| 568 | &iface.checkbtn_always_show_msg, | 579 | &iface.checkbtn_always_show_msg, |
| @@ -693,6 +704,9 @@ static void prefs_junk_create (void); | |||
| 693 | #if USE_GPGME | 704 | #if USE_GPGME |
| 694 | static void prefs_privacy_create (void); | 705 | static void prefs_privacy_create (void); |
| 695 | #endif | 706 | #endif |
| 707 | #if USE_SSL | ||
| 708 | static void prefs_master_password_create (void); | ||
| 709 | #endif | ||
| 696 | static void prefs_details_create (void); | 710 | static void prefs_details_create (void); |
| 697 | static GtkWidget *prefs_other_create (void); | 711 | static GtkWidget *prefs_other_create (void); |
| 698 | static GtkWidget *prefs_extcmd_create (void); | 712 | static GtkWidget *prefs_extcmd_create (void); |
| @@ -853,6 +867,10 @@ static void prefs_common_create(void) | |||
| 853 | prefs_privacy_create(); | 867 | prefs_privacy_create(); |
| 854 | SET_NOTEBOOK_LABEL(dialog.notebook, _("Privacy"), page++); | 868 | SET_NOTEBOOK_LABEL(dialog.notebook, _("Privacy"), page++); |
| 855 | #endif | 869 | #endif |
| 870 | #if USE_SSL | ||
| 871 | prefs_master_password_create(); | ||
| 872 | SET_NOTEBOOK_LABEL(dialog.notebook, _("Master password"), page++); | ||
| 873 | #endif | ||
| 856 | prefs_details_create(); | 874 | prefs_details_create(); |
| 857 | SET_NOTEBOOK_LABEL(dialog.notebook, _("Details"), page++); | 875 | SET_NOTEBOOK_LABEL(dialog.notebook, _("Details"), page++); |
| 858 | 876 | ||
| @@ -2648,6 +2666,35 @@ static void prefs_privacy_create(void) | |||
| 2648 | } | 2666 | } |
| 2649 | #endif /* USE_GPGME */ | 2667 | #endif /* USE_GPGME */ |
| 2650 | 2668 | ||
| 2669 | #if USE_SSL | ||
| 2670 | static void prefs_master_password_create(void) | ||
| 2671 | { | ||
| 2672 | GtkWidget *vbox1; | ||
| 2673 | GtkWidget *vbox2; | ||
| 2674 | GtkWidget *hbox1; | ||
| 2675 | GtkWidget *checkbtn_use_master_password; | ||
| 2676 | |||
| 2677 | vbox1 = gtk_vbox_new (FALSE, VSPACING); | ||
| 2678 | gtk_widget_show (vbox1); | ||
| 2679 | gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1); | ||
| 2680 | gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER); | ||
| 2681 | |||
| 2682 | vbox2 = gtk_vbox_new (FALSE, 0); | ||
| 2683 | gtk_widget_show (vbox2); | ||
| 2684 | gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0); | ||
| 2685 | |||
| 2686 | PACK_CHECK_BUTTON (vbox2, checkbtn_use_master_password, | ||
| 2687 | _("Use master password")); | ||
| 2688 | |||
| 2689 | hbox1 = gtk_hbox_new (FALSE, 8); | ||
| 2690 | gtk_widget_show (hbox1); | ||
| 2691 | gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); | ||
| 2692 | |||
| 2693 | master_password.checkbtn_use_master_password | ||
| 2694 | = checkbtn_use_master_password; | ||
| 2695 | } | ||
| 2696 | #endif /* USE_SSL */ | ||
| 2697 | |||
| 2651 | static void prefs_details_create(void) | 2698 | static void prefs_details_create(void) |
| 2652 | { | 2699 | { |
| 2653 | GtkWidget *vbox1; | 2700 | GtkWidget *vbox1; |
