summaryrefslogtreecommitdiffstats
path: root/cest_ton_boot
blob: 8b4763a996c54826ec33688439a55798814df506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
/**
*
* @package phpbb_request
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* An interface through which all application input can be accessed.
*
* @package phpbb_request
*/
interface phpbb_request_interface
{
	/**#@+
	* Constant identifying the super global with the same name.
	*/
	const POST = 0;
	const GET = 1;
	const REQUEST = 2;
	const COOKIE = 3;
	const SERVER = 4;
	const FILES = 5;
	/**#@-*/

	/**
	* This function allows overwriting or setting a value in one of the super global arrays.
	*
	* Changes which are performed on the super globals directly will not have any effect on the results of
	* other methods this class provides. Using this function should be avoided if possible! It will
	* consume twice the the amount of memory of the value
	*
	* @param	string	$var_name	The name of the variable that shall be overwritten
	* @param	mixed	$value		The value which the variable shall contain.
	* 								If this is null the variable will be unset.
	* @param	phpbb_request_interface::POST|GET|REQUEST|COOKIE	$super_global
	* 								Specifies which super global shall be changed
	*/
	public function overwrite<#!/usr/bin/perl -w

# Control-center

# Copyright (C) 2001 MandrakeSoft
# Yves Duret <yduret at mandrakesoft.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


use Gtk;
use Config;
init Gtk;
use POSIX;
use Locale::GetText;

setlocale (LC_ALL, "");
Locale::GetText::textdomain ("c'est ton boot !");
#Locale::GetText::bindtextdomain ("drakfloppy", "/usr/share/locale");

import Locale::GetText I_;

$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/;
if ($::isEmbedded) {
  print "EMBED\n";
  print "XID : $::XID\n";
  print "CCPID :  $::CCPID\n";
}

local $_ = join '', @ARGV;

/-h/ and die I_("usage: drakfloppy\n");

$x_mode = 0;
$a_mode = (-e "/etc/aurora/Monitor");

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');
$window->set_policy(0, 0, 0);
$window->border_width (10);
$window->realize;


### menus definition
# the menus are not shown
# but they provides shiny shortcut like C-q
my @menu_items = ( { path        => I_("/_File"),
		     type        => '<Branch>' },
		   { path        => I_("/File/_New"),
		     accelerator => I_("<control>N"),
		     callback    => \&print_hello },
		   { path        => I_("/File/_Open"),
		     accelerator => I_("<control>O"),
		     callback    => \&print_hello },
		   { path        => I_("/File/_Save"),
		     accelerator => I_("<control>S"),
		     callback    => \&print_hello },
		   { path        => I_("/File/Save _As") },
		   { path        => I_("/File/-"),
		     type        => '<Separator>' },
		   { path        => I_("/File/_Quit"),
		     accelerator => I_("<control>Q"),
		     callback    => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } },

		   { path        => I_("/_Options"),
		     type        => '<Branch>' },
		   { path        => I_("/Options/Test") },

		   { path        => I_("/_Help"),
		     type        => '<LastBranch>' },
		   { path        => I_("/Help/_About...")
	public function header($var_name, $default = '');

	/**
	* Checks whether a certain variable was sent via POST.
	* To make sure that a request was sent using POST you should call this function
	* on at least one variable.
	*
	* @param	string	$name	The name of the form variable which should have a
	*							_p suffix to indicate the check in the code that creates the form too.
	*
	* @return	bool			True if the variable was set in a POST request, false otherwise.
	*/
	public function is_set_post($name);

	/**
	* Checks whether a certain variable is set in one of the super global
	* arrays.
	*
	* @param	string	$var	Name of the variable
	* @param	phpbb_request_interface::POST|GET|REQUEST|COOKIE	$super_global
	*							Specifies the super global which shall be checked
	*
	* @return	bool			True if the variable was sent as input
	*/
	public function is_set($var, $super_global = phpbb_request_interface::REQUEST);

	/**
	* Checks whether the current request is an AJAX request (XMLHttpRequest)
	*
	* @return	bool			True if the current request is an ajax request
	*/
	public function is_ajax();

	/**
	* Checks if the current request is happening over HTTPS.
	*
	* @return	bool			True if the request is secure.
	*/
	public function is_secure();

	/**
	* Returns all variable names for a given super global
	*
	* @param	phpbb_request_interface::POST|GET|REQUEST|COOKIE	$super_global
	*					The super global from which names shall be taken
	*
	* @return	array	All variable names that are set for the super global.
	*					Pay attention when using these, they are unsanitised!
	*/
	public function variable_names($super_global = phpbb_request_interface::REQUEST);
}
$item_factory->create_items( @menu_items ); $window->add_accel_group( $accel_group ); return ( $item_factory->get_widget( '<main>' ) ); }