mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 00:53:23 -05:00
Added "changed" signal in entry(). No more need to press [enter].
This commit is contained in:
parent
7c27f6e03f
commit
55f63cda7b
32
gBootRoot
32
gBootRoot
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# gBootRoot Copyright (C) 2000
|
# gBootRoot Copyright (C) 2000
|
||||||
# Project Developer and Coordinator
|
# Project Developer and Coordinator
|
||||||
# Jonathan Rosenbaum <mttrader@access.mountain.net>
|
# Jonathan Rosenbaum <mttrader@access.mountain.net>
|
||||||
#
|
#
|
||||||
# Lead Programmer and Developer
|
# Lead Programmer and Developer
|
||||||
# Cristian Ionescu-Idbohrn <cii@axis.com>
|
# Cristian Ionescu-Idbohrn <cii@axis.com>
|
||||||
@ -241,7 +241,7 @@ $box1->show();
|
|||||||
|
|
||||||
# First row
|
# First row
|
||||||
hbox();
|
hbox();
|
||||||
my $entry = entry($false);
|
my $entry = entry($false,0);
|
||||||
|
|
||||||
# Menu - later this may be improved if new methods are added.
|
# Menu - later this may be improved if new methods are added.
|
||||||
my $opt = new Gtk::OptionMenu();
|
my $opt = new Gtk::OptionMenu();
|
||||||
@ -450,12 +450,14 @@ sub advanced_section {
|
|||||||
if ($button_count == 0) {
|
if ($button_count == 0) {
|
||||||
#$vbox_advanced->set_usize(321,300);
|
#$vbox_advanced->set_usize(321,300);
|
||||||
my $boolean;
|
my $boolean;
|
||||||
|
|
||||||
# Will use a table once things start to take shape.
|
# Will use a table once things start to take shape.
|
||||||
|
|
||||||
# The strip section
|
# The strip section
|
||||||
hbox_advanced(); $ha1 = $hbox_advanced;
|
hbox_advanced(); $ha1 = $hbox_advanced;
|
||||||
label_advanced("Stripping:");
|
label_advanced("Stripping:");
|
||||||
!defined $lib_strip_check ? ($boolean = 1)
|
|
||||||
|
!defined $lib_strip_check ? ($boolean = 1)
|
||||||
: ($boolean = $lib_strip_check->get_active());
|
: ($boolean = $lib_strip_check->get_active());
|
||||||
$lib_strip_check = new Gtk::CheckButton("Libraries");
|
$lib_strip_check = new Gtk::CheckButton("Libraries");
|
||||||
$lib_strip_check->set_active($boolean);
|
$lib_strip_check->set_active($boolean);
|
||||||
@ -484,6 +486,7 @@ sub advanced_section {
|
|||||||
#hbox_advanced(); $ha2 = $hbox_advanced;
|
#hbox_advanced(); $ha2 = $hbox_advanced;
|
||||||
#label_advanced("Verbosity Level: \"Coming Soon!\"");
|
#label_advanced("Verbosity Level: \"Coming Soon!\"");
|
||||||
|
|
||||||
|
|
||||||
$button_count++;
|
$button_count++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -499,9 +502,9 @@ sub advanced_section {
|
|||||||
|
|
||||||
sub separator_advanced {
|
sub separator_advanced {
|
||||||
|
|
||||||
$separator_advanced = new Gtk::HSeparator();
|
$separator_advanced = new Gtk::HSeparator();
|
||||||
$vbox_advanced->pack_start( $separator_advanced, $false, $true, 0 );
|
$vbox_advanced->pack_start( $separator_advanced, $false, $true, 0 );
|
||||||
$separator_advanced->show();
|
$separator_advanced->show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,10 +728,16 @@ sub entry {
|
|||||||
my($edit,$num) = @_;
|
my($edit,$num) = @_;
|
||||||
|
|
||||||
my $entry = new Gtk::Entry();
|
my $entry = new Gtk::Entry();
|
||||||
$entry->set_editable( $edit );
|
$entry->set_editable( $true );
|
||||||
# enter will have to be pressed, tried other solutions with a mess
|
|
||||||
$entry->signal_connect( "activate", sub {
|
if ($num == 0) {
|
||||||
$container[$num] = $entry->get_text();});
|
$entry->signal_connect( "activate", sub {
|
||||||
|
$container[$num] = $entry->get_text(); });
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$entry->signal_connect( "changed", sub {
|
||||||
|
$container[$num] = $entry->get_text(); });
|
||||||
|
}
|
||||||
if (defined $num) {
|
if (defined $num) {
|
||||||
my $todo;
|
my $todo;
|
||||||
if ($num == 1) {
|
if ($num == 1) {
|
||||||
@ -741,7 +750,7 @@ sub entry {
|
|||||||
$todo = "the Device to use";
|
$todo = "the Device to use";
|
||||||
}
|
}
|
||||||
$tooltips->set_tip( $entry,
|
$tooltips->set_tip( $entry,
|
||||||
"Type in the location of $todo and press [Enter].", "" );
|
"Type in the location of $todo.", "" );
|
||||||
}
|
}
|
||||||
$box2->pack_start( $entry, $true, $true, 0 );
|
$box2->pack_start( $entry, $true, $true, 0 );
|
||||||
$entry->show();
|
$entry->show();
|
||||||
@ -843,6 +852,7 @@ elsif (defined $container[0] && defined $container[1] &&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# kernel value can change without effecting initrd
|
# kernel value can change without effecting initrd
|
||||||
# no sense doing this until important stuff is filled in
|
# no sense doing this until important stuff is filled in
|
||||||
if (defined $kernel && defined $root_image &&
|
if (defined $kernel && defined $root_image &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user