summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
Commit message (Expand)AuthorAgeFilesLines
* changed keyboard to "us" for ChinesePablo Saratxaga2005-02-251-2/+2
* XBox support - XFdrakeStew Benedict2005-02-231-1/+1
* keyboard values for "lb" language.Pablo Saratxaga2005-02-201-1/+2
* small fixPablo Saratxaga2005-02-191-1/+1
* synchronized keyboards with X11;Pablo Saratxaga2005-02-081-5/+7
* minimal XkbModel supportPascal Rigaux2005-01-211-3/+26
* Make %lang2keyboard a global variable, so it can be overriden in aRafael Garcia-Suarez2005-01-071-1/+1
* - enabled choice of various new keyboard layouts.Pablo Saratxaga2005-01-031-20/+54
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-131-4/+4
* removed "caps:shift" it never fully solved the problem of turkish keyboardsPablo Saratxaga2004-09-151-1/+1
* disambiguation of keyboard names, so they can be translated differentlyPablo Saratxaga2004-09-121-104/+104
* some more XKB keyboard names fixed to match xorg versionsPablo Saratxaga2004-09-101-14/+21
* fixed compose:rwin (it must be enabled if the key isn't used, and notPablo Saratxaga2004-09-101-3/+4
* fixed Russian phonetic keyboard layout on xorgPablo Saratxaga2004-09-101-1/+1
* added (commented) new keyboard for tibetan script, so I remember it laterPablo Saratxaga2004-09-081-0/+3
* changed a keyboard namePablo Saratxaga2004-08-161-2/+2
* ppc doesn't use dumpkeys (?) (Christiaan Welvaart)Pascal Rigaux2004-08-051-1/+2
* the presence of loadkeys doesn't mean it is the regular one. (fixes loadkeys ...Pascal Rigaux2004-06-151-5/+8
* enabled Latgalian language choice;Pablo Saratxaga2004-05-261-0/+1
* Nepali uses devanagari scriptPablo Saratxaga2004-05-251-1/+1
* new keyboards; new lang->keyboard correspondencesPablo Saratxaga2004-05-251-4/+25
* don't trust the USB keyboard layout announc when it claims to be "us"Pablo Saratxaga2004-05-251-2/+5
* fix typoPascal Rigaux2004-05-121-1/+1
* use lang::analyse_locale_name() and lang::analyse_locale_name()Pascal Rigaux2004-05-111-4/+6
* - az, tr and tr_f needs XkbOptions 'caps:shift'Pascal Rigaux2004-03-231-8/+9
* list jp106 keyboard as latin only to avoid the misleading screen aboutPablo Saratxaga2004-03-101-1/+4
* keyboard::load() causes some errors on kernel 2.4, ignoring themPascal Rigaux2004-03-091-2/+2
* rewrite & cleanup. Now works with kernel 2.6, don't know exactly why...Pascal Rigaux2004-02-101-20/+17
* ichanged console uz keyboard to uz.uniPablo Saratxaga2004-02-051-1/+1
* don't use ioctl KDSKBENT with kernel 2.6, until fixed...Pascal Rigaux2004-01-261-1/+1
* thx perl_checkoThierry Vignaud2003-11-241-1/+1
* reuse bg_command:Thierry Vignaud2003-11-231-8/+4
* perl_checkerGuillaume Cottenceau2003-10-301-1/+1
* check_prog won't work if arguments are not properly splitted when passed to r...Guillaume Cottenceau2003-10-301-1/+1
* if we have /bin/loadkeys, use itPascal Rigaux2003-10-231-1/+3
* - use setxkbmap instead of xmodmap if setxkbmap is availablePascal Rigaux2003-10-231-4/+8
* move setxkbmap to keyboard.pmPascal Rigaux2003-10-151-0/+7
* Uzbek console keyboard is now in console-tools; enabling itPablo Saratxaga2003-09-251-1/+1
* /me suxGuillaume Cottenceau2003-09-051-1/+1
* apply patch asked by pablo so that users are not confused duringGuillaume Cottenceau2003-09-051-0/+4
* - don't set XkbCompat to group_led, it's better to use grp_led:scroll inPascal Rigaux2003-08-261-2/+5
* Added choice of Irish keyboard; updated the Georgian "latin layout" one.Pablo Saratxaga2003-08-201-4/+5
* corrected typoPablo Saratxaga2003-08-131-1/+1
* Turkish "F" keyboard was unavailable due to a typoPablo Saratxaga2003-08-051-2/+2
* removed bad keyboard from list for Swedish;Pablo Saratxaga2003-08-041-1/+2
* looks like a pablo's typoGuillaume Cottenceau2003-07-021-2/+2
* added spaces to make perl_checker happyPablo Saratxaga2003-07-011-4/+4
* iAdded various new keyboard layoutsPablo Saratxaga2003-07-011-9/+19
* changed the name of the russian phonetic layoutPablo Saratxaga2003-05-311-1/+1
* Added new toggle possibilities to the menu; use "en_US" for US layoutPablo Saratxaga2003-05-241-1/+8
="hl opt">(Gtk2::Button->new(translate($s)), clicked => sub { try($kind, $s, {}, $entry) }); } (if_($entry->{isMounted}, N_("Unmount")), if_($entry->{mntpoint} && !$entry->{isMounted}, N_("Mount"))) if $entry; my @l = ( if_($entry, N_("Mount point") => \&raw_hd_mount_point), if_($entry && $entry->{mntpoint}, N_("Options") => \&raw_hd_options), N_("Cancel") => sub {}, N_("Done") => \&done, ); push @buttons, map { my ($txt, $f) = @$_; $f ? gtksignal_connect(Gtk2::Button->new(translate($txt)), clicked => sub { try_($kind, $txt, $f, $entry) }) : Gtk2::Label->new(""); } group_by2(@l); gtkadd($box, gtkpack(Gtk2::HBox->new(0,0), @buttons)); } sub done { my ($in) = @_; diskdrake::interactive::Done($in, $all_hds); } sub export_icon { my ($entry) = @_; $entry ||= {}; $icons{$entry->{isMounted} ? 'mounted' : $entry->{mntpoint} ? 'has_mntpoint' : 'default'}; } sub update { my ($kind) = @_; per_entry_action_box($kind->{action_box}, $kind, $current_entry); per_entry_info_box($kind->{info_box}, $kind, $current_entry); $tree_model->set($current_leaf, 0 => export_icon($current_entry)) if $current_entry; } sub find_fstab_entry { my ($kind, $e, $b_add_or_not) = @_; my $fs_entry = $kind->to_fstab_entry($e); if (my $fs_entry_ = find { $fs_entry->{device} eq $_->{device} } @{$kind->{val}}) { $fs_entry_; } elsif ($b_add_or_not) { push @{$kind->{val}}, $fs_entry; $fs_entry; } else { undef; } } sub import_tree { my ($kind, $info_box) = @_; my (%servers_displayed, %wservers, %wexports); $tree_model = Gtk2::TreeStore->new("Gtk2::Gdk::Pixbuf", "Glib::String"); my $tree = Gtk2::TreeView->new_with_model($tree_model); $tree->get_selection->set_mode('browse'); my $col = Gtk2::TreeViewColumn->new; $col->pack_start(my $pixrender = Gtk2::CellRendererPixbuf->new, 0); $col->add_attribute($pixrender, 'pixbuf', 0); $col->pack_start(my $texrender = Gtk2::CellRendererText->new, 1); $col->add_attribute($texrender, 'text', 1); $tree->append_column($col); $tree->set_headers_visible(0); foreach ('default', 'server', 'has_mntpoint', 'mounted') { $icons{$_} = gtkcreate_pixbuf("smbnfs_$_"); } my $add_server = sub { my ($server) = @_; my $identifier = $server->{ip} || $server->{name}; my $name = $server->{name} || $server->{ip}; $servers_displayed{$identifier} ||= do { my $w = $tree_model->append_set(undef, [ 0 => $icons{server}, 1 => $name ]); $wservers{$tree_model->get_path_str($w)} = $server; $w; }; }; my $find_exports; $find_exports = sub { my ($server) = @_; my @l = eval { $kind->find_exports($server) }; return @l if !$@; if ($server->{username}) { $in->ask_warn('', N("Can not login using username %s (bad password?)", $server->{username})); network::smb::remove_bad_credentials($server); } else { if (my @l = network::smb::authentications_available($server)) { my $user = $in->ask_from_list_(N("Domain Authentication Required"), N("Which username"), [ @l, N_("Another one") ]) or return; if ($user ne 'Another one') { network::smb::read_credentials($server, $user); goto $find_exports; } } } if ($in->ask_from(N("Domain Authentication Required"), N("Please enter your username, password and domain name to access this host."), [ { label => N("Username"), val => \$server->{username} }, { label => N("Password"), val => \$server->{password}, hidden => 1 }, { label => N("Domain"), val => \$server->{domain} }, ])) { goto $find_exports; } else { delete $server->{username}; (); } }; my $add_exports = sub { my ($node) = @_; my $path = $tree_model->get_path($node); $tree->expand_row($path, 0); foreach ($find_exports->($wservers{$tree_model->get_path_str($node)} || return)) { #- can not die here since insert_node provoque a tree_select_row before the %wservers is filled my $s = $kind->to_string($_); my $w = $tree_model->append_set($node, [ 0 => export_icon(find_fstab_entry($kind, $_)), 1 => $s ]); $wexports{$tree_model->get_path_str($w)} = $_; } }; { my $search = Gtk2::Button->new(N("Search servers")); gtkpack__($info_box, gtksignal_connect($search, clicked => sub { $add_server->($_) foreach sort { $a->{name} cmp $b->{name} } $kind->find_servers; $search->set_label(N("Search new servers")); })); } foreach (uniq(map { ($kind->from_dev($_->{device}))[0] } @{$kind->{val}})) { my $node = $add_server->({ name => $_ }); $add_exports->($node); } $tree->get_selection->signal_connect(changed => sub { my ($_model, $curr) = $_[0]->get_selected; $curr or return; if ($tree_model->iter_parent($curr)) { $current_leaf = $curr; $current_entry = find_fstab_entry($kind, $wexports{$tree_model->get_path_str($curr)} || die(''), 'add'); } else { if (!$tree_model->iter_has_child($curr)) { gtkset_mousecursor_wait($tree->window); ugtk2::flush(); $add_exports->($curr); gtkset_mousecursor_normal($tree->window); } $current_entry = undef; } update($kind); }); $tree; } sub add_smbnfs { my ($widget, $kind) = @_; die if $kind->{main_box}; $kind->{info_box} = Gtk2::VBox->new(0,0); $kind->{display_box} = create_scrolled_window(import_tree($kind, $kind->{info_box})); $kind->{action_box} = Gtk2::HBox->new(0,0); $kind->{main_box} = gtkpack_(Gtk2::VBox->new(0,7), 1, gtkpack(Gtk2::HBox->new(0,7), gtkset_size_request($kind->{display_box}, 200, 0), $kind->{info_box}), 0, $kind->{action_box}, ); $widget->add($kind->{main_box}); $current_entry = undef; update($kind); $kind; } sub nfs2kind() { network::nfs->new({ type => 'nfs', name => 'NFS', val => $all_hds->{nfss}, no_auto => 1 }); } sub smb2kind() { network::smb->new({ type => 'smb', name => 'Samba', val => $all_hds->{smbs}, no_auto => 1 }); } 1;