fixed #2023
This commit is contained in:
parent
6b4bd54191
commit
db22b940e5
|
@ -602,10 +602,6 @@ GLiveSupport :: login(const std::string & login,
|
|||
|
||||
loadWindowPositions();
|
||||
|
||||
if (masterPanel) {
|
||||
masterPanel->createScratchpadWindow();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1759,3 +1755,17 @@ GLiveSupport :: refreshPlaylistInLiveMode(Ptr<Playlist>::Ref playlist)
|
|||
masterPanel->refreshPlaylistInLiveMode(playlist);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Preload the Scratchpad window during login.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
LiveSupport :: GLiveSupport ::
|
||||
GLiveSupport :: createScratchpadWindow(void)
|
||||
throw ()
|
||||
{
|
||||
if (masterPanel) {
|
||||
masterPanel->createScratchpadWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1266,6 +1266,12 @@ class GLiveSupport : public LocalizedConfigurable,
|
|||
Gtk::Main::iteration();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload the Scratchpad window during login.
|
||||
*/
|
||||
void
|
||||
createScratchpadWindow(void) throw ();
|
||||
};
|
||||
|
||||
/* ================================================= external data structures */
|
||||
|
|
|
@ -132,12 +132,10 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
|
||||
ImageButton * outputPlayButton = Gtk::manage(wf->createButton(
|
||||
WidgetConstants::hugePlayButton ));
|
||||
Button * clearListButton;
|
||||
Button * removeButton;
|
||||
|
||||
Gtk::VBox * cueAudioBox = Gtk::manage(new Gtk::VBox);
|
||||
Gtk::HBox * cueAudioLabelBox = Gtk::manage(new Gtk::HBox);
|
||||
Gtk::Label * cueAudioLabel;
|
||||
|
||||
try {
|
||||
cueAudioLabel = Gtk::manage(new Gtk::Label(
|
||||
*getResourceUstring("cuePlayerLabel") ));
|
||||
|
@ -685,6 +683,29 @@ LiveModeWindow :: onTreeModelChanged(void) throw ()
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Update the strings in the widget.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
LiveModeWindow :: updateStrings(void) throw ()
|
||||
{
|
||||
try {
|
||||
setBundle(gLiveSupport->getBundle("liveModeWindow"));
|
||||
|
||||
set_title(*getResourceUstring("windowTitle"));
|
||||
cueAudioLabel->set_label(*getResourceUstring("cuePlayerLabel"));
|
||||
clearListButton->set_label(*getResourceUstring("clearListButtonLabel"));
|
||||
removeButton->set_label(*getResourceUstring("removeButtonLabel"));
|
||||
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
show_all_children();
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Event handler called when the the window gets hidden.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -106,6 +106,21 @@ class LiveModeWindow : public GuiWindow
|
|||
*/
|
||||
CuePlayer * cueAudioButtons;
|
||||
|
||||
/**
|
||||
* The label for the cue player.
|
||||
*/
|
||||
Gtk::Label * cueAudioLabel;
|
||||
|
||||
/**
|
||||
* The button for removing every item from the window.
|
||||
*/
|
||||
Button * clearListButton;
|
||||
|
||||
/**
|
||||
* The button for removing the selected items from the window.
|
||||
*/
|
||||
Button * removeButton;
|
||||
|
||||
/**
|
||||
* Construct the right-click context menu for local audio clips.
|
||||
*
|
||||
|
@ -389,6 +404,11 @@ class LiveModeWindow : public GuiWindow
|
|||
return (treeModel->children().size() != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the localized strings in the widget.
|
||||
*/
|
||||
void
|
||||
updateStrings(void) throw ();
|
||||
};
|
||||
|
||||
/* ================================================= external data structures */
|
||||
|
|
|
@ -255,6 +255,17 @@ LoginWindow :: onOkButtonClicked (void) throw ()
|
|||
}
|
||||
|
||||
loggedIn = gLiveSupport->login(*getLogin(), *getPassword());
|
||||
|
||||
if (loggedIn) {
|
||||
if (selectedLocale->size() > 0) {
|
||||
gLiveSupport->changeLanguage(selectedLocale);
|
||||
} else {
|
||||
// TODO: get and set default locale for user
|
||||
}
|
||||
|
||||
gLiveSupport->createScratchpadWindow();
|
||||
}
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
|
|
|
@ -202,14 +202,6 @@ MasterPanelUserInfoWidget :: onLoginButtonClicked (void) throw ()
|
|||
logInOutButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&MasterPanelUserInfoWidget::onLogoutButtonClicked));
|
||||
|
||||
// update the UI to the possibly selected locale
|
||||
Ptr<const std::string>::Ref locale = loginWindow->getSelectedLocale();
|
||||
if (locale->size() > 0) {
|
||||
gLiveSupport->changeLanguage(locale);
|
||||
} else {
|
||||
// TODO: get and set default locale for user
|
||||
}
|
||||
|
||||
// remove the close button
|
||||
remove(*closeButton);
|
||||
|
||||
|
|
|
@ -756,8 +756,11 @@ MasterPanelWindow :: showLoggedInUI(void) throw ()
|
|||
|
||||
setSchedulerAvailable(gLiveSupport->isSchedulerAvailable());
|
||||
|
||||
if (liveModeWindow && liveModeWindow->isNotEmpty()) {
|
||||
liveModeWindow->present();
|
||||
if (liveModeWindow) {
|
||||
liveModeWindow->updateStrings();
|
||||
if (liveModeWindow->isNotEmpty()) {
|
||||
liveModeWindow->present();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue