diff options
Diffstat (limited to 'control-center3')
-rwxr-xr-x | control-center3 | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/control-center3 b/control-center3 index d74246f9..7bddbb88 100755 --- a/control-center3 +++ b/control-center3 @@ -47,7 +47,7 @@ my $_docdir = "/usr/share/doc"; my %pixmaps_global; my $xpm_path="$_iconsdir"; -my $xpm_path_l="$_iconsdir"; #./pixmaps"; +my $xpm_path_l="./pixmaps"; my $tree_depth_max = 1; my @treeitem_sub; @@ -115,6 +115,9 @@ $hpane_global->pack2($notebook_global,0,1); my ($pix_splash_map, $pix_splash_mask) = gtkcreate_png("$xpm_path_l/splash.png"); +my @anim; +($anim[$_]->[0], $anim[$_]->[1]) = gtkcreate_png("$xpm_path_l/anim_" . ($_ + 1) . ".png") foreach (0..7); + my $vbox_about = new Gtk::VBox(0,0); my $darea1= new Gtk::DrawingArea(); $darea1->size(540,460); @@ -172,6 +175,10 @@ $window_global->show_all; $SIG{USR1} = sub { $notebook_global->set_page(0); }; # embedded applications will send me that signal in order to "hide" them $SIG{TERM} = sub { quit_global(); }; # embedded applications will send me that signal in order to quit the cc. +my $global_vbox; +my $global_time_tag; +my $global_socket; +$SIG{USR2} = sub { $$global_vbox->hide; Gtk->timeout_remove($global_time_tag); $$global_socket->show; }; my $pix_dbl = new Gtk::Gdk::Pixmap($darea1->window, 540,460); draw_exposed($pix_dbl); @@ -343,7 +350,7 @@ sub create_tree_item $treebox->show(); if ($tree_depth_max == 0) { # $treeitem->signal_connect('clicked', sub { exec_treeitem($label, $tree_exec{$label});}); - $treeitem->signal_connect('select', sub { print "EEEEE\n"; exec_treeitem($label, $tree_exec{$label}); }); + $treeitem->signal_connect('select', sub { exec_treeitem($label, $tree_exec{$label}); }); } else { $treeitem->signal_connect('select', sub { $treeitem_old and $$treeitem_old->collapse(); $treeitem->expand(); $treeitem_old=\$treeitem; #$treeitem->deselect(); @@ -422,12 +429,35 @@ sub exec_treeitem { if ($tree_launched{$label}==-1) { my $vbox = new Gtk::VBox(0, 0); $vbox->show; + my $vbox2 = new Gtk::VBox(0, 0); + $vbox2->show; + $global_vbox=\$vbox2; + $vbox->pack_start($vbox2,0,0,0); + my $hbox = new Gtk::HBox(0, 0); + $hbox->show; + $vbox2->pack_start($hbox,0,0,0); + my $darea1= new Gtk::DrawingArea(); + $darea1->size(70,70); + $darea1->set_usize(70,70); + $hbox->pack_start($darea1,1,0,0); + $darea1->show; + my $anim_nb=0; + $global_time_tag = Gtk->timeout_add(120, sub { + $darea1->window->draw_pixmap + ($darea1->style->white_gc, + $anim[$anim_nb]->[0], 0, 0, + ($darea1->allocation->[2]-70)/2, ($darea1->allocation->[3]-70)/2, + 70, 70); + $anim_nb++; + $anim_nb > 7 and $anim_nb=0; + 1; + }); # my $label = new Gtk::Label "Please be patient"; # $vbox->pack_start( $label, 0, 0, 0); # $label->show; my $socket = new Gtk::Socket; - $vbox->pack_start( $socket, 1, 1, 0); - $socket->show; + $global_socket = \$socket; + $vbox->pack_start($socket, 1, 1, 0); $notebook_global->append_page($vbox, ""); $socket->realize; # $label->destroy; |