summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2002-02-12 11:33:19 +0000
committerdamien <damien@mandriva.com>2002-02-12 11:33:19 +0000
commitb0e511f77cce3efc05ba202fffb02ab6b25a1d9b (patch)
treeae6ef5a058fe9d73b247dd4c1efecac5349b7efc
parentfba212a48322a2072c9adc9e7b3f4c6435850b6c (diff)
downloadcontrol-center-b0e511f77cce3efc05ba202fffb02ab6b25a1d9b.tar
control-center-b0e511f77cce3efc05ba202fffb02ab6b25a1d9b.tar.gz
control-center-b0e511f77cce3efc05ba202fffb02ab6b25a1d9b.tar.bz2
control-center-b0e511f77cce3efc05ba202fffb02ab6b25a1d9b.tar.xz
control-center-b0e511f77cce3efc05ba202fffb02ab6b25a1d9b.zip
debug, update
-rwxr-xr-xcontrol-center50
1 files changed, 27 insertions, 23 deletions
diff --git a/control-center b/control-center
index d39c698f..6bfd1202 100755
--- a/control-center
+++ b/control-center
@@ -169,6 +169,7 @@ my $style_dflt = new Gtk::Style;
# latin1 languages; never use a simple font, *always* load a fontset
$style_dflt->font(Gtk::Gdk::Font->fontset_load(_("-*-times-bold-r-normal-*-14-*-*-*-p-*-iso8859-1,*-r-*")));
my $index = 0;
+my $darea_left_sav;
foreach (@tree) {
$index++;
my $index = $index;
@@ -215,7 +216,6 @@ foreach (@tree) {
$darea_left->draw(undef);
}
});
- my $darea_left_sav;
$darea_left->signal_connect( button_release_event => sub {
clean_socket();
$notebook_global->show;
@@ -274,11 +274,13 @@ sub compute_exec_string {
}
push @pid_launched, $pid;
}
- foreach (@darea_left_list) {
- $_->[1]->window->set_cursor($cursor_hand);
- if($_->[1]->{state} != 0) {
- $_->[1]->{state} = 0;
- $_->[1]->draw(undef);
+ if ($embedded) {
+ foreach (@darea_left_list) {
+ $_->[1]->window->set_cursor($cursor_hand);
+ if($_->[1]->{state} != 0) {
+ $_->[1]->{state} = 0;
+ $_->[1]->draw(undef);
+ }
}
}
}
@@ -326,6 +328,7 @@ sub clean_socket {
sub res_socket {
clean_socket();
gtkpack($emb_box, $emb_socket = new Gtk::Socket);
+ $emb_socket->hide;
$logs and gtkadd($exp_frame, $exp_socket = new Gtk::Socket);
}
@@ -391,6 +394,8 @@ $fixed_title->signal_connect( realize => sub { $fixed_title->window->set_back_pi
$darea_title->signal_connect( realize => sub { $darea_title->window->set_cursor($cursor_hand) });
$darea_title->set_events([ 'button_release_mask' ]);
$darea_title->signal_connect( button_release_event => sub {
+ clean_socket();
+ $notebook_global->show;
$notebook_global->set_page(0);
foreach (@darea_left_list) {
$_->[1]->window->set_cursor($cursor_normal);
@@ -465,9 +470,9 @@ foreach (@tree) {
$pixmap_back_right, 540, 460, 55, 50, 50, 50, 50, 50, \&compute_exec_string, $exec_hash);
$notebook_global->append_page($w);
}
-$window_global->show_all;
-$emb_box->hide;
-$window_global->realize;
+#$window_global->show_all;
+#$emb_box->hide;
+#$window_global->realize;
my %tree_launched;
@@ -478,20 +483,25 @@ $notebook_global->signal_connect( switch_page => sub {
$tab_number > 0 or return;
$tab_widget->child->child->child->{redraw_function}->();
});
-foreach (0..$#tree) {
- $notebook_global->set_page($_);
- Gtk->main_iteration while Gtk->events_pending;
-}
+#foreach (0..$#tree) {
+# $notebook_global->set_page($_);
+# Gtk->main_iteration while Gtk->events_pending;
+#}
$notebook_global->set_page(0);
-#$window_global->show;
+$window_global->show_all;
+$emb_box->hide;
my @anim;
($anim[$_]->[0], $anim[$_]->[1]) = gtkcreate_png("$png_path/anim_" . ($_ + 1) . ".png") foreach (0..9);
+$window_global->set_default_size(700, 505);
+$window_global->set_position(1);
+Gtk->main;
+
$SIG{USR1} = sub {
- print "hmmm\n";
clean_socket();
+ $darea_left_sav->{state} = 2, $darea_left_sav->draw(undef);
$notebook_global->show;
-}; # embedded applications will send me that signal in order to "hide" them
+}; # embedded applications will send me that signal in order to "kill/hide" them
$SIG{TERM} = \&quit_global; # embedded applications will send me that signal in order to quit the cc.
my $global_vbox;
my $global_time_tag;
@@ -507,11 +517,6 @@ my $global_socket;
# $notebook_global->set_page($a);
};
-$window_global->set_default_size(700, 505);
-$window_global->set_position(1);
-Gtk->main;
-
-
#-------------------------------------------------------------
# i18n routines
# IMPORTANT: next two routines have to be redefined here to
@@ -640,8 +645,7 @@ sub get_main_menu {
type => '<Branch>' },
{ path => _("/Options")._("/Display _Logs"),
callback => \&display_logs,
- type => '<CheckItem>'
- },
+ type => '<CheckItem>' },
{ path => _("/Options")._("/_Embedded Mode"),
callback => \&embedded_mode,
type => '<ToggleItem>'},