diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-18 15:37:55 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-24 21:30:39 +0100 |
commit | e572f9c0e93a9e9022a94631a8de8b3c588c5d93 (patch) | |
tree | c07dd6d9644daf14b79f48f085bf6af2a7f42e58 | |
parent | f9c64d2dad8e8afb7bf54fcab55ac9781c1394cc (diff) | |
download | userdrake-e572f9c0e93a9e9022a94631a8de8b3c588c5d93.tar userdrake-e572f9c0e93a9e9022a94631a8de8b3c588c5d93.tar.gz userdrake-e572f9c0e93a9e9022a94631a8de8b3c588c5d93.tar.bz2 userdrake-e572f9c0e93a9e9022a94631a8de8b3c588c5d93.tar.xz userdrake-e572f9c0e93a9e9022a94631a8de8b3c588c5d93.zip |
use Gtk3 namespace instead of Gtk2
-rwxr-xr-x | userdrake | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -186,7 +186,7 @@ each_index { N("Full Name"), N("Login Shell"), N("Home Directory"), N("Status")); each_index { - my $col = Gtk3::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i); + my $col = Gtk3::TreeViewColumn->new_with_attributes($_, Gtk3::CellRendererText->new, 'text' => $::i); $col->set_sort_column_id($::i); $col->set_min_width($gcolsize[$::i]); $grouptree->append_column($col); @@ -491,7 +491,7 @@ sub AddUser() { $fullname or $us->{o}{fullname}->set_text($us->{o}{login}->get_text); 0; # Gdk expect focus event handlers to return false }); - $us->{o}{uid} = Gtk3::SpinButton->new(Gtk2::Adjustment->new(500, 1, 65000, 1, 10, 10), 1, 0); + $us->{o}{uid} = Gtk3::SpinButton->new(Gtk3::Adjustment->new(500, 1, 65000, 1, 10, 10), 1, 0); $h->pack_end($us->{o}{uid}, 0, 0, 4); $h->pack_end(Gtk3::Label->new(N("UID: ")), 0, 0, 4); GrayBox($us->{o}{userid}, $h, 0); @@ -585,7 +585,7 @@ sub AddGroup() { !$error and $w->destroy; $error = 0 }); } ([ N("Cancel"), 1 ], [ N("Ok"), 0 ]) ); - $us->{o}{gid} = Gtk3::SpinButton->new(Gtk2::Adjustment->new(500, 1, 65000, 1, 10, 10), 1, 0); + $us->{o}{gid} = Gtk3::SpinButton->new(Gtk3::Adjustment->new(500, 1, 65000, 1, 10, 10), 1, 0); $h->pack_end($us->{o}{gid}, 0, 0, 4); $h->pack_end(Gtk3::Label->new(N("GID: ")), 0, 0, 4); $us->{o}{groupid}->signal_connect('clicked' => sub { $mode = !$mode; $h->set_sensitive($mode) }); @@ -992,7 +992,7 @@ sub UserEdit_widget { 0, gtkpack__(my $h = Gtk3::HBox->new(0, 10), Gtk3::Label->new(N("Account expires (YYYY-MM-DD):")), map { my ($s, $value, $minv, $maxv) = @$_; #my $spc = $_->[4]; - $us->{o}{$s} = Gtk3::SpinButton->new(Gtk2::Adjustment->new($value, $minv , $maxv, 1, 10, 10), 1, 0); + $us->{o}{$s} = Gtk3::SpinButton->new(Gtk3::Adjustment->new($value, $minv , $maxv, 1, 10, 10), 1, 0); } (['expy', $valy, 1970, 10000], ['expm', $valm, 1, 12], ['expd', $vald, 1, 31]), @@ -1124,16 +1124,16 @@ sub GroupEdit_widget { sub Edit() { my $w = NewWindow(N("Edit Groups / Users")); - my $model = Gtk3::ListStore->new("Gtk2::Gdk::Pixbuf", "Glib::String", "Glib::Int"); + my $model = Gtk3::ListStore->new("Gtk3::Gdk::Pixbuf", "Glib::String", "Glib::Int"); my $tree = Gtk3::TreeView->new_with_model($model); my ($groupname, $groupEnt, $userEnt, $primgid, $Gent); my @primgroup; $tree->get_selection->set_mode('browse'); - my $check = Gtk3::TreeViewColumn->new_with_attributes("", Gtk2::CellRendererPixbuf->new, + my $check = Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererPixbuf->new, 'pixbuf' => 0); $tree->append_column($check); $check->{is_pixbuf_column} = 1; - $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes("", Gtk2::CellRendererText->new, + $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererText->new, 'text' => 1)); $tree->set_headers_visible(0); my $p = $nb->get_current_page; |