diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-18 02:45:58 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-12-20 10:25:03 +0100 |
commit | 122658abc05374cbdbac4eef563265a1673da984 (patch) | |
tree | 7d94e790f7e2a77c8cccb6f7c76c5a3bcda2343e /menus_launcher.pl | |
parent | d3c03b5b1992e028d1239e5f04a19edd04f85830 (diff) | |
download | control-center-122658abc05374cbdbac4eef563265a1673da984.tar control-center-122658abc05374cbdbac4eef563265a1673da984.tar.gz control-center-122658abc05374cbdbac4eef563265a1673da984.tar.bz2 control-center-122658abc05374cbdbac4eef563265a1673da984.tar.xz control-center-122658abc05374cbdbac4eef563265a1673da984.zip |
use Gtk3 namespace instead of Gtk2
Diffstat (limited to 'menus_launcher.pl')
-rwxr-xr-x | menus_launcher.pl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/menus_launcher.pl b/menus_launcher.pl index 3d0bf852..4aa82f92 100755 --- a/menus_launcher.pl +++ b/menus_launcher.pl @@ -20,29 +20,29 @@ $my_win->{rwindow}->set_title(N("Menu Configuration Center")) unless $::isEmbedd $my_win->{window}->signal_connect(delete_event => sub { ugtk3->exit(0); }); -my $table = Gtk2::Table->new(3, 2, 0); +my $table = Gtk3::Table->new(3, 2, 0); $table->set_border_width(5); $table->set_row_spacings(5); $table->set_col_spacings(5); -$table->attach(Gtk2::Label->new(N("System menu")), 0, 1, 0, 1, 'fill', 'fill', 0, 0); -my $b1 = gtksignal_connect(Gtk2::Button->new(N("Configure...")), clicked => sub { system("$bindir/menudrake --systemmenu &") }); +$table->attach(Gtk3::Label->new(N("System menu")), 0, 1, 0, 1, 'fill', 'fill', 0, 0); +my $b1 = gtksignal_connect(Gtk3::Button->new(N("Configure...")), clicked => sub { system("$bindir/menudrake --systemmenu &") }); $table->attach($b1, 1, 2, 0, 1, 'fill', 'fill', 0, 0); -$table->attach(Gtk2::Label->new(N("User menu")), 0, 1, 1, 2, 'fill', 'fill', 0, 0); +$table->attach(Gtk3::Label->new(N("User menu")), 0, 1, 1, 2, 'fill', 'fill', 0, 0); -my $combo = Gtk2::OptionMenu->new; +my $combo = Gtk3::OptionMenu->new; $combo->set_popdown_strings("root", sort(list_users())); $table->attach($combo, 2, 3, 1, 2, 'fill', 'fill', 0, 0); -my $b2 = gtksignal_connect(Gtk2::Button->new(N("Configure...")), +my $b2 = gtksignal_connect(Gtk3::Button->new(N("Configure...")), clicked => sub { my $a = $combo->entry->get_text(); system($a eq "root" ? "$bindir/menudrake --usermenu &" : " su $a -c \"$bindir/menudrake\" &") }); $table->attach($b2, 1, 2, 1, 2, 'fill', 'fill', 0, 0); -$my_win->{window}->add(gtkpack(Gtk2::VBox->new(0, 0), - Gtk2::Label->new(N("Menu Configuration Center") . N("\n\nChoose which menu you want to configure")), - Gtk2::HSeparator->new, +$my_win->{window}->add(gtkpack(Gtk3::VBox->new(0, 0), + Gtk3::Label->new(N("Menu Configuration Center") . N("\n\nChoose which menu you want to configure")), + Gtk3::HSeparator->new, $table, - Gtk2::HSeparator->new, - gtkpack(gtkset_layout(Gtk2::HButtonBox->new, 'end'), - gtkcan_default(gtksignal_connect(Gtk2::Button->new_from_stock('gtk-close'), clicked => sub { ugtk3->exit(0) }), 1) + Gtk3::HSeparator->new, + gtkpack(gtkset_layout(Gtk3::HButtonBox->new, 'end'), + gtkcan_default(gtksignal_connect(Gtk3::Button->new_from_stock('gtk-close'), clicked => sub { ugtk3->exit(0) }), 1) ), ), ); |