summaryrefslogtreecommitdiffstats
path: root/control-center2
diff options
context:
space:
mode:
Diffstat (limited to 'control-center2')
-rwxr-xr-xcontrol-center231
1 files changed, 16 insertions, 15 deletions
diff --git a/control-center2 b/control-center2
index 1f7c4526..357e36ce 100755
--- a/control-center2
+++ b/control-center2
@@ -22,9 +22,6 @@
use Gtk;
init Gtk;
use Data::Dumper;
-#local $_ = join '', @ARGV;
-#if ($ARGV[1]= )
-#/-h/ and die "usage: draknet[--xf3] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
my %pixmaps_global;
my $xpm_path="pixmaps";
@@ -111,7 +108,7 @@ $vbox_about->pack_start($pix_about, 1, 1, 0);
my $text_about = new Gtk::Text ();
$text_about->set_editable(0);
$text_about->insert ( undef, undef, undef, "About, help, click on that button...");
-$vbox_about->pack_start($text_about, 0, 0, 0);
+$vbox_about->pack_start($text_about, 1, 1, 0);
my $label_about2 = new Gtk::Label ("");
$vbox_about->pack_start($label_about2, 1, 1, 0);
$notebook_global->append_page($vbox_about, "$arg");
@@ -123,16 +120,16 @@ $window_global->realize;
map {
$pixmaps_global{$_ . '_pixmap'} =
Gtk::Gdk::Pixmap->create_from_xpm($window_global->window, Gtk::Widget->get_default_style->bg('normal'), "$xpm_path/$_.xpm");
-} ('item1', 'item2', 'item3', 'item4', 'item5');
+} ('item1', 'item2', 'item3', 'item4', 'item5','draknet1','draknet2','draknet3','draknet4', 'draknet5', 'drakgw');
my %tree;
-$tree{nb_groups}=2;
-$tree[0]{name}="groupe1";
+$tree{nb_groups}=1;
+$tree[0]{name}="Boot Configuration";
$tree[0]{nb_applis}=2;
-$tree[0]{applis}[0]{name}='DrakFont';
-$tree[0]{applis}[0]{exec}='drakfont';
-$tree[0]{applis}[1]{name}='DrakFloppy';
-$tree[0]{applis}[1]{exec}='drakfloppy';
+$tree[0]{applis}[0]{name}='Boot Loader';
+$tree[0]{applis}[0]{exec}='/usr/sbin/drakboot';
+$tree[0]{applis}[1]{name}='Boot Floppy';
+$tree[0]{applis}[1]{exec}='/home/damien/cvs/soft/drakbootdisk/drakfloppy';
$tree[1]{name}="groupe2";
$tree[1]{nb_applis}=2;
$tree[1]{applis}[0]{name}='DrakFont';#'drakxservices';
@@ -170,6 +167,8 @@ for (my $i=0; $i<$tree{nb_groups}; $i++) {
}
print "num : " . $notebook_global->page_num($vbox_about) . "\n";
$notebook_global->set_page(0);
+$SIG{USR1} = sub { $notebook_global->set_page(0); }; # embedded applications will send me that signal in order to "hide" them
+
Gtk->main;
@@ -183,8 +182,10 @@ sub draw_icon {
$socket->show;
$notebook_global->append_page($socket, "");
$socket->realize;
- print ("The XID of the sockets window n°$arg is [" . $socket->window->XWINDOW . "]\n");
- system ( $exec_string . " --embedded " . $socket->window->XWINDOW . "&");
+ print ("The XID of the sockets window n°$arg is [" . $socket->window->XWINDOW . "]\nMy PID is [" . $$ . "]\n");
+ my $a = $exec_string . " --embedded " . $socket->window->XWINDOW . " " . $$ . "&";
+ print "$a\n";
+ system ($a);
}
$hash{PIX_W} = $width;
$hash{PIX_H} = $height;
@@ -224,9 +225,9 @@ sub draw_icon {
$hash{anim_idle} ||= Gtk->idle_add
( sub {
$hash{actual_pixmap}==$hash{save_pixmap} and return 1;
- $hash{darea}->window->draw_pixmap
+ $hash{darea}->window->draw_pixmap
($hash{darea}->style->bg_gc('normal'),
- $pixmaps_global{ $icon_name . $hash{actual_pixmap} . '_pixmap'},
+ $pixmaps_global{ $icon_name . 1 . '_pixmap'}, # $hash{actual_pixmap} . '_pixmap'},
0, 0,
($hash{darea}->allocation->[2]-$hash{PIX_W})/2*0+($decalage * 20),
($hash{darea}->allocation->[3]-$hash{PIX_H})/2,