made master panel look like Charles' design, first iteration

This commit is contained in:
maroy 2005-02-03 13:10:28 +00:00
parent c92e65a824
commit b3d923e5af
35 changed files with 184 additions and 66 deletions

View File

@ -20,8 +20,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# #
# Author : $Author: fgerlits $ # Author : $Author: maroy $
# Version : $Revision: 1.22 $ # Version : $Revision: 1.23 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
# #
# @configure_input@ # @configure_input@
@ -108,6 +108,12 @@ PLAYLIST_EXECUTOR_LIB_DIR = ${PLAYLIST_EXECUTOR_DIR}/lib
PLAYLIST_EXECUTOR_LIB = livesupport_playlist_executor PLAYLIST_EXECUTOR_LIB = livesupport_playlist_executor
PLAYLIST_EXECUTOR_LIB_FILE = ${PLAYLIST_EXECUTOR_LIB_DIR}/lib${PLAYLIST_EXECUTOR_LIB}.a PLAYLIST_EXECUTOR_LIB_FILE = ${PLAYLIST_EXECUTOR_LIB_DIR}/lib${PLAYLIST_EXECUTOR_LIB}.a
WIDGETS_DIR = ${MODULES_DIR}/widgets
WIDGETS_INCLUDE_DIR = ${WIDGETS_DIR}/include
WIDGETS_LIB_DIR = ${WIDGETS_DIR}/lib
WIDGETS_LIB = livesupport_widgets
WIDGETS_LIB_FILE = ${WIDGETS_LIB_DIR}/lib${WIDGETS_LIB}.a
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@ LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
LIBXMLPP_LIBS=@LIBXMLPP_LIBS@ LIBXMLPP_LIBS=@LIBXMLPP_LIBS@
@ -149,6 +155,7 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-I${CORE_INCLUDE_DIR} \ -I${CORE_INCLUDE_DIR} \
-I${AUTHENTICATION_INCLUDE_DIR} \ -I${AUTHENTICATION_INCLUDE_DIR} \
-I${STORAGE_INCLUDE_DIR} \ -I${STORAGE_INCLUDE_DIR} \
-I${WIDGETS_INCLUDE_DIR} \
-I${SCHEDULER_CLIENT_INCLUDE_DIR} \ -I${SCHEDULER_CLIENT_INCLUDE_DIR} \
-I${PLAYLIST_EXECUTOR_INCLUDE_DIR} \ -I${PLAYLIST_EXECUTOR_INCLUDE_DIR} \
-I${TMP_DIR} -I${TMP_DIR}
@ -163,6 +170,7 @@ LDFLAGS = @LDFLAGS@ -pthread \
-L${CORE_LIB_DIR} \ -L${CORE_LIB_DIR} \
-L${AUTHENTICATION_LIB_DIR} \ -L${AUTHENTICATION_LIB_DIR} \
-L${STORAGE_LIB_DIR} \ -L${STORAGE_LIB_DIR} \
-L${WIDGETS_LIB_DIR} \
-L${SCHEDULER_CLIENT_LIB_DIR} \ -L${SCHEDULER_CLIENT_LIB_DIR} \
-L${PLAYLIST_EXECUTOR_LIB_DIR} -L${PLAYLIST_EXECUTOR_LIB_DIR}
@ -194,6 +202,7 @@ FSDF = ${G_LIVESUPPORT_OBJS} \
G_LIVESUPPORT_EXE_LIBS = -l${PLAYLIST_EXECUTOR_LIB} \ G_LIVESUPPORT_EXE_LIBS = -l${PLAYLIST_EXECUTOR_LIB} \
-l${AUTHENTICATION_LIB} \ -l${AUTHENTICATION_LIB} \
-l${STORAGE_LIB} \ -l${STORAGE_LIB} \
-l${WIDGETS_LIB} \
-l${SCHEDULER_CLIENT_LIB} \ -l${SCHEDULER_CLIENT_LIB} \
-l${CORE_LIB} \ -l${CORE_LIB} \
${HELIX_LIBS} \ ${HELIX_LIBS} \
@ -231,6 +240,7 @@ docclean:
depclean: clean depclean: clean
${MAKE} -C ${PLAYLIST_EXECUTOR_DIR} clean ${MAKE} -C ${PLAYLIST_EXECUTOR_DIR} clean
${MAKE} -C ${SCHEDULER_CLIENT_DIR} clean ${MAKE} -C ${SCHEDULER_CLIENT_DIR} clean
${MAKE} -C ${WIDGETS_DIR} clean
${MAKE} -C ${STORAGE_DIR} clean ${MAKE} -C ${STORAGE_DIR} clean
${MAKE} -C ${AUTHENTICATION_DIR} clean ${MAKE} -C ${AUTHENTICATION_DIR} clean
${MAKE} -C ${CORE_DIR} clean ${MAKE} -C ${CORE_DIR} clean
@ -267,6 +277,7 @@ uninstall: ${SCHEDULER_EXE}
${G_LIVESUPPORT_EXE}: ${CORE_LIB_FILE} \ ${G_LIVESUPPORT_EXE}: ${CORE_LIB_FILE} \
${AUTHENTICATION_LIB_FILE} \ ${AUTHENTICATION_LIB_FILE} \
${STORAGE_LIB_FILE} \ ${STORAGE_LIB_FILE} \
${WIDGETS_LIB_FILE} \
${SCHEDULER_CLIENT_LIB_FILE} \ ${SCHEDULER_CLIENT_LIB_FILE} \
${PLAYLIST_EXECUTOR_LIB_FILE} \ ${PLAYLIST_EXECUTOR_LIB_FILE} \
${G_LIVESUPPORT_OBJS} ${G_LIVESUPPORT_EXE_OBJS} ${G_LIVESUPPORT_OBJS} ${G_LIVESUPPORT_EXE_OBJS}
@ -281,6 +292,7 @@ ${DOXYGEN_DIR}:
${TEST_RUNNER}: ${CORE_LIB_FILE} \ ${TEST_RUNNER}: ${CORE_LIB_FILE} \
${AUTHENTICATION_LIB_FILE} \ ${AUTHENTICATION_LIB_FILE} \
${STORAGE_LIB_FILE} \ ${STORAGE_LIB_FILE} \
${WIDGETS_LIB_FILE} \
${SCHEDULER_CLIENT_LIB_FILE} \ ${SCHEDULER_CLIENT_LIB_FILE} \
${TEST_RUNNER_OBJS} ${TEST_RUNNER_OBJS}
${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS}
@ -294,6 +306,9 @@ ${AUTHENTICATION_LIB_FILE}:
${STORAGE_LIB_FILE}: ${STORAGE_LIB_FILE}:
${MAKE} -C ${STORAGE_DIR} ${MAKE} -C ${STORAGE_DIR}
${WIDGETS_LIB_FILE}:
${MAKE} -C ${WIDGETS_DIR}
${SCHEDULER_CLIENT_LIB_FILE}: ${SCHEDULER_CLIENT_LIB_FILE}:
${MAKE} -C ${SCHEDULER_CLIENT_DIR} ${MAKE} -C ${SCHEDULER_CLIENT_DIR}

View File

@ -3,6 +3,7 @@
<!ELEMENT gLiveSupport (resourceBundle, <!ELEMENT gLiveSupport (resourceBundle,
supportedLanguages, supportedLanguages,
widgetFactory,
authenticationClientFactory, authenticationClientFactory,
storageClientFactory, storageClientFactory,
schedulerClientFactory, schedulerClientFactory,
@ -18,6 +19,9 @@
<!ATTLIST language locale CDATA #REQUIRED > <!ATTLIST language locale CDATA #REQUIRED >
<!ATTLIST language name CDATA #REQUIRED > <!ATTLIST language name CDATA #REQUIRED >
<!ELEMENT widgetFactory EMPTY >
<!ATTLIST widgetFactory path CDATA #REQUIRED >
<!ELEMENT authenticationClientFactory (testAuthentication| <!ELEMENT authenticationClientFactory (testAuthentication|
webAuthentication)> webAuthentication)>
@ -84,6 +88,8 @@
<language locale="hu" name="Magyar"/> <language locale="hu" name="Magyar"/>
</supportedLanguages> </supportedLanguages>
<widgetFactory path = "var/widgets/" />
<authenticationClientFactory> <authenticationClientFactory>
<webAuthentication> <webAuthentication>
<location server="localhost" port="80" <location server="localhost" port="80"

View File

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $ Author : $Author: maroy $
Version : $Revision: 1.17 $ Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -145,13 +145,21 @@ GLiveSupport :: configure(const xmlpp::Element & element)
// configure the StorageClientFactory // configure the StorageClientFactory
nodes = element.get_children(StorageClientFactory::getConfigElementName()); nodes = element.get_children(StorageClientFactory::getConfigElementName());
if (nodes.size() < 1) { if (nodes.size() < 1) {
throw std::invalid_argument("no StorageClientFactory element"); throw std::invalid_argument("no storageClientFactory element");
} }
Ptr<StorageClientFactory>::Ref stcf = StorageClientFactory::getInstance(); Ptr<StorageClientFactory>::Ref stcf = StorageClientFactory::getInstance();
stcf->configure( *((const xmlpp::Element*) *(nodes.begin())) ); stcf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
storage = stcf->getStorageClient(); storage = stcf->getStorageClient();
// configure the WidgetFactory
nodes = element.get_children(WidgetFactory::getConfigElementName());
if (nodes.size() < 1) {
throw std::invalid_argument("no widgetFactory element");
}
widgetFactory = WidgetFactory::getInstance();
widgetFactory->configure( *((const xmlpp::Element*) *(nodes.begin())) );
// configure the SchedulerClientFactory // configure the SchedulerClientFactory
nodes = element.get_children( nodes = element.get_children(
SchedulerClientFactory::getConfigElementName()); SchedulerClientFactory::getConfigElementName());

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.17 $ Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -52,6 +52,7 @@
#include "LiveSupport/Storage/StorageClientInterface.h" #include "LiveSupport/Storage/StorageClientInterface.h"
#include "LiveSupport/SchedulerClient/SchedulerClientInterface.h" #include "LiveSupport/SchedulerClient/SchedulerClientInterface.h"
#include "LiveSupport/PlaylistExecutor/AudioPlayerInterface.h" #include "LiveSupport/PlaylistExecutor/AudioPlayerInterface.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
namespace LiveSupport { namespace LiveSupport {
namespace GLiveSupport { namespace GLiveSupport {
@ -61,6 +62,7 @@ using namespace LiveSupport::SchedulerClient;
using namespace LiveSupport::Authentication; using namespace LiveSupport::Authentication;
using namespace LiveSupport::Storage; using namespace LiveSupport::Storage;
using namespace LiveSupport::PlaylistExecutor; using namespace LiveSupport::PlaylistExecutor;
using namespace LiveSupport::Widgets;
/* ================================================================ constants */ /* ================================================================ constants */
@ -83,9 +85,12 @@ class MasterPanelWindow;
* *
* <pre><code> * <pre><code>
* <!ELEMENT gLiveSupport (resourceBundle, * <!ELEMENT gLiveSupport (resourceBundle,
* supportedLanguages,
* widgetFactory,
* authenticationClientFactory, * authenticationClientFactory,
* storageClientFactory, * storageClientFactory,
* schedulerClientFactory) > * schedulerClientFactory,
* audioPlayer) >
* </code></pre> * </code></pre>
* *
* For a description of the <code>resourceBundle</code>, * For a description of the <code>resourceBundle</code>,
@ -95,7 +100,7 @@ class MasterPanelWindow;
* respective documentation. * respective documentation.
* *
* @author $Author: maroy $ * @author $Author: maroy $
* @version $Revision: 1.17 $ * @version $Revision: 1.18 $
* @see LocalizedObject#getBundle(const xmlpp::Element &) * @see LocalizedObject#getBundle(const xmlpp::Element &)
* @see AuthenticationClientFactory * @see AuthenticationClientFactory
* @see StorageClientFactory * @see StorageClientFactory
@ -137,6 +142,11 @@ class GLiveSupport : public LocalizedConfigurable,
*/ */
Ptr<StorageClientInterface>::Ref storage; Ptr<StorageClientInterface>::Ref storage;
/**
* The widget factory, containing our own widgets.
*/
Ptr<WidgetFactory>::Ref widgetFactory;
/** /**
* The scheduler client, used to access the scheduler daemon. * The scheduler client, used to access the scheduler daemon.
*/ */

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.3 $ Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -43,6 +43,7 @@
#include "MasterPanelUserInfoWidget.h" #include "MasterPanelUserInfoWidget.h"
using namespace LiveSupport::Widgets;
using namespace LiveSupport::GLiveSupport; using namespace LiveSupport::GLiveSupport;
/* =================================================== local data structures */ /* =================================================== local data structures */
@ -68,7 +69,7 @@ MasterPanelUserInfoWidget :: MasterPanelUserInfoWidget (
this->gLiveSupport = gLiveSupport; this->gLiveSupport = gLiveSupport;
loggedIn = false; loggedIn = false;
logInOutButton.reset(new Gtk::Button()); logInOutButton = WidgetFactory::getInstance()->createButton("");
logInOutSignalConnection = logInOutSignalConnection =
logInOutButton->signal_clicked().connect(sigc::mem_fun(*this, logInOutButton->signal_clicked().connect(sigc::mem_fun(*this,
&MasterPanelUserInfoWidget::onLoginButtonClicked)); &MasterPanelUserInfoWidget::onLoginButtonClicked));

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.2 $ Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -51,6 +51,7 @@
namespace LiveSupport { namespace LiveSupport {
namespace GLiveSupport { namespace GLiveSupport {
using namespace LiveSupport;
using namespace LiveSupport::Core; using namespace LiveSupport::Core;
/* ================================================================ constants */ /* ================================================================ constants */
@ -67,7 +68,7 @@ using namespace LiveSupport::Core;
* This widget handles login and login info display. * This widget handles login and login info display.
* *
* @author $Author: maroy $ * @author $Author: maroy $
* @version $Revision: 1.2 $ * @version $Revision: 1.3 $
*/ */
class MasterPanelUserInfoWidget : public Gtk::Table, class MasterPanelUserInfoWidget : public Gtk::Table,
public LocalizedObject public LocalizedObject
@ -76,7 +77,7 @@ class MasterPanelUserInfoWidget : public Gtk::Table,
/** /**
* The login / logout button. * The login / logout button.
*/ */
Ptr<Gtk::Button>::Ref logInOutButton; Ptr<Widgets::Button>::Ref logInOutButton;
/** /**
* A label to display the currently logged in user. * A label to display the currently logged in user.

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.9 $ Version : $Revision: 1.10 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -44,6 +44,7 @@
#include "MasterPanelWindow.h" #include "MasterPanelWindow.h"
using namespace LiveSupport;
using namespace LiveSupport::GLiveSupport; using namespace LiveSupport::GLiveSupport;
/* =================================================== local data structures */ /* =================================================== local data structures */
@ -67,37 +68,71 @@ MasterPanelWindow :: MasterPanelWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
{ {
this->gLiveSupport = gLiveSupport; this->gLiveSupport = gLiveSupport;
lsLogoWidget.reset(new Gtk::Label("lsLogo")); Ptr<WidgetFactory>::Ref widgetFactory = WidgetFactory::getInstance();
nowPlayingWidget.reset(new Gtk::Label("now playing"));
vuMeterWidget.reset(new Gtk::Label("VU meter")); // TODO: remove hard-coded station logo path reference
nextPlayingWidget.reset(new Gtk::Label("next playing")); radioLogoWidget.reset(new Gtk::Image("var/stationLogo.png"));
onAirWidget.reset(new Gtk::Label("on air"));
radioLogoWidget.reset(new Gtk::Label("radio logo"));
userInfoWidget.reset(new MasterPanelUserInfoWidget(gLiveSupport, bundle));
// set up the layout, which is a button box // set up the layout, which is a button box
layout.reset(new Gtk::Table()); layout.reset(new Gtk::Table());
// set the localized resources
changeLanguage(bundle);
// set up the time label // set up the time label
timeWidget.reset(new Gtk::Label("time")); timeWidget.reset(new Gtk::Label("time"));
timeBin = widgetFactory->createBlueBin();
timeBin->add(*timeWidget);
// set up the now playing widget
nowPlayingWidget.reset(new Gtk::Label("now playing"));
nowPlayingBin = widgetFactory->createDarkBlueBin();
nowPlayingBin->add(*nowPlayingWidget);
// set up the VU meter widget
vuMeterWidget.reset(new Gtk::Label("VU meter"));
vuMeterBin = widgetFactory->createBlueBin();
vuMeterBin->add(*vuMeterWidget);
// set up the next playing widget
nextPlayingWidget.reset(new Gtk::Label("next playing"));
nextPlayingBin = widgetFactory->createBlueBin();
nextPlayingBin->add(*nextPlayingWidget);
// create the bottom bar
bottomBar.reset(new Gtk::Table());
buttonBar.reset(new Gtk::Table());
buttonBarAlignment.reset(new Gtk::Alignment(Gtk::ALIGN_LEFT,
Gtk::ALIGN_CENTER,
0, 0));
buttonBarAlignment->add(*buttonBar);
userInfoWidget.reset(new MasterPanelUserInfoWidget(gLiveSupport, bundle));
userInfoAlignment.reset(new Gtk::Alignment(Gtk::ALIGN_RIGHT,
Gtk::ALIGN_CENTER,
0, 0));
userInfoAlignment->add(*userInfoWidget);
bottomBar->attach(*buttonBarAlignment, 0, 1, 0, 1);
bottomBar->attach(*userInfoAlignment, 1, 2, 0, 1);
// set up the main window, and show everything // set up the main window, and show everything
// all the localized widgets were set up in changeLanguage() // all the localized widgets were set up in changeLanguage()
set_border_width(10); set_border_width(10);
layout->attach(*lsLogoWidget, 0, 1, 0, 2); layout->attach(*timeBin, 0, 1, 0, 2);
layout->attach(*timeWidget, 1, 2, 0, 2); layout->attach(*nowPlayingBin, 1, 2, 0, 2);
layout->attach(*nowPlayingWidget, 2, 3, 0, 2); layout->attach(*vuMeterBin, 2, 3, 0, 1);
layout->attach(*vuMeterWidget, 3, 4, 0, 1); layout->attach(*nextPlayingBin, 2, 3, 1, 2);
layout->attach(*nextPlayingWidget, 3, 4, 1, 2); layout->attach(*radioLogoWidget, 3, 4, 0, 2);
layout->attach(*onAirWidget, 4, 5, 0, 1); layout->attach(*bottomBar, 0, 4, 2, 3);
layout->attach(*radioLogoWidget, 5, 6, 0, 1);
layout->attach(*userInfoWidget, 4, 6, 1, 2);
add(*layout); add(*layout);
// set the background to white
bgColor = Gdk::Color();
bgColor.set_rgb(0xffff, 0xffff, 0xffff);
Glib::RefPtr<Gdk::Colormap> colormap = get_default_colormap();
colormap->alloc_color(bgColor);
modify_bg(Gtk::STATE_NORMAL, bgColor);
// set the localized resources
changeLanguage(bundle);
// show what's there to see // show what's there to see
showAnonymousUI(); showAnonymousUI();
@ -127,14 +162,16 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
try { try {
set_title(*getResourceUstring("windowTitle")); set_title(*getResourceUstring("windowTitle"));
uploadFileButton.reset(new Gtk::Button( Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
*getResourceUstring("uploadFileButtonLabel")));
djBagButton.reset(new Gtk::Button( uploadFileButton = wf->createButton(
*getResourceUstring("djBagButtonLabel"))); *getResourceUstring("uploadFileButtonLabel"));
simplePlaylistMgmtButton.reset(new Gtk::Button( djBagButton = wf->createButton(
*getResourceUstring("simplePlaylistMgmtButtonLabel"))); *getResourceUstring("djBagButtonLabel"));
schedulerButton.reset(new Gtk::Button( simplePlaylistMgmtButton = wf->createButton(
*getResourceUstring("schedulerButtonLabel"))); *getResourceUstring("simplePlaylistMgmtButtonLabel"));
schedulerButton = wf->createButton(
*getResourceUstring("schedulerButtonLabel"));
} catch (std::invalid_argument &e) { } catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;
} }
@ -142,10 +179,10 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
userInfoWidget->changeLanguage(bundle); userInfoWidget->changeLanguage(bundle);
// re-attach the localized widgets to the layout // re-attach the localized widgets to the layout
layout->attach(*uploadFileButton, 0, 1, 2, 3); buttonBar->attach(*uploadFileButton, 0, 1, 0, 1);
layout->attach(*djBagButton, 1, 2, 2, 3); buttonBar->attach(*djBagButton, 1, 2, 0, 1);
layout->attach(*simplePlaylistMgmtButton, 2, 3, 2, 3); buttonBar->attach(*simplePlaylistMgmtButton, 2, 3, 0, 1);
layout->attach(*schedulerButton, 3, 4, 2, 3); buttonBar->attach(*schedulerButton, 3, 4, 0, 1);
// re-bind events to the buttons // re-bind events to the buttons
uploadFileButton->signal_clicked().connect(sigc::mem_fun(*this, uploadFileButton->signal_clicked().connect(sigc::mem_fun(*this,
@ -315,6 +352,7 @@ void
MasterPanelWindow :: showAnonymousUI(void) throw () MasterPanelWindow :: showAnonymousUI(void) throw ()
{ {
show_all(); show_all();
buttonBar->hide();
uploadFileButton->hide(); uploadFileButton->hide();
djBagButton->hide(); djBagButton->hide();
simplePlaylistMgmtButton->hide(); simplePlaylistMgmtButton->hide();

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.7 $ Version : $Revision: 1.8 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -42,6 +42,7 @@
#include <gtkmm/button.h> #include <gtkmm/button.h>
#include <gtkmm/table.h> #include <gtkmm/table.h>
#include <gtkmm/image.h>
#include <gtkmm/window.h> #include <gtkmm/window.h>
#include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/Ptr.h"
@ -58,6 +59,7 @@ namespace LiveSupport {
namespace GLiveSupport { namespace GLiveSupport {
using namespace LiveSupport::Core; using namespace LiveSupport::Core;
using namespace LiveSupport::Widgets;
/* ================================================================ constants */ /* ================================================================ constants */
@ -72,19 +74,21 @@ using namespace LiveSupport::Core;
* *
* The layout of the window is roughly the following: * The layout of the window is roughly the following:
* <pre><code> * <pre><code>
* +--- master panel --------------------------------------------------------+ * +--- master panel ---------------------------------+
* | + LS logo + + time + + now ----+ + VU meter + + on-air + + radio logo + | * | + time + + now ----+ + VU meter + + radio logo + |
* | | | | | | playing | | | | | | | | * | | | | playing | | | | | |
* | | | | | | | +----------+ +--------+ +------------+ | * | | | | | +----------+ | | |
* | | | | | | | + next ----+ + user info ------------+ | * | | | | | + next ----+ | | |
* | | | | | | | | playing | | | | * | | | | | | playing | | | |
* | +---------+ +------+ +---------+ +----------+ +-----------------------+ | * | +------+ +---------+ +----------+ +------------+ |
* | +-- button bar -------------------------------------------------------+ | * | +-- bottom bar --------------------------------+ |
* +-------------------------------------------------------------------------+ * | | +-- button bar -----------+ +-- user info -+ | |
* | +----------------------------------------------+ |
* +--------------------------------------------------+
* </code></pre> * </code></pre>
* *
* @author $Author: maroy $ * @author $Author: maroy $
* @version $Revision: 1.7 $ * @version $Revision: 1.8 $
*/ */
class MasterPanelWindow : public Gtk::Window, public LocalizedObject class MasterPanelWindow : public Gtk::Window, public LocalizedObject
{ {
@ -95,9 +99,14 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
Ptr<Gtk::Table>::Ref layout; Ptr<Gtk::Table>::Ref layout;
/** /**
* The LiveSupport logo * The background color.
*/ */
Ptr<Gtk::Widget>::Ref lsLogoWidget; Gdk::Color bgColor;
/**
* The container for the time widget
*/
Ptr<BlueBin>::Ref timeBin;
/** /**
* The time display * The time display
@ -110,25 +119,40 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
*/ */
Ptr<sigc::connection>::Ref timer; Ptr<sigc::connection>::Ref timer;
/**
* The container for the now playing widget
*/
Ptr<BlueBin>::Ref nowPlayingBin;
/** /**
* The 'now playing' display. * The 'now playing' display.
*/ */
Ptr<Gtk::Widget>::Ref nowPlayingWidget; Ptr<Gtk::Widget>::Ref nowPlayingWidget;
/**
* The container for the VU meter widget
*/
Ptr<BlueBin>::Ref vuMeterBin;
/** /**
* The VU meter display. * The VU meter display.
*/ */
Ptr<Gtk::Widget>::Ref vuMeterWidget; Ptr<Gtk::Widget>::Ref vuMeterWidget;
/**
* The container for the next playing widget.
*/
Ptr<BlueBin>::Ref nextPlayingBin;
/** /**
* The 'next playing' display. * The 'next playing' display.
*/ */
Ptr<Gtk::Widget>::Ref nextPlayingWidget; Ptr<Gtk::Widget>::Ref nextPlayingWidget;
/** /**
* The on-air indicator. * The user info alignment helper.
*/ */
Ptr<Gtk::Widget>::Ref onAirWidget; Ptr<Gtk::Alignment>::Ref userInfoAlignment;
/** /**
* The user info widget. * The user info widget.
@ -138,27 +162,42 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
/** /**
* The radio logo. * The radio logo.
*/ */
Ptr<Gtk::Widget>::Ref radioLogoWidget; Ptr<Gtk::Image>::Ref radioLogoWidget;
/**
* The bottom bar.
*/
Ptr<Gtk::Table>::Ref bottomBar;
/**
* The button bar alignment helper
*/
Ptr<Gtk::Alignment>::Ref buttonBarAlignment;
/**
* The button bar.
*/
Ptr<Gtk::Table>::Ref buttonBar;
/** /**
* The button to invoke the upload file window. * The button to invoke the upload file window.
*/ */
Ptr<Gtk::Button>::Ref uploadFileButton; Ptr<Button>::Ref uploadFileButton;
/** /**
* The button to invoke the DJ Bag window. * The button to invoke the DJ Bag window.
*/ */
Ptr<Gtk::Button>::Ref djBagButton; Ptr<Button>::Ref djBagButton;
/** /**
* The button to invoke the Simple Playlist Management Window. * The button to invoke the Simple Playlist Management Window.
*/ */
Ptr<Gtk::Button>::Ref simplePlaylistMgmtButton; Ptr<Button>::Ref simplePlaylistMgmtButton;
/** /**
* The button to invoke the Scheduler Window. * The button to invoke the Scheduler Window.
*/ */
Ptr<Gtk::Button>::Ref schedulerButton; Ptr<Button>::Ref schedulerButton;
/** /**
* The gLiveSupport object, handling the logic of the application. * The gLiveSupport object, handling the logic of the application.

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $ Author : $Author: maroy $
Version : $Revision: 1.4 $ Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/PlaylistListWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/PlaylistListWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -72,7 +72,7 @@ PlaylistListWindow :: PlaylistListWindow (
set_title(*getResourceUstring("windowTitle")); set_title(*getResourceUstring("windowTitle"));
listBoxLabel.set_text(*getResourceUstring("listBoxLabel")); listBoxLabel.set_text(*getResourceUstring("listBoxLabel"));
detailBoxLabel.set_text(*getResourceUstring("detailBoxLabel")); detailBoxLabel.set_text(*getResourceUstring("detailBoxLabel"));
closeButton.reset(new Button( closeButton.reset(new Gtk::Button(
*getResourceUstring("closeButtonLabel"))); *getResourceUstring("closeButtonLabel")));
} catch (std::invalid_argument &e) { } catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB