summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakdvb
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-01-21 10:54:29 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-01-21 10:54:29 +0000
commit9ced6b2a11727ae7f004e16262e3f64617c35f08 (patch)
tree94517bab12ac1179c91be2b988f0827e5153617e /perl-install/standalone/drakdvb
parent60830a9953cbf89b9e5aed8ac2a29c117533c1a7 (diff)
downloaddrakx-9ced6b2a11727ae7f004e16262e3f64617c35f08.tar
drakx-9ced6b2a11727ae7f004e16262e3f64617c35f08.tar.gz
drakx-9ced6b2a11727ae7f004e16262e3f64617c35f08.tar.bz2
drakx-9ced6b2a11727ae7f004e16262e3f64617c35f08.tar.xz
drakx-9ced6b2a11727ae7f004e16262e3f64617c35f08.zip
Drop () only for display, and fix double click on channel
Diffstat (limited to 'perl-install/standalone/drakdvb')
-rw-r--r--perl-install/standalone/drakdvb13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb
index 9a5a0ef0a..e98f35e7d 100644
--- a/perl-install/standalone/drakdvb
+++ b/perl-install/standalone/drakdvb
@@ -35,12 +35,12 @@ my $in = 'interactive'->vnew;
my $config_file = "$ENV{HOME}/.mplayer/channels.conf";
-my $channel_list = Gtk2::SimpleList->new(N("Channel")=> "text");
+my $channel_list = Gtk2::SimpleList->new(N("Channel")=> "text", "id" => "hidden");
my %buttons;
sub get_selected_channel() {
my ($index) = $channel_list->get_selected_indices;
- defined $index && $channel_list->{data}[$index][0];
+ defined $index && $channel_list->{data}[$index][1];
}
sub detect_channels {
@@ -65,8 +65,8 @@ sub load_channels {
open(CHANNELCONF, "<$config_file");
while(<CHANNELCONF>) {
my($line) = $_;
- if ($line =~ /^([^:]*)(\([^(:]*\))?:/) {
- push @{$channel_list->{data}}, $1;
+ if ($line =~ /^([^:]*?)(\([^(:]*\))?:/) {
+ push @{$channel_list->{data}}, [$1, $1.$2];
}
}
close(CHANNELCONF);
@@ -94,13 +94,16 @@ gtkadd($w->{window},
);
$buttons{view}->set_sensitive(0);
+
$channel_list->get_selection->signal_connect('changed' => sub {
my ($index) = $channel_list->get_selected_indices;
$buttons{view}->set_sensitive(defined $index);
});
-$channel_list->signal_connect('activated' => sub {
+
+$channel_list->signal_connect('row-activated' => sub {
launch_tv();
});
+
load_channels();
$w->main;