package ugtk2; use diagnostics; use strict; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $grab $border); #- leave it on one line, for automatic removal of the line at package creation @ISA = qw(Exporter); %EXPORT_TAGS = ( wrappers => [ qw(gtkadd gtkadd_widget gtkappend gtkappend_page gtkappenditems gtkcombo_setpopdown_strings gtkdestroy gtkentry gtkflush gtkhide gtkmodify_font gtkmove gtkpack gtkpack2 gtkpack2_ gtkpack2__ gtkpack_ gtkpack__ gtkpowerpack gtkput gtkradio gtkresize gtkroot gtkset_active gtkset_border_width gtkset_editable gtkset_justify gtkset_alignment gtkset_layout gtkset_line_wrap gtkset_markup gtkset_modal gtkset_mousecursor gtkset_mousecursor_normal gtkset_mousecursor_wait gtkset_name gtkset_property gtkset_relief gtkset_selectable gtkset_sensitive gtkset_shadow_type gtkset_size_request gtkset_text gtkset_tip gtkset_visibility gtksetstyle gtkshow gtksignal_connect gtksize gtktext_append gtktext_insert ) ], helpers => [ qw(add2notebook add_icon_path fill_tiled fill_tiled_coords gtkcolor gtkcreate_img gtkcreate_pixbuf gtkfontinfo gtkset_background n_line_size set_back_pixbuf set_back_pixmap string_size string_width string_height wrap_paragraph) ], create => [ qw(create_adjustment create_box_with_title create_dialog create_factory_menu create_factory_popup_menu create_hbox create_hpaned create_menu create_notebook create_okcancel create_packtable create_scrolled_window create_vbox create_vpaned _create_dialog gtkcreate_frame) ], ask => [ qw(ask_browse_tree_info ask_browse_tree_info_given_widgets ask_dir ask_from_entry ask_okcancel ask_warn ask_yesorno ) ], dialogs => [ qw(err_dialog info_dialog warn_dialog) ], ); $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ]; @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; use c; use log; use common; use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version use Gtk2; use Gtk2::Gdk::Keysyms; $border = 5; sub wm_icon() { $wm_icon || $::Wizard_pix_up || "wiz_default_up.png" } # -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=--- # wrappers # # Functional-style wrappers to existing Gtk functions; allows to program in # a more functional way, and especially, first, to avoid using temp # variables, and second, to "see" directly in the code the user interface # you're building. sub gtkdestroy { mygtk2::may_destroy($_[0]) } sub gtkflush() { mygtk2::flush() } sub gtkhide { $_[0]->hide; $_[0] } sub gtkmove { $_[0]->window->move($_[1], $_[2]); $_[0] } sub gtkpack { gtkpowerpack(1, 1, @_) } sub gtkpack_ { gtkpowerpack('arg', 1, @_) } sub gtkpack__ { gtkpowerpack(0, 1, @_) } sub gtkpack2 { gtkpowerpack(1, 0, @_) } sub gtkpack2_ { gtkpowerpack('arg', 0, @_) } sub gtkpack2__ { gtkpowerpack(0, 0, @_) } sub gtkput { $_[0]->put(gtkshow($_[1]), $_[2], $_[3]); $_[0] } sub gtkresize { $_[0]->window->resize($_[1], $_[2]); $_[0] } sub gtkset_active { $_[0]->set_active($_[1]); $_[0] } sub gtkset_border_width { $_[0]->set_border_width($_[1]); $_[0] } sub gtkset_editable { $_[0]->set_editable($_[1]); $_[0] } sub gtkset_selectable { $_[0]->set_selectable($_[1]); $_[0] } sub gtkset_justify { $_[0]->set_justify($_[1]); $_[0] } sub gtkset_alignment { $_[0]->set_alignment($_[1], $_[2]); $_[0] } sub gtkset_layout { $_[0]->set_layout($_[1]); $_[0] } sub gtkset_modal { $_[0]->set_modal($_[1]); $_[0] } sub gtkset_mousecursor_normal { gtkset_mousecursor('left-ptr', @_) } sub gtkset_mousecursor_wait { gtkset_mousecursor('watch', @_) } sub gtkset_relief { $_[0]->set_relief($_[1]); $_[0] } sub gtkset_sensitive { $_[0]->set_sensitive($_[1]); $_[0] } sub gtkset_visibility { $_[0]->set_visibility($_[1]); $_[0] } sub gtkset_tip { $_[0]->set_tip($_[1], $_[2]) if $_[2]; $_[1] } sub gtkset_shadow_type { $_[0]->set_shadow_type($_[1]); $_[0] } sub gtkset_style { $_[0]->set_style($_[1]); $_[0] } sub gtkset_size_request { $_[0]->set_size_request($_[1], $_[2]); $_[0] } sub gtkshow { $_[0]->show; $_[0] } sub gtksize { $_[0]->size($_[1], $_[2]); $_[0] } sub gtkset_markup { $_[0]->set_markup($_[1]); $_[0] } sub gtkset_line_wrap { $_[0]->set_line_wrap($_[1]); $_[0] } sub gtkadd { my $w = shift; foreach my $l (@_) { ref $l or $l = gtknew('WrappedLabel', text => $l); $w->add(gtkshow($l)); } $w; } sub gtkadd_widget { my $sg = shift; map { my $l = $_; ref $l or $l = gtknew('WrappedLabel', text => $l); $sg->add_widget($l); $l; } @_; } sub gtkappend { my $w = shift; foreach my $l (@_) { ref $l or $l = gtknew('WrappedLabel', text => $l); $w->append(gtkshow($l)); } $w; } sub gtkappenditems { my $w = shift; $_->show foreach @_; $w->append_items(@_); $w; } # append page to a notebook sub gtkappend_page { my ($notebook, $page, $o_title) = @_; $notebook->append_page($page, $o_title); $notebook; } sub gtkentry { my ($text) = @_; my $e = gtknew('Entry'); $text and $e->set_text($text); $e; } sub gtksetstyle { my ($w, $s) = @_; $w->set_style($s); $w; } sub gtkradio { my $def = shift; my $radio; map { gtkset_active($radio = Gtk2::RadioButton->new_with_label($radio ? $radio->get_group : undef, $_), $_ eq $def) } @_; } sub gtkroot() { mygtk2::root_window() } sub gtkcolor { &mygtk2::rgb2color } sub gtkset_background { &mygtk2::set_root_window_background } sub gtkset_text { my ($w, $s) = @_; $w->set_text($s); $w; } sub gtkcombo_setpopdown_strings { my $w = shift; $w->set_popdown_strings(@_); $w; } sub gtkset_mousecursor { my ($type, $w) = @_; ($w || gtkroot())->set_cursor(Gtk2::Gdk::Cursor->new($type)); $w; } sub gtksignal_connect { my $w = shift; $w->signal_connect(@_); $w; } sub gtkset_name { my ($widget, $name) = @_; $widget->set_name($name); $widget; } sub gtkpowerpack { #- Get Default Attributes (if any). 2 syntaxes allowed : #- gtkpowerpack( {expand => 1, fill => 0}, $box...) : the attributes are picked from a specified hash ref #- gtkpowerpack(1, 0, 1, $box, ...) : the attributes are picked from the non-ref list, in the order (expand, fill, padding, pack_end). my @attributes_list = qw(expand fill padding pack_end); my $default_attrs = {}; if (ref($_[0]) eq 'HASH') { $default_attrs = shift; } elsif (!ref($_[0])) { foreach (@attributes_list) { ref($_[0]) and last; $default_attrs->{$_} = shift; } } my $box = shift; while (@_) { #- Get attributes (if specified). 4 syntaxes allowed (default values are undef ie. false...) : #- gtkpowerpack({defaultattrs}, $box, $widget1, $widget2, ...) : the attrs are picked from the default ones (if they exist) #- gtkpowerpack($box, {fill=>1, expand=>0, ...}, $widget1, ...) : the attributes are picked from a specified hash ref #- gtkpowerpack($box, [1,0,1], $widget1, ...) : the attributes are picked from the array ref : (expand, fill, padding, pack_end). #- gtkpowerpack({attr=>'arg'}, $box, 1, $widget1, 0, $widget2, etc...) : the 'arg' value will tell gtkpowerpack to always read the #- attr value directly in the arg list (avoiding confusion between value 0 and Gtk::Label("0"). That can simplify some writings but #- this arg(s) MUST then be present... my (%attr, $attrs); ref($_[0]) eq 'HASH' || ref($_[0]) eq 'ARRAY' and $attrs = shift; foreach (@attributes_list) { if (($default_attrs->{$_} || '') eq 'arg') { ref($_[0]) and die "error in packing definition\n"; $attr{$_} = shift; ref($attrs) eq 'ARRAY' and shift @$attrs; } elsif (ref($attrs) eq 'HASH' && defined($attrs->{$_})) { $attr{$_} = $attrs->{$_}; } elsif (ref($attrs) eq 'ARRAY') { $attr{$_} = shift @$attrs; } elsif (defined($default_attrs->{$_})) { $attr{$_} = int $default_attrs->{$_}; } else { $attr{$_} = 0; } } #- Get and pack the widget (create it if necessary to a label...) my $widget = ref($_[0]) ? shift : gtknew('WrappedLabel', text => shift); my $pack_call = 'pack_' . ($attr{pack_end} ? 'end' : 'start'); $box->$pack_call($widget, $attr{expand}, $attr{fill}, $attr{padding}); $widget->show; } return $box; } sub gtktreeview_children { my ($model, $iter) = @_; my @l; $model && $iter or return; for (my $p = $model->iter_children($iter); $p; $p = $model->iter_next($p)) { push @l, $p; } @l; } # -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=--- # create # # Helpers that allow omitting common operations on common widgets # (e.g. create widgets with good default properties) sub create_pixbutton { my ($label, $pix, $reverse_order) = @_; my @label_and_pix = (0, $label, if_($pix, 0, $pix)); gtkadd(gtknew('Button'), gtknew('HBox', spacing => 3, children => [ 1, "", $reverse_order ? reverse(@label_and_pix) : @label_and_pix, 1, "", ])); } sub create_adjustment { my ($val, $min, $max) = @_; Gtk2::Adjustment->new($val, $min, $max + 1, 1, ($max - $min + 1) / 10, 1); } sub create_scrolled_window { my ($W, $o_policy, $o_viewport_shadow) = @_; my $w = Gtk2::ScrolledWindow->new(undef, undef); $w->set_policy($o_policy ? @$o_policy : ('automatic', 'automatic')); if (member(ref($W), qw(Gtk2::Layout Gtk2::Html2::View Gtk2::Text Gtk2::TextView Gtk2::TreeView))) { $w->add($W); } else { $w->add_with_viewport($W); } $o_viewport_shadow and gtkset_shadow_type($w->child, $o_viewport_shadow); $W->can('set_focus_vadjustment') and $W->set_focus_vadjustment($w->get_vadjustment); $W->set_left_margin(6) if ref($W) =~ /Gtk2::TextView/; $W->show; if (ref($W) =~ /Gtk2::TextView|Gtk2::TreeView/) { gtknew('Frame', shadow_type => 'in', child => $w); } else { $w; } } sub n_line_size { my ($nbline, $type, $widget) = @_; my $spacing = ${{ text => 3, various => 17 }}{$type}; my %fontinfo = gtkfontinfo($widget); round($nbline * ($fontinfo{ascent} + $fontinfo{descent} + $spacing) + 8); } sub create_box_with_title { my ($o, @l) = @_; my $nbline = sum(map { round(length($_) / 60 + 1/2) } map { split "\n" } @l); my $box = gtknew('VBox'); if ($nbline == 0) { $o->{box_size} = 0; return $box; } $o->{box_size} = n_line_size($nbline, 'text', $box); if (@l <= 2 && $nbline > 4) { $o->{icon} && !$::isWizard and eval { gtkpack__($box, gtknew('HBox', border_width => 5, children_loose => [ gtkcreate_img($o->{icon}) ])) }; my $wanted = $o->{box_size}; $o->{box_size} = min(200, $o->{box_size}); my $has_scroll = $o->{box_size} < $wanted; chomp(my $text = join("\n", @l)); my $wtext = gtknew('TextView', text => $text); $wtext->set_left_margin(3); $wtext->can_focus($has_scroll); $wtext->signal_connect(button_press_event => sub { 1 }); #- disable selecting text and popping the contextual menu (GUI team says it's *horrible* to be able to do select text!) my $width = 400; my $scroll = gtknew('ScrolledWindow', child => $wtext, width => $width, height => 200); $scroll->signal_connect(realize => sub { my $layout = $wtext->create_pango_layout($text); $layout->set_width(($width - 10) * Gtk2::Pango->scale); $wtext->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10)); $scroll->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10)); $o->{rwindow}->queue_resize; }); gtkpack_($box, $o->{box_allow_grow} || 0, $scroll); } else { my $a = !$::no_separator; undef $::no_separator; my $new_label = sub { my ($txt) = @_; ref($txt) ? $txt : gtknew('WrappedLabel', text => $txt); }; if ($o->{icon} && (!$::isWizard || $::isInstall)) { gtkpack__($box, gtknew('HBox', children => [ 0, gtknew('VBox', width => 15), 0, eval { gtkcreate_img($o->{icon}) }, 0, gtknew('VBox', width => 15), 1, $o->{box_title} = gtknew('VBox', children_loose => [ gtknew('HBox', children => [ (map { my $w = $new_label->($_); $::isWizard and $w->set_justify("left"); (0, $w); } @l), 1, gtknew('HBox'), ]) ]) ]), if_($a, gtknew('HSeparator')) ); } else { gtkpack__($box, if_($::isWizard, gtknew('Label', height => 10)), (map { my $w = $new_label->($_); $::isWizard ? gtknew('HBox', children_tight => [ gtknew('Label', width => 20), $w ]) : $w; } @l), if_($::isWizard, gtknew('Label', height => 15)), if_($a, gtknew('HSeparator')), ); } } } sub _create_dialog { my ($title, $o_options) = @_; my $options = $o_options || {}; #- keep compatibility with "transient" now called "transient_for" $options->{transient_for} = delete $options->{transient} if $options->{transient}; gtknew('Dialog', title => $title, position_policy => 'center-on-parent', # center-on-parent does not work modal => 1, if_(!$::isInstall, icon_no_error => wm_icon()), %$options, allow_unknown_options => 1, ); } # drakfloppy / drakfont / harddrake2 / mcc sub create_dialog { my ($title, $label, $o_options) = @_; my $ret = 0; my $dialog = gtkset_border_width(_create_dialog($title, $o_options), 10); $dialog->set_border_width(10); my $text = ref($label) ? $label : $o_options->{use_markup} ? gtknew('WrappedLabel', text_markup => $label) : gtknew('WrappedLabel', text => $label); gtkpack($dialog->vbox, gtknew('HBox', children => [ if_($o_options->{stock}, 0, Gtk2::Image->new_from_stock($o_options->{stock}, 'dialog'), 0, gtknew('Label', text => " "), ), 1, $o_options->{scroll} ? create_scrolled_window($text, [ 'never', 'automatic' ]) : $text, ]), ); if ($o_options->{cancel}) { $dialog->action_area->pack_start( gtknew('Button', text => N("Cancel"), clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit }, can_default => 1), 1, 1, 0); } my $button = gtknew('Button', text => N("Ok"), can_default => 1, clicked => sub { $ret = 1; $dialog->destroy; Gtk2->main_quit }); $dialog->action_area->pack_start($button, 1, 1, 0); $button->grab_default; $dialog->set_has_separator(0); $dialog->show_all; Gtk2->main; $ret; } sub info_dialog { my ($title, $label, $o_options) = @_; $o_options ||= { }; add2hash_($o_options, { stock => 'gtk-dialog-info' }); create_dialog($title, $label, $o_options); } sub warn_dialog { my ($title, $label, $o_options) = @_; $o_options ||= { }; add2hash_($o_options, { stock => 'gtk-dialog-warning', cancel => 1 }); create_dialog($title, $label, $o_options); } sub err_dialog { my ($title, $label, $o_options) = @_; $o_options ||= { }; add2hash_($o_options, { stock => 'gtk-dialog-error' }); create_dialog($title, $label, $o_options); } sub create_hbox { gtknew('HButtonBox', layout => $_[0]) } sub create_vbox { gtknew('VButtonBox', layout => $_[0]) } sub create_factory_menu_ { my ($type, $name, $window, @menu_items) = @_; my $widget = Gtk2::ItemFactory->new($type, $name, my $accel_group = Gtk2::AccelGroup->new); $widget->create_items($window, @menu_items); $window->add_accel_group($accel_group); ($widget->get_widget($name), $widget); } sub create_factory_popup_menu { create_factory_menu_("Gtk2::Menu", '
', @_) } sub create_factory_menu { create_factory_menu_("Gtk2::MenuBar", '
', @_) } sub create_menu { my $title = shift; my $w = Gtk2::MenuItem->new($title); $w->set_submenu(gtkshow(gtkappend(Gtk2::Menu->new, @_))); $w; } sub create_notebook { my $book = gtknew('Notebook'); while (@_) { my ($page, $title) = splice(@_, 0, 2); gtkappend_page($book, $page, $title); } $book; } sub create_packtable { my ($options, @l) = @_; my $w = Gtk2::Table->new(0, 0, $options->{homogeneous} || 0); add2hash_($options, { xpadding => 5, ypadding => 0 }); each_index { my ($i, $l) = ($::i, $_); each_index { my $j = $::i; if ($_) { ref $_ or $_ = gtknew('WrappedLabel', text => $_); $j != $#$l && !$options->{mcc} ? $w->attach($_, $j, $j + 1, $i, $i + 1, 'fill', 'fill', $options->{xpadding}, $options->{ypadding}) : $w->attach($_, $j, $j + 1, $i, $i + 1, ['expand', 'fill'], ref($_) eq 'Gtk2::ScrolledWindow' || $_->get_data('must_grow') ? ['expand', 'fill'] : [], 0, 0); $_->show; } } @$l; } @l; $w->set_col_spacings($options->{col_spacings} || 0); $w->set_row_spacings($options->{row_spacings} || 0); gtkset_border_width($w, $::isInstall ? 3 : 10); } sub create_okcancel { my ($w, $o_ok, $o_cancel, $_o_spread, @other) = @_; # @other is a list of extra buttons (usually help (eg: XFdrake/drakx caller) or advanced (eg: interactive caller) button) # extra buttons have the following structure [ label, handler, is_first, pack_right ] local $::isWizard = $::isWizard && !$w->{pop_it}; my $cancel; if (defined $o_cancel || defined $o_ok) { $cancel = $o_cancel; } elsif (!$::Wizard_no_previous) { $cancel = $::isWizard ? N("Previous") : N("Cancel"); } my $ok = defined $o_ok ? $o_ok : $::isWizard ? ($::Wizard_finished ? N("Finish") : N("Next")) : N("Ok"); my $bok = $ok && ($w->{ok} = gtknew('Button', text => $ok, clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit })); my $bprev; if ($cancel) { $bprev = $w->{cancel} = gtknew('Button', text => $cancel, clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit }); } $w->{wizcancel} = gtknew('Button', text => N("Cancel"), clicked => sub { die 'wizcancel' }) if $::isWizard && !$::isInstall; my $f = sub { $w->{buttons}{$_[0][0]} = gtknew('Button', text => $_[0][0], clicked => $_[0][1]) }; my @left = ((map { $f->($_) } grep { $_->[2] && !$_->[3] } @other), map { $f->($_) } grep { !$_->[2] && !$_->[3] } @other); my @right = ((map { $f->($_) } grep { $_->[2] && $_->[3] } @other), map { $f->($_) } grep { !$_->[2] && $_->[3] } @other); # we put space to group buttons in two packs (but if there's only one when not in wizard mode) # but in the installer where all windows run in wizard mode because of design even when not in a wizard step $bprev = gtknew('Label') if !$cancel && $::Wizard_no_previous && !@left && !@right; if ($::isWizard) { # wizard mode: order is cancel/left_extras/white/right_extras/prev/next unshift @left, $w->{wizcancel} if !$::isInstall; push @right, $bprev, $bok; } else { # normal mode: cancel/ok button follow GNOME's HIG unshift @left, $bprev; push @left, gtknew('Label') if $ok && $cancel; # space buttons but if there's only one button push @right, $bok; } gtknew('VBox', spacing => 5, children_loose => [ gtknew('HBox', height => 5), gtknew('HSeparator'), gtknew('HBox', children_loose => [ map { gtknew('HButtonBox', layout => $_->[1], children_loose => [ map { $_->can_default($::isWizard); $_; } grep { $_ } @{$_->[0]} ]); } ([ \@left, 'start' ], [ \@right, 'end' ], ) ]), ]); } sub _setup_paned { my ($paned, $child1, $child2, %options) = @_; foreach ([ 'resize1', 0 ], [ 'shrink1', 1 ], [ 'resize2', 1 ], [ 'shrink2', 1 ]) { $options{$_->[0]} = $_->[1] unless defined($options{$_->[0]}); } $paned->pack1(gtkshow($child1), $options{resize1}, $options{shrink1}); $paned->pack2(gtkshow($child2), $options{resize2}, $options{shrink2}); gtkshow($paned); } sub create_vpaned { _setup_paned(Gtk2::VPaned->new, @_); } sub create_hpaned { _setup_paned(Gtk2::HPaned->new, @_); } sub gtkcreate_frame { my ($label) = @_; gtknew('Frame', text => $label, border_width => 5); } # -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=--- # helpers # # Functions that do typical operations on widgets, that you may need in # several places of your programs. sub _find_imgfile { my ($name) = @_; if ($name =~ m|/| && -f $name) { $name; } else { foreach my $path (icon_paths()) { foreach ('', '.png', '.xpm') { my $file = "$path/$name$_"; -f $file and return $file; } } } } # use it if you want to display an icon/image in your app sub gtkcreate_img { gtknew('Image', file => $_[0]); } # use it if you want to draw an image onto a drawingarea sub gtkcreate_pixbuf { gtknew('Pixbuf', file => $_[0]); } sub gtktext_append { gtktext_insert(@_, append => 1) } sub may_set_icon { my ($w, $name) = @_; if (my $f = $name && _find_imgfile($name)) { $w->set_icon(gtkcreate_pixbuf($f)); } } sub gtktext_insert { &mygtk2::_text_insert } sub icon_paths { &mygtk2::_icon_paths } sub add_icon_path { &mygtk2::add_icon_path } sub set_main_window_size { my ($o) = @_; mygtk2::set_main_window_size($o->{rwindow}); } # extracts interesting font metrics for a given widget sub gtkfontinfo { my ($widget) = @_; my $context = $widget->get_pango_context; my $metrics = $context->get_metrics($context->get_font_description, $context->get_language); my %fontinfo; foreach (qw(ascent descent approximate_char_width approximate_digit_width)) { no strict; my $func = "get_$_"; $fontinfo{$_} = Gtk2::Pango->pixels($metrics->$func); } %fontinfo; } sub gtkmodify_font { my ($w, $arg) = @_; $w->modify_font(ref($arg) ? $arg : Gtk2::Pango::FontDescription->from_string($arg)); $w; } sub gtkset_property { my ($w, $property, $value) = @_; $w->set_property($property, $value); $w; } sub set_back_pixbuf { my ($widget, $pixbuf) = @_; my $window = $widget->window; 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, 'none', 0, 0); $window->set_back_pixmap($pixmap, 0); } sub set_back_pixmap { my ($w) = @_; return if !$w->realized; my $window = $w->window; my $pixmap = $w->{back_pixmap} ||= Gtk2::Gdk::Pixmap->new($window, 1, 2, $window->get_depth); my $style = $w->get_style; $pixmap->draw_points($style->bg_gc('normal'), 0, 0); $pixmap->draw_points($style->base_gc('normal'), 0, 1); $window->set_back_pixmap($pixmap); } sub fill_tiled_coords { my ($widget, $pixbuf, $x_back, $y_back, $width, $height) = @_; my ($x2, $y2) = (0, 0); while (1) { $x2 = 0; while (1) { $pixbuf->render_to_drawable($widget->window, $widget->style->fg_gc('normal'), 0, 0, $x2, $y2, $x_back, $y_back, 'none', 0, 0); $x2 += $x_back; $x2 >= $width and last; } $y2 += $y_back; $y2 >= $height and last; } } sub fill_tiled { my ($widget, $pixbuf) = @_; my ($window_width, $window_height) = $widget->window->get_size; fill_tiled_coords($widget, $pixbuf, $pixbuf->get_width, $pixbuf->get_height, $window_width, $window_height); } sub add2notebook { my ($n, $title, $book) = @_; $n->append_page($book, gtkshow(gtknew('Label', text => $title))); $book->show; } sub string_size { my ($widget, $text) = @_; my $layout = $widget->create_pango_layout($text); my @size = $layout->get_pixel_size; @size; } sub string_width { my ($widget, $text) = @_; my ($width, undef) = string_size($widget, $text); $width; } sub string_height { my ($widget, $text) = @_; my (undef, $height) = string_size($widget, $text); $height; } sub get_text_coord { my ($text, $widget4style, $max_width, $currentx, $currenty) = @_; my $wrap_char = ' '; my @lines; my $current_text; my @t = split($wrap_char, $text); my @t2; if ($::isInstall && $::o->{locale}{lang} =~ /ja|zh/) { use locale; @t = map { $_ . $wrap_char } @t; $wrap_char = ''; foreach (@t) { my @c = split(/\b/); my $i = 0; my $el = ''; while (1) { $i >= @c and last; $el .= $c[$i]; if (ord($c[$i]) >= 128) { $el .= $c[$i+1]; $i++; push @t2, $el; $el = '' } $i++; } $el ne '' and push @t2, $el; } } else { @t2 = @t; } my $add_line = sub { my ($w, $h) = string_size($widget4style, $current_text); push @lines, { text => $current_text, width => $w, height => $h + 1, 'x' => $currentx, 'y' => $currenty }; }; my $width; foreach my $word (@t2) { my $w = string_width($widget4style, $word . $wrap_char); if ($currentx + $width + $w > $max_width) { $add_line->(); $current_text = $word; $width = $w; $currentx = 0; $currenty += $lines[-1]{height}; } else { $current_text .= ($current_text ne '' ? $wrap_char : '') . $word; $width += $w; } } #- if wrap_char was at the end, do not forget it, for cases when bold/nonbold text follows $text =~ /$wrap_char$/ and $current_text .= $wrap_char; $add_line->(); return @lines; } sub wrap_paragraph { my ($text, $widget4style, $border, $max_width) = @_; $max_width -= 2*$border; my @lines; my $ydec; foreach my $paragraph (@$text) { my @paragraph_lines; my $center; if (ref($paragraph) eq 'ARRAY') { my ($text, %options) = @$paragraph; $center = $options{center}; $paragraph = $text; } if ($paragraph ne '') { my @elements; while ($paragraph =~ m|(.*?)(.*?)(.*)|) { $1 ne '' and push @elements, [ $1, bold => 0 ]; push @elements, [ $2, bold => 1 ]; $paragraph = $3; } $paragraph ne '' and push @elements, [ $paragraph, bold => 0 ]; my $currentx; foreach (@elements) { my ($text, %options) = @$_; #- hack :( if ' ' is at the beginning, do not forget it, substitute #- with an unbreakable space because gtk allocates too much space otherwise if ($text =~ /^ (.*)/) { use utf8; $text = ' ' . $1; } my @newlines = get_text_coord($text, $widget4style, $max_width, $currentx, $ydec); $currentx = $newlines[-1]{'x'} + $newlines[-1]{width}; $ydec = $newlines[-1]{'y'}; $options{bold} and $currentx++; $_->{options} = \%options foreach @newlines; push @paragraph_lines, @newlines; } $ydec = $paragraph_lines[-1]{'y'} + $paragraph_lines[-1]{height}; } if ($center) { my %widths; $widths{$_->{'y'}} ||= $_->{x} + $_->{width} foreach reverse @paragraph_lines; $_->{x} += ($max_width - $widths{$_->{'y'}})/2 foreach @paragraph_lines; } $_->{x} += $border foreach @paragraph_lines; push @lines, @paragraph_lines; } return @lines; } # -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=--- # toplevel window creation helper # # Use the 'new' function as a method constructor and then 'main' on it to # launch the main loop. Use $o->{retval} to indicate that the window needs # to terminate. # Set $::isWizard to have a wizard appearance. # Set $::isEmbedded and $::XID so that the window will plug. sub new { my ($type, $title, %opts) = @_; my $o = bless { %opts }, $type; while (my $e = shift @tempory::objects) { $e->destroy } my $window = gtknew( 'MagicWindow', title => $title || '', pop_it => $o->{pop_it}, child => $o->{window} = gtknew('VBox'), modal => $grab || $o->{grab} || $o->{modal}, if_(!$::isInstall, icon_no_error => wm_icon()), if_($o->{transient} && $o->{transient} =~ /Gtk2::Window/, transient_for => $o->{transient}), ); $o->{rwindow} = $o->{window} = $window; $o->{real_window} = $window->{real_window}; $o->{pop_it} = $window->{pop_it}; $o; } sub main { my ($o, $o_completed, $o_canceled) = @_; gtkset_mousecursor_normal(); $o->show; mygtk2::main($o->{rwindow}, sub { $o->{retval} ? !$o_completed || $o_completed->() : !$o_canceled || $o_canceled->() }); $o->{retval}; } sub show($) { my ($o) = @_; $o->{rwindow}->show; } sub destroy($) { my ($o) = @_; $o->{rwindow}->destroy; flush(); } sub DESTROY { goto &destroy } sub sync { my ($o) = @_; show($o); flush(); } sub flush() { gtkflush() } sub shrink_topwindow { my ($o) = @_; $o->{rwindow}->signal_emit('size_allocate', Gtk2::Gdk::Rectangle->new(-1, -1, -1, -1)); } sub exit { gtkset_mousecursor_normal(); #- for restoring a normal in any case flush(); if ($::isStandalone) { require standalone; standalone::__exit($_[1]); #- workaround } else { c::_exit($_[1]); #- workaround } } #- in case "exit" above was not called by the program END { &exit() } # -=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=---=-=--- # ask # # Full UI managed functions that will return to you the value that the # user chose. sub ask_warn { my $w = ugtk2->new(shift @_, grab => 1); $w->_ask_warn(@_); main($w) } sub ask_yesorno { my $w = ugtk2->new(shift @_, grab => 1); $w->_ask_okcancel(@_, N("Yes"), N("No")); main($w) } sub ask_okcancel { my $w = ugtk2->new(shift @_, grab => 1); $w->_ask_okcancel(@_, N("Is this correct?"), N("Ok"), N("Cancel")); main($w) } sub ask_from_entry { my $w = ugtk2->new(shift @_, grab => 1); $w->_ask_from_entry(@_); main($w) } sub ask_dir { my $w = ugtk2->new(shift @_, grab => 1); $w->_ask_dir(@_); main($w) } sub _ask_from_entry($$@) { my ($o, @msgs) = @_; my $entry = gtknew('Entry'); my $f = sub { $o->{retval} = $entry->get_text; Gtk2->main_quit }; $o->{ok_clicked} = $f; $o->{cancel_clicked} = sub { undef $o->{retval}; Gtk2->main_quit }; gtkadd($o->{window}, gtkpack($o->create_box_with_title(@msgs), gtksignal_connect($entry, 'activate' => $f), ($o->{hide_buttons} ? () : create_okcancel($o))), ); $entry->grab_focus; } sub _ask_warn($@) { my ($o, @msgs) = @_; gtkadd($o->{window}, gtkpack($o->create_box_with_title(@msgs), my $w = gtknew('Button', text => N("Ok"), clicked => sub { Gtk2->main_quit }), ), ); $w->grab_focus; } sub _ask_okcancel($@) { my ($o, @msgs) = @_; my ($ok, $cancel) = splice @msgs, -2; gtkadd($o->{window}, gtkpack(create_box_with_title($o, @msgs), create_okcancel($o, $ok, $cancel), ) ); $o->{ok}->grab_focus; } sub create_file_selector { my (%opts) = @_; my $w = ugtk2->new(delete $opts{title}, modal => 1); my ($message, $save, $want_a_dir) = (delete $opts{message}, delete $opts{save}, delete $opts{want_a_dir}); my $action = $want_a_dir ? ($save ? 'create_folder' : 'select_folder') : ($save ? 'save' : 'open'); add2hash(\%opts, { width => 480, height => 250 }); gtkadd($w->{window}, gtkpack_(create_box_with_title($w, $message), 1, $w->{chooser} = gtknew('FileChooser', action => $action, %opts), 0, create_okcancel($w), )); $w->{chooser}->signal_connect(file_activated => sub { $w->{ok}->clicked }); $w; } sub file_selected_check { my ($save, $want_a_dir, $file) = @_; if (!$file) { N("No file chosen"); } elsif (-f $file && $want_a_dir) { N("You have chosen a file, not a directory"); } elsif (-d $file && !$want_a_dir) { N("You have chosen a directory, not a file"); } elsif (!-e $file && !$save) { $want_a_dir ? N("No such directory") : N("No such file"); } else { ''; } } sub _ask_file { my ($o, $title, $path) = @_; my $w = create_file_selector(title => $title, want_a_dir => 0, directory => $path); put_in_hash($o, $w); $w->{ok}->signal_connect(clicked => sub { $o->{retval} = $w->{chooser}->get_filename }); } sub _ask_dir { my ($o, $title, $path) = @_; my $w = create_file_selector(title => $title, want_a_dir => 1, directory => $path); put_in_hash($o, $w); $w->{ok}->signal_connect(clicked => sub { $o->{retval} = $w->{chooser}->get_filename }); } sub ask_browse_tree_info { my ($common) = @_; my $w = ugtk2->new($common->{title}); my $tree_model = Gtk2::TreeStore->new("Glib::String", "Gtk2::Gdk::Pixbuf", "Glib::String"); my $tree = Gtk2::TreeView->new_with_model($tree_model); $tree->get_selection->set_mode('browse'); $tree->append_column(my $textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0)); $tree->append_column(my $pixcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererPixbuf->new, 'pixbuf' => 1)); $tree->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 2)); $tree->set_headers_visible(0); $tree->set_rules_hint(1); $textcolumn->set_min_width(200); $textcolumn->set_max_width(200); gtkadd($w->{window}, gtknew('VBox', spacing => 5, children => [ 0, $common->{message}, 1, gtknew('HBox', children_loose => [ gtknew('ScrolledWindow', child => $tree), gtknew('Frame', text => N("Info"), child => gtknew('ScrolledWindow', child => my $info = gtknew('TextView')), ) ]), 0, my $box1 = gtknew('HBox', spacing => 15), 0, my $box2 = gtknew('HBox', spacing => 10), ])); #gtkpack__($box2, my $toolbar = Gtk2::Toolbar->new('horizontal', 'icons')); gtkpack__($box2, my $toolbar = Gtk2::Toolbar->new); my @l = ([ $common->{ok}, 1 ], if_($common->{cancel}, [ $common->{cancel}, 0 ])); @l = reverse @l if !$::isInstall; my @buttons = map { my ($t, $val) = @$_; $box2->pack_end(my $w = gtknew('Button', text => $t, clicked => sub { $w->{retval} = $val; Gtk2->main_quit; }), 0, 1, 20); $w->show; $w; } @l; @buttons = reverse @buttons if !$::isInstall; gtkpack__($box2, gtknew('Button', text => N("Help"), clicked => sub { ask_warn(N("Help"), $common->{interactive_help}->()); })) if $common->{interactive_help}; if ($common->{auto_deps}) { gtkpack__($box1, gtknew('CheckButton', text => $common->{auto_deps}, active_ref => \$common->{state}{auto_deps})); } $box1->pack_end(my $status = gtknew('Label'), 0, 1, 20); $status->show; $w->{window}->set_size_request(map { $_ - 2 * $border - 4 } $::windowwidth, $::windowheight) if !$::isInstall; $buttons[0]->grab_focus; $w->{rwindow}->show; #- TODO: $tree->queue_draw is a workaround to a bug in gtk-2.2.1; submit it in their bugzilla my @toolbar = (ftout => [ N("Expand Tree"), sub { $tree->expand_all; $tree->queue_draw } ], ftin => [ N("Collapse Tree"), sub { $tree->collapse_all } ], reload => [ N("Toggle between flat and group sorted"), sub { invbool(\$common->{state}{flat}); $common->{rebuild_tree}->() } ]); foreach my $ic (@{$common->{icons} || []}) { push @toolbar, ($ic->{icon} => [ $ic->{help}, sub { if ($ic->{code}) { my $_w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message}); $ic->{code}(); $common->{rebuild_tree}->(); } } ]); } my %toolbar = @toolbar; foreach (grep_index { $::i % 2 == 0 } @toolbar) { $toolbar->append_item(undef, $toolbar{$_}[0], undef, gtkcreate_img("$_.png"), $toolbar{$_}[1]); } $pixcolumn->{is_pix} = 1; $common->{widgets} = { w => $w, tree => $tree, tree_model => $tree_model, textcolumn => $textcolumn, pixcolumn => $pixcolumn, info => $info, status => $status }; ask_browse_tree_info_given_widgets($common); } sub ask_browse_tree_info_given_widgets { my ($common) = @_; my $w = $common->{widgets}; my ($curr, $prev_label, $idle, $mouse_toggle_pending); my (%wtree, %ptree, %pix, %node_state, %state_stats); my $update_size = sub { if ($w->{status}) { my $new_label = $common->{get_status}(); $prev_label ne $new_label and $w->{status}->set($prev_label = $new_label); } }; my $set_node_state_flat = sub { my ($iter, $state) = @_; $state eq 'XXX' and return; $pix{$state} ||= gtkcreate_pixbuf($state); $w->{tree_model}->set($iter, 1 => $pix{$state}); }; my $set_node_state_tree; $set_node_state_tree = sub { my ($iter, $state) = @_; my $iter_str = $w->{tree_model}->get_path_str($iter); $state eq 'XXX' and return; $pix{$state} ||= gtkcreate_pixbuf($state); if ($node_state{$iter_str} ne $state) { my $parent; if (!$w->{tree_model}->iter_has_child($iter) && ($parent = $w->{tree_model}->iter_parent($iter))) { my $parent_str = $w->{tree_model}->get_path_str($parent); my $stats = $state_stats{$parent_str} ||= {}; $stats->{$node_state{$iter_str}}--; $stats->{$state}++; my @list = grep { $stats->{$_} > 0 } keys %$stats; my $new_state = @list == 1 ? $list[0] : 'semiselected'; $node_state{$parent_str} ne $new_state and $set_node_state_tree->($parent, $new_state); } $w->{tree_model}->set($iter, 1 => $pix{$state}); $node_state{$iter_str} = $state; #- cache for efficiency } }; my $set_node_state = $common->{state}{flat} ? $set_node_state_flat : $set_node_state_tree; my $set_leaf_state = sub { my ($leaf, $state) = @_; $set_node_state->($_, $state) foreach @{$ptree{$leaf}}; }; my $add_parent; $add_parent = sub { my ($root, $state) = @_; $root or return undef; if (my $w = $wtree{$root}) { return $w } my $s; foreach (split '\|', $root) { my $s2 = $s ? "$s|$_" : $_; $wtree{$s2} ||= do { my $iter = $w->{tree_model}->append_set($s ? $add_parent->($s, $state) : undef, [ 0 => $_ ]); $iter; }; $s = $s2; } $set_node_state->($wtree{$s}, $state); #- use this state by default as tree is building. $wtree{$s}; }; my $add_node = sub { my ($leaf, $root, $options) = @_; my $state = $common->{node_state}($leaf) or return; if ($leaf) { my $iter = $w->{tree_model}->append_set($add_parent->($root, $state), [ 0 => $leaf ]); $set_node_state->($iter, $state); push @{$ptree{$leaf}}, $iter; } else { my $parent = $add_parent->($root, $state); #- hackery for partial displaying of trees, used in rpmdrake: #- if leaf is void, we may create the parent and one child (to have the [+] in front of the parent in the ctree) #- though we use '' as the label of the child; then rpmdrake will connect on tree_expand, and whenever #- the first child has '' as the label, it will remove the child and add all the "right" children $options->{nochild} or $w->{tree_model}->append_set($parent, [ 0 => '' ]); } }; my $clear_all_caches = sub { foreach (values %ptree) { foreach my $n (@$_) { delete $node_state{$w->{tree_model}->get_path_str($n)}; } } foreach (values %wtree) { my $iter_str = $w->{tree_model}->get_path_str($_); delete $node_state{$iter_str}; delete $state_stats{$iter_str}; } %ptree = %wtree = (); }; $common->{delete_all} = sub { $clear_all_caches->(); $w->{tree_model}->clear; }; $common->{rebuild_tree} = sub { $common->{delete_all}->(); $set_node_state = $common->{state}{flat} ? $set_node_state_flat : $set_node_state_tree; $common->{build_tree}($add_node, $common->{state}{flat}, $common->{tree_mode}); &$update_size; }; $common->{delete_category} = sub { my ($cat) = @_; exists $wtree{$cat} or return; foreach (keys %ptree) { my @to_remove; foreach my $node (@{$ptree{$_}}) { my $category; my $parent = $node; my @parents; while ($parent = $w->{tree_model}->iter_parent($parent)) { #- LEAKS my $parent_name = $w->{tree_model}->get($parent, 0); $category = $category ? "$parent_name|$category" : $parent_name; $_->[1] = "$parent_name|$_->[1]" foreach @parents; push @parents, [ $parent, $category ]; } if ($category =~ /^\Q$cat/) { push @to_remove, $node; foreach (@parents) { next if $_->[1] eq $cat || !exists $wtree{$_->[1]}; delete $wtree{$_->[1]}; delete $node_state{$w->{tree_model}->get_path_str($_->[0])}; delete $state_stats{$w->{tree_model}->get_path_str($_->[0])}; } } } foreach (@to_remove) { delete $node_state{$w->{tree_model}->get_path_str($_)}; } @{$ptree{$_}} = difference2($ptree{$_}, \@to_remove); } if (exists $wtree{$cat}) { my $iter_str = $w->{tree_model}->get_path_str($wtree{$cat}); delete $node_state{$iter_str}; delete $state_stats{$iter_str}; $w->{tree_model}->remove($wtree{$cat}); delete $wtree{$cat}; } &$update_size; }; $common->{add_nodes} = sub { my (@nodes) = @_; $add_node->($_->[0], $_->[1], $_->[2]) foreach @nodes; &$update_size; }; $common->{display_info} = sub { gtktext_insert($w->{info}, $common->{get_info}($curr)); 0 }; my $children = sub { map { my $v = $w->{tree_model}->get($_, 0); $v } gtktreeview_children($w->{tree_model}, $_[0]) }; my $toggle = sub { if (ref($curr) && !$_[0]) { $w->{tree}->toggle_expansion($w->{tree_model}->get_path($curr)); } else { if (ref $curr) { my @l = $common->{grep_allowed_to_toggle}($children->($curr)) or return; my @unsel = $common->{grep_unselected}(@l); my @p = @unsel ? #- not all is selected, select all if no option to potentially override (exists $common->{partialsel_unsel} && $common->{partialsel_unsel}->(\@unsel, \@l) ? difference2(\@l, \@unsel) : @unsel) : @l; $common->{toggle_nodes}($set_leaf_state, @p); &$update_size; } else { $common->{check_interactive_to_toggle}($curr) and $common->{toggle_nodes}($set_leaf_state, $curr); &$update_size; } } }; $w->{tree}->signal_connect(key_press_event => sub { my $c = chr($_[1]->keyval & 0xff); if ($_[1]->keyval >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ') { $toggle->(0); } 0; }); $w->{tree}->get_selection->signal_connect(changed => sub { my ($model, $iter) = $_[0]->get_selected; $model && $iter or return; Glib::Source->remove($idle) if $idle; if (!$model->iter_has_child($iter)) { $curr = $model->get($iter, 0); $idle = Glib::Timeout->add(100, $common->{display_info}); } else { $curr = $iter; } #- the following test for equality is because we can have a button_press_event first, then #- two changed events, the first being on a different row :/ (is it a bug in gtk2?) - that #- happens in rpmdrake when doing a "search" and directly trying to select a found package if ($mouse_toggle_pending eq $model->get($iter, 0)) { $toggle->(1); $mouse_toggle_pending = 0; } 0; }); $w->{tree}->signal_connect(button_press_event => sub { #- not too good, but CellRendererPixbuf does not have the needed signals :( my ($path, $column) = $w->{tree}->get_path_at_pos($_[1]->x, $_[1]->y); if ($path && $column) { $column->{is_pix} and $mouse_toggle_pending = $w->{tree_model}->get($w->{tree_model}->get_iter($path), 0); } 0; }); $common->{rebuild_tree}->(); &$update_size; $common->{initial_selection} and $common->{toggle_nodes}($set_leaf_state, @{$common->{initial_selection}}); my $_b = before_leaving { $clear_all_caches->() }; $common->{init_callback}->() if $common->{init_callback}; $w->{w}->main; } sub gtk_set_treelist { my ($treelist, $l) = @_; my $list = $treelist->get_model; $list->clear; $list->append_set([ 0 => $_ ]) foreach @$l; } sub gtk_TextView_get_log { my ($log_w, $log_scroll, $command, $filter_output, $when_command_is_over) = @_; my $pid = open(my $F, "$command |") or return; fcntl($F, c::F_SETFL(), c::O_NONBLOCK()) or die "can not fcntl F_SETFL: $!"; my $gtk_buffer = $log_w->get_buffer; $log_w->signal_connect(destroy => sub { kill 9, $pid if $pid; #- we do not continue in background $pid = $gtk_buffer = ''; #- ensure $gtk_buffer is valid when its value is non-null }); my ($prev_scroll, $want_scroll_down) = (0, 1); Glib::Timeout->add(100, sub { if ($gtk_buffer) { my $end = $gtk_buffer->get_end_iter; while (defined (my $s = <$F>)) { $gtk_buffer->insert($end, $filter_output->($s)); } my $new_scroll = $log_scroll->get_vadjustment->get_value; $want_scroll_down &&= $new_scroll >= $prev_scroll; $prev_scroll = $new_scroll; $log_w->scroll_to_iter($end, 0, 0, 0, 0) if $want_scroll_down; } if (waitpid($pid, c::WNOHANG()) > 0) { #- we do not call $when_command_is_over if $gtk_buffer does not exist anymore #- since it is not a normal case $when_command_is_over->($gtk_buffer) if $when_command_is_over && $gtk_buffer; $pid = ''; 0; } else { to_bool($gtk_buffer); } }); $pid; #- $pid becomes invalid after $when_command_is_over is called } sub gtk_new_TextView_get_log { my ($command, $filter_output, $when_command_is_over) = @_; my $log_w = gtknew('TextView', editable => 0); my $log_scroll = gtknew('ScrolledWindow', child => $log_w); #- $log_scroll is a frame, not a ScrolledWindow, so giving $log_scroll->child my $pid = gtk_TextView_get_log($log_w, $log_scroll->child, $command, $filter_output, $when_command_is_over) or return; $log_scroll, $pid; } # misc helpers: package Gtk2::TreeStore; sub append_set { my ($model, $parent, @values) = @_; # compatibility: @values = @{$values[0]} if @values == 1 && ref($values[0]) eq 'ARRAY'; my $iter = $model->append($parent); $model->set($iter, @values); return $iter; } package Gtk2::ListStore; # Append a new row, set the values, return the TreeIter sub append_set { my ($model, @values) = @_; # compatibility: @values = @{$values[0]} if @values == 1 && ref($values[0]) eq 'ARRAY'; my $iter = $model->append; $model->set($iter, @values); return $iter; } package Gtk2::TreeModel; # gets the string representation of a TreeIter sub get_path_str { my ($self, $iter) = @_; my $path = $self->get_path($iter); $path or return; $path->to_string; } sub iter_each_children { my ($model, $iter, $f) = @_; for (my $child = $model->iter_children($iter); $child; $child = $model->iter_next($child)) { $f->($child); } } package Gtk2::TreeView; # likewise gtk-1.2 function sub toggle_expansion { my ($self, $path, $b_open_all) = @_; if ($self->row_expanded($path)) { $self->collapse_row($path); } else { $self->expand_row($path, $b_open_all || 0); } } # With GTK+, for more GUIes coherency, GtkOptionMenu is recommended instead of a # combo if the user is selecting from a fixed set of options. # # That is, non-editable combo boxes are not encouraged. GtkOptionMenu is much # easier to use than GtkCombo as well. Use GtkCombo only when you need the # editable text entry. # # GtkOptionMenu is a much better-implemented widget and also the right UI for # noneditable sets of choices.) # # GtkCombo is deprecated in 2.4.x because it still uses deprecated # GtkList. GtkOption menu is deprecated in order to have an unified widget. # # GtkComBox widget replaces GtkOption menu whereas GtkComBoxEntry replaces GtkCombo. # # # This layer try to make OptionMenu and ComboBox look being api # compatible with Combo since its API is quite nice. package Gtk2::OptionMenu; use common; # try to get combox <==> option menu mapping sub set_popdown_strings { my ($w, @strs) = @_; my $menu = Gtk2::Menu->new; # keep string list around for ->set_text compatibilty helper $w->{strings} = \@strs; #$w->set_menu((ugtk2::create_factory_menu($window, [ "File", (undef) x 3, '' ], map { [ "File/" . $_, (undef) x 3, '' ] } @strs))[0]); $menu->append(ugtk2::gtkshow(Gtk2::MenuItem->new_with_label($_))) foreach @strs; $w->set_menu($menu); $w; } sub new_with_strings { my ($class, $strs, $o_val) = @_; my $w = $class->new; $w->set_popdown_strings(@$strs); $w->set_text($o_val) if $o_val; $w; } sub entry { my ($w) = @_; return $w; } sub get_text { my ($w) = @_; $w->{strings}[$w->get_history]; } sub set_text { my ($w, $val) = @_; each_index { if ($_ eq $val) { $w->set_history($::i); return; } } @{$w->{strings}}; } package Gtk2::ComboBox; use common; # try to get combox <==> option menu mapping sub set_popdown_strings { my ($w, @strs) = @_; $w->get_model->clear; # keep string list around for ->set_text compatibilty helper $w->{strings} = \@strs; $w->append_text($_) foreach @strs; $w; } sub new_with_strings { my ($class, $strs, $o_val) = @_; my $w = $class->new_text; $w->set_popdown_strings(@$strs); $w->set_text($o_val) if $o_val; $w; } sub entry { my ($w) = @_; return $w; } sub get_text { my ($w) = @_; $w->{strings}[$w->get_active]; } sub set_text { my ($w, $val) = @_; eval { my $val_index = find_index { $_ eq $val } @{$w->{strings}}; $w->set_active($val_index); }; # internal_error(qq(impossible to lookup "$val":\n\t) . chomp_($@)) if $@; } package Gtk2::Label; sub set { my ($label, $text) = @_; mygtk2::gtkset($label, text => $text); } package Gtk2::WrappedLabel; sub new { my ($_type, $o_text, $o_align) = @_; mygtk2::gtknew('WrappedLabel', text => $o_text || '', alignment => [ $o_align || 0, 0.5 ]); } package Gtk2::Entry; sub new_with_text { my ($_class, $o_text) = @_; mygtk2::gtknew('Entry', text => $o_text); } package Gtk2::Banner; use ugtk2 qw(:helpers :wrappers); sub set_pixmap { my ($darea) = @_; return if !$darea->realized; ugtk2::set_back_pixmap($darea); $darea->{layout} = $darea->create_pango_layout($darea->{text}); $darea->{txt_width} = ($darea->{layout}->get_pixel_size)[0]; } sub new { my ($_class, $icon, $text, $o_options) = @_; my $darea = Gtk2::DrawingArea->new; my $d_height = 75; $darea->set_size_request(-1, $d_height); $darea->modify_font(Gtk2::Pango::FontDescription->from_string(common::N("_banner font:\nSans 14"))); $darea->{icon} = ugtk2::gtkcreate_pixbuf($icon); $darea->{text} = $text; my $is_rtl = lang::text_direction_rtl(); $darea->signal_connect(realize => \&set_pixmap); $darea->signal_connect("style-set" => \&set_pixmap); $darea->signal_connect(expose_event => sub { my $style = $darea->get_style; my $height = $darea->{icon}->get_height; my $padding = int(($d_height - $height)/2); my $d_width = $darea->allocation->width; my $x_icon = $is_rtl ? $d_width - $padding - $darea->{icon}->get_width : $padding; my $x_text = $is_rtl ? $x_icon - $padding - $darea->{txt_width} : $height + $padding*2; $darea->{icon}->render_to_drawable($darea->window, $style->bg_gc('normal'), 0, 0, $x_icon, $padding, -1, -1, 'none', 0, 0); $darea->window->draw_layout($style->text_gc('normal'), $x_text, $o_options->{txt_ypos} || 25, $darea->{layout}); 1; }); return $darea; } 1; 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813
# translation of de.po to deutsch
# translation of de.po to
# german translation of the MandrivaInstaller.
# Copyright (C) 2000-2003 Mandriva S.A.
#
#
# Stefan Siegel <siegel@linux-mandrake.com>, 2000, 2001, 2002, 2003.
# Sebastian Deutscher <sebastian.deutscher@web.de>, 2003, 2004, 2006.
# Gerhard Ortner <gerhard.ortner@aon.at>, 2003, 2004.
# Roy Steuber <roysteuber@mittweida-net.de>, 2004.
# Marcus Fischer <i18n@marcusfischer.com>, 2004.
# Ronny Standtke <Ronny.Standtke@gmx.net>, 2003, 2004, 2005.
# Nicolas Bauer <webmaster@mandrakeusers.de>, 2005.
# Frank Koester <frank@dueppel13.de>, 2004, 2005, 2006.
# Nicolas Bauer <rastafarii@mandrivauer.de>, 2006, 2007.
# Nicolas Bauer <rastafarii@mandrivauser.de>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-07-20 04:48+0200\n"
"PO-Revision-Date: 2008-03-11 20:12+0100\n"
"Last-Translator: Nicolas Bauer <rastafarii@mandrivauser.de>\n"
"Language-Team: deutsch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: drakauth:27 drakauth:29 draksec:279 draksec:328
#, c-format
msgid "Authentication"
msgstr "Authentifizierung"

#: drakauth:39 drakclock:111 drakclock:125 drakfont:213 drakfont:226
#: drakfont:264 draksplash:169 finish-install:105 logdrake:170 logdrake:445
#: logdrake:450 scannerdrake:59 scannerdrake:101 scannerdrake:142
#: scannerdrake:200 scannerdrake:259 scannerdrake:730 scannerdrake:741
#: scannerdrake:880 scannerdrake:891 scannerdrake:961
#, c-format
msgid "Error"
msgstr "Fehler"

#: drakboot:53
#, c-format
msgid "No bootloader found, creating a new configuration"
msgstr "Kein Systemstarter gefunden, erzeuge eine neue Konfiguration"

#: drakboot:88 harddrake2:196 harddrake2:197 logdrake:71
#, c-format
msgid "/_File"
msgstr "/_Datei"

#: drakboot:89 logdrake:77
#, c-format
msgid "/File/_Quit"
msgstr "/Datei/B_eenden"

#: drakboot:89 harddrake2:197 logdrake:77
#, c-format
msgid "<control>Q"
msgstr "<control>Q"

#: drakboot:129
#, c-format
msgid "Text only"
msgstr "Nur Text"

#: drakboot:130
#, c-format
msgid "Verbose"
msgstr "Ausführlich"

#: drakboot:131
#, c-format
msgid "Silent"
msgstr "Still"

#: drakboot:137 drakbug:233 drakfont:682 drakperm:375 drakperm:385 drakups:27
#: harddrake2:515 localedrake:43 notify-x11-free-driver-switch:15
#: scannerdrake:51 scannerdrake:54 scannerdrake:297 scannerdrake:302
#: scannerdrake:955
#, c-format
msgid "Warning"
msgstr "Warnung"

#: drakboot:138
#, c-format
msgid ""
"Your system bootloader is not in framebuffer mode. To activate graphical "
"boot, select a graphic video mode from the bootloader configuration tool."
msgstr ""
"Ihr System-Starter ist nicht im Framebuffer-Modus. Um grafisches Starten zu "
"aktivieren wählen Sie einen grafischen Videomodus im Konfigurationswerkzeug "
"des System-Starters."

#: drakboot:139
#, c-format
msgid "Do you want to configure it now?"
msgstr "Möchten Sie es jetzt einstellen?"

#: drakboot:148
#, c-format
msgid "Install themes"
msgstr "Designs installieren"

#: drakboot:150
#, c-format
msgid "Graphical boot theme selection"
msgstr "Auswahl des grafischen Startthemas"

#: drakboot:153
#, c-format
msgid "Graphical boot mode:"
msgstr "Grafischer Startmodus:"

#: drakboot:155
#, c-format
msgid "Theme"
msgstr "Thema"

#: drakboot:158
#, c-format
msgid ""
"Display theme\n"
"under console"
msgstr ""
"Design in der\n"
"Konsole anzeigen"

#: drakboot:163 draksplash:25
#, c-format
msgid "Create new theme"
msgstr "Ein neues Design erzeugen"

#: drakboot:195
#, c-format
msgid "Default user"
msgstr "Standardbenutzer"

#: drakboot:196
#, c-format
msgid "Default desktop"
msgstr "Standard Arbeitsumgebung"

#: drakboot:199
#, c-format
msgid "No, I do not want autologin"
msgstr "Nein, ich will kein Autologin"

#: drakboot:200
#, c-format
msgid "Yes, I want autologin with this (user, desktop)"
msgstr "Ja, ich will Autologin mit diesem Benutzer und dieser Arbeitsumgebung"

#: drakboot:207
#, c-format
msgid "System mode"
msgstr "System-Modus"

#: drakboot:210
#, c-format
msgid "Launch the graphical environment when your system starts"
msgstr "Arbeitsoberfläche nach dem Hochfahren automatisch starten "

#: drakboot:262
#, c-format
msgid "Boot Style Configuration"
msgstr "Konfiguration der Boot-Einstellungen"

#: drakboot:264 drakboot:268
#, c-format
msgid "Video mode"
msgstr "Video-Modus"

#: drakboot:265
#, c-format
msgid ""
"Please choose a video mode, it will be applied to each of the boot entries "
"selected below.\n"
"Be sure your video card supports the mode you choose."
msgstr ""
"Bitte wählen Sie einen Grafikmodus. Er wird auf alle unten ausgewählte "
"Starteinträge angewendet.\n"
"Stellen Sie sicher, dass Ihre Grafikkarte den ausgewählten Modus unterstützt."

#: drakbug:65 drakbug:143
#, c-format
msgid "The \"%s\" program has crashed with the following error:"
msgstr "Das Programm \"%s\" ist folgender Fehlermeldung abgestürzt:"

#: drakbug:76
#, c-format
msgid "Mandriva Linux Bug Report Tool"
msgstr "Mandriva Linux Fehlerberichte"

#: drakbug:81
#, c-format
msgid "Mandriva Linux Control Center"
msgstr "Mandriva Linux Kontrollzentrum"

#: drakbug:82
#, c-format
msgid "First Time Wizard"
msgstr "Einrichtungsassistent"

#: drakbug:83
#, c-format
msgid "Synchronization tool"
msgstr "Synchronisationsprogramm"

#: drakbug:84 drakbug:195
#, c-format
msgid "Standalone Tools"
msgstr "Eingenständige Werkzeuge"

#: drakbug:86 drakbug:87
#, c-format
msgid "Mandriva Online"
msgstr "Mandriva Online"

#: drakbug:88
#, c-format
msgid "Remote Control"
msgstr "Fernsteuerung"

#: drakbug:89
#, c-format
msgid "Software Manager"
msgstr "Software-Verwaltung"

#: drakbug:90
#, c-format
msgid "Windows Migration tool"
msgstr "Windows-Migrationswerkzeug"

#: drakbug:91
#, c-format
msgid "Configuration Wizards"
msgstr "Konfigurationsassistenten"

#: drakbug:113
#, c-format
msgid "Select Mandriva Tool:"
msgstr "Wählen Sie ein Mandriva-Werkzeug:"

#: drakbug:114
#, c-format
msgid ""
"or Application Name\n"
"(or Full Path):"
msgstr ""
"oder Anwendungsname\n"
"(oder ganzer Pfad):"

#: drakbug:117
#, c-format
msgid "Find Package"
msgstr "Finde Pakete"

#: drakbug:119
#, c-format
msgid "Package: "
msgstr "Paket: "

#: drakbug:120
#, c-format
msgid "Kernel:"
msgstr "Kernel:"

#: drakbug:142
#, c-format
msgid "The \"%s\" program has segfaulted with the following error:"
msgstr "Das Programm \"%s\" hat ein segfaulted mit folgender Fehlermeldung::"

#: drakbug:146
#, c-format
msgid "Its gdb trace is:"
msgstr "gdb verfolgt die Spur:"

#: drakbug:149
#, c-format
msgid ""
"To submit a bug report, click on the report button.  \n"
"This will open a web browser window on %s where you'll find a form to fill "
"in.  The information displayed above will be transferred to that server.  \n"
"Things useful to include in your report are the output of lspcidrake -v, "
"kernel version, and /proc/cpuinfo."
msgstr ""
"Um eine Fehlerbericht abzugeben, klicken Sie auf den Knopf „Berichten“. Dies "
"wird ein Webbrowser-Fenster auf %s öffnen wo sie das Forumlar ausfüllen "
"müssen. Die oben dargestellten Informationen werden auf den Server "
"übertragen werden. Nützliche Informationen in Ihrem Fehlerbericht sind die "
"Ausgabe von lspcidrake -v, die Kernelversion und /proc/cpuinfo."

#: drakbug:152
#, c-format
msgid "Please describe what you were doing when it crashed:"
msgstr ""
"Bitte beschreiben Sie, was Sie gemacht haben, als es zu dem Absturz gekommen "
"ist:"

#: drakbug:164 drakperm:135 draksec:438 draksec:440 draksec:459 draksec:461
#, c-format
msgid "Help"
msgstr "Hilfe"

#: drakbug:168
#, c-format
msgid "Report"
msgstr "Bericht"

#: drakbug:169 drakfont:506
#, c-format
msgid "Close"
msgstr "Schließen"

#: drakbug:202
#, c-format
msgid "Not installed"
msgstr "Nicht installiert"

#: drakbug:215
#, c-format
msgid "Package not installed"
msgstr "Paket nicht installiert"

#: drakbug:234
#, c-format
msgid ""
"You must type in what you were doing when this bug happened in order to "
"enable us to reproduce this bug and to increase the odds of fixing it"
msgstr ""
"Bitte teilen Sie uns mit, was Sie gemacht haben, als der Fehler aufgetreten "
"ist, da so der Fehler reproduziert werden kann und dann der Fehler behoben "
"werden kann"

#: drakbug:235
#, c-format
msgid "Thanks."
msgstr "Danke."

#: drakclock:30 draksec:334
#, c-format
msgid "Date, Clock & Time Zone Settings"
msgstr "Datum, Zeit und Zeitzonen Einstellungen"

#: drakclock:39
#, c-format
msgid "not defined"
msgstr "nicht definiert"

#: drakclock:41
#, c-format
msgid "Change Time Zone"
msgstr "Zeitzone ändern"

#: drakclock:44
#, c-format
msgid "Timezone - DrakClock"
msgstr "Zeitzone - DrakClock"

#: drakclock:44
#, c-format
msgid "Which is your timezone?"
msgstr "Wählen Sie Ihre Zeitzone"

#: drakclock:45
#, c-format
msgid "GMT - DrakClock"
msgstr "GMT - DrakClock"

#: drakclock:45
#, c-format
msgid "Is your hardware clock set to GMT?"
msgstr "Ist Ihre Hardware Uhr auf GMT eingestellt?"

#: drakclock:70
#, c-format
msgid "Network Time Protocol"
msgstr "Netzwerk Zeitprotokoll (NTP)"

#: drakclock:72
#, c-format
msgid ""
"Your computer can synchronize its clock\n"
" with a remote time server using NTP"
msgstr ""
"Dieser Computer kann seine Zeit mit einem\n"
" Remote Time Server synchronisieren"

#: drakclock:73
#, c-format
msgid "Enable Network Time Protocol"
msgstr "Aktiviere das Network Time Protocol"

#: drakclock:81
#, c-format
msgid "Server:"
msgstr "Server:"

#: drakclock:95
#, c-format
msgid "Timezone"
msgstr "Zeitzone"

#: drakclock:111
#, c-format
msgid "Please enter a valid NTP server address."
msgstr "Bitte geben Sie eine gültige NTP Server Adresse ein."

#: drakclock:126
#, c-format
msgid "Could not synchronize with %s."
msgstr "Konnte nicht mit %s synchronisieren."

#: drakclock:127 draksplash:93 logdrake:175 scannerdrake:492
#, c-format
msgid "Quit"
msgstr "Beenden"

#: drakclock:128
#, c-format
msgid "Retry"
msgstr "Wiederholen"

#: drakclock:151 drakclock:161
#, c-format
msgid "Reset"
msgstr "Zurücksetzen"

#: drakedm:41
#, c-format
msgid "GDM (GNOME Display Manager)"
msgstr "GDM (GNOME Display Manager)"

#: drakedm:42
#, c-format
msgid "KDM (KDE Display Manager)"
msgstr "KDM (KDE Display Manager)"

#: drakedm:43
#, c-format
msgid "XDM (X Display Manager)"
msgstr "XDM (X Display Manager)"

#: drakedm:54
#, c-format
msgid "Choosing a display manager"
msgstr "Wähle einen Display-Manager"

#: drakedm:55
#, c-format
msgid ""
"X11 Display Manager allows you to graphically log\n"
"into your system with the X Window System running and supports running\n"
"several different X sessions on your local machine at the same time."
msgstr ""
"Der X11-Display-Manager erlaubt das grafische Anmelden\n"
"an das System, sowie das gleichzeitige Ausführen mehrerer verschiedener \n"
"lokaler X-Sitzungen."

#: drakedm:74
#, c-format
msgid "The change is done, do you want to restart the dm service?"
msgstr "Die Änderungen wurden ausgeführt, soll ich den dm-Dienst neu starten?"

#: drakedm:75
#, c-format
msgid ""
"You are going to close all running programs and lose your current session. "
"Are you really sure that you want to restart the dm service?"
msgstr ""
"Sie werden alle laufenden Programme beenden und Ihre aktuelle Sitzung "
"beenden.Sind Sie sicher, dass Sie dem dm-Dienst neustarten wollen?"

#: drakfont:187
#, c-format
msgid "Search installed fonts"
msgstr "Installierte Schriftarten suchen"

#: drakfont:189
#, c-format
msgid "Unselect fonts installed"
msgstr "Auswahl installierter Schriftarten zurücksetzen"

#: drakfont:213
#, c-format
msgid "No fonts found"
msgstr "Keine Schriftarten gefunden"

#: drakfont:217
#, c-format
msgid "parse all fonts"
msgstr "Alle Schriftarten analysieren"

#: drakfont:222 drakfont:263 drakfont:338 drakfont:379 drakfont:383
#: drakfont:409 drakfont:427 drakfont:435
#, c-format
msgid "done"
msgstr "Fertig"

#: drakfont:226
#, c-format
msgid "Could not find any font in your mounted partitions"
msgstr "Ich konnte keine Schriften in Ihren eingehängten Partitionen finden"

#: drakfont:261
#, c-format
msgid "Reselect correct fonts"
msgstr "Neuwahl korrekter Schriftarten"

#: drakfont:264
#, c-format
msgid "Could not find any font.\n"
msgstr "Konnte keine Schriftarten finden.\n"

#: drakfont:274
#, c-format
msgid "Search for fonts in installed list"
msgstr "Suche installierter Schriften"

#: drakfont:298
#, c-format
msgid "%s fonts conversion"
msgstr "%sSchriftkonvertierung"

#: drakfont:336
#, c-format
msgid "Fonts copy"
msgstr "Schriftarten-Kopie"

#: drakfont:339
#, c-format
msgid "True Type fonts installation"
msgstr "Installation von TrueType-Schriftarten"

#: drakfont:347
#, c-format
msgid "please wait during ttmkfdir..."
msgstr "Bitte warten Sie - ttmkfdir arbeitet ..."

#: drakfont:348
#, c-format
msgid "True Type install done"
msgstr "TrueType-Installation beendet"

#: drakfont:354 drakfont:369
#, c-format
msgid "type1inst building"
msgstr "Erzeuge „type1inst“"

#: drakfont:363
#, c-format
msgid "Ghostscript referencing"
msgstr "Ghostscriptreferenz"

#: drakfont:380
#, c-format
msgid "Suppress Temporary Files"
msgstr "Temporäre Dateien löschen"

#: drakfont:425 drakfont:431
#, c-format
msgid "Suppress Fonts Files"
msgstr "Schriftartdateien unterdrücken"

#: drakfont:439
#, c-format
msgid ""
"Before installing any fonts, be sure that you have the right to use and "
"install them on your system.\n"
"\n"
"You can install the fonts the normal way. In rare cases, bogus fonts may "
"hang up your X Server."
msgstr ""
"Bevor Sie irgendwelche Schriftarten installieren, müssen Sie das Recht "
"haben, diese zu verwenden und zu installieren.\n"
"\n"
"Sie können die Schriftarten auf normalem Weg einbinden. In seltenen "
"Fällenkönnen defekte Schriftarten den X-Server lahmlegen."

#: drakfont:478
#, c-format
msgid "Font Installation"
msgstr "Schrift  Installation"

#: drakfont:489
#, c-format
msgid "DrakFont"
msgstr "DrakFont"

#: drakfont:490 drakfont:642
#, c-format
msgid "Font List"
msgstr "Font-Liste"

#: drakfont:493
#, c-format
msgid "Get Windows Fonts"
msgstr "Windows-Schriftarten holen"

#: drakfont:499
#, c-format
msgid "About"
msgstr "Über"

#: drakfont:500 drakfont:541
#, c-format
msgid "Options"
msgstr "Optionen"

#: drakfont:501 drakfont:721
#, c-format
msgid "Uninstall"
msgstr "Deinstallieren"

#: drakfont:502
#, c-format
msgid "Import"
msgstr "Importieren"

#: drakfont:520
#, c-format
msgid "Drakfont"
msgstr "DrakFont"

#: drakfont:522 harddrake2:234
#, c-format
msgid "Copyright (C) %s by Mandriva"
msgstr "Copyright·(C)·%s·bei·Mandriva"

#: drakfont:524
#, c-format
msgid "Font installer."
msgstr "Schriftarten installieren."

#: drakfont:526 harddrake2:238
#, c-format
msgid "Mandriva Linux"
msgstr "Mandriva Linux"

#. -PO: put here name(s) and email(s) of translator(s) (eg: "John Smith <jsmith@nowhere.com>")
#. -PO: put here name(s) and email(s) of translator(s) (eg: "John Smith <jsmith@nowhere.com>")
#: drakfont:533 harddrake2:243
#, c-format
msgid "_: Translator(s) name(s) & email(s)\n"
msgstr ""
"Nicolas Bauer <rastafarii@mandrivauser.de>\n"
"Sebastian Deutscher <sebastian.deutscher@web.de>\n"

#: drakfont:543
#, c-format
msgid "Choose the applications that will support the fonts:"
msgstr "Wählen Sie die Programme, die die Schriftarten verwenden sollen:"

#: drakfont:554
#, c-format
msgid "Ghostscript"
msgstr "Ghostscript"

#: drakfont:555
#, c-format
msgid "OpenOffice.org"
msgstr "OpenOffice.org"

#: drakfont:556
#, c-format
msgid "Abiword"
msgstr "Abiword"

#: drakfont:557
#, c-format
msgid "Generic Printers"
msgstr "Generische Drucker"

#: drakfont:562 drakfont:572 draksplash:180 drakups:210
#, c-format
msgid "Ok"
msgstr "OK"

#: drakfont:571
#, c-format
msgid "Select the font file or directory and click on 'Add'"
msgstr ""
"Wählen Sie eine Schriftartdatei bzw. ein Verzeichnis und betätigen Sie "
"„Hinzufügen“"

#: drakfont:572
#, c-format
msgid "File Selection"
msgstr "Dateiauswahl"

#: drakfont:572 drakfont:652 drakfont:736 draksplash:180 drakups:217
#: logdrake:175
#, c-format
msgid "Cancel"
msgstr "Abbrechen"

#: drakfont:576
#, c-format
msgid "Fonts"
msgstr "Schriftarten"

#: drakfont:640 draksec:330
#, c-format
msgid "Import fonts"
msgstr "Schriftarten importieren"

#: drakfont:646 drakups:299 drakups:361 drakups:381
#, c-format
msgid "Add"
msgstr "Hinzufügen"

#: drakfont:647 drakfont:735 drakups:301 drakups:363 drakups:383
#, c-format
msgid "Remove"
msgstr "Entfernen"

#: drakfont:653
#, c-format
msgid "Install"
msgstr "Installieren"

#: drakfont:684
#, c-format
msgid "Are you sure you want to uninstall the following fonts?"
msgstr "Sind Sie sicher, dass Sie die folgenden Schriften entfernen möchten?"

#: drakfont:688 draksec:59 harddrake2:323
#, c-format
msgid "Yes"
msgstr "Ja"

#: drakfont:690 draksec:58 harddrake2:324
#, c-format
msgid "No"
msgstr "Nein"

#: drakfont:729
#, c-format
msgid "Unselect All"
msgstr "Markierung löschen"

#: drakfont:732
#, c-format
msgid "Select All"
msgstr "Alle auswählen"

#: drakfont:749
#, c-format
msgid "Importing fonts"
msgstr "Importiere Schriftarten"

#: drakfont:753 drakfont:773
#, c-format
msgid "Initial tests"
msgstr "Vortests"

#: drakfont:754
#, c-format
msgid "Copy fonts on your system"
msgstr "Schriftarten auf Ihren Rechner kopieren"

#: drakfont:755
#, c-format
msgid "Install & convert Fonts"
msgstr "Schriftarten installieren und konvertieren"

#: drakfont:756
#, c-format
msgid "Post Install"
msgstr "Nach der Installation"

#: drakfont:768
#, fuzzy, c-format
msgid "Removing fonts"
msgstr "Importiere Schriftarten"

#: drakfont:774
#, c-format
msgid "Remove fonts on your system"
msgstr "Entfernen von Schriftarten auf Ihrem Rechner"

#: drakfont:775
#, c-format
msgid "Post Uninstall"
msgstr "Nach dem Entfernen"

#: drakhelp:17
#, c-format
msgid ""
" drakhelp 0.1\n"
"Copyright (C) %s Mandriva.\n"
"This is free software and may be redistributed under the terms of the GNU "
"GPL.\n"
"\n"
"Usage: \n"
msgstr ""
" drakhelp 0.1\n"
"Copyright © %s Mandriva.\n"
"Dies ist freie Software und kann unter der den Bedingungen der GNU GPL "
"weitergegeben werden.\n"
"\n"
"Aufruf: \n"

#: drakhelp:22
#, c-format
msgid " --help                - display this help     \n"
msgstr " --help                - diesen Hilfetext anzeigen     \n"

#: drakhelp:23
#, c-format
msgid ""
" --id <id_label>       - load the html help page which refers to id_label\n"
msgstr ""
" --id <id_label>       - lade die HTML Hilfeseite, die auf id_label "
"verweist\n"

#: drakhelp:24
#, c-format
msgid ""
" --doc <link>          - link to another web page ( for WM welcome "
"frontend)\n"
msgstr ""
" --doc <Verweis>       - Verweis auf eine andere Internetseite (für den WM-"
"Begrüßungsschirm)\n"

#: drakhelp:52
#, c-format
msgid "Mandriva Linux Help Center"
msgstr "Mandriva Linux Hilfezentrum"

#: drakhelp:52
#, c-format
msgid "No Help entry for %s\n"
msgstr "Kein Hilfe-Eintrag für %s\n"

#: drakperm:23
#, c-format
msgid "System settings"
msgstr "System Einstellungen"

#: drakperm:24
#, c-format
msgid "Custom settings"
msgstr "Benutzerdefinierte Einstellungen"

#: drakperm:25
#, c-format
msgid "Custom & system settings"
msgstr "Benutzerdefinierte & Systemeinstellungen"

#: drakperm:33
#, c-format
msgid "Security Permissions"
msgstr "Sicherheits Einstellung"

#: drakperm:45
#, c-format
msgid "Editable"
msgstr "änderbar"

#: drakperm:50 drakperm:319
#, c-format
msgid "Path"
msgstr "Pfad"

#: drakperm:50 drakperm:248
#, c-format
msgid "User"
msgstr "Benutzer"

#: drakperm:50 drakperm:248
#, c-format
msgid "Group"
msgstr "Gruppe"

#: drakperm:50 drakperm:331
#, c-format
msgid "Permissions"
msgstr "Berechtigungen"

#: drakperm:60
#, c-format
msgid "Add a new rule"
msgstr "Neue Regel hinzufügen"

#: drakperm:67 drakperm:102 drakperm:127
#, c-format
msgid "Edit current rule"
msgstr "Aktuelle Regel bearbeiten"

#: drakperm:109
#, c-format
msgid ""
"Here you can see files to use in order to fix permissions, owners, and "
"groups via msec.\n"
"You can also edit your own rules which will owerwrite the default rules."
msgstr ""
"Hier sind die Dateien aufgelistet um die Berechtigungen, Eigentümer und "
"Gruppen via msec anzupassen.\n"
"Es können auch eigene Regeln definiert werden, die die Default Regeln "
"überschreiben."

#: drakperm:111
#, c-format
msgid ""
"The current security level is %s.\n"
"Select permissions to see/edit"
msgstr ""
"Die aktuelle Sicherheitsebene ist : %s\n"
"Wählen Sie die Rechte, die Sie sehen/ändern wollen"

#: drakperm:123
#, c-format
msgid "Up"
msgstr "Hoch"

#: drakperm:123
#, c-format
msgid "Move selected rule up one level"
msgstr "Markierte Regel eine Ebene höher verschieben"

#: drakperm:124
#, c-format
msgid "Down"
msgstr "Runter"

#: drakperm:124
#, c-format
msgid "Move selected rule down one level"
msgstr "Markierte Regel eine Ebene heruntersetzen"

#: drakperm:125
#, c-format
msgid "Add a rule"
msgstr "eine Regel hinzufügen"

#: drakperm:125
#, c-format
msgid "Add a new rule at the end"
msgstr "Neue Regel am Ende hinzufügen"

#: drakperm:126
#, c-format
msgid "Delete"
msgstr "Löschen"

#: drakperm:126
#, c-format
msgid "Delete selected rule"
msgstr "Markierte Regel entfernen"

#: drakperm:127 drakups:300 drakups:362 drakups:382
#, c-format
msgid "Edit"
msgstr "Bearbeiten"

#: drakperm:240
#, c-format
msgid "browse"
msgstr "durchsuchen"

#: drakperm:245
#, c-format
msgid "user"
msgstr "Benutzer"

#: drakperm:245
#, c-format
msgid "group"
msgstr "Gruppe"

#: drakperm:245
#, c-format
msgid "other"
msgstr "Andere"

#: drakperm:248
#, c-format
msgid "Other"
msgstr "Andere"

#: drakperm:250
#, c-format
msgid "Read"
msgstr "Lesen"

#. -PO: here %s will be either "user", "group" or "other"
#: drakperm:253
#, c-format
msgid "Enable \"%s\" to read the file"
msgstr "Aktiviere „%s“ um die Datei zu lesen"

#: drakperm:257
#, c-format
msgid "Write"
msgstr "Schreiben"

#. -PO: here %s will be either "user", "group" or "other"
#: drakperm:260
#, c-format
msgid "Enable \"%s\" to write the file"
msgstr "„%s“ aktivieren, um die Datei zu schreiben"

#: drakperm:264
#, c-format
msgid "Execute"
msgstr "Ausführen"

#. -PO: here %s will be either "user", "group" or "other"
#: drakperm:267
#, c-format
msgid "Enable \"%s\" to execute the file"
msgstr "Aktivierung von „%s“, um die Datei auszuführen"

#: drakperm:270
#, c-format
msgid "Sticky-bit"
msgstr "Sticky-bit"

#: drakperm:270
#, c-format
msgid ""
"Used for directory:\n"
" only owner of directory or file in this directory can delete it"
msgstr ""
"Für Verzeichnisse:\n"
" nur der Besitzer des Verzeichnisses kann es oder enthaltene Dateien löschen"

#: drakperm:271
#, c-format
msgid "Set-UID"
msgstr "Set-UID"

#: drakperm:271
#, c-format
msgid "Use owner id for execution"
msgstr "Benutzer ID zur Ausführung benutzen"

#: drakperm:272
#, c-format
msgid "Set-GID"
msgstr "GID setzen"

#: drakperm:272
#, c-format
msgid "Use group id for execution"
msgstr "Gruppen-ID zur Ausführung benutzen"

#: drakperm:289
#, c-format
msgid "User:"
msgstr "Benutzer :"

#: drakperm:290
#, c-format
msgid "Group:"
msgstr "Gruppe :"

#: drakperm:294
#, c-format
msgid "Current user"
msgstr "Aktueller Benutzer"

#: drakperm:295
#, c-format
msgid "When checked, owner and group will not be changed"
msgstr "wenn markiert, werden Eigentümer und Gruppe nicht geändert"

#: drakperm:305
#, c-format
msgid "Path selection"
msgstr "Pfad-Auswahl"

#: drakperm:325
#, c-format
msgid "Property"
msgstr "Eigenschaft"

#: drakperm:375
#, c-format
msgid ""
"The first character of the path must be a slash (\"/\"):\n"
"\"%s\""
msgstr ""
"Das erste Zeichen des Pfades muss ein Schrägstrich sein (\"/\"):\n"
"\"%s\""

#: drakperm:385
#, c-format
msgid "Both the username and the group must valid!"
msgstr "Sowohl der Benutzername als auch die Gruppe müssen gültig sein!"

#: drakperm:386
#, c-format
msgid "User: %s"
msgstr "Benutzer: %s"

#: drakperm:387
#, c-format
msgid "Group: %s"
msgstr "Gruppe: %s"

#: draksec:53
#, c-format
msgid "ALL"
msgstr "Alle"

#: draksec:54
#, c-format
msgid "LOCAL"
msgstr "LOKAL"

#: draksec:55
#, c-format
msgid "NONE"
msgstr "KEINER"

#: draksec:56
#, c-format
msgid "Default"
msgstr "Standard"

#: draksec:57
#, c-format
msgid "Ignore"
msgstr "Ignorieren"

#: draksec:72 drakups:99 finish-install:93 harddrake2:369 scannerdrake:66
#: scannerdrake:70 scannerdrake:78 scannerdrake:319 scannerdrake:368
#: scannerdrake:505 scannerdrake:509 scannerdrake:531 service_harddrake:254
#, c-format
msgid "Please wait"
msgstr "Bitte warten"

#. -PO: Do not alter the <span ..> and </span> tags.
#. -PO: Translate the security levels (Poor, Standard, High, Higher and Paranoid) in the same way, you translated these individuals words.
#. -PO: keep the double empty lines between sections, this is formatted a la LaTeX.
#: draksec:93
#, c-format
msgid ""
"Here, you can setup the security level and administrator of your machine.\n"
"\n"
"\n"
"The '<span weight=\"bold\">Security Administrator</span>' is the one who "
"will receive security alerts if the\n"
"'<span weight=\"bold\">Security Alerts</span>' option is set. It can be a "
"username or an email.\n"
"\n"
"\n"
"The '<span weight=\"bold\">Security Level</span>' menu allows you to select "
"one of the six preconfigured security levels\n"
"provided with msec. These levels range from '<span weight=\"bold\">poor</"
"span>' security and ease of use, to\n"
"'<span weight=\"bold\">paranoid</span>' config, suitable for very sensitive "
"server applications:\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Poor</span>: This is a totally unsafe but "
"very\n"
"easy to use security level. It should only be used for machines not "
"connected to\n"
"any network and that are not accessible to everybody.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Standard</span>: This is the standard "
"security\n"
"recommended for a computer that will be used to connect to the Internet as "
"a\n"
"client.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">High</span>: There are already some\n"
"restrictions, and more automatic checks are run every night.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Higher</span>: The security is now high "
"enough\n"
"to use the system as a server which can accept connections from many "
"clients. If\n"
"your machine is only a client on the Internet, you should choose a lower "
"level.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Paranoid</span>: This is similar to the "
"previous\n"
"level, but the system is entirely closed and security features are at their\n"
"maximum"
msgstr ""
"Hier können Sie die Sicherheitstsebene und den Administrator ihres Computers "
"festlegen\n"
"\n"
"\n"
"Der „<span weight=\"bold\">Sicherheits Administrator</span>“ ist derjenige, "
"der Sicherheitswarnungen erhält, wenn die „<span weight=\"bold"
"\">Sicherheitswarnungen</span>“-Option ausgewählt wurde. Das kann in Form "
"eines\n"
"Benutzernamens oder einer Emailadresse festgelegt werden.\n"
"\n"
"\n"
"Das Menü „<span weight=\"bold\">Sicherheitsebene</span>“ gibt Ihnen die Wahl "
"zwischen sechs vordefinierten Sicherheitsebenen\n"
"Diese Stufen reichen von „<span weight=\"bold\">schwacher</span>“ Sicherheit "
"und einfacher Benutzung, bis „<span weight=\"bold\">paranoider</span>“ "
"Einstellung, passend für sensible Server Anwendungen:\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Schwach</span>: Dies ist eine total "
"unsichere, aber einfach\n"
"zu nutzende Sicherheitsebene. Sie sollte nur für Rechner verwendet werden, "
"die nicht mit einem\n"
"Netzwerk verbunden sind und auf die nicht jeder Zugriff hat.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Standard</span>: Dies ist die Standard "
"Sicherheitsebene\n"
"empfohlen für Rechner, die als Client mit dem Internet verbunden\n"
"sind.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Hoch</span>: Hier gibt es bereits ein paar\n"
"Einschränkungen, und mehr automatische Überprüfungen laufen jede Nacht.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Höher</span>: Die Sicherheit ist jetzt hoch "
"genug \n"
"um das System als Server zu nutzen, der Verbindungen zu vielen Clients "
"akzeptiert. Wenn\n"
"Ihr Rechner nur als Client im Internet ist, sollten Sie eine niedrigere "
"Stufe wählen.\n"
"\n"
"\n"
"<span foreground=\"royalblue3\">Paranoid</span>: Diese Einstellung ähnelt "
"der vorherigen \n"
"Ebene, aber das System ist vollständig abgeschlossen und die "
"Sicherheitsregeln\n"
"sind auf Maximum"

#: draksec:147 harddrake2:213
#, c-format
msgid ""
"Description of the fields:\n"
"\n"
msgstr ""
"Beschreibung der Felder:\n"
"\n"

#: draksec:161
#, c-format
msgid "(default value: %s)"
msgstr " (Voreinstellung: %s)"

#: draksec:166
#, c-format
msgid "Security Level and Checks"
msgstr "Sicherheits Level und Checks"

#: draksec:203
#, c-format
msgid "Security Level:"
msgstr "Sicherheitsebene:"

#: draksec:206
#, c-format
msgid "Security Alerts:"
msgstr "Sicherheitswarnungen:"

#: draksec:210
#, c-format
msgid "Security Administrator:"
msgstr "Sicherheitsadministrator (Benutzername oder E-Mail):"

#: draksec:212
#, c-format
msgid "Basic options"
msgstr "grundlegende Optionen"

#: draksec:226
#, c-format
msgid "Network Options"
msgstr "Netzwerkoptionen"

#: draksec:226
#, c-format
msgid "System Options"
msgstr "Systemoptionen"

#: draksec:261
#, c-format
msgid "Periodic Checks"
msgstr "Periodische Checks"

#: draksec:282
#, c-format
msgid "No password"
msgstr "Kein Passwort"

#: draksec:283
#, c-format
msgid "Root password"
msgstr "Root Passwort"

#: draksec:284
#, c-format
msgid "User password"
msgstr "Benutzer Passwort"

#: draksec:314 draksec:360
#, c-format
msgid "Software Management"
msgstr "Software verwalten"

#: draksec:315
#, c-format
msgid "Mandriva Update"
msgstr "Mandriva Update"

#: draksec:316
#, c-format
msgid "Software Media Manager"
msgstr "Paketquellen-Manager"

#: draksec:317
#, c-format
msgid "Configure 3D Desktop effects"
msgstr "Konfigurieren der 3D Desktop Effekte"

#: draksec:318
#, c-format
msgid "Graphical Server Configuration"
msgstr "Grafischer Server Konfiguration"

#: draksec:319
#, c-format
msgid "Mouse Configuration"
msgstr "Maus Konfiguration"

#: draksec:320
#, c-format
msgid "Keyboard Configuration"
msgstr "Tastatur Konfiguration"

#: draksec:321
#, c-format
msgid "UPS Configuration"
msgstr "UPS Konfiguration"

#: draksec:322
#, c-format
msgid "Network Configuration"
msgstr "Netzwerkkonfiguration"

#: draksec:323
#, c-format
msgid "Hosts definitions"
msgstr "Hosts Definitionen"

#: draksec:324
#, c-format
msgid "Network Center"
msgstr "Netzwerkcenter"

#: draksec:325
#, c-format
msgid "VPN"
msgstr "VPN"

#: draksec:326
#, c-format
msgid "Proxy Configuration"