summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-05 11:23:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-05 11:23:28 +0000
commite1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6 (patch)
treea64eb4f2155efa43cd59ff0e9fb7e9df33269fa8 /bin
parent18a2f9c0c3841415c31c368b8ccc54ecc08166f4 (diff)
downloaddrakx-net-e1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6.tar
drakx-net-e1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6.tar.gz
drakx-net-e1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6.tar.bz2
drakx-net-e1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6.tar.xz
drakx-net-e1f65769589d7ab4fcf04b6ffbec08f1ffe27ce6.zip
add banner
Diffstat (limited to 'bin')
-rw-r--r--bin/drakids24
1 files changed, 15 insertions, 9 deletions
diff --git a/bin/drakids b/bin/drakids
index 6c272df..6d0aa9e 100644
--- a/bin/drakids
+++ b/bin/drakids
@@ -37,8 +37,11 @@ my $services_log = create_service_list('status');
my $allowed_services = create_service_list();
my $blocked_services = create_service_list();
-$ugtk2::wm_icon = "drakfirewall";
-my $w = ugtk2->new(N("Interactive Firewall"));
+my $title = N("Interactive Firewall");
+my $icon = "drakfirewall";
+
+$ugtk2::wm_icon = $icon;
+my $w = ugtk2->new($title);
my $ifw;
eval {
@@ -69,11 +72,13 @@ if ($@) {
init_lists();
gtkadd($w->{window},
- gtknew('Notebook', children => [
+ gtknew('VBox', spacing => 5, children => [
+ $::isEmbedded ? () : (0, Gtk2::Banner->new($icon, $title)),
+ 1, gtknew('Notebook', children => [
if_($i_m_ifw2,
gtknew('Label', text => N("Log")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $services_log),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $services_log),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Allow"), clicked => sub {}),
gtknew('Button', text => N("Block"), clicked => sub {}),
@@ -82,7 +87,7 @@ gtkadd($w->{window},
]),
gtknew('Label', text => N("Allowed services")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $allowed_services),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $allowed_services),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Remove"), clicked => sub {}),
gtknew('Button', text => N("Block"), clicked => sub {}),
@@ -91,7 +96,7 @@ gtkadd($w->{window},
]),
gtknew('Label', text => N("Blocked services")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $blocked_services),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $blocked_services),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Remove"), clicked => sub {}),
gtknew('Button', text => N("Allow"), clicked => sub {}),
@@ -101,7 +106,7 @@ gtkadd($w->{window},
),
gtknew('Label', text => N("Log")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $loglist),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $loglist),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Clear logs"), clicked => \&clear_log),
gtknew('Button', text => N("Blacklist"), clicked => sub { blacklist(get_selected_log_seq()) }),
@@ -111,7 +116,7 @@ gtkadd($w->{window},
]),
gtknew('Label', text => N("Blacklist")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $blacklist),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $blacklist),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Remove from blacklist"), clicked => sub { unblacklist(get_selected_blacklist()) }),
gtknew('Button', text => N("Move to whitelist"), clicked => sub {
@@ -124,13 +129,14 @@ gtkadd($w->{window},
]),
gtknew('Label', text => N("Whitelist")),
gtknew('VBox', spacing => 5, children => [
- 1, gtknew('ScrolledWindow', width => 600, height => 400, child => $whitelist),
+ 1, gtknew('ScrolledWindow', width => 600, height => 350, child => $whitelist),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
gtknew('Button', text => N("Remove from whitelist"), clicked => sub { unwhitelist(get_selected_whitelist()) }),
gtknew('Button', text => N("Close"), clicked => sub { Gtk2->main_quit })
]),
]),
]),
+ ]),
);
$w->show;
Gtk2->main;