diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-18 15:42:30 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-28 15:38:21 +0100 |
commit | 5169a7b07951b319bd5e4d0d75c3aa97b2482f7e (patch) | |
tree | d6f96721f68d1923f2bcafac1914d4dcd99a6803 | |
parent | 9cb4f1ab3aaafd088ba997d2d4b4d2cd9ef5847b (diff) | |
download | drakguard-5169a7b07951b319bd5e4d0d75c3aa97b2482f7e.tar drakguard-5169a7b07951b319bd5e4d0d75c3aa97b2482f7e.tar.gz drakguard-5169a7b07951b319bd5e4d0d75c3aa97b2482f7e.tar.bz2 drakguard-5169a7b07951b319bd5e4d0d75c3aa97b2482f7e.tar.xz drakguard-5169a7b07951b319bd5e4d0d75c3aa97b2482f7e.zip |
use Gtk3 namespace instead of Gtk2
-rwxr-xr-x | bin/drakguard | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/drakguard b/bin/drakguard index c681bec..a4e87a0 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -9,7 +9,7 @@ use common; use standalone; use mygtk3; use ugtk3 qw(:create :helpers :wrappers); -use Gtk2::SimpleList; +use Gtk3::SimpleList; use interactive; use network::shorewall; use network::squid; @@ -83,14 +83,14 @@ my $w = ugtk3->new($title); $::main_window = $w->{real_window}; my $in = interactive->vnew('su'); -my $allusers_list = Gtk2::SimpleList->new(N("All users") => 'text'); +my $allusers_list = Gtk3::SimpleList->new(N("All users") => 'text'); $allusers_list->get_selection->set_mode('multiple'); @{$allusers_list->{data}} = sort(list_users()); my $allusers_program_list; my $users_program_list; -my $users_list = Gtk2::SimpleList->new(N("Allowed users") => 'text'); +my $users_list = Gtk3::SimpleList->new(N("Allowed users") => 'text'); $users_list->get_selection->set_mode('multiple'); @{$users_list->{data}} = difference2($shorewall->{accept_local_users}{http}, [ $root_user, $proxy_user ]); @@ -140,7 +140,7 @@ $w->{cancel_clicked} = \&quit_gui; gtkadd($w->{window}, gtknew('VBox', spacing => 5, children => [ - $::isEmbedded ? () : (0, Gtk2::Banner->new($icon, $title)), + $::isEmbedded ? () : (0, Gtk3::Banner->new($icon, $title)), 1, gtknew('Notebook', children => [ gtknew('Label', text => N("Configuration")), gtknew('VBox', spacing => 5, border_width => 5, children => [ @@ -199,16 +199,16 @@ gtkadd($w->{window}, ]), (map { my $url_list = $_; - $url_list->{list} = Gtk2::SimpleList->new($url_list->{list_title} => 'text'); + $url_list->{list} = Gtk3::SimpleList->new($url_list->{list_title} => 'text'); $url_list->{list}->get_selection->set_mode('multiple'); if ($url_list->{tab_title} eq N("Block programs")) { @{$url_list->{list}{data}} = read_program_list($url_list->{file}) } else { @{$url_list->{list}{data}} = read_url_list($url_list->{file}) } - $allusers_program_list = Gtk2::SimpleList->new(N("Blocked users") => 'text'); + $allusers_program_list = Gtk3::SimpleList->new(N("Blocked users") => 'text'); $allusers_program_list->get_selection->set_mode('multiple'); @{$allusers_program_list->{data}} = sort(list_users()); - $users_program_list = Gtk2::SimpleList->new(N("Allowed users") => 'text'); + $users_program_list = Gtk3::SimpleList->new(N("Allowed users") => 'text'); $users_program_list->get_selection->set_mode('multiple'); @{$users_program_list->{data}} = sort(read_program_user_list($url_list->{file})); my $entry; @@ -320,7 +320,7 @@ else { $acl_active = 1 } } update_time_change(); -Gtk2->main; +Gtk3->main; $w->exit(0); @@ -345,7 +345,7 @@ sub list_add_entry_program { sub list_remove_entry { my ($list, @addr) = @_; - #- workaround buggy Gtk2::SimpleList array abstraction, it destroys references + #- workaround buggy Gtk3::SimpleList array abstraction, it destroys references @{$list->{data}} = map { member($_->[0], @addr) ? () : [ @$_ ] } @{$list->{data}}; } |