summaryrefslogtreecommitdiff
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)
commit9caad911cdb3650b16ae7cbe8294f0ebec9502d1 (patch)
tree3ed7245ddcf1d465330f355da5eee551a2efda61
parent5696313ed494fcd2adc199e0ed12f9904b3882da (diff)
automatic selection of pool vs show mode based on selected dropbox
git-svn-id: https://svn.helsinki.at/rhimport/trunk@28 7c65635b-ec39-4f67-a626-873dbafdd612
-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";