# Copyright (C) 2010 Free Software Foundation, Inc.
#
# Nurali Abdurahmonov <mavnur@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2009-10-07 13:57+0200\n"
"PO-Revision-Date: 2010-01-15 08:03+0500\n"
"Last-Translator: Nurali Abdurahmonov <mavnur@gmail.com>\n"
"Language-Team: Uzbek (Cyrillic) <mavnur@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Lokalize 1.0\n"
#: any.pm:252 any.pm:910 diskdrake/interactive.pm:594 diskdrake/interactive.pm:794 diskdrake/interactive.pm:838 diskdrake/interactive.pm:942 diskdrake/interactive.pm:1196 diskdrake/interactive.pm:1248 do_pkgs.pm:241 do_pkgs.pm:287 harddrake/sound.pm:303 interactive.pm:587 pkgs.pm:281
#, fuzzy, c-format
msgid "Please wait"
msgstr "Илтимос кутиб туринг"
#: any.pm:252
#, c-format
msgid "Bootloader installation in progress"
msgstr "Операцион тизим юклагичини ўрнатиш давом этмоқда"
#: any.pm:263
#, fuzzy, c-format
msgid ""
"LILO wants to assign a new Volume ID to drive %s. However, changing\n"
"the Volume ID of a Windows NT, 2000, or XP boot disk is a fatal Windows error.\n"
"This caution does not apply to Windows 95 or 98, or to NT data disks.\n"
"\n"
"Assign a new Volume ID?"
msgstr ""
"LILO %s диск учун янги диск қисми ID'си ёзмоқчи. Эсингизда бўлсин,\n"
"Windows NT, 2000 ёки XP юклаш диск қисмини ўзгартириш Windows учун хатарли "
"ҳисобланади.\n"
"Ушбу огоҳлантириш Windows 95 ёки 98, ёки NT маълумот дискларга тегишли эмас."
"\n"
"\n"
"Янги диск қисми ID'си ёзилсинми?"
#: any.pm:274
#, c-format
msgid "Installation of bootloader failed. The following error occurred:"
msgstr ""
"Операцион тизим юклагичини ўрнатиш
foreach my $opt (qw(resize1 shrink1 resize2 shrink2)) {
$opts->{$opt} = 1 if !defined $opts->{$opt};
}
$w->pack1(delete $opts->{child1}, delete $opts->{resize1}, delete $opts->{shrink1});
$w->pack2(delete $opts->{child2}, delete $opts->{resize2}, delete $opts->{shrink2});
$w;
}
sub _gtk__VBox { &_gtk_any_Box }
sub _gtk__HBox { &_gtk_any_Box }
sub _gtk_any_Box {
my ($w, $opts, $class, $action) = @_;
if (!$w) {
$w = "Gtk2::$class"->new;
$w->set_homogeneous(delete $opts->{homogenous}) if exists $opts->{homogenous};
$w->set_spacing(delete $opts->{spacing}) if exists $opts->{spacing};
$w->set_border_width(delete $opts->{border_width}) if exists $opts->{border_width};
} elsif ($action eq 'gtkset') {
$_->destroy foreach $w->get_children;
}
_gtknew_handle_children($w, $opts);
$w;
}
sub _gtk__VButtonBox { &_gtk_any_ButtonBox }
sub _gtk__HButtonBox { &_gtk_any_ButtonBox }
sub _gtk_any_ButtonBox {
my ($w, $opts, $class, $action) = @_;
if (!$w) {
$w = "Gtk2::$class"->new;
$w->set_homogeneous(delete $opts->{homogenous}) if exists $opts->{homogenous};
$w->set_border_width(delete $opts->{border_width}) if exists $opts->{border_width};
$w->set_spacing(delete $opts->{spacing}) if exists $opts->{spacing};
$w->set_layout(delete $opts->{layout} || 'spread');
} elsif ($action eq 'gtkset') {
$_->destroy foreach $w->get_children;
}
_gtknew_handle_children($w, $opts);
$w;
}
sub _gtk__Notebook {
my ($w, $opts) = @_;
if (!$w) {
$w = Gtk2::Notebook->new;
$w->set_property('show-tabs', delete $opts->{show_tabs}) if exists $opts->{show_tabs};
$w->set_property('show-border', delete $opts->{show_border}) if exists $opts->{show_border};
}
if (exists $opts->{children}) {
foreach (group_by2(@{delete $opts->{children}})) {
my ($title, $page) = @$_;
$w->append_page($page, $title);
$page->show;
$title->show;
}
}
$w;
}
sub _gtk__Table {
my ($w, $opts) = @_;
if (!$w) {
add2hash_($opts, { xpadding => 5, ypadding => 0, border_width => $::isInstall ? 3 : 10 });
$w = Gtk2::Table->new(0, 0, delete $opts->{homogeneous} || 0);
$w->set_col_spacings(delete $opts->{col_spacings} || 0);
$w->set_row_spacings(delete $opts->{row_spacings} || 0);
$w->set_border_width(delete $opts->{border_width});
$w->{$_} = delete $opts->{$_} foreach 'xpadding', 'ypadding', 'mcc';
}
each_index {
my ($i, $l) = ($::i, $_);
each_index {
my $j = $::i;
if ($_) {
ref $_ or $_ = Gtk2::WrappedLabel->new($_);
$w->attach($_, $j, $j + 1, $i, $i + 1,
$j != $#$l && !$w->{mcc} ?
('fill', 'fill', $w->{xpadding}, $w->{ypadding}) :
(['expand', 'fill'], ref($_) eq 'Gtk2::ScrolledWindow' || $_->get_data('must_grow') ?
['expand', 'fill'] : [], 0, 0));
$_->show;
}
} @$l;
} @{delete $opts->{children} || []};
$w;
}
sub _gtk_any_simple {
my ($w, $_opts, $class) = @_;
$w ||= "Gtk2::$class"->new;
}
sub _gtknew_handle_children {
my ($w, $opts) = @_;
my @child = exists $opts->{children_tight} ? map { [ 0, $_ ] } @{delete $opts->{children_tight}} :
exists $opts->{children_loose} ? map { [ 1, $_ ] } @{delete $opts->{children_loose}} :
exists $opts->{children} ? group_by2(@{delete $opts->{children}}) :
exists $opts->{children_centered} ?
([ 1, gtknew('VBox') ], (map { [ 0, $_ ] } @{delete $opts->{children_centered}}), [ 1, gtknew('VBox') ]) :
();
my $padding = delete $opts->{padding};
foreach (@child) {
my ($fill, $child) = @$_;
$fill eq '0' || $fill eq '1' || $fill eq 'fill' || $fill eq 'expand' or internal_error("odd {children} parameter must be 0 or 1 (got $fill)");
ref $child or $child = Gtk2::WrappedLabel->new($child);
my $expand = $fill && $fill ne 'fill' ? 1 : 0;
$w->pack_start($child, $expand, $fill, $padding || 0);
$child->show;
}
}
#- this magic function redirects method calls:
#- * default is to redirect them to the {child}
#- * if the {child} doesn't handle the method, we try with the {real_window}
#- (eg : add_accel_group set_position set_default_size
#- * a few methods are handled specially
my %for_real_window = map { $_ => 1 } qw(show_all size_request);
sub mygtk2::MagicWindow::AUTOLOAD {
my ($w, @args) = @_;
my ($meth) = $mygtk2::MagicWindow::AUTOLOAD =~ /mygtk2::MagicWindow::(.*)/;
my ($s1, @s2) = $meth eq 'show'
? ('real_window', 'banner', 'child') :
$meth eq 'destroy' || $meth eq 'hide' ?
($w->{pop_it} ? 'real_window' : ('child', 'banner')) :
$meth eq 'get' && $args[0] eq 'window-position' ||
$for_real_window{$meth} ||
!$w->{child}->can($meth)
? 'real_window'
: 'child';
#- warn "mygtk2::MagicWindow::$meth", first($w =~ /HASH(.*)/), " on $s1 @s2 (@args)\n";
$w->{$_} && $w->{$_}->$meth(@args) foreach @s2;
$w->{$s1}->$meth(@args);
}
sub _create_Window {
my ($opts, $special_center) = @_;
my $no_Window_Manager = exists $opts->{no_Window_Manager} ? delete $opts->{no_Window_Manager} : !$::isStandalone;
add2hash($opts, {
if_(!$::isInstall && !$::isWizard, border_width => 5),
#- policy: during install, we need a special code to handle the weird centering, see below
position_policy => $special_center ? 'none' :
$no_Window_Manager ? 'center-always' : 'center-on-parent',
if_($::isInstall, position => [
$::stepswidth + ($::o->{windowwidth} - $::real_windowwidth) / 2,
($::o->{windowheight} - $::real_windowheight) / 2,
]),
});
my $w = _gtk(undef, 'Window', 'gtknew', $opts);
#- when the window is closed using the window manager "X" button (or alt-f4)
$w->signal_connect(delete_event => sub {
if ($::isWizard) {
$w->destroy;
die 'wizcancel';
} else {
if (Gtk2->main_level) {
Gtk2->main_quit;
} else {
# block window deletion if not in main loop (eg: while starting the GUI)
return 1;
}
}
});
if ($no_Window_Manager) {
_force_keyboard_focus($w);
}
if ($::isInstall && !$::isStandalone) {
require install::gtk; #- for perl_checker
install::gtk::handle_unsafe_mouse($::o, $w);
$w->signal_connect(key_press_event => \&install::gtk::special_shortcuts);
#- force center at a weird position, this can't be handled by position_policy
#- because center-* really are window manager hints for centering, whereas we want
#- to center the main window in the right part of the screen
my ($wi, $he);
$w->signal_connect(size_allocate => sub {
my (undef, $event) = @_;
my @w_size = $event->values;
# ignore bogus sizing events:
return if $w_size[2] < 5;
return if $w_size[2] == $wi && $w_size[3] == $he; #BUG
(undef, undef, $wi, $he) = @w_size;
$w->move(max(0, $::rootwidth - ($::o->{windowwidth} + $wi) / 2),
max(0, ($::o->{windowheight} - $he) / 2));
}) if $special_center;
}
$w;
}
my $current_window;
sub _force_keyboard_focus {
my ($w) = @_;
sub _XSetInputFocus {
my ($w) = @_;
if ($current_window == $w) {
$w->window->XSetInputFocus;
}
0;
}
#- force keyboard focus instead of mouse focus
my $previous_current_window = $current_window;
$current_window = $w;
$w->signal_connect(expose_event => \&_XSetInputFocus);
$w->signal_connect(destroy => sub { $current_window = $previous_current_window });
}
sub _find_imgfile {
my ($name) = @_;
if ($name =~ m|/| && -f $name) {
$name;
} else {
foreach my $path (_icon_paths()) {
foreach ('', '.png', '.xpm', '.jpg') {
my $file = "$path/$name$_";
-f $file and return $file;
}
}
}
}
# _text_insert() can be used with any of choose one of theses styles:
# - no tags:
# _text_insert($textview, "My text..");
# - anonymous tags:
# _text_insert($textview, [ [ 'first text', { 'foreground' => 'blue', 'background' => 'green', ... } ],
# [ 'second text' ],
# [ 'third', { 'font' => 'Serif 15', ... } ],
# ... ]);
# - named tags:
# $textview->{tags} = {
# 'blue_green' => { 'foreground' => 'blue', 'background' => 'green', ... },
# 'big_font' => { 'font' => 'Serif 35', ... },
# }
# _text_insert($textview, [ [ 'first text', 'blue_green' ],
# [ 'second', 'big_font' ],
# ... ]);
# - mixed anonymous and named tags:
# $textview->{tags} = {
# 'blue_green' => { 'foreground' => 'blue', 'background' => 'green', ... },
# 'big_font' => { 'font' => 'Serif 35', ... },
# }
# _text_insert($textview, [ [ 'first text', 'blue_green' ],
# [ 'second text' ],
# [ 'third', 'big_font' ],
# [ 'fourth', { 'font' => 'Serif 15', ... } ],
# ... ]);
sub _text_insert {
my ($textview, $t, %opts) = @_;
my $buffer = $textview->get_buffer;
$buffer->{tags} ||= {};
$buffer->{gtk_tags} ||= {};
my $gtk_tags = $buffer->{gtk_tags};
my $tags = $buffer->{tags};
if (ref($t) eq 'ARRAY') {
if (!$opts{append}) {
$buffer->set_text('');
$textview->{anchors} = [];
}
foreach my $token (@$t) {
my ($item, $tag) = @$token;
my $iter1 = $buffer->get_end_iter;
if (ref($item) =~ /^Gtk2::Gdk::Pixbuf/) {
$buffer->insert_pixbuf($iter1, $item);
next;
}
if (ref($item) =~ /^Gtk2::/) {
my $anchor = $buffer->create_child_anchor($iter1);
$textview->add_child_at_anchor($item, $anchor);
$textview->{anchors} ||= [];
push @{$textview->{anchors}}, $anchor;
next;
}
if ($tag) {
if (ref($tag)) {
# use anonymous tags
$buffer->insert_with_tags($iter1, $item, $buffer->create_tag(undef, %$tag));
} else {
# fast text insertion:
# since in some contexts (eg: localedrake, rpmdrake), we use quite a lot of identical tags,
# it's much more efficient and less memory pressure to use named tags
$gtk_tags->{$tag} ||= $buffer->create_tag($tag, %{$tags->{$token->[1]}});
$buffer->insert_with_tags($iter1, $item, $gtk_tags->{$tag});
}
} else {
$buffer->insert($iter1, $item);
}
}
} else {
if ($opts{append}) {
$buffer->insert($buffer->get_end_iter, $t);
} else {
$textview->{anchors} = [];
$buffer->set_text($t);
}
}
$textview->{to_bottom}->() if $textview->{to_bottom};
#- the following line is needed to move the cursor to the beginning, so that if the
#- textview has a scrollbar, it will not scroll to the bottom when focusing (#3633)
$buffer->place_cursor($buffer->get_start_iter);
$textview->set_wrap_mode($opts{wrap_mode} || 'word');
$textview->set_editable($opts{editable} || 0);
$textview->set_cursor_visible($opts{visible} || 0);
$textview;
}
sub _allow_scroll_TextView_to_bottom {
my ($scrolledWindow, $textView) = @_;
$textView->get_buffer->create_mark('end', $textView->get_buffer->get_end_iter, 0);
sub {
my ($o_force) = @_;
my $adjustment = $scrolledWindow->get_vadjustment;
if ($o_force || $adjustment->page_size + $adjustment->value == $adjustment->upper) {
flush(); #- one must flush before scrolling to end, otherwise the text just added *may* not be taken into account correctly, and so it doesn't really scroll to end
$textView->scroll_to_mark($textView->get_buffer->get_mark('end'), 0, 1, 0, 1);
}
};
}
sub asteriskize {
my ($label) = @_;
"\x{2022} " . $label;
}
sub get_main_window_size() {
my ($width, $height) = $::real_windowwidth ? ($::real_windowwidth, $::real_windowheight) : $::isWizard ? (540, 360) : (600, 400);
}
# in order to workaround infamous 6 years old gnome bug #101968:
sub get_label_width() {
first(mygtk2::get_main_window_size()) - 50 - $left_padding;
}
sub set_main_window_size {
my ($window) = @_;
my ($width, $height) = get_main_window_size();
$window->set_size_request($width, $height);
}
my @icon_paths;
sub add_icon_path { push @icon_paths, @_ }
sub _icon_paths() {
(@icon_paths, (exists $ENV{SHARE_PATH} ? ($ENV{SHARE_PATH}, "$ENV{SHARE_PATH}/icons", "$ENV{SHARE_PATH}/libDrakX/pixmaps") : ()),
"/usr/lib/libDrakX/icons", "pixmaps", 'data/icons', 'data/pixmaps', 'standalone/icons', '/usr/share/rpmdrake/icons');
}
sub main {
my ($window, $o_verif) = @_;
my $destroyed;
$window->signal_connect(destroy => sub { $destroyed = 1 });
$window->show;
do { Gtk2->main } while (!$destroyed && $o_verif && !$o_verif->());
may_destroy($window);
flush();
}
sub sync {
my ($window) = @_;
$window->show;
flush();
}
sub flush() {
Gtk2->main_iteration while Gtk2->events_pending;
}
sub enable_sync_flush {
my ($w) = @_;
$w->signal_connect(expose_event => sub { $w->{displayed} = 1; 0 });
}
sub sync_flush {
my ($w) = @_;
# hackish :-(
mygtk2::sync($w) while !$w->{displayed};
}
sub may_destroy {
my ($w) = @_;
return if !$w;
@::main_windows = difference2(\@::main_windows, [ $w->{real_window} ]);
if ($::main_window eq $w->{real_window}) {
undef $::main_window;
$::main_window = $::main_windows[-1];
}
$w->destroy;
}
sub root_window() {
state $root;
$root ||= Gtk2::Gdk->get_default_root_window;
}
sub rgb2color {
my ($r, $g, $b) = @_;
my $color = Gtk2::Gdk::Color->new($r, $g, $b);
root_window()->get_colormap->rgb_find_color($color);
$color;
}
sub set_root_window_background {
my ($r, $g, $b) = @_;
my $root = root_window();
my $gc = Gtk2::Gdk::GC->new($root);
my $color = rgb2color($r, $g, $b);
$gc->set_rgb_fg_color($color);
set_root_window_background_with_gc($gc);
}
sub set_root_window_background_with_gc {
my ($gc) = @_;
my $root = root_window();
my ($w, $h) = $root->get_size;
$root->set_background($gc->get_values->{foreground});
$root->draw_rectangle($gc, 1, 0, 0, $w, $h);
}
sub _new_alpha_pixbuf {
my ($pixbuf) = @_;
my ($height, $width) = ($pixbuf->get_height, $pixbuf->get_width);
my $new_pixbuf = Gtk2::Gdk::Pixbuf->new('rgb', 1, 8, $width, $height);
$new_pixbuf->fill(0x00000000); # transparent white
$width, $height, $new_pixbuf;
}
sub _pixbuf_render_alpha {
my ($pixbuf, $alpha_threshold) = @_;
my ($width, $height, $new_pixbuf) = _new_alpha_pixbuf($pixbuf);
$pixbuf->composite($new_pixbuf, 0, 0, $width, $height, 0, 0, 1, 1, 'bilinear', $alpha_threshold);
$new_pixbuf;
}
sub pixmap_from_pixbuf {
my ($widget, $pixbuf) = @_;
my $window = $widget->window or internal_error("you can't use this function if the widget is not realised");
my ($width, $height) = ($pixbuf->get_width, $pixbuf->get_height);
my $pixmap = Gtk2::Gdk::Pixmap->new($window, $width, $height, $window->get_depth);
$pixbuf->render_to_drawable($pixmap, $widget->style->fg_gc('normal'), 0, 0, 0, 0, $width, $height, 'max', 0, 0);
$pixmap;
}
sub import_style_ressources() {
if (!$::isInstall) {
Gtk2::Rc->parse_string(scalar cat_('/usr/share/libDrakX/themes-galaxy.rc')); # FIXME DEBUG
}
}
sub text_direction_rtl() {
Gtk2::Widget->get_default_direction() eq 'rtl';
}
package Gtk2::MDV_Notebook; # helper functions for installer & mcc
our @ISA = qw(Gtk2::Widget);
sub hide_selection {
my ($w) = @_;
$_->hide foreach $w->{selection_bar}, $w->{selection_arrow};
}
sub move_selection {
my ($w, $label) = @_;
my $layout = $w->{layout};
$layout->{arrow_ydiff} ||=
($w->{selection_arrow}->get_pixbuf->get_height - $w->{selection_bar}->get_pixbuf->get_height)/2;
my $bar_y = $label->allocation->y - ($w->{selection_bar}->get_pixbuf->get_height - $label->allocation->height)/2;
$layout->move($w->{selection_bar}, 0, $bar_y);
$layout->move($w->{selection_arrow}, $w->{arrow_x}, $bar_y - $layout->{arrow_ydiff}); # arrow is higer
$_->show foreach $w->{selection_bar}, $w->{selection_arrow};
}
1;
|