From c6e592bfc73202b1d8b1cdaf1df82779efe7de21 Mon Sep 17 00:00:00 2001 From: Yves Duret Date: Thu, 15 Feb 2001 11:00:35 +0000 Subject: added pixmap support --- cest_ton_boot | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'cest_ton_boot') diff --git a/cest_ton_boot b/cest_ton_boot index 54583c33..369cd8d0 100755 --- a/cest_ton_boot +++ b/cest_ton_boot @@ -46,7 +46,29 @@ local $_ = join '', @ARGV; $x_mode = 0; $a_mode = (-e "/etc/aurora/Monitor"); -my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; +my @xpm_data = ( "16 16 4 1", + " c None s None", + ". c black", + "X c #808080", + "o c white", + " ", + " .. ", + " .Xo. ... ", + " .Xoo. ..oo. ", + " .Xooo.Xooo... ", + " .Xooo.oooo.X. ", + " .Xooo.Xooo.X. ", + " .Xooo.oooo.X. ", + " .Xooo.Xooo.X. ", + " .Xooo.oooo.X. ", + " .Xoo.Xoo..X. ", + " .Xo.o..ooX. ", + " .X..XXXXX. ", + " ..X....... ", + " .. ", + " "); + +my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel"); $window->signal_connect( 'delete_event', sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) }); $window->set_title( I_("ce soir tu choisis ton boot") ); #$window->set_policy('automatic', 'automatic'); @@ -92,6 +114,8 @@ $global_vbox->pack_start (new Gtk::Label(I_("special c'est ton choix")), 0, 0, 0 ######## aurora part my $aurora_frame = new Gtk::Frame( I_("Boot mode") ); +my $a_main_hbox = new Gtk::HBox; + my $a_dedans = new Gtk::VBox( 0, 10 ); $a_dedans->border_width (5); my $a_box = new Gtk::VBox(0, 0 ); @@ -115,7 +139,17 @@ $a_box->pack_start($a_g_button, 1, 1, 0); $a_box->set_sensitive (0); $a_dedans->pack_start ($a_box, 0, 0, 0); -$aurora_frame->add($a_dedans); + +# now for the pixmap from gdk +my ( $pixmap, $mask ) = Gtk::Gdk::Pixmap->create_from_xpm_d( NULL, $window->get_style()->bg( 'normal' ), @xpm_data ); + +# a pixmap widget to contain the pixmap +my $pixmapwid = new Gtk::Pixmap( $pixmap, $mask ); +$pixmapwid->show(); + +$a_main_hbox->pack_start ($a_dedans, 0, 0, 0); +$a_main_hbox->pack_start ($pixmapwid, 0, 0, 0); +$aurora_frame->add($a_main_hbox); $global_vbox->pack_start ($aurora_frame, 1, 1, 0); ### X mode @@ -126,8 +160,8 @@ my $x_box = new Gtk::VBox(0, 0 ); my $x_button = new Gtk::CheckButton( I_("Launch the X-Window system at start") ); $x_button->signal_connect( "clicked", sub { - ($x_mode) ? $x_box->set_sensitive(0) : $x_box->set_sensitive(1); - $x_mode = !$x_mode; + ($x_mode) ? $x_box->set_sensitive(0) : $x_box->set_sensitive(1); + $x_mode = !$x_mode; }); $x_dedans->pack_start ($x_button, 0, 0, 0); @@ -136,7 +170,7 @@ my $x_no_button = new Gtk::RadioButton I_("no, I do not want autologin"); #$x_no_button->set_active(1); $x_box->pack_start($x_no_button, 1, 1, 0); -my $x_yes_button = new Gtk::RadioButton I_("yes, I want it with all my friends"), $x_no_button; +my $x_yes_button = new Gtk::RadioButton I_("yes, I want autologin with this user"), $x_no_button; $x_box->pack_start($x_yes_button, 1, 1, 0); my $user_dedans = new Gtk::VBox( 0, 10 ); @@ -185,5 +219,3 @@ sub get_main_menu { $window->add_accel_group( $accel_group ); return ( $item_factory->get_widget( '
' ) ); } - - -- cgit v1.2.1