made the start/stop button to enable/disable the Scheduler button on the Master Panel
This commit is contained in:
parent
9900d724f0
commit
f24055e72c
|
@ -1571,8 +1571,14 @@ GLiveSupport :: checkSchedulerClient(void) throw ()
|
||||||
try {
|
try {
|
||||||
scheduler->getVersion();
|
scheduler->getVersion();
|
||||||
schedulerAvailable = true;
|
schedulerAvailable = true;
|
||||||
|
if (masterPanel) {
|
||||||
|
masterPanel->setSchedulerAvailable(true);
|
||||||
|
}
|
||||||
} catch (XmlRpcException &e) {
|
} catch (XmlRpcException &e) {
|
||||||
schedulerAvailable = false;
|
schedulerAvailable = false;
|
||||||
|
if (masterPanel) {
|
||||||
|
masterPanel->setSchedulerAvailable(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -333,12 +333,12 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
&MasterPanelWindow::onSearchButtonClicked));
|
&MasterPanelWindow::onSearchButtonClicked));
|
||||||
} else {
|
} else {
|
||||||
// gray out all the buttons except Options
|
// gray out all the buttons except Options
|
||||||
liveModeButton->set_sensitive(false);
|
liveModeButton->setDisabled(true);
|
||||||
uploadFileButton->set_sensitive(false);
|
uploadFileButton->setDisabled(true);
|
||||||
scratchpadButton->set_sensitive(false);
|
scratchpadButton->setDisabled(true);
|
||||||
simplePlaylistMgmtButton->set_sensitive(false);
|
simplePlaylistMgmtButton->setDisabled(true);
|
||||||
schedulerButton->set_sensitive(false);
|
schedulerButton->setDisabled(true);
|
||||||
searchButton->set_sensitive(false);
|
searchButton->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
optionsButton->signal_clicked().connect(sigc::mem_fun(*this,
|
optionsButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||||
|
@ -754,9 +754,7 @@ MasterPanelWindow :: showLoggedInUI(void) throw ()
|
||||||
searchButton->setDisabled(true);
|
searchButton->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gLiveSupport->isSchedulerAvailable()) {
|
setSchedulerAvailable(gLiveSupport->isSchedulerAvailable());
|
||||||
schedulerButton->setDisabled(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -879,3 +877,20 @@ MasterPanelWindow :: uploadToHub(Ptr<Playable>::Ref playable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Show or hide the Scheduler button.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
MasterPanelWindow :: setSchedulerAvailable(bool status) throw ()
|
||||||
|
{
|
||||||
|
if (status == false) {
|
||||||
|
if (schedulerWindow && schedulerWindow->is_visible()) {
|
||||||
|
schedulerWindow->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schedulerButton) {
|
||||||
|
schedulerButton->setDisabled(!status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -536,6 +536,13 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
void
|
void
|
||||||
uploadToHub(Ptr<Playable>::Ref playable) throw ();
|
uploadToHub(Ptr<Playable>::Ref playable) throw ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show or hide the Scheduler button.
|
||||||
|
*
|
||||||
|
* @param status true means show the button, false means hide.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
setSchedulerAvailable(bool status) throw ();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
/* ================================================= external data structures */
|
||||||
|
|
Loading…
Reference in New Issue