fixed #2023
This commit is contained in:
parent
6b4bd54191
commit
db22b940e5
7 changed files with 80 additions and 17 deletions
|
@ -602,10 +602,6 @@ GLiveSupport :: login(const std::string & login,
|
||||||
|
|
||||||
loadWindowPositions();
|
loadWindowPositions();
|
||||||
|
|
||||||
if (masterPanel) {
|
|
||||||
masterPanel->createScratchpadWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1759,3 +1755,17 @@ GLiveSupport :: refreshPlaylistInLiveMode(Ptr<Playlist>::Ref playlist)
|
||||||
masterPanel->refreshPlaylistInLiveMode(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();
|
Gtk::Main::iteration();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preload the Scratchpad window during login.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
createScratchpadWindow(void) throw ();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
/* ================================================= external data structures */
|
||||||
|
|
|
@ -132,12 +132,10 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
|
|
||||||
ImageButton * outputPlayButton = Gtk::manage(wf->createButton(
|
ImageButton * outputPlayButton = Gtk::manage(wf->createButton(
|
||||||
WidgetConstants::hugePlayButton ));
|
WidgetConstants::hugePlayButton ));
|
||||||
Button * clearListButton;
|
|
||||||
Button * removeButton;
|
|
||||||
|
|
||||||
Gtk::VBox * cueAudioBox = Gtk::manage(new Gtk::VBox);
|
Gtk::VBox * cueAudioBox = Gtk::manage(new Gtk::VBox);
|
||||||
Gtk::HBox * cueAudioLabelBox = Gtk::manage(new Gtk::HBox);
|
Gtk::HBox * cueAudioLabelBox = Gtk::manage(new Gtk::HBox);
|
||||||
Gtk::Label * cueAudioLabel;
|
|
||||||
try {
|
try {
|
||||||
cueAudioLabel = Gtk::manage(new Gtk::Label(
|
cueAudioLabel = Gtk::manage(new Gtk::Label(
|
||||||
*getResourceUstring("cuePlayerLabel") ));
|
*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.
|
* Event handler called when the the window gets hidden.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -106,6 +106,21 @@ class LiveModeWindow : public GuiWindow
|
||||||
*/
|
*/
|
||||||
CuePlayer * cueAudioButtons;
|
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.
|
* Construct the right-click context menu for local audio clips.
|
||||||
*
|
*
|
||||||
|
@ -389,6 +404,11 @@ class LiveModeWindow : public GuiWindow
|
||||||
return (treeModel->children().size() != 0);
|
return (treeModel->children().size() != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the localized strings in the widget.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
updateStrings(void) throw ();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
/* ================================================= external data structures */
|
||||||
|
|
|
@ -255,6 +255,17 @@ LoginWindow :: onOkButtonClicked (void) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
loggedIn = gLiveSupport->login(*getLogin(), *getPassword());
|
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();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,14 +202,6 @@ MasterPanelUserInfoWidget :: onLoginButtonClicked (void) throw ()
|
||||||
logInOutButton->signal_clicked().connect(sigc::mem_fun(*this,
|
logInOutButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||||
&MasterPanelUserInfoWidget::onLogoutButtonClicked));
|
&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 the close button
|
||||||
remove(*closeButton);
|
remove(*closeButton);
|
||||||
|
|
||||||
|
|
|
@ -756,10 +756,13 @@ MasterPanelWindow :: showLoggedInUI(void) throw ()
|
||||||
|
|
||||||
setSchedulerAvailable(gLiveSupport->isSchedulerAvailable());
|
setSchedulerAvailable(gLiveSupport->isSchedulerAvailable());
|
||||||
|
|
||||||
if (liveModeWindow && liveModeWindow->isNotEmpty()) {
|
if (liveModeWindow) {
|
||||||
|
liveModeWindow->updateStrings();
|
||||||
|
if (liveModeWindow->isNotEmpty()) {
|
||||||
liveModeWindow->present();
|
liveModeWindow->present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue