diff options
author | Yves Duret <yduret@mandriva.com> | 2001-08-06 14:58:12 +0000 |
---|---|---|
committer | Yves Duret <yduret@mandriva.com> | 2001-08-06 14:58:12 +0000 |
commit | 13daf8bd66be2297db292d6aa1fb7998823f1ca2 (patch) | |
tree | a2d51c8e02e07066bbde40b1714aac866e4c9f8b | |
parent | e01463079c48d8784f11c37b1db2575e56613f0c (diff) | |
download | control-center-13daf8bd66be2297db292d6aa1fb7998823f1ca2.tar control-center-13daf8bd66be2297db292d6aa1fb7998823f1ca2.tar.gz control-center-13daf8bd66be2297db292d6aa1fb7998823f1ca2.tar.bz2 control-center-13daf8bd66be2297db292d6aa1fb7998823f1ca2.tar.xz control-center-13daf8bd66be2297db292d6aa1fb7998823f1ca2.zip |
added isFile mode for daminounet
-rwxr-xr-x | logdrake | 32 |
1 files changed, 23 insertions, 9 deletions
@@ -41,6 +41,11 @@ init Gtk; $::isInstall and die "Not supported during install.\n"; +$::isFile = ($::File) = "@ARGV" =~ /--file (.+)/; +if ($::isFile) { + print "isFile mode : $::File\n"; +} + $::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; if ($::isEmbedded) { print "EMBED\n"; @@ -146,14 +151,15 @@ gtkadd($window, ) ), _("tips: you can use OR"), - gtkpack (new Gtk::VBox(0,5), - map { - ${"b_". $_} = new Gtk::CheckButton($files{$_}{desc}) - } keys %files, - ), + if_ (!$::isFile, gtkpack (new Gtk::VBox(0,5), + map { + ${"b_". $_} = new Gtk::CheckButton($files{$_}{desc}) + } keys %files, + ) + ), gtksignal_connect(new Gtk::Button(_("search")), clicked => \&search) ) - ), + ), 1, gtkadd(new Gtk::Frame(_("Content of the file")), createScrolledWindow(my $log_text = new Gtk::Text(undef, undef)) ) @@ -163,6 +169,7 @@ gtkadd($window, $window->realize; $window->show_all(); +search() if ($::isFile); Gtk->main_iteration while Gtk->events_pending; $::isEmbedded and kill USR2, $::CCPID; Gtk->main; @@ -173,9 +180,13 @@ Gtk->main; sub search { $log_text->backward_delete($log_text->get_length()); $log_text->freeze(); - foreach (keys %files) { - parse_file($files{$_}{file}) if ${$::{"b_". $_}}->active - }; + if ($::isFile) { + parse_file($::File); + } else { + foreach (keys %files) { + parse_file($files{$_}{file}) if ${$::{"b_". $_}}->active + }; + } $log_text->thaw(); Gtk->main_iteration while Gtk->events_pending; } @@ -326,6 +337,9 @@ sub destroy_window { # log # $Log$ +# Revision 1.14 2001/08/06 14:58:12 yduret +# added isFile mode for daminounet +# # Revision 1.13 2001/08/03 05:49:10 yduret # really fixed bug when embeded in mcc # use plain english instead of bad french |