summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-03-25 18:17:47 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-03-25 18:17:47 (GMT)
commitf01b5c68ff71034cdc179739f42875dde9d99dee (patch)
tree3ed7245ddcf1d465330f355da5eee551a2efda61 /rhimport
parent7987c5d0d6fe9b37501b0bbbe241beca8b3d0c40 (diff)
automatic selection of pool vs show mode based on selected dropbox
Diffstat (limited to 'rhimport')
-rwxr-xr-xrhimport18
1 files changed, 11 insertions, 7 deletions
diff --git a/rhimport b/rhimport
index 3b828bc..c28d013 100755
--- a/rhimport
+++ b/rhimport
@@ -252,7 +252,16 @@ sub dropbox_updated_gui()
exit 0;
}
-
+ my $co_dropbox = $guixml->get_widget('co_dropbox');
+ my $to_cart = $allowed_dbs[$co_dropbox->get_active]->{'TO_CART'};
+ my $group = $allowed_dbs[$co_dropbox->get_active]->{'GROUP'};
+ my ($low_cart, $high_cart) = rhimport::get_cart_range($dbh, $group);
+
+ if($to_cart == 0) {
+ set_mode_playlist_gui();
+ } else {
+ set_mode_file_gui();
+ }
}
if(!$FILE || !$DROPBOX) {
@@ -272,6 +281,7 @@ if(!$FILE || !$DROPBOX) {
$co_dropbox->pack_start($renderer, 1);
$co_dropbox->add_attribute($renderer, text => 3);
$co_dropbox->set_active(0);
+ dropbox_updated_gui();
my $cb_clear_carts = $guixml->get_widget('cb_clear_carts');
if($KEEPCARTS) {
@@ -280,12 +290,6 @@ if(!$FILE || !$DROPBOX) {
$cb_clear_carts->set_active(1);
}
- if($POOL) {
- set_mode_playlist_gui();
- } else {
- set_mode_file_gui();
- }
-
$guixml->signal_autoconnect_from_package('gui_callbacks');
my $appwin = $guixml->get_widget('appwin');
$appwin or die "can't find Main Window";