summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-06 13:42:35 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-06 13:42:35 +0000
commit0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435 (patch)
tree09fb3ac41f6c567b1f512accedf96c1acf6f0b64 /perl-install/standalone
parentfad2f405f64e0f6d2abfd71fa1bfafa60e0c3069 (diff)
downloaddrakx-0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435.tar
drakx-0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435.tar.gz
drakx-0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435.tar.bz2
drakx-0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435.tar.xz
drakx-0b1ba6a22bf86c55bf0c9ffc6fc20e6c8b737435.zip
perl_checker cleanups
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakperm9
-rwxr-xr-xperl-install/standalone/logdrake43
2 files changed, 11 insertions, 41 deletions
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index f88b3c989..be77b1cfc 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -7,9 +7,8 @@ use standalone;
use common;
use ugtk2 qw(:helpers :wrappers :create);
-use interactive;
-my $in = 'interactive'->vnew('su');
+require_root_capability();
local $_ = join '', @ARGV;
#- vars declaration
@@ -141,7 +140,7 @@ $w->{rwindow}->set_position('center') unless $::isEmbedded;
$combo_perm->entry->set_text($perm_l10n{all});
display_perm('all');
-my $combo_sig = $combo_perm->entry->signal_connect(changed => sub { display_perm($rev_perm_l10n{$combo_perm->entry->get_text} , @_) });
+my $_combo_sig = $combo_perm->entry->signal_connect(changed => sub { display_perm($rev_perm_l10n{$combo_perm->entry->get_text} , @_) });
$permList->get_selection->signal_connect('changed' => sub {
my ($select) = @_;
@@ -315,8 +314,7 @@ sub row_setting_dialog {
});
my %perms;
$ok->signal_connect(clicked => sub {
- my ($path, $user, $group, $perms, $idx);
- # create new item if needed (that is when adding a new one) at end of list
+ my ($path, $user, $group, $perms, $_idx);
$path = $file->get_text;
if ($usr_check->get_active) {
$user = 'current';
@@ -328,6 +326,7 @@ sub row_setting_dialog {
$perms = sprintf("%o", eval(join('', "0b",
(map { $perms{$_}->get_active || 0 } reverse @bits),
(map { my $owner = $_;map_index { $perms{$owner}{$_}->get_active || 0 } @rights } @owners))));
+ # create new item if needed (that is when adding a new one) at end of list
if (!$iter) {
$iter = $model->append;
push @rules, { path => $path, user => $user, group => $group, perms => $perms, index => $index };
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 8289ac8aa..f0e8451f8 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -76,40 +76,14 @@ my @menu_items = (
{ path => N("/_Help"), item_type => '<LastBranch>' },
{ path => N("/Help/_About...") }
);
-my $menubar = create_factory_menu($my_win->{rwindow}, @menu_items) unless $::isEmbedded;
+my $_menubar = create_factory_menu($my_win->{rwindow}, @menu_items) unless $::isEmbedded;
######### menus end
########## font and colors
-my %n = ('font' => ''); # Gtk2::Pango::FontDescription->from_string('Serif 12');#Gtk2::Gdk::Font->fontset_load(N("-misc-fixed-medium-r-*-*-*-100-*-*-*-*-*-*,*"));
-my %b = ('font' => 'Bold'); #Gtk2::Pango::FontDescription->from_string('Serif Bold 12');#Gtk2::Gdk::Font->fontset_load(N("-misc-fixed-bold-r-*-*-*-100-*-*-*-*-*-*,*"));
-
-#$black = "\033[30m";
-#$red = "\033[31m";
-#$green = "\033[32m";
-#$yellow = "\033[33m";
-#$blue = "\033[34m";
-#$magenta = "\033[35m";
-#$purple = "\033[35m";
-#$cyan = "\033[36m";
-#$white = "\033[37m";
-#$darkgray = "\033[30m";
-#$col_norm = "\033[00m";
-#$col_background = "\033[07m";
-#$col_brighten = "\033[01m";
-#$col_underline = "\033[04m";
-#$col_blink = "\033[05m";
-
-my $white = gtkcolor(50400, 655, 20000);
-my $black = gtkcolor(0, 0, 0);
-my $red = gtkcolor(0xFFFF, 655, 655);
-my $green = gtkcolor(0x0, 0x9898,0x0);
-my $yellow = gtkcolor(0xFFFF, 0xD7D7, 0);
-my $blue = gtkcolor(655, 655, 0xFFFF);
-my $magenta = gtkcolor(0xFFFF, 655, 0xFFFF);
-my $purple = gtkcolor(0xA0A0, 0x2020, 0xF0F0);
-my $cyan = gtkcolor(0x0, 0x9898, 0x9898);
-my $darkgray = gtkcolor(0x2F2F, 0x4F4F, 0x4F4F);
+my %n = ('font' => '');
+my %b = ('font' => 'Bold');
+
# Define global terms:
# Define good notables:
@@ -117,12 +91,9 @@ my @word_good = ("starting\n", "Freeing", "Detected", "starting.", "accepted.\n"
my @word_warn = ("dangling", "closed.\n", "Assuming", "root", "root\n", "exiting\n", "missing", "Ignored", "adminalert:", "deleting", "OFFLINE\n");
my @word_bad = "bad";
my @word_note = ("LOGIN", "DHCP_OFFER", "optimized", "reset:", "unloaded", "disconnected", "connect", "Successful", "registered\n");
-my @line_good = ("up", "DHCP_ACK", "Cleaned", "Initializing", "Starting", "success", "successfully", "alive", "found", "ONLINE\n");
-my @line_warn = ("warning:", "WARNING:", "invalid", "obsolete", "bad", "Password", "detected", "timeout", "timeout:", "attackalert:", "wrong", "Lame", "FAILED", "failing", "unknown", "obsolete", "stopped.\n", "terminating.", "disabled\n", "disabled", "Lost");
-my @line_bad = ("DENY", "lost", "shutting", "dead", "DHCP_NAK", "failure;", "Unable", "inactive", "terminating", "refused", "rejected", "down", "OFFLINE\n", "error\n", "ERROR\n", "ERROR:", "error", "ERROR", "error:", "failed:");
-
-# Define specifics:
-my @daemons = "named";
+#my @line_good = ("up", "DHCP_ACK", "Cleaned", "Initializing", "Starting", "success", "successfully", "alive", "found", "ONLINE\n");
+#my @line_warn = ("warning:", "WARNING:", "invalid", "obsolete", "bad", "Password", "detected", "timeout", "timeout:", "attackalert:", "wrong", "Lame", "FAILED", "failing", "unknown", "obsolete", "stopped.\n", "terminating.", "disabled\n", "disabled", "Lost");
+#my @line_bad = ("DENY", "lost", "shutting", "dead", "DHCP_NAK", "failure;", "Unable", "inactive", "terminating", "refused", "rejected", "down", "OFFLINE\n", "error\n", "ERROR\n", "ERROR:", "error", "ERROR", "error:", "failed:");
# Now define what we want to use when:
my $col_good = 'green4';