summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-18 02:45:58 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-12-20 10:25:03 +0100
commit37f3b1c36446f1ec88293cfc0be1d41b6d627bb8 (patch)
tree8315f3fba7b8209c267b591b7ab2c62775d420b7
parentaa44065fd26b2785b8ac67b2d99b1ecb4c97c04d (diff)
downloadcontrol-center-37f3b1c36446f1ec88293cfc0be1d41b6d627bb8.tar
control-center-37f3b1c36446f1ec88293cfc0be1d41b6d627bb8.tar.gz
control-center-37f3b1c36446f1ec88293cfc0be1d41b6d627bb8.tar.bz2
control-center-37f3b1c36446f1ec88293cfc0be1d41b6d627bb8.tar.xz
control-center-37f3b1c36446f1ec88293cfc0be1d41b6d627bb8.zip
use (my|u)gtk3 instead of *tk2
-rwxr-xr-xcontrol-center30
-rwxr-xr-xdrakconsole8
-rwxr-xr-xmdkwebadmin.pl6
-rwxr-xr-xmenus_launcher.pl10
4 files changed, 27 insertions, 27 deletions
diff --git a/control-center b/control-center
index 83fa92ad..4baaebd4 100755
--- a/control-center
+++ b/control-center
@@ -36,8 +36,8 @@ POSIX::sigprocmask(SIG_BLOCK, POSIX::SigSet->new(SIGCHLD));
# i18n: IMPORTANT: to get correct namespace (drakconf instead of libDrakX)
BEGIN { unshift @::textdomains, 'drakconf' }
-use mygtk2 qw(gtknew);
-use ugtk2 qw(:create :dialogs :helpers :wrappers);
+use mygtk3 qw(gtknew);
+use ugtk3 qw(:create :dialogs :helpers :wrappers);
use Gtk2::WebKit;
use MDV::Control_Center;
@@ -86,7 +86,7 @@ foreach (@ARGV) {
add_icon_path("$themes_dir/$theme/");
add_icon_path("$themes_dir/default") if $theme ne 'default'; # fall back if theme miss some icons
-mygtk2::import_style_ressources();
+mygtk3::import_style_ressources();
my $rc = find { -r $_ } ("$themes_dir/$theme/gtkrc", if_($theme ne 'default', "$themes_dir/default/gtkrc"));
Gtk2::Rc->parse($rc) if -r $rc;
@@ -582,8 +582,8 @@ if (scalar glob_("$more_wizard_dir/*.conf")) {
# let build the GUI
-my $align = mygtk2::text_direction_rtl() ? "right" : "left";
-my $align2 = mygtk2::text_direction_rtl() ? "right" : "left";
+my $align = mygtk3::text_direction_rtl() ? "right" : "left";
+my $align2 = mygtk3::text_direction_rtl() ? "right" : "left";
# main window :
@@ -593,7 +593,7 @@ my ($timeout, %check_boxes, $emb_socket);
# set default size:
my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), $min_width, $min_height);
-mygtk2::register_main_window($window_global);
+mygtk3::register_main_window($window_global);
if ($geometry) {
@h{qw(HEIGTH WIDTH)} = $geometry =~ /(\d+)x(\d+)/;
@@ -844,7 +844,7 @@ sub build_widget_element {
};
# FIX ME: DO THIS AGAIN:
$tool_feedback{$label} = sub {}; #sub { $event_box->window && $event_box->window->set_cursor($hand_cursor) };
- my $real_icon = $icon ? '<IMG SRC="' . mygtk2::_find_imgfile($icon) . '">' : '';
+ my $real_icon = $icon ? '<IMG SRC="' . mygtk3::_find_imgfile($icon) . '">' : '';
my @widgets = (
qq(<TD class="img">$real_icon</TD>),
qq(<TD style="text-align: $align"><DIV>)
@@ -879,8 +879,8 @@ foreach (@tree) {
my $my_index = $index++;
- my $square_icon_uri = mygtk2::_find_imgfile('cadre-ic');
- my $back_img = mygtk2::_find_imgfile('right-white-background_right_part_768.png');
+ my $square_icon_uri = mygtk3::_find_imgfile('cadre-ic');
+ my $back_img = mygtk3::_find_imgfile('right-white-background_right_part_768.png');
my $string = join("\n", qq(<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -933,7 +933,7 @@ foreach (@tree) {
margin-right: 10px;
}
),
- if_(mygtk2::text_direction_rtl(), " a { direction: rtl; unicode-bidi: embed }"), qq(
+ if_(mygtk3::text_direction_rtl(), " a { direction: rtl; unicode-bidi: embed }"), qq(
a:link {color:black; text-decoration:none }
a:visited {color:black; text-decoration:none }
a:hover {color:grey }
@@ -951,14 +951,14 @@ foreach (@tree) {
my $section;
foreach my $subtree (@subtrees) {
$string .= $section++ ? "<hr NOSHADE>\n" : '<div ID="top_margin"></div>';
- my $title = mygtk2::asteriskize($subtree->{title});
+ my $title = mygtk3::asteriskize($subtree->{title});
$string .= qq(
<div ID="title">$title</div>
<TABLE BORDER=0 WIDTH="100%" ID="block">
);
if (@{$subtree->{list}} % 2) {
my @widgets = (pop @{$subtree->{list}}, "");
- @widgets = reverse @widgets if mygtk2::text_direction_rtl();
+ @widgets = reverse @widgets if mygtk3::text_direction_rtl();
push @{$subtree->{list}}, @widgets;
}
$string .= join("\n",
@@ -1065,7 +1065,7 @@ $wait_darea->signal_connect(expose_event => sub {
return unless $run_pixbuf; # some people got an expose event before we start an embedded tool
return unless $wait_darea->{size};
$wait_darea->{layout} ||= $wait_darea->create_pango_layout(N("Loading... Please wait"));
- my $pixbuf = $run_pixbufs{$run_counter} ||= mygtk2::_pixbuf_render_alpha($run_pixbuf, $run_counter);
+ my $pixbuf = $run_pixbufs{$run_counter} ||= mygtk3::_pixbuf_render_alpha($run_pixbuf, $run_counter);
if (!$wait_darea->{first_expose}) {
$wait_darea->{first_expose} = 1;
my $size = $wait_darea->{size};
@@ -1331,7 +1331,7 @@ sub kill_logdrake() {
}
sub quit_global() {
- return 1 if mygtk2::quit_popup();
+ return 1 if mygtk3::quit_popup();
if (@pid_launched) {
&kill_children();
@@ -1557,7 +1557,7 @@ sub create_packtable2 {
sub render_shiner {
my ($pixbuf, $shine_value) = @_;
- my $new_pixbuf = (mygtk2::_new_alpha_pixbuf($pixbuf))[2];
+ my $new_pixbuf = (mygtk3::_new_alpha_pixbuf($pixbuf))[2];
$pixbuf->saturate_and_pixelate($new_pixbuf, $shine_value, 0);
$new_pixbuf;
}
diff --git a/drakconsole b/drakconsole
index 46d66ee0..49e004cb 100755
--- a/drakconsole
+++ b/drakconsole
@@ -21,15 +21,15 @@ use lib qw(/usr/lib/libDrakX);
use common;
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
-use ugtk2 qw(:create :wrappers);
+use ugtk3 qw(:create :wrappers);
use Gnome2::Vte;
-my $w = ugtk2->new(N("DrakConsole"));
+my $w = ugtk3->new(N("DrakConsole"));
$w->{rwindow}->add(gtkpack_(Gtk2::VBox->new(0, 0),
- 1, my $vte = gtksignal_connect(Gnome2::Vte::Terminal->new, 'child-exited' => sub { ugtk2->exit }),
+ 1, my $vte = gtksignal_connect(Gnome2::Vte::Terminal->new, 'child-exited' => sub { ugtk3->exit }),
0, gtkpack__(create_hbox('end'), gtksignal_connect(Gtk2::Button->new(N("Close")),
- clicked => sub { ugtk2->exit })
+ clicked => sub { ugtk3->exit })
)
),
);
diff --git a/mdkwebadmin.pl b/mdkwebadmin.pl
index 883cf04f..85959189 100755
--- a/mdkwebadmin.pl
+++ b/mdkwebadmin.pl
@@ -23,7 +23,7 @@
use strict;
use lib qw(/usr/lib/libDrakX);
use standalone;
-use ugtk2 qw(:all);
+use ugtk3 qw(:all);
use common;
my ($ent, $link);
@@ -32,7 +32,7 @@ my ($opt) = @ARGV;
@ARGV == 1 && ($opt eq '--direct' || $opt eq '--link') or exit(1);
$opt eq '--direct' and exec "$execbin";
-my $w = ugtk2->new('mdkwebadmin.pl');
+my $w = ugtk3->new('mdkwebadmin.pl');
unless ($::isEmbedded) {
$w->{rwindow}->set_title(N("Connect to remote Site"));
$w->{window}->set_border_width(5);
@@ -52,4 +52,4 @@ gtkadd($w->{window},
$w->{window}->show_all;
$w->main;
-sub quit() { ugtk2->exit(0) }
+sub quit() { ugtk3->exit(0) }
diff --git a/menus_launcher.pl b/menus_launcher.pl
index ae92b2c2..3d0bf852 100755
--- a/menus_launcher.pl
+++ b/menus_launcher.pl
@@ -5,7 +5,7 @@ use lib qw(/usr/lib/libDrakX);
use common;
# i18n : IMPORTANT to get correct namespace (drakconf instead of libDrakX)
BEGIN { unshift @::textdomains, 'drakconf' }
-use ugtk2 qw(:helpers :wrappers);
+use ugtk3 qw(:helpers :wrappers);
use interactive;
use standalone;
@@ -15,10 +15,10 @@ sub gtkcan_default {
}
my $bindir = "/usr/bin/";
-my $my_win = ugtk2->new('print_launcher');
+my $my_win = ugtk3->new('print_launcher');
$my_win->{rwindow}->set_title(N("Menu Configuration Center")) unless $::isEmbedded;
$my_win->{window}->signal_connect(delete_event => sub {
- ugtk2->exit(0);
+ ugtk3->exit(0);
});
my $table = Gtk2::Table->new(3, 2, 0);
$table->set_border_width(5);
@@ -42,7 +42,7 @@ $my_win->{window}->add(gtkpack(Gtk2::VBox->new(0, 0),
$table,
Gtk2::HSeparator->new,
gtkpack(gtkset_layout(Gtk2::HButtonBox->new, 'end'),
- gtkcan_default(gtksignal_connect(Gtk2::Button->new_from_stock('gtk-close'), clicked => sub { ugtk2->exit(0) }), 1)
+ gtkcan_default(gtksignal_connect(Gtk2::Button->new_from_stock('gtk-close'), clicked => sub { ugtk3->exit(0) }), 1)
),
),
);
@@ -50,4 +50,4 @@ $my_win->{window}->add(gtkpack(Gtk2::VBox->new(0, 0),
$my_win->{window}->show_all;
$my_win->main;
-ugtk2->exit(0);
+ugtk3->exit(0);