From 46019a7fdc84cf3dfde4a3a95292af2b7899be58 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 17 Feb 2010 21:51:59 +0000 Subject: updated (cleaned) GUI diff --git a/rhimport.glade b/rhimport.glade index 5743022..999ac1a 100644 --- a/rhimport.glade +++ b/rhimport.glade @@ -3,9 +3,15 @@ - rhimport + 640 + 480 + True + 5 + rhimport + center + 1 - + True 0 none @@ -22,9 +28,10 @@ vertical 4 - + True - <b>Dropbox</b> + False + <b>Dropbox</b> True @@ -42,9 +49,10 @@ - + True - <b>Playlist</b> + False + <b>Playlist</b> True @@ -53,7 +61,7 @@ - + True vertical @@ -79,6 +87,7 @@ True + False False @@ -99,7 +108,7 @@ gtk-cancel - 120 + 130 True True True @@ -113,7 +122,7 @@ gtk-ok - 120 + 130 True True True @@ -135,9 +144,9 @@ - + True - <b>rhimport - Radio Helsinki Importtool</b> + <big><b>rhimport - Radio Helsinki Importtool</b></big> True diff --git a/rhimport.pl b/rhimport.pl index 8f8a4ed..5c3b2ca 100755 --- a/rhimport.pl +++ b/rhimport.pl @@ -40,37 +40,42 @@ EOF my $user = 'martinland';#$ENV{'USER'}; $user or die "Username not found in environment"; -my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr"; +# my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr"; -my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;}; +# my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;}; -my $sth = $dbh->prepare($sql); -$sth->execute(); +# my $sth = $dbh->prepare($sql); +# $sth->execute(); my @allowed_dbs; -while(my ($group, $path) = $sth->fetchrow_array()) { - $path =~ s/\/\*$//; - my $perm = {}; - $perm->{'GROUP'} = $group; - $perm->{'PATH'} = $path; - push @allowed_dbs, $perm; -} -$sth->finish(); +# while(my ($group, $path) = $sth->fetchrow_array()) { +# $path =~ s/\/\*$//; +# my $perm = {}; +# $perm->{'GROUP'} = $group; +# $perm->{'PATH'} = $path; +# push @allowed_dbs, $perm; +# } +# $sth->finish(); if($LISTALLOWED) { for my $href ( @allowed_dbs ) { print "$href->{'PATH'}\n"; } - $dbh->disconnect(); +# $dbh->disconnect(); exit 0; } ## GUI mode if(!$M3U) { - my $gui = Gtk2::GladeXML->new('rhimport.glade'); + my $guixml = Gtk2::GladeXML->new('rhimport.glade'); + $guixml or die "can't load glade xml file"; +# my $widget = $guixml->get_widget('appwin'); +# $widget or die "can't find main GUI Widget"; + Gtk2->main; +# $dbh->disconnect(); exit 0; } @@ -83,5 +88,5 @@ if($DONTCONCAT) { print "Will import $M3U (concatenated), with user $user\n\n"; } -$dbh->disconnect(); +# $dbh->disconnect(); exit 0; -- cgit v0.10.2