Read CA configuration and show small info dialog
This commit is contained in:
parent
efa49c6ffc
commit
29901d491d
|
@ -127,6 +127,12 @@ sub open_ca {
|
||||||
$main->{'exportdir'} = $dir;
|
$main->{'exportdir'} = $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# read per CA configuration
|
||||||
|
$self->{'cfg'} = HELPERS::read_cfg($self->{'cadir'});
|
||||||
|
main::printd("Request-Type: " . ($self->{'cfg'}->{global}{default_req_type} // 'none'));
|
||||||
|
main::printd("Default bits server: " . ($self->{'cfg'}->{server}{default_bits} // 'none'));
|
||||||
|
main::printd("Default bits user: " . ($self->{'cfg'}->{user}{default_bits} // 'none'));
|
||||||
|
|
||||||
# update config (necessary for update from old tinyca)
|
# update config (necessary for update from old tinyca)
|
||||||
$cnf = $self->{$opts->{'name'}}->{'cnf'};
|
$cnf = $self->{$opts->{'name'}}->{'cnf'};
|
||||||
open(IN, "<$cnf");
|
open(IN, "<$cnf");
|
||||||
|
|
41
lib/GUI.pm
41
lib/GUI.pm
|
@ -718,7 +718,10 @@ sub create_menu {
|
||||||
_("_Preferences") => {
|
_("_Preferences") => {
|
||||||
item_type => '<Branch>',
|
item_type => '<Branch>',
|
||||||
children => [
|
children => [
|
||||||
_("Experts Only!!") => {
|
_("View") => {
|
||||||
|
callback => sub { $self->show_cfg_dialog($self) },
|
||||||
|
item_type => '<StockItem>',
|
||||||
|
extra_data => 'gtk-info'
|
||||||
},
|
},
|
||||||
Separator => {
|
Separator => {
|
||||||
item_type => '<Separator>',
|
item_type => '<Separator>',
|
||||||
|
@ -2648,6 +2651,42 @@ sub show_ca_import_dialog {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Configuration display dialog
|
||||||
|
#
|
||||||
|
sub show_cfg_dialog {
|
||||||
|
my $self = shift;
|
||||||
|
my $main = shift;
|
||||||
|
|
||||||
|
my ($box, $button, $table, $label);
|
||||||
|
|
||||||
|
$box = Gtk2::Dialog->new(_("Preferences"), undef, ["destroy-with-parent"]);
|
||||||
|
$box->signal_connect(response => sub { $box->destroy });
|
||||||
|
|
||||||
|
$label = Gtk2::Label->new("base directory:".$main->{'init'}->{'basedir'});
|
||||||
|
$box->vbox->add($label);
|
||||||
|
|
||||||
|
$label = Gtk2::Label->new("export directory:".$main->{'init'}->{'exportdir'});
|
||||||
|
$box->vbox->add($label);
|
||||||
|
|
||||||
|
$label = Gtk2::Label->new("openssl binary:".$main->{'init'}->{'opensslbin'});
|
||||||
|
$box->vbox->add($label);
|
||||||
|
|
||||||
|
$label = Gtk2::Label->new("zip binary:".$main->{'init'}->{'zipbin'});
|
||||||
|
$box->vbox->add($label);
|
||||||
|
|
||||||
|
$label = Gtk2::Label->new("tar binary:".$main->{'init'}->{'tarbin'});
|
||||||
|
$box->vbox->add($label);
|
||||||
|
|
||||||
|
$button = Gtk2::Button->new_from_stock('gtk-ok');
|
||||||
|
$box->add_action_widget($button, 0);
|
||||||
|
|
||||||
|
$button->can_default(1);
|
||||||
|
$button->grab_default();
|
||||||
|
$box->show_all();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# subroutines for pop-up boxes
|
# subroutines for pop-up boxes
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue