summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-29 14:13:47 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-29 14:13:47 +0000
commitec5cc80aff948eceee5b322bc19cf3e4e65a7c3a (patch)
treeb351a5b996899f440d24f6f04fab18f9d8a57efb /perl-install/my_gtk.pm
parent59d92e68854412a0ad81ec287e6c44a583bce140 (diff)
downloaddrakx-ec5cc80aff948eceee5b322bc19cf3e4e65a7c3a.tar
drakx-ec5cc80aff948eceee5b322bc19cf3e4e65a7c3a.tar.gz
drakx-ec5cc80aff948eceee5b322bc19cf3e4e65a7c3a.tar.bz2
drakx-ec5cc80aff948eceee5b322bc19cf3e4e65a7c3a.tar.xz
drakx-ec5cc80aff948eceee5b322bc19cf3e4e65a7c3a.zip
no_comment
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index a102ab1f6..b11dd3a3f 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -7,7 +7,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $border);
@ISA = qw(Exporter);
%EXPORT_TAGS = (
helpers => [ qw(create_okcancel createScrolledWindow create_menu create_notebook create_packtable create_hbox create_vbox create_adjustment create_box_with_title) ],
- wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_background gtkset_default_fontset) ],
+ wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_background gtkset_default_fontset) ],
ask => [ qw(ask_warn ask_okcancel ask_yesorno ask_from_entry ask_from_list ask_file) ],
);
$EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ];
@@ -90,13 +90,11 @@ sub gtksignal_connect($@) {
}
sub gtkpack($@) {
my $box = shift;
- foreach (@_) {
- my $l = $_;
- ref $l or $l = new Gtk::Label($l);
- $box->pack_start($l, 1, 1, 0);
- $l->show;
- }
- $box
+ gtkpack_($box, map { 1, $_} @_);
+}
+sub gtkpack__($@) {
+ my $box = shift;
+ gtkpack_($box, map { 0, $_} @_);
}
sub gtkpack_($@) {
my $box = shift;
@@ -318,7 +316,9 @@ sub _create_window($$) {
}
$w->set_title($title);
- $w->signal_connect("expose_event" => sub { c::XSetInputFocus($w->window->XWINDOW) }) if $my_gtk::force_focus || $o->{force_focus};
+
+ $w->signal_connect("map_event" => sub { c::XSetInputFocus($w->window->XWINDOW); })
+ if $my_gtk::force_focus || $o->{force_focus};
$w->signal_connect("delete_event" => sub { $o->{retval} = undef; Gtk->main_quit });
$w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position};