summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2012-08-01 17:16:30 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 21:28:33 +0100
commitb9e700aea8f8dfae031d9ff923f00393b052fd3d (patch)
tree77874a7a36987e70b128aa303842ba623ec249e0 /perl-install/standalone
parent2cfaaed875e7caeae898acf23630558077bb668a (diff)
downloaddrakx-b9e700aea8f8dfae031d9ff923f00393b052fd3d.tar
drakx-b9e700aea8f8dfae031d9ff923f00393b052fd3d.tar.gz
drakx-b9e700aea8f8dfae031d9ff923f00393b052fd3d.tar.bz2
drakx-b9e700aea8f8dfae031d9ff923f00393b052fd3d.tar.xz
drakx-b9e700aea8f8dfae031d9ff923f00393b052fd3d.zip
use Gtk3 namespace instead of Gtk2
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/display_help10
-rwxr-xr-xperl-install/standalone/drakautoinst58
-rwxr-xr-xperl-install/standalone/drakboot2
-rwxr-xr-xperl-install/standalone/drakbug24
-rwxr-xr-xperl-install/standalone/drakclock18
-rwxr-xr-xperl-install/standalone/drakdvb8
-rwxr-xr-xperl-install/standalone/drakfloppy14
-rwxr-xr-xperl-install/standalone/drakfont92
-rwxr-xr-xperl-install/standalone/drakperm12
-rwxr-xr-xperl-install/standalone/draksec8
-rwxr-xr-xperl-install/standalone/drakups28
-rwxr-xr-xperl-install/standalone/harddrake226
-rwxr-xr-xperl-install/standalone/logdrake48
13 files changed, 174 insertions, 174 deletions
diff --git a/perl-install/standalone/display_help b/perl-install/standalone/display_help
index bc219eb8a..bd857d092 100755
--- a/perl-install/standalone/display_help
+++ b/perl-install/standalone/display_help
@@ -24,7 +24,7 @@ use common;
use any;
use mygtk3 qw(gtknew);
use ugtk3 qw(:wrappers :create);
-use Gtk2::WebKit;
+use Gtk3::WebKit;
my $view = gtknew('WebKit_View', no_popup_menu => 1);
@@ -54,17 +54,17 @@ if (!$is_firstime) {
my $w = ugtk3->new(N("Help"), width => $default_width, height => $default_height);
gtkadd($w->{rwindow},
- gtkpack_(Gtk2::VBox->new,
+ gtkpack_(Gtk3::VBox->new,
if_(!$is_firstime,
0, gtknew('Title2', label => N("Help")),
- 0, Gtk2::HSeparator->new,
+ 0, Gtk3::HSeparator->new,
),
1, create_scrolled_window(gtkset_border_width($view, 5), [ 'never', 'automatic' ]),
#1, gtknew('ScrolledWindow', child => $view, border_width => 5, h_policy => 'never');
- 0, Gtk2::HSeparator->new,
+ 0, Gtk3::HSeparator->new,
if_(!$is_firstime,
0, gtkpack(create_hbox('end'),
- gtknew('Button', text => N("Close"), clicked => sub { Gtk2->main_quit })
+ gtknew('Button', text => N("Close"), clicked => sub { Gtk3->main_quit })
),
),
),
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index 63b8c4974..2648cf4bd 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -141,34 +141,34 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
my $W = ugtk3->new('$o edition');
my @box_to_hide;
my $nb_pages=0;
- my $notebook = Gtk2::Notebook->new;
+ my $notebook = Gtk3::Notebook->new;
$notebook->set_show_border(0);
$notebook->set_show_tabs(0);
- $notebook->append_page(gtkpack_(gtkset_border_width(Gtk2::VBox->new(0,0), 10),
- 1, Gtk2::VBox->new(0,0),
- 0, gtkpack_(Gtk2::HBox->new(0,0),
- 1, Gtk2::VBox->new(0,0),
- 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched-in'),
+ $notebook->append_page(gtkpack_(gtkset_border_width(Gtk3::VBox->new(0,0), 10),
+ 1, Gtk3::VBox->new(0,0),
+ 0, gtkpack_(Gtk3::HBox->new(0,0),
+ 1, Gtk3::VBox->new(0,0),
+ 0, gtkadd(gtkset_shadow_type(Gtk3::Frame->new, 'etched-in'),
gtkcreate_img('mdk_logo')),
- 1, Gtk2::VBox->new(0,0),
+ 1, Gtk3::VBox->new(0,0),
),
0, N("\nWelcome.\n\nThe parameters of the auto-install are available in the sections on the left"),
- 1, Gtk2::VBox->new(0,0),
+ 1, Gtk3::VBox->new(0,0),
), undef);
$notebook->show_all;
$notebook->set_current_page(0);
gtkadd($W->{window},
- gtkpack_(Gtk2::VBox->new(0,5),
- 1, gtkpack_(Gtk2::HBox->new(0,0),
- 0, gtkadd(gtkset_size_request(gtkset_shadow_type(Gtk2::Frame->new, 'in'), 130, 470),
- gtkpack_(Gtk2::VBox->new(0,0),
+ gtkpack_(Gtk3::VBox->new(0,5),
+ 1, gtkpack_(Gtk3::HBox->new(0,0),
+ 0, gtkadd(gtkset_size_request(gtkset_shadow_type(Gtk3::Frame->new, 'in'), 130, 470),
+ gtkpack_(Gtk3::VBox->new(0,0),
map {
- my $box = Gtk2::VBox->new(0,0);
+ my $box = Gtk3::VBox->new(0,0);
push @box_to_hide, $box;
$box->{vis} = 0;
my @button_to_hide;
- 0, gtksignal_connect(Gtk2::Button->new($_), clicked => sub {
+ 0, gtksignal_connect(Gtk3::Button->new($_), clicked => sub {
if ($box->{vis}) { $box->hide; $box->{vis} = 0; $notebook->set_current_page(0) }
else {
$_->hide, $_->{vis}=0 foreach @box_to_hide;
@@ -177,7 +177,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
}
}), 1, gtkpack__($box,
map {
- my $button = gtkset_relief(Gtk2::ToggleButton->new, 'none');
+ my $button = gtkset_relief(Gtk3::ToggleButton->new, 'none');
push @button_to_hide, $button;
my $gru = $_->[0];
$notebook->append_page(gtkshow($_->[2]), undef);
@@ -190,7 +190,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
my $b;
if ($_->[1] ne "") { $b = gtkcreate_img($_->[1]) } else { undef $b }
gtksignal_connect(gtkadd($button,
- gtkpack__(Gtk2::VBox->new(0,3),
+ gtkpack__(Gtk3::VBox->new(0,3),
$b,
translate($gru),
)
@@ -208,10 +208,10 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
),
1, $notebook,
),
- 0, Gtk2::HSeparator->new,
- 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'end'), 5),
- gtksignal_connect(Gtk2::Button->new(N("Accept")), clicked => sub { Gtk2->main_quit }),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $o = $o_old; Gtk2->main_quit; quit_global($in, 0) }),
+ 0, Gtk3::HSeparator->new,
+ 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk3::HButtonBox->new, 'end'), 5),
+ gtksignal_connect(Gtk3::Button->new(N("Accept")), clicked => sub { Gtk3->main_quit }),
+ gtksignal_connect(Gtk3::Button->new(N("Cancel")), clicked => sub { $o = $o_old; Gtk3->main_quit; quit_global($in, 0) }),
)
)
);
@@ -220,7 +220,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
# gtkadd($W->{window},
# gtkpack_($W->create_box_with_title(N("Edit variables")),
# 1, my $notebook = create_notebook( map { h2widget($o->{$_}, "\$o->\{$_\}"), $_ } keys %$o ),
-# 0, gtkpack(gtkset_border_width(Gtk2::HBox->new(0,0),5), $W->create_okcancel),
+# 0, gtkpack(gtkset_border_width(Gtk3::HBox->new(0,0),5), $W->create_okcancel),
# ),
# );
# $notebook->set_tab_pos('left');
@@ -270,8 +270,8 @@ sub h2widget {
my @list_keys = keys(%$k);
if (ref($k->{$list_keys[0]}) =~ /HASH/) {
$i++;
- $w = gtkpack_(Gtk2::VBox->new(0,0),
- 1, create_scrolled_window(gtkpack__($vb = Gtk2::VBox->new(0,10),
+ $w = gtkpack_(Gtk3::VBox->new(0,0),
+ 1, create_scrolled_window(gtkpack__($vb = Gtk3::VBox->new(0,10),
$widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 },
map {
my $e;
@@ -302,9 +302,9 @@ sub h2widget {
my $vb;
my @widget_list;
my $i = -1;
- $w = gtkpack_(Gtk2::VBox->new(0,0),
+ $w = gtkpack_(Gtk3::VBox->new(0,0),
1, create_scrolled_window(
- gtkpack__($vb = Gtk2::VBox->new(0,5),
+ gtkpack__($vb = Gtk3::VBox->new(0,5),
map { $i++; $widget_list[$i] = h2widget($_, "$label\[$i]") } @$k,
)
),
@@ -332,7 +332,7 @@ sub create_entry_element {
} elsif (ref $text =~ /ARRAY/) {
return [ "$label : ", h2widget($text, $label) ];
} else {
- $e = Gtk2::Entry->new;
+ $e = Gtk3::Entry->new;
$e->{value} = $value;
my $_tag = Glib::Timeout->add(1000, sub { $e->set_text($text); 0 });
gtksignal_connect($e, changed => sub {
@@ -351,15 +351,15 @@ sub control_buttons {
ref($ref_local_k) =~ /HASH/ or return();
my %local_k = %$ref_local_k;
my ($button_remove);
- 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'spread'), 5),
- gtksignal_connect(Gtk2::Button->new(N("Add an item")), clicked => sub {
+ 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk3::HButtonBox->new, 'spread'), 5),
+ gtksignal_connect(Gtk3::Button->new(N("Add an item")), clicked => sub {
$local_k{$_} = undef foreach keys %local_k;
$i++;
$local_gui->($vb, \@widget_list, \%local_k, $i) or $i--, return;
$i >= 0 and $button_remove->set_sensitive(1);
}
),
- gtksignal_connect($button_remove = Gtk2::Button->new(N("Remove the last item")), clicked => sub {
+ gtksignal_connect($button_remove = Gtk3::Button->new(N("Remove the last item")), clicked => sub {
$i >= 0 or return;
$widget_list[$i]->destroy;
$i--;
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index dc2b2267b..e9f6cf348 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -182,7 +182,7 @@ sub autologin_choice() {
push @users, $user;
}
my $user_combo = gtknew('ComboBox', text => $user, list => \@users);
- my $desktop_combo = Gtk2::ComboBox->new_with_strings(\@sessions, if_(member($auto_mode->{desktop}, @sessions), $auto_mode->{desktop}));
+ my $desktop_combo = Gtk3::ComboBox->new_with_strings(\@sessions, if_(member($auto_mode->{desktop}, @sessions), $auto_mode->{desktop}));
my $auto_box = gtknew('Table', col_spacings => 5, row_spacings => 5, homogeneous => 1, children => [
[ gtknew('Label_Left', text => N("Default user")), $user_combo ],
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index a960a248d..fe8866df4 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -96,15 +96,15 @@ my $bugzilla_url = 'http://bugs.mageia.org/enter_bug.cgi';
my $wizard_name = "Bugzilla";
$table = create_packtable({ col_spacings => 5, row_spacings => 10 },
- [ gtknew('Label_Left', text => N("Select %s Tool:", N("Mageia"))), $comb_app = Gtk2::ComboBox->new_text, $comb_app->set_wrap_width(3) ],
+ [ gtknew('Label_Left', text => N("Select %s Tool:", N("Mageia"))), $comb_app = Gtk3::ComboBox->new_text, $comb_app->set_wrap_width(3) ],
[ gtknew('Label_Left', text => N("or Application Name\n(or Full Path):")),
- gtkpack_(Gtk2::HBox->new(0, 5),
- 1, $com_app = gtkset_editable(Gtk2::Entry->new, 1),
- 0, $button_pkg = Gtk2::Button->new(N("Find Package")),
- 0, $button_browse = Gtk2::FileChooserButton->new(N("Browse"), 'GTK_FILE_CHOOSER_ACTION_OPEN'),
+ gtkpack_(Gtk3::HBox->new(0, 5),
+ 1, $com_app = gtkset_editable(Gtk3::Entry->new, 1),
+ 0, $button_pkg = Gtk3::Button->new(N("Find Package")),
+ 0, $button_browse = Gtk3::FileChooserButton->new(N("Browse"), 'GTK_FILE_CHOOSER_ACTION_OPEN'),
) ],
- [ gtknew('Label_Left', text => N("Package: ")), $package = Gtk2::Entry->new_with_text("...") ], # complain on gtk-perl@ml
- [ gtknew('Label_Left', text => N("Kernel:")), gtkset_editable(Gtk2::Entry->new_with_text($kernel_release), 0) ]
+ [ gtknew('Label_Left', text => N("Package: ")), $package = Gtk3::Entry->new_with_text("...") ], # complain on gtk-perl@ml
+ [ gtknew('Label_Left', text => N("Kernel:")), gtkset_editable(Gtk3::Entry->new_with_text($kernel_release), 0) ]
);
$comb_app->set_popdown_strings("", uniq(sort(@generic_tool), if_($prog, $prog)));
$comb_app->set_text("");
@@ -127,7 +127,7 @@ my $parent_uid = get_parent_uid();
my $width = 600;
gtkadd($window->{window},
- gtkpack_(Gtk2::VBox->new(0, 5),
+ gtkpack_(Gtk3::VBox->new(0, 5),
0, gtknew('Title1', label => $mageia_release, width => $width),
1, create_scrolled_window(
gtknew('TextView', editable => 0, height => 150,
@@ -167,15 +167,15 @@ gtkadd($window->{window},
if_(!$error,
0, gtkadd($table),
),
- 0, gtkpack(Gtk2::HSeparator->new),
+ 0, gtkpack(Gtk3::HSeparator->new),
0, gtkpack(create_hbox('edge'),
gtksignal_connect(
- Gtk2::Button->new(N("Help")), clicked => sub {
+ Gtk3::Button->new(N("Help")), clicked => sub {
run_program::raw({ detach => 1, setuid => $parent_uid }, 'drakhelp', '--id', 'drakbug');
}),
gtkpack(create_hbox('end'),
- gtksignal_connect(Gtk2::Button->new(N("Report")), clicked => \&report_bug_to_bugzilla),
- gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { ugtk3->exit(0) }),
+ gtksignal_connect(Gtk3::Button->new(N("Report")), clicked => \&report_bug_to_bugzilla),
+ gtksignal_connect(Gtk3::Button->new(N("Close")), clicked => sub { ugtk3->exit(0) }),
))));
if (defined $prog) {
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index 71653b7b1..962474341 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -55,9 +55,9 @@ if (!@timezones) {
my $drawing_area;
-my $adjh = Gtk2::Adjustment->new(0.0, 0.0, 23.0, 1.0, 5.0, 0.0);
-my $adjm = Gtk2::Adjustment->new(0.0, 0.0, 59.0, 1.0, 5.0, 0.0);
-my $adjs = Gtk2::Adjustment->new(0.0, 0.0, 59.0, 1.0, 5.0, 0.0);
+my $adjh = Gtk3::Adjustment->new(0.0, 0.0, 23.0, 1.0, 5.0, 0.0);
+my $adjm = Gtk3::Adjustment->new(0.0, 0.0, 59.0, 1.0, 5.0, 0.0);
+my $adjs = Gtk3::Adjustment->new(0.0, 0.0, 59.0, 1.0, 5.0, 0.0);
my ($button_reset, $check_ntp, $hb_ntp, $combo_ntpserver, $ntp);
my $mode = 0;
@@ -82,18 +82,18 @@ $my_win->{window}->add(gtknew('VBox', border_width => $::isEmbedded ? 0 : 5, chi
}),
0, $hb_ntp = gtknew('HBox', border_width => 5, children => [
0, gtknew('Label', text => N("Server:")),
- 1, $combo_ntpserver = Gtk2::Combo->new
+ 1, $combo_ntpserver = Gtk3::Combo->new
])
]))
]),
0, gtknew('VBox', children => [
0, gtknew('HBox', children => [
- 0, $drawing_area = gtkset_size_request(Gtk2::DrawingArea->new, @image_size),
+ 0, $drawing_area = gtkset_size_request(Gtk3::DrawingArea->new, @image_size),
]),
0, my $time_box = gtknew('HBox', homogenous => 1, children => [
- 0, my $spinner_h = Gtk2::SpinButton->new($adjh, 0, 0),
- 0, my $spinner_m = Gtk2::SpinButton->new($adjm, 0, 0),
- 0, my $spinner_s = Gtk2::SpinButton->new($adjs, 0, 0),
+ 0, my $spinner_h = Gtk3::SpinButton->new($adjh, 0, 0),
+ 0, my $spinner_m = Gtk3::SpinButton->new($adjm, 0, 0),
+ 0, my $spinner_s = Gtk3::SpinButton->new($adjs, 0, 0),
]),
1, gtknew('Frame', text => N("Timezone"), shadow_type => 'etched_in', child =>
gtknew('VBox', border_width => 5, children_tight => [
@@ -194,7 +194,7 @@ $drawing_area->set_events([ 'button_press_mask', 'button_release_mask', "pointer
$drawing_area->signal_connect(expose_event => \&expose_event);
$drawing_area->signal_connect(realize => sub {
my $window = $drawing_area->window;
- $pixmap = Gtk2::Gdk::Pixmap->new($window, @image_size, $window->get_depth);
+ $pixmap = Gtk3::Gdk::Pixmap->new($window, @image_size, $window->get_depth);
});
$drawing_area->signal_connect(button_press_event => sub { $pressed = 1 });
diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb
index 9ed351b71..bcbf4a9c9 100755
--- a/perl-install/standalone/drakdvb
+++ b/perl-install/standalone/drakdvb
@@ -25,7 +25,7 @@ use standalone;
use mygtk3;
use interactive;
use ugtk3 qw(:create :helpers :wrappers);
-use Gtk2::SimpleList;
+use Gtk3::SimpleList;
my $title = N("DVB");
$ugtk3::wm_icon = "/usr/share/mcc/themes/default/tv-mdk.png";
@@ -36,7 +36,7 @@ my $in = 'interactive'->vnew;
my $config_file = "$ENV{HOME}/.mplayer/channels.conf";
-my $channel_list = Gtk2::SimpleList->new(N("Channel") => "text", "id" => "hidden");
+my $channel_list = Gtk3::SimpleList->new(N("Channel") => "text", "id" => "hidden");
my %buttons;
my $pid;
my $wait;
@@ -49,7 +49,7 @@ sub get_selected_channel() {
sub exitapp() {
local $SIG{TERM} = 'IGNORE';
kill TERM => -$$;
- Gtk2->main_quit;
+ Gtk3->main_quit;
}
sub detect_channels() {
@@ -142,7 +142,7 @@ sub launch_tv() {
gtkadd($w->{window},
gtknew('VBox', spacing => 5, children => [
- $::isEmbedded ? () : (0, Gtk2::Banner->new($ugtk3::wm_icon, $title)),
+ $::isEmbedded ? () : (0, Gtk3::Banner->new($ugtk3::wm_icon, $title)),
1, gtknew('ScrolledWindow', width => 300, height => 400, child => $channel_list),
0, gtknew('HButtonBox', layout => 'end', children_loose => [
$buttons{detect} = gtknew('Button', text => N("Detect Channels"), clicked => \&detect_channels),
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 11597c6aa..74a9105ea 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -119,18 +119,18 @@ sub pref_dialog() {
# Create root tree:
- $tree_model = Gtk2::TreeStore->new(("Glib::String") x 2, "Glib::Int");
- $tree = Gtk2::TreeView->new_with_model($tree_model);
+ $tree_model = Gtk3::TreeStore->new(("Glib::String") x 2, "Glib::Int");
+ $tree = Gtk3::TreeView->new_with_model($tree_model);
$tree->set_headers_visible(0);
- $tree->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$tree->signal_connect('row-expanded', \&expand_tree);
$tree->get_selection->signal_connect('changed' => \&selected_tree);
# Create modules list:
- $list_model = Gtk2::ListStore->new(("Glib::String") x 3); # relative path, size, (hidden full path)
- $list = Gtk2::TreeView->new_with_model($list_model);
+ $list_model = Gtk3::ListStore->new(("Glib::String") x 3); # relative path, size, (hidden full path)
+ $list = Gtk3::TreeView->new_with_model($list_model);
each_index {
- $list->append_column(my $col = Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i));
+ $list->append_column(my $col = Gtk3::TreeViewColumn->new_with_attributes($_, Gtk3::CellRendererText->new, 'text' => $::i));
$col->set_sort_column_id($::i);
$col->set_min_width((200, 50)[$::i]);
} (N("Module name"), N("Size"));
@@ -150,7 +150,7 @@ sub pref_dialog() {
gtknew('ScrolledWindow', child => $tree),
200, $::isEmbedded ? 0 : 175),
gtknew('VBox', children => [
- 1, gtkadd(Gtk2::ScrolledWindow->new,
+ 1, gtkadd(Gtk3::ScrolledWindow->new,
$list
),
0, $remove_but = gtknew('Button', text => N("Remove a module"),
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 4599d76f7..14584c1a4 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -486,15 +486,15 @@ sub interactive_mode() {
local $::Wizard_no_previous = 1;
gtkadd($window1->{window},
- gtkpack_(Gtk2::VBox->new(0, 2),
- if_(!$::isEmbedded, 0, Gtk2::Banner->new("drakfont", N("DrakFont"))),
+ gtkpack_(Gtk3::VBox->new(0, 2),
+ if_(!$::isEmbedded, 0, Gtk3::Banner->new("drakfont", N("DrakFont"))),
0, gtknew('Title2', label => N("Font List")),
- 1, Gtk2::FontSelection->new,
+ 1, Gtk3::FontSelection->new,
0, gtkadd(create_hbox(),
- gtksignal_connect(Gtk2::Button->new(N("Get Windows Fonts")), clicked => sub { $windows = 1; import_status(); $windows = 0 }),
+ gtksignal_connect(Gtk3::Button->new(N("Get Windows Fonts")), clicked => sub { $windows = 1; import_status(); $windows = 0 }),
),
0, create_okcancel(my $oc = {
- ok_clicked => sub { Gtk2->main_quit },
+ ok_clicked => sub { Gtk3->main_quit },
},
undef, undef, '',
if_(0, [ N("About"), \&help, 1 ]),
@@ -541,14 +541,14 @@ sub appli_choice() {
dialog(N("Options"),
[
0, gtknew('Title2', label => N("Choose the applications that will support the fonts:")),
- 0, Gtk2::WrappedLabel->new(formatAlaTeX(license_msg())),
+ 0, Gtk3::WrappedLabel->new(formatAlaTeX(license_msg())),
(map {
my ($label, $ref) = @$_;
- (0, gtkpack_(Gtk2::HBox->new,
+ (0, gtkpack_(Gtk3::HBox->new,
0, $label,
- 1, Gtk2::HBox->new,
+ 1, Gtk3::HBox->new,
# BUG: that code never had supported canceling
- 0, gtksignal_connect(gtkset_active(Gtk2::CheckButton->new, $$ref), toggled => sub { $$ref = $$ref ? 0 : 1 }),
+ 0, gtksignal_connect(gtkset_active(Gtk3::CheckButton->new, $$ref), toggled => sub { $$ref = $$ref ? 0 : 1 }),
),
);
} ([ N("Ghostscript"), \$gs ],
@@ -559,7 +559,7 @@ sub appli_choice() {
),
],
[
- gtksignal_connect(Gtk2::Button->new(N("Ok")),
+ gtksignal_connect(Gtk3::Button->new(N("Ok")),
clicked => \&exitdialog,
),
],
@@ -569,10 +569,10 @@ sub appli_choice() {
sub font_choice() {
my $file_dialog;
my $_select_font_msg = N("Select the font file or directory and click on 'Add'");
- $file_dialog = Gtk2::FileChooserDialog->new(N("File Selection"), $::main_window, 'open', N("Cancel") => 'cancel', N("Ok") => 'ok'); # 'select_folder'
+ $file_dialog = Gtk3::FileChooserDialog->new(N("File Selection"), $::main_window, 'open', N("Cancel") => 'cancel', N("Ok") => 'ok'); # 'select_folder'
$file_dialog->set_select_multiple(1);
- my $filter = Gtk2::FileFilter->new;
+ my $filter = Gtk3::FileFilter->new;
$filter->set_name(N("Fonts"));
$filter->add_pattern("*.$_") foreach @font_extensions, map { uc($_) } @font_extensions;
$file_dialog->add_filter($filter);
@@ -604,7 +604,7 @@ sub list_remove() { #- TODO : multi-selection
$treeStore->remove($iter);
}
-sub exitdialog() { Gtk2->main_quit }
+sub exitdialog() { Gtk3->main_quit }
sub dialog {
my ($title, $widgets, $buttons, $o_main_loop, $o_options) = @_;
@@ -620,7 +620,7 @@ sub dialog {
gtkflush();
$o_main_loop->();
} else {
- Gtk2->main;
+ Gtk3->main;
}
$dialog->destroy if $dialog;
undef $dialog;
@@ -628,9 +628,9 @@ sub dialog {
sub advanced_install() {
my $button;
- $model = Gtk2::TreeStore->new("Glib::String");
- $list = Gtk2::TreeView->new_with_model($model);
- $list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ $model = Gtk3::TreeStore->new("Glib::String");
+ $list = Gtk3::TreeView->new_with_model($model);
+ $list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
$list->get_selection->set_mode('browse');
$list->set_rules_hint(1);
@@ -643,14 +643,14 @@ sub advanced_install() {
1, gtknew('HBox', children => [
1, create_scrolled_window($list),
0, gtknew('VBox', children_tight => [
- gtksignal_connect(Gtk2::Button->new(N("Add")), clicked => \&font_choice),
- gtksignal_connect(Gtk2::Button->new(N("Remove")), clicked => \&list_remove),
+ gtksignal_connect(Gtk3::Button->new(N("Add")), clicked => \&font_choice),
+ gtksignal_connect(Gtk3::Button->new(N("Remove")), clicked => \&list_remove),
]),
]),
],
[
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => \&exitdialog),
- gtksignal_connect($button = gtkset_sensitive(Gtk2::Button->new(N("Install")), 0),
+ gtksignal_connect(Gtk3::Button->new(N("Cancel")), clicked => \&exitdialog),
+ gtksignal_connect($button = gtkset_sensitive(Gtk3::Button->new(N("Install")), 0),
clicked => sub {
import_status() if @install;
}),
@@ -670,9 +670,9 @@ sub list_to_remove() {
}
sub show_list_to_remove() {
- my $model = Gtk2::TreeStore->new("Glib::String");
- my $list = Gtk2::TreeView->new_with_model($model);
- $list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ my $model = Gtk3::TreeStore->new("Glib::String");
+ my $list = Gtk3::TreeView->new_with_model($model);
+ $list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
$list->get_selection->set_mode('browse');
$list->set_rules_hint(1);
@@ -681,13 +681,13 @@ sub show_list_to_remove() {
dialog(N("Warning"),
[
- 0, Gtk2::Label->new(N("Are you sure you want to uninstall the following fonts?")),
- 1, gtkpack_(Gtk2::HBox->new(0, 4), 1, create_scrolled_window($list)),
+ 0, Gtk3::Label->new(N("Are you sure you want to uninstall the following fonts?")),
+ 1, gtkpack_(Gtk3::HBox->new(0, 4), 1, create_scrolled_window($list)),
],
[
- gtksignal_connect(Gtk2::Button->new(N("Yes")),
+ gtksignal_connect(Gtk3::Button->new(N("Yes")),
clicked => sub { import_status_uninstall(); exitdialog() }),
- gtksignal_connect(Gtk2::Button->new(N("No")),
+ gtksignal_connect(Gtk3::Button->new(N("No")),
clicked => \&exitdialog
),
],
@@ -701,9 +701,9 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
chk_empty_xfs_path();
#- left part
- $left_model = Gtk2::TreeStore->new("Glib::String");
- $left_list = Gtk2::TreeView->new_with_model($left_model);
- $left_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ $left_model = Gtk3::TreeStore->new("Glib::String");
+ $left_list = Gtk3::TreeView->new_with_model($left_model);
+ $left_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$left_list->set_headers_visible(0);
$left_list->set_rules_hint(1);
$left_list->get_selection->set_mode('multiple');
@@ -711,29 +711,29 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
$left_model->append_set(undef, [ 0 => $_ ]) foreach sort @installed_fonts_path;
#- right part
- $right_model = Gtk2::TreeStore->new("Glib::String");
- $right_list = Gtk2::TreeView->new_with_model($right_model);
- $right_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ $right_model = Gtk3::TreeStore->new("Glib::String");
+ $right_list = Gtk3::TreeView->new_with_model($right_model);
+ $right_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$right_list->set_headers_visible(0);
$right_list->get_selection->set_mode('multiple');
$right_list->set_rules_hint(1);
dialog(N("Uninstall"),
[
- 1, gtkpack_(Gtk2::HBox->new(0, 4),
+ 1, gtkpack_(Gtk3::HBox->new(0, 4),
1, create_scrolled_window($left_list),
#1, create_scrolled_window($right_list)
),
],
[
- gtksignal_connect(Gtk2::Button->new(N("Unselect All")),
+ gtksignal_connect(Gtk3::Button->new(N("Unselect All")),
clicked => sub { $left_list->get_selection->unselect_all }
),
- gtksignal_connect(Gtk2::Button->new(N("Select All")),
+ gtksignal_connect(Gtk3::Button->new(N("Select All")),
clicked => sub { $left_list->get_selection->select_all }
),
- gtksignal_connect(Gtk2::Button->new(N("Remove")), clicked => sub { exitdialog(); list_to_remove() }),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => \&exitdialog),
+ gtksignal_connect(Gtk3::Button->new(N("Remove")), clicked => sub { exitdialog(); list_to_remove() }),
+ gtksignal_connect(Gtk3::Button->new(N("Cancel")), clicked => \&exitdialog),
],
undef,
{ size => [ -1, 300 ] }
@@ -742,10 +742,10 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
}
sub import_status() {
- $pbar = Gtk2::ProgressBar->new;
- $pbar1 = Gtk2::ProgressBar->new;
- $pbar2 = Gtk2::ProgressBar->new;
- $pbar3 = Gtk2::ProgressBar->new;
+ $pbar = Gtk3::ProgressBar->new;
+ $pbar1 = Gtk3::ProgressBar->new;
+ $pbar2 = Gtk3::ProgressBar->new;
+ $pbar3 = Gtk3::ProgressBar->new;
dialog(N("Importing fonts"),
[
0, create_packtable({ col_spacings => 10, row_spacings => 50 },
@@ -762,9 +762,9 @@ sub import_status() {
}
sub import_status_uninstall() {
- $pbar = Gtk2::ProgressBar->new;
- $pbar1 = Gtk2::ProgressBar->new;
- $pbar2 = Gtk2::ProgressBar->new;
+ $pbar = Gtk3::ProgressBar->new;
+ $pbar1 = Gtk3::ProgressBar->new;
+ $pbar2 = Gtk3::ProgressBar->new;
dialog(N("Removing fonts"),
[
0, create_packtable({ col_spacings => 10, row_spacings => 50 },
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index c7fae3143..5dd9d9198 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -34,17 +34,17 @@ my $w = ugtk3->new(N("Security Permissions"));
$w->{rwindow}->set_size_request(620, 400) unless $::isEmbedded;
my $W = $w->{window};
$W->signal_connect(delete_event => sub { ugtk3->exit });
-my $model = Gtk2::ListStore->new("Gtk2::Gdk::Pixbuf", ("Glib::String") x 5);
-my $permList = Gtk2::TreeView->new_with_model($model);
+my $model = Gtk3::ListStore->new("Gtk3::Gdk::Pixbuf", ("Glib::String") x 5);
+my $permList = Gtk3::TreeView->new_with_model($model);
my $pixbuf = gtknew('Pixbuf', file => 'non-editable');
my @column_sizes = (150, 100, 100, 15, -1);
# TreeView layout is (Editable, Path, User, Group, Permissions, [hidden]index_id)
-$permList->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Editable"), Gtk2::CellRendererPixbuf->new, 'pixbuf' => 0));
+$permList->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Editable"), Gtk3::CellRendererPixbuf->new, 'pixbuf' => 0));
each_index {
- my $col = Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i + 1);
+ my $col = Gtk3::TreeViewColumn->new_with_attributes($_, Gtk3::CellRendererText->new, 'text' => $::i + 1);
$col->set_min_width($column_sizes[$::i+1]);
$permList->append_column($col);
} (N("Path"), N("User"), N("Group"), N("Permissions"));
@@ -103,10 +103,10 @@ $permList->signal_connect(button_press_event => sub {
});
-my $tips = Gtk2::Tooltips->new;
+my $tips = Gtk3::Tooltips->new;
$W->add(gtknew('VBox', spacing => 5, children => [
- if_(!$::isEmbedded, 0, Gtk2::Banner->new('/usr/share/mcc/themes/default/drakperm-mdk.png', N("Permissions"))),
+ if_(!$::isEmbedded, 0, Gtk3::Banner->new('/usr/share/mcc/themes/default/drakperm-mdk.png', N("Permissions"))),
0, gtknew('Label_Left', text => N("Here you can see files to use in order to fix permissions, owners, and groups via msec.\nYou can also edit your own rules which will overwrite the default rules."), alignment => [ 0.5, 0 ]),
1, gtknew('VBox', border_width => 0, children => [
0, gtknew('Label_Left', text => N("The current security level is %s.
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index b4d99469f..6a262bc2b 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -71,8 +71,8 @@ sub wait_msg {
$mainw->{rwindow}->show_all;
gtkset_mousecursor_wait($mainw->{rwindow}->window);
# ugly workaround for gtk+ not displaying subdialog contents:
- Glib::Timeout->add(300, sub { Gtk2->main_quit; 0 });
- Gtk2->main;
+ Glib::Timeout->add(300, sub { Gtk3->main_quit; 0 });
+ Gtk3->main;
$mainw;
}
@@ -89,7 +89,7 @@ my $window = $w->{window};
############################ MAIN WINDOW ###################################
-# Set different options to Gtk2::Window
+# Set different options to Gtk3::Window
unless ($::isEmbedded) {
$w->{rwindow}->set_position('center');
$w->{rwindow}->set_title("DrakSec");
@@ -197,7 +197,7 @@ my %descr = (
####################### OK CANCEL BUTTONS ##################################
gtkpack_($vbox,
0, gtkshow(gtknew('VBox', spacing => 5, children => [
- if_(!$::isEmbedded, 0, Gtk2::Banner->new('/usr/share/mcc/themes/default/drakperm-mdk.png', N("Permissions"))),
+ if_(!$::isEmbedded, 0, Gtk3::Banner->new('/usr/share/mcc/themes/default/drakperm-mdk.png', N("Permissions"))),
0, gtknew('Label', text => $auth_string, alignment => [ 0.5, 0 ])
])),
1, gtkshow(create_scrolled_window(
diff --git a/perl-install/standalone/drakups b/perl-install/standalone/drakups
index 266c6fd1b..61f0a66a7 100755
--- a/perl-install/standalone/drakups
+++ b/perl-install/standalone/drakups
@@ -197,7 +197,7 @@ sub edit_row {
my ($model, $o_iter) = @_;
# create new item if needed (that is when adding a new one) at end of list
my $iter = $o_iter || $model->append;
- my $dialog = Gtk2::Dialog->new;
+ my $dialog = Gtk3::Dialog->new;
$dialog->set_transient_for($w->{real_window});
$dialog->set_modal(1);
@@ -207,14 +207,14 @@ sub edit_row {
);
gtkadd($dialog->action_area,
- gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub {
+ gtksignal_connect(Gtk3::Button->new(N("Ok")), clicked => sub {
# create new item if needed (that is when adding a new one) at end of list
$iter ||= $model->append;
# $model->set($iter, 1 => $file->get_text); # FILL ME
$dialog->destroy;
# $modified++;
}),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $dialog->destroy }),
+ gtksignal_connect(Gtk3::Button->new(N("Cancel")), clicked => sub { $dialog->destroy }),
);
$dialog->show_all;
@@ -338,9 +338,9 @@ if (!$::isEmbedded) {
my $_msg = N("Welcome to the UPS configuration tools");
-$w->{window}->add(gtkpack_(Gtk2::VBox->new,
- if_(!$::isEmbedded, 0, Gtk2::Banner->new('drakups', N("DrakUPS"))),
- 1, my $nb = Gtk2::Notebook->new,
+$w->{window}->add(gtkpack_(Gtk3::VBox->new,
+ if_(!$::isEmbedded, 0, Gtk3::Banner->new('drakups', N("DrakUPS"))),
+ 1, my $nb = Gtk3::Notebook->new,
0, create_okcancel(
{
ok_clicked => sub {
@@ -358,18 +358,18 @@ $w->{window}->add(gtkpack_(Gtk2::VBox->new,
# build the notebook
foreach my $i (@pages) {
- my $model = $models{$i->{id}} = Gtk2::ListStore->new("Glib::Int", ("Glib::String") x listlength(@{$i->{columns}}));
+ my $model = $models{$i->{id}} = Gtk3::ListStore->new("Glib::Int", ("Glib::String") x listlength(@{$i->{columns}}));
my (%buttons, $list);
$indexes{$i->{name}} = 0;
my $idx = \$indexes{$i->{name}};
my $getindex = sub { $$idx++ };
- $nb->append_page(gtkpack_(Gtk2::VBox->new,
- 1, create_scrolled_window($list = Gtk2::TreeView->new_with_model($model),
+ $nb->append_page(gtkpack_(Gtk3::VBox->new,
+ 1, create_scrolled_window($list = Gtk3::TreeView->new_with_model($model),
[ 'automatic', 'automatic' ]),
- 0, gtkpack(Gtk2::HButtonBox->new,
+ 0, gtkpack(Gtk3::HButtonBox->new,
(map {
my ($id, $label, $sub) = @$_;
- gtksignal_connect($buttons{$id} = Gtk2::Button->new($label), clicked => sub {
+ gtksignal_connect($buttons{$id} = Gtk3::Button->new($label), clicked => sub {
$sub->($model, $list, $getindex);
});
} ([ 'add', N("Add"), $i->{callbacks}{add} || \&add_callback ],
@@ -378,15 +378,15 @@ foreach my $i (@pages) {
)
)
#(map {
- # gtksignal_connect(Gtk2::Button->new($_), clicked => $i->{callbacks}{$_}),
+ # gtksignal_connect(Gtk3::Button->new($_), clicked => $i->{callbacks}{$_}),
#} keys %{$i->{callbacks}})
),
),
- Gtk2::Label->new($i->{name}),
+ Gtk3::Label->new($i->{name}),
);
#$i->{list} = $list;
each_index {
- $list->append_column(Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i + 1));
+ $list->append_column(Gtk3::TreeViewColumn->new_with_attributes($_, Gtk3::CellRendererText->new, 'text' => $::i + 1));
} @{$i->{columns}};
my @u = $i->{load}->();
foreach my $line (@u) {
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 4a605c480..c857dbb03 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -261,23 +261,23 @@ $::noborderWhenEmbedded = 1;
my ($menubar, $factory) = create_factory_menu($w->{real_window}, @menu_items);
$w->{window}->set_size_request(805, 550) if !$::isEmbedded;
-my $tree_model = Gtk2::TreeStore->new("Gtk2::Gdk::Pixbuf", "Glib::String", "Glib::Int");
-$w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0),
+my $tree_model = Gtk3::TreeStore->new("Gtk3::Gdk::Pixbuf", "Glib::String", "Glib::Int");
+$w->{window}->add(gtkpack_(0, Gtk3::VBox->new(0, 0),
0, $menubar,
- 0, Gtk2::Banner->new("/usr/share/mcc/themes/default/harddrake-mdk.png", translate("Hardware")),
- 1, create_hpaned(gtkadd(Gtk2::Frame->new(N("Detected hardware")),
- create_scrolled_window(gtkset_size_request(my $tree = Gtk2::TreeView->new_with_model($tree_model), 350, -1), ['automatic', 'automatic'])),
- gtkpack_(0, Gtk2::VBox->new(0, 0),
- 1, gtkadd(my $frame = Gtk2::Frame->new(N("Information")),
- create_scrolled_window(my $text = Gtk2::TextView->new)),
- 0, my $module_cfg_button = gtksignal_connect(Gtk2::Button->new(N("Set current driver options")),
+ 0, Gtk3::Banner->new("/usr/share/mcc/themes/default/harddrake-mdk.png", translate("Hardware")),
+ 1, create_hpaned(gtkadd(Gtk3::Frame->new(N("Detected hardware")),
+ create_scrolled_window(gtkset_size_request(my $tree = Gtk3::TreeView->new_with_model($tree_model), 350, -1), ['automatic', 'automatic'])),
+ gtkpack_(0, Gtk3::VBox->new(0, 0),
+ 1, gtkadd(my $frame = Gtk3::Frame->new(N("Information")),
+ create_scrolled_window(my $text = Gtk3::TextView->new)),
+ 0, my $module_cfg_button = gtksignal_connect(Gtk3::Button->new(N("Set current driver options")),
clicked => sub {
local $SIG{CHLD} = undef;
require modules::interactive;
modules::interactive::config_window($in, $current_device);
gtkset_mousecursor_normal();
}),
- 0, my $config_button = gtksignal_connect(Gtk2::Button->new(N("Run config tool")),
+ 0, my $config_button = gtksignal_connect(Gtk3::Button->new(N("Run config tool")),
# we've a configurator, let's add a button for it and show it
clicked => sub {
return 1 if defined $pid;
@@ -292,7 +292,7 @@ $text->set_wrap_mode('word');
$frame->set_size_request(300, 450) unless $::isEmbedded;
# $tree->set_column_auto_resize(0, 1);
my (@data, @configurators);
-$tree->append_column(my $textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::MDV::CellRendererPixWithLabel->new, 'pixbuf' => 0, label => 1));
+$tree->append_column(my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::MDV::CellRendererPixWithLabel->new, 'pixbuf' => 0, label => 1));
$tree->set_headers_visible(0);
sub fill_default_text {
@@ -373,7 +373,7 @@ $tree->get_selection->signal_connect('changed' => sub {
# show the main window earlier (so that sub dialogs can use main
# window's icon and so that no Gtk+ critical message got displayed):
$w->{rwindow}->show_all;
-my $flush_guard = Gtk2::GUI_Update_Guard->new;
+my $flush_guard = Gtk3::GUI_Update_Guard->new;
$_->hide foreach $module_cfg_button, $config_button; # hide buttons while no device
my $wait = $in->wait_message(N("Please wait"), N("Detection in progress"));
gtkflush() if !$::isEmbedded;
@@ -516,7 +516,7 @@ $textcolumn->set_min_width(350);
#$textcolumn->set_minmax_width(400);
$textcolumn->set_sizing('GTK_TREE_VIEW_COLUMN_AUTOSIZE');#GROW_ONLY
#$tree->columns_autosize();
-$tree->signal_connect(realize => sub { $tree->get_selection->select_path(Gtk2::TreePath->new_first) });
+$tree->signal_connect(realize => sub { $tree->get_selection->select_path(Gtk3::TreePath->new_first) });
{
$SIG{CHLD} = undef;
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 2c420affd..f2e9d0120 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -60,12 +60,12 @@ unless ($::isEmbedded) {
}
$my_win->{window}->signal_connect(delete_event => \&quit);
-my $cal = gtkset_sensitive(Gtk2::Calendar->new, 0);
+my $cal = gtkset_sensitive(Gtk3::Calendar->new, 0);
my $mday = (localtime(time()))[3];
$cal->select_day($mday);
my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my $cal_mode = 0;
-my $cal_butt = gtksignal_connect(Gtk2::CheckButton->new(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) });
+my $cal_butt = gtksignal_connect(Gtk3::CheckButton->new(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) });
### menus definition
# the menus are not shown
@@ -117,9 +117,9 @@ my %files = (
"explanations" => { file => "/var/log/explanations", desc => $explain_title }
);
-my $yy = gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("search")) , clicked => \&search),0);
+my $yy = gtkset_sensitive(gtksignal_connect(Gtk3::Button->new(N("search")) , clicked => \&search),0);
-my $log_text = gtktext_insert(Gtk2::TextView->new, [ [ '' ] ]);
+my $log_text = gtktext_insert(Gtk3::TextView->new, [ [ '' ] ]);
my $log_buf = $log_text->get_buffer;
my $refcount_search;
@@ -128,19 +128,19 @@ my $refcount_search;
my %toggle;
gtkadd($my_win->{window},
- gtkpack_(Gtk2::VBox->new(0,0),
+ gtkpack_(Gtk3::VBox->new(0,0),
if_(!$::isEmbedded, 0, gtknew('Title1', label => N("A tool to monitor your logs"))),
- if_(!$isFile, 0, gtkpack__(Gtk2::VBox->new(0,2),
+ if_(!$isFile, 0, gtkpack__(Gtk3::VBox->new(0,2),
gtknew('Title2', label => N("Settings")),
# N("Show lines"),
- gtkpack__(Gtk2::HBox->new(0,0),
- " " . N("Matching") . " ", my $e_yes = Gtk2::Entry->new,
- " " . N("but not matching") . " ", my $e_no = Gtk2::Entry->new
+ gtkpack__(Gtk3::HBox->new(0,0),
+ " " . N("Matching") . " ", my $e_yes = Gtk3::Entry->new,
+ " " . N("but not matching") . " ", my $e_no = Gtk3::Entry->new
),
- gtkpack_(Gtk2::HBox->new(0,0),
- 1, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Choose file")),2),
- gtkpack(gtkset_border_width(Gtk2::VBox->new(0,0),0),
- map { $toggle{$_} = gtksignal_connect(Gtk2::CheckButton->new($files{$_}{desc}),
+ gtkpack_(Gtk3::HBox->new(0,0),
+ 1, gtkadd(gtkset_border_width(Gtk3::Frame->new(N("Choose file")),2),
+ gtkpack(gtkset_border_width(Gtk3::VBox->new(0,0),0),
+ map { $toggle{$_} = gtksignal_connect(Gtk3::CheckButton->new($files{$_}{desc}),
clicked => sub {
$refcount_search++;
gtkset_sensitive($yy, $refcount_search);
@@ -150,8 +150,8 @@ gtkadd($my_win->{window},
} sort keys %files,
)
),
- 0, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Calendar")),2),
- gtkpack__(gtkset_border_width(Gtk2::VBox->new(0,0),5),
+ 0, gtkadd(gtkset_border_width(Gtk3::Frame->new(N("Calendar")),2),
+ gtkpack__(gtkset_border_width(Gtk3::VBox->new(0,0),5),
$cal_butt, $cal
)
)
@@ -162,8 +162,8 @@ gtkadd($my_win->{window},
!$isExplain ? (0, gtknew('Title2', label => N("Content of the file")),
1, create_scrolled_window($log_text)
) : (1, create_scrolled_window($log_text)),
- 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'end'), 5),
- if_(!$isFile, gtksignal_connect(Gtk2::Button->new(N("Mail alert")),
+ 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk3::HButtonBox->new, 'end'), 5),
+ if_(!$isFile, gtksignal_connect(Gtk3::Button->new(N("Mail alert")),
clicked => sub {
eval { alert_config() };
my $err = $@;
@@ -174,8 +174,8 @@ gtkadd($my_win->{window},
. "\n\n" . $err);
}
})),
- gtksignal_connect(Gtk2::Button->new(N("Save")), clicked => \&save),
- gtksignal_connect(Gtk2::Button->new($::isEmbedded ? N("Cancel") : N("Quit")), clicked => \&quit)
+ gtksignal_connect(Gtk3::Button->new(N("Save")), clicked => \&save),
+ gtksignal_connect(Gtk3::Button->new($::isEmbedded ? N("Cancel") : N("Quit")), clicked => \&quit)
)
)
);
@@ -220,10 +220,10 @@ sub parse_file {
my ($pbar, $win_pb);
unless ($::isEmbedded && $isExplain) {
local $::main_window = $my_win->{real_window};
- gtkadd($win_pb = gtkset_modal(Gtk2::Window->new('toplevel'), 1),
- gtkpack(Gtk2::VBox->new(2,0),
- Gtk2::Label->new(" " . N("please wait, parsing file: %s", $descr) . " "),
- $pbar = Gtk2::ProgressBar->new
+ gtkadd($win_pb = gtkset_modal(Gtk3::Window->new('toplevel'), 1),
+ gtkpack(Gtk3::VBox->new(2,0),
+ Gtk3::Label->new(" " . N("please wait, parsing file: %s", $descr) . " "),
+ $pbar = Gtk3::ProgressBar->new
)
);
$win_pb->set_transient_for($my_win->{real_window});
@@ -355,7 +355,7 @@ sub logcolorize {
}
-# log_output (Gtk2::TextView, [ [ ... ] ])
+# log_output (Gtk3::TextView, [ [ ... ] ])
sub log_output {
my ($text, $font, $col) = @_;
my $tag = join('', $font, $col);