summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-06 17:58:22 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-06 17:58:22 +0000
commit8bcf945dbec5accd4011940ad8a166d19145d8f1 (patch)
tree72c8130c0d87712fe58ddd132a5e8fe696feeda1 /perl-install
parent392ecc12d323eae88def56281938b3ca13009de1 (diff)
downloaddrakx-8bcf945dbec5accd4011940ad8a166d19145d8f1.tar
drakx-8bcf945dbec5accd4011940ad8a166d19145d8f1.tar.gz
drakx-8bcf945dbec5accd4011940ad8a166d19145d8f1.tar.bz2
drakx-8bcf945dbec5accd4011940ad8a166d19145d8f1.tar.xz
drakx-8bcf945dbec5accd4011940ad8a166d19145d8f1.zip
increase gui coherency of drakxtools vs other gtk+ apps: use stock icons
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/diskdrake/hd_gtk.pm2
-rw-r--r--perl-install/drakxtools.spec5
-rw-r--r--perl-install/interactive/gtk.pm6
-rw-r--r--perl-install/services.pm2
-rwxr-xr-xperl-install/standalone/drakbug4
-rwxr-xr-xperl-install/standalone/drakgw2
-rwxr-xr-xperl-install/standalone/drakperm4
-rwxr-xr-xperl-install/standalone/harddrake22
-rwxr-xr-xperl-install/standalone/mousedrake4
-rw-r--r--perl-install/ugtk2.pm24
10 files changed, 29 insertions, 26 deletions
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index 82fe1964a..f7575b7c6 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -152,7 +152,7 @@ sub general_action_box {
my ($box, $nowizard, $interactive_help) = @_;
$_->widget->destroy foreach $box->children;
- gtkadd($box, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => $interactive_help)) if $interactive_help;
+ gtkadd($box, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => $interactive_help)) if $interactive_help;
my @actions = (if_($::isInstall && !$nowizard, N_("Wizard")),
diskdrake::interactive::general_possible_actions($in, $all_hds),
diff --git a/perl-install/drakxtools.spec b/perl-install/drakxtools.spec
index ff306d95f..ec8c71bb9 100644
--- a/perl-install/drakxtools.spec
+++ b/perl-install/drakxtools.spec
@@ -1,7 +1,7 @@
Summary: The drakxtools (XFdrake, diskdrake, keyboarddrake, mousedrake...)
Name: drakxtools
Version: 9.2
-Release: 0.8mdk
+Release: 0.9mdk
Url: http://www.mandrakelinux.com/en/drakx.php2
Source0: %name-%version.tar.bz2
License: GPL
@@ -312,6 +312,9 @@ file /etc/sysconfig/harddrake2/previous_hw | fgrep -q perl && %_datadir/harddrak
%config(noreplace) %_sysconfdir/logrotate.d/drakxtools-http
%changelog
+* Sat Jul 5 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 9.2-0.9mdk
+- increase gui coherency of drakxtools vs other gtk+ apps: use stock icons
+
* Tue Jul 1 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 9.2-0.8mdk
- drakbackup: try to better fit gui when embedded (fix #4111) (stew)
- drakTermServ: enable local client hardware configuration (stew)
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index d2effe1ee..f3af1e0b9 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -419,7 +419,7 @@ sub ask_fromW {
if ($e->{image}) {
$w = gtkadd(Gtk2::CheckButton->new, gtkshow(gtkcreate_img($e->{image})));
} else {
- $w = Gtk2::CheckButton->new($e->{text});
+ $w = Gtk2::CheckButton->new_from_stock($e->{text});
}
$w->signal_connect(clicked => $changed);
$set = sub { $w->set_active($_[0]) };
@@ -489,7 +489,7 @@ sub ask_fromW {
%buttons = map {
my $action = $_;
- $action => gtksignal_connect(Gtk2::Button->new(translate($action)),
+ $action => gtksignal_connect(Gtk2::Button->new_from_stock(translate($action)),
clicked => sub { $do_action->($action) });
} @actions;
$real_w = gtkpack_(Gtk2::HBox->new(0,0),
@@ -649,7 +649,7 @@ sub ask_fromW {
1, $create_widgets->($advanced_total_size, @widgets_advanced));
my @help = if_($common->{interactive_help},
- [ N("Help"), sub {
+ [ 'gtk-help', sub {
my $message = $common->{interactive_help}->() or return;
$o->ask_warn(N("Help"), $message);
}, 1 ]);
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 7e5850d6a..166259b7c 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -216,7 +216,7 @@ sub ask_standalone_gtk {
my ($started, $action) = $update_service->($service, gtkset_justify($l, 'left'));
[ gtkpack__(Gtk2::HBox->new(0,0), $_),
gtkpack__(Gtk2::HBox->new(0,0), $l),
- gtkpack__(Gtk2::HBox->new(0,0), gtksignal_connect(Gtk2::Button->new(N("Info")), clicked => sub { $display->($infos) })),
+ gtkpack__(Gtk2::HBox->new(0,0), gtksignal_connect(Gtk2::Button->new_from_stock('gtk-dialog-info'), clicked => sub { $display->($infos) })),
gtkpack__(Gtk2::HBox->new(0,0), gtkset_active(gtksignal_connect(
Gtk2::CheckButton->new(N("On boot")),
clicked => sub { if ($_[0]->active) {
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index a18606d74..d8801f32b 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -81,7 +81,7 @@ gtkadd(
),
gtkpack(new Gtk2::HSeparator),
gtkpack_(Gtk2::HBox->new(0,0),
- 0, gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { ugtk2->exit(0) }),
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-close'), clicked => sub { ugtk2->exit(0) }),
1, Gtk2::Label->new(""),
0, gtksignal_connect(Gtk2::Button->new(N("Report")), clicked => sub {
my $options = "mdkbugreport=1";
@@ -95,7 +95,7 @@ gtkadd(
connect_bugzilla($bugzilla_url."?".$options);
}
),
- 0, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { system("drakhelp https://qa.mandrakesoft.com &") }),
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub { system("drakhelp https://qa.mandrakesoft.com &") }),
),
),
);
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index c6aec5358..96a9b5b01 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -565,7 +565,7 @@ Click on Configure to launch the setup wizard.", $setup_state));
ugtk2->exit(0);
});
$bbox1->add($button_conf);
- my $button_cancel = Gtk2::Button->new(N("Cancel"));
+ my $button_cancel = Gtk2::Button->new_from_stock('gtk-cancel');
$button_cancel->signal_connect(clicked => sub { ugtk2->exit(0) });
$bbox1->add($button_cancel);
$window1->{rwindow}->show_all;
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index 166eea7bc..3a9c27205 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -135,8 +135,8 @@ $W->add(gtkpack_(Gtk2::VBox->new(0,5),
[ N("delete"), N("Delete selected rule"), \&del_callback ],
[ N("edit"), N("Edit current rule"), \&edit_callback ])),
0, gtkpack(Gtk2::HBox->new(0, 5),
- gtksignal_connect(Gtk2::Button->new(N("Save")), clicked => \&save_perm),
- gtksignal_connect(Gtk2::Button->new(N("Quit")), clicked => sub { ugtk2->exit })
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => \&save_perm),
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub { ugtk2->exit })
)
)
)
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 49ecbec4c..361f58249 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -178,7 +178,7 @@ $w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0),
),
0, $statusbar = Gtk2::Statusbar->new,
if_($::isEmbedded, 0, gtkpack(create_hbox(),
- gtksignal_connect(Gtk2::Button->new(N("Options")), 'event' => popup_menu($opt_menu), $menubar),
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-preferences'), 'event' => popup_menu($opt_menu), $menubar),
gtksignal_connect(Gtk2::Button->new(N("Help")), 'event' => popup_menu($help_menu), $menubar),
gtksignal_connect(Gtk2::Button->new(N("Quit")),
'clicked' => \&quit_global),
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index a774eeb9f..935d0db6c 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -73,8 +73,8 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
Gtk2::Label->new(N("Please test your mouse:")),
my $test_hbox = Gtk2::HBox->new(0, 5),
gtkpack(create_hbox(),
- gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { $w->{retval} = 1; Gtk2->main_quit }),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))));
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub { $w->{retval} = 1; Gtk2->main_quit }),
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))));
mouse::test_mouse_standalone($mouse, $test_hbox);
$w->main or goto begin;
}
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index e98985f08..d5409bdbd 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -369,14 +369,14 @@ sub create_dialog {
$dialog->vbox->pack_start(create_scrolled_window($text, [ 'never', 'automatic' ]), 1, 1, 0);
$text->set_line_wrap(1);
- my $button = Gtk2::Button->new(N("OK"));
+ my $button = Gtk2::Button->new_from_stock('gtk-ok');
$button->can_default(1);
$button->signal_connect(clicked => sub { $ret = 1; $dialog->destroy; Gtk2->main_quit });
$dialog->action_area->pack_start($button, 1, 1, 0);
$button->grab_default;
if ($o_options->{cancel}) {
- my $button2 = Gtk2::Button->new(N("Cancel"));
+ my $button2 = Gtk2::Button->new_from_stock('gtk-cancel');
$button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit });
$button2->can_default(1);
$dialog->action_area->pack_start($button2, 1, 1, 0);
@@ -452,15 +452,15 @@ sub create_packtable {
sub create_okcancel {
my ($w, $o_ok, $o_cancel, $o_spread, @other) = @_;
my $wizard_buttons = $::isWizard && !$w->{pop_it};
- my $cancel = defined $o_cancel || defined $o_ok ? $o_cancel : $wizard_buttons ? N("<- Previous") : N("Cancel");
- my $ok = defined $o_ok ? $o_ok : $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : N("Ok");
- my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit });
- my $b2 = $cancel && gtksignal_connect($w->{cancel} = Gtk2::Button->new($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit });
- gtksignal_connect($w->{wizcancel} = Gtk2::Button->new(N("Cancel")), clicked => sub { die 'wizcancel' }) if $wizard_buttons && !$::isInstall;
+ my $cancel = defined $o_cancel || defined $o_ok ? $o_cancel : $wizard_buttons ? N("<- Previous") : 'gtk-cancel';
+ my $ok = defined $o_ok ? $o_ok : $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : 'gtk-ok';
+ my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new_from_stock($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit });
+ my $b2 = $cancel && gtksignal_connect($w->{cancel} = Gtk2::Button->new_from_stock($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit });
+ gtksignal_connect($w->{wizcancel} = Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub { die 'wizcancel' }) if $wizard_buttons && !$::isInstall;
my @l = grep { $_ } $wizard_buttons ? (if_(!$::isInstall, $w->{wizcancel}),
if_(!$::Wizard_no_previous, $b2), $b1) : ($b1, $b2);
- my @l2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } grep { $_->[2] } @other;
- my @r2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } grep { !$_->[2] } @other;
+ my @l2 = map { gtksignal_connect(Gtk2::Button->new_from_stock($_->[0]), clicked => $_->[1]) } grep { $_->[2] } @other;
+ my @r2 = map { gtksignal_connect(Gtk2::Button->new_from_stock($_->[0]), clicked => $_->[1]) } grep { !$_->[2] } @other;
my $box = create_hbox($o_spread || "edge");
@@ -983,7 +983,7 @@ sub _ask_warn($@) {
my ($o, @msgs) = @_;
gtkadd($o->{window},
gtkpack($o->create_box_with_title(@msgs),
- gtksignal_connect(my $w = Gtk2::Button->new(N("Ok")), "clicked" => sub { Gtk2->main_quit }),
+ gtksignal_connect(my $w = Gtk2::Button->new_from_stock('gtk-ok'), "clicked" => sub { Gtk2->main_quit }),
),
);
$w->grab_focus;
@@ -1058,7 +1058,7 @@ sub ask_browse_tree_info {
@l = reverse @l if !$::isInstall;
my @buttons = map {
my ($t, $val) = @$_;
- $box2->pack_end(my $w = gtksignal_connect(Gtk2::Button->new($t), clicked => sub {
+ $box2->pack_end(my $w = gtksignal_connect(Gtk2::Button->new_from_stock($t), clicked => sub {
$w->{retval} = $val;
Gtk2->main_quit;
}), 0, 1, 20);
@@ -1066,7 +1066,7 @@ sub ask_browse_tree_info {
} @l;
@buttons = reverse @buttons if !$::isInstall;
- gtkpack__($box2, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub {
+ gtkpack__($box2, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
ask_warn(N("Help"), $common->{interactive_help}->())
})) if $common->{interactive_help};