index
:
drakx
distro/mdv2007.1
distro/mdv2008.0
distro/mdv2008.1
distro/mdv2009.0
distro/mdv2009.1
distro/mdv2010.0
distro/mes5
distro/mes5-2.6.33
distro/mes6
distro/mga1
distro/mga2
distro/mga3
distro/mga4
distro/mga5
distro/mga6
distro/mga7
distro/mga8
distro/mga9
master
topic/Corpo_2_1
topic/KA9_0
topic/MDK-10-update
topic/MDK-10_1-update
topic/MDK-10_2-update
topic/MDK-2006_0-update
topic/MDK92-branch
topic/MDKC_1_0
topic/PCMCIA_CS_DISTRO
topic/R9_0-64bit-branch
topic/R9_1_HP-branch
topic/a
topic/before_matchbox_wm
topic/bug-13680
topic/dietlibc
topic/efi
topic/extlinux
topic/firewall
topic/gdk-pixbuf-0-branch
topic/gi-ppc
topic/ia64-8_1
topic/mandrakesoft
topic/mlcd4
topic/ppp
topic/rp-pppoe
topic/switching_to_dnf
topic/switching_to_urpmi
topic/unlabeled-1.1.1
topic/v_webmin_0_87
topic/x86_64-branch
user/animtim/designWork
user/colin/rescue-systemd
user/ennael/mga6
user/erwan/bug-13680
user/jibz/aarch64
user/martinw/mga6
user/pterjan/arm64
Mageia Installer and base platform for many utilities
Thierry Vignaud [tv]
summary
refs
log
tree
commit
diff
stats
log msg
author
committer
range
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
package gurpmi
;
#- This is needed because text printed by Gtk2 will always be encoded
#- in UTF-8; we first check if LC_ALL is defined, because if it is,
#- changing only LC_COLLATE will have no effect.
use
POSIX
qw(setlocale LC_ALL LC_COLLATE)
;
use
locale
;
my
$collation_locale
=
$ENV
{
LC_ALL
};
if
(
$collation_locale
) {
$collation_locale
=~
/UTF-8/
or
setlocale
(
LC_ALL
,
"
$collation_locale
.UTF-8"
);
}
else
{
$collation_locale
=
setlocale
(
LC_COLLATE
);
$collation_locale
=~
/UTF-8/
or
setlocale
(
LC_COLLATE
,
"
$collation_locale
.UTF-8"
);
}
use
urpm
;
use
strict
;
use
Exporter
;
our
@ISA
));
}
sub
but
($) {
"
$_
[0] "
}
sub
quit
() {
Gtk2-
>
main_quit
}
sub
add_button_box
{
my
(
$vbox, @buttons
) =
@_
;
my
$hbox
=
Gtk2
::
HButtonBox-
>
new
;
$vbox
->
pack_start
(
$hbox,
0
,
0
,
0
);
$hbox
->
set_layout
(
'edge'
);
$_
->
set_alignment
(
0.5
,
0.5
),
$hbox
->
add
(
$_
)
foreach
@buttons
;
}
sub
new_label
{
my
(
$msg
) =
@_
;
my
$label
=
Gtk2
::
Label-
>
new
(
$msg
);
$label
->
set_line_wrap
(
1
);
$label
->
set_alignment
(
0.5
,
0.5
);
if
((
$msg
=~
tr/\n/\n/
) >
5
) {
my
$sw
=
Gtk2
::
ScrolledWindow-
>
new
;
$sw
->
set_policy
(
'never'
,
'automatic'
);
$sw
->
add_with_viewport
(
$label
);
$sw
->
set_size_request
(-
1
,
200
);
return
$sw
;
}
else
{
return
$label
;
}
}
sub
N
{
my
(
$format, @params
) =
@_
;
my
$r
=
sprintf
(
eval
{
Locale
::
gettext
::
gettext
(
$format
||
''
) } ||
$format,
@params,
);
Locale
::
gettext
::
iconv
(
$r,
undef
,
"UTF-8"
);
}
1
;