moved the public constants from WidgetFactory to a separate class;

this solves some circular reference isssues
This commit is contained in:
fgerlits 2006-02-10 19:06:14 +00:00
parent 5183197c69
commit ae820b8d59
21 changed files with 192 additions and 112 deletions

View file

@ -48,6 +48,7 @@
#include "LiveSupport/Core/LocalizedObject.h"
#include "LiveSupport/Widgets/WhiteWindow.h"
#include "LiveSupport/Widgets/Button.h"
namespace LiveSupport {
namespace Widgets {

View file

@ -40,6 +40,7 @@
#include "configure.h"
#endif
#include <boost/enable_shared_from_this.hpp>
#include <gtkmm/label.h>
#include <gtkmm/table.h>
#include <gtkmm/alignment.h>
@ -49,11 +50,11 @@
#include <gtkmm/buttonbox.h>
#include "LiveSupport/Core/Ptr.h"
#include "LiveSupport/Widgets/WidgetConstants.h"
#include "LiveSupport/Widgets/CornerImages.h"
#include "LiveSupport/Widgets/Colors.h"
#include "LiveSupport/Widgets/ImageButton.h"
#include "LiveSupport/Widgets/BlueBin.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
namespace LiveSupport {
@ -341,7 +342,7 @@ class WhiteWindow : public Gtk::Window,
* @param cornerImages the corner images.
* @param properties some WindowProperties flags
*/
WhiteWindow(WidgetFactory::ImageType title,
WhiteWindow(WidgetConstants::ImageType title,
Colors::ColorName backgroundColor,
Ptr<CornerImages>::Ref cornerImages,
int properties = isResizable)

View file

@ -0,0 +1,105 @@
/*------------------------------------------------------------------------------
Copyright (c) 2004 Media Development Loan Fund
This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org
LiveSupport is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LiveSupport is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author $
Version : $Revision $
Location : $URL $
------------------------------------------------------------------------------*/
#ifndef LiveSupport_Widgets_WidgetConstants_h
#define LiveSupport_Widgets_WidgetConstants_h
#ifndef __cplusplus
#error This is a C++ include file
#endif
/* ============================================================ include files */
namespace LiveSupport {
namespace Widgets {
/* ================================================================ constants */
/* =================================================================== macros */
/* =============================================================== data types */
/**
* A collection of constants used by the widgets.
*
* Constants which are either used by more than one widget or used by
* the WidgetFactory class are collected here. This way widget headers
* do not need to include each other's or WidgetFactory's header.
*
* @author $Author $
* @version $Revision $
*/
class WidgetConstants
{
public:
/**
* The types of available buttons.
*/
typedef enum { pushButton, tabButton } ButtonType;
/**
* The types of available image buttons.
*/
typedef enum { deleteButton, plusButton, minusButton,
smallPlayButton, smallPauseButton, smallStopButton,
hugePlayButton,
cuePlayButton, cueStopButton,
masterPlayButton, masterPauseButton, masterStopButton,
windowMinimizeButton, windowMaximizeButton,
windowCloseButton }
ImageButtonType;
/**
* The list of available miscellaneous images.
*/
typedef enum { resizeImage,
scratchpadWindowTitleImage,
searchWindowTitleImage,
liveModeWindowTitleImage,
playlistsWindowTitleImage,
schedulerWindowTitleImage,
audioClipIconImage,
playlistIconImage }
ImageType;
};
/* ================================================= external data structures */
/* ====================================================== function prototypes */
} // namespace Widgets
} // namespace LiveSupport
#endif // LiveSupport_Widgets_WidgetConstants_h

View file

@ -46,6 +46,7 @@
#include "LiveSupport/Core/Configurable.h"
#include "LiveSupport/Core/MetadataTypeContainer.h"
#include "LiveSupport/Widgets/WidgetConstants.h"
#include "LiveSupport/Widgets/CornerImages.h"
#include "LiveSupport/Widgets/ButtonImages.h"
#include "LiveSupport/Widgets/Button.h"
@ -55,6 +56,8 @@
#include "LiveSupport/Widgets/OperatorComboBoxText.h"
#include "LiveSupport/Widgets/BlueBin.h"
#include "LiveSupport/Widgets/EntryBin.h"
#include "LiveSupport/Widgets/DialogWindow.h"
#include "LiveSupport/Widgets/ZebraTreeView.h"
namespace LiveSupport {
@ -70,9 +73,6 @@ using namespace LiveSupport::Core;
/* =============================================================== data types */
class WhiteWindow;
class ZebraTreeView;
/**
* A factory to provide access to LiveSupport Widgets.
*
@ -97,38 +97,6 @@ class ZebraTreeView;
class WidgetFactory :
virtual public Configurable
{
public:
/**
* The types of available buttons.
*/
typedef enum { pushButton, tabButton } ButtonType;
/**
* The types of available image buttons.
*/
typedef enum { deleteButton, plusButton, minusButton,
smallPlayButton, smallPauseButton, smallStopButton,
hugePlayButton,
cuePlayButton, cueStopButton,
masterPlayButton, masterPauseButton, masterStopButton,
windowMinimizeButton, windowMaximizeButton,
windowCloseButton }
ImageButtonType;
/**
* The list of available miscellaneous images.
*/
typedef enum { resizeImage,
scratchpadWindowTitleImage,
searchWindowTitleImage,
liveModeWindowTitleImage,
playlistsWindowTitleImage,
schedulerWindowTitleImage,
audioClipIconImage,
playlistIconImage }
ImageType;
private:
/**
* The name of the configuration XML elmenent used by this object.
@ -193,7 +161,7 @@ class WidgetFactory :
/**
* A container holding the miscallenous image pixbuf references.
*/
std::map<ImageType, Glib::RefPtr<Gdk::Pixbuf> >
std::map<WidgetConstants::ImageType, Glib::RefPtr<Gdk::Pixbuf> >
imageTypePixbufs;
/**
@ -268,8 +236,9 @@ class WidgetFactory :
* @return a button with the specified label.
*/
Button *
createButton(const Glib::ustring & label,
ButtonType type = pushButton)
createButton(
const Glib::ustring & label,
WidgetConstants::ButtonType type = WidgetConstants::pushButton)
throw ();
/**
@ -281,7 +250,7 @@ class WidgetFactory :
* @return a button of the requested type, or 0
*/
ImageButton *
createButton(ImageButtonType type) throw ();
createButton(WidgetConstants::ImageButtonType type) throw ();
/**
* Create a combo box that holds text entries.
@ -366,7 +335,7 @@ class WidgetFactory :
* @return the image.
*/
Glib::RefPtr<Gdk::Pixbuf>
getPixbuf(ImageType imageName) throw ();
getPixbuf(WidgetConstants::ImageType imageName) throw ();
/**
* Create and return a container holding an image.
@ -376,7 +345,7 @@ class WidgetFactory :
* @return the container holding the requested image.
*/
Gtk::Image *
createImage(ImageType imageName) throw ();
createImage(WidgetConstants::ImageType imageName) throw ();
/**
* Create and return a ZebraTreeView instance.

View file

@ -50,7 +50,7 @@
#include <gtkmm/window.h>
#include "LiveSupport/Core/Ptr.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
#include "LiveSupport/Widgets/WidgetConstants.h"
#include "LiveSupport/Widgets/CornerImages.h"
#include "LiveSupport/Widgets/ImageButton.h"
#include "LiveSupport/Widgets/BlueBin.h"
@ -269,7 +269,7 @@ class ZebraTreeView : public Gtk::TreeView
*/
int
appendColumn(const Glib::ustring& title,
WidgetFactory::ImageButtonType buttonType,
WidgetConstants::ImageButtonType buttonType,
int minimumWidth = 0)
throw ();

View file

@ -45,6 +45,7 @@
#include "LiveSupport/Core/Ptr.h"
#include "LiveSupport/Widgets/Button.h"
#include "LiveSupport/Widgets/WhiteWindow.h"
namespace LiveSupport {

View file

@ -58,8 +58,6 @@ using namespace LiveSupport::Widgets;
*----------------------------------------------------------------------------*/
Notebook :: Notebook(void) throw ()
{
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
layout = Gtk::manage(new Gtk::VBox());
tabBox = Gtk::manage(new Gtk::HBox());
pageHolder = Gtk::manage(new Gtk::Alignment());
@ -216,7 +214,7 @@ Notebook :: appendPage(Gtk::Widget & widget,
{
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
Button * button = wf->createButton(label,
WidgetFactory::tabButton);
WidgetConstants::tabButton);
Page * page = new Page(this, pageList.size(), &widget, button);
pageList.push_back(page);

View file

@ -72,13 +72,13 @@ TestWindow :: TestWindow (void)
// init the imageButtons
hugeImageButton = Gtk::manage(
widgetFactory->createButton(WidgetFactory::hugePlayButton));
widgetFactory->createButton(WidgetConstants::hugePlayButton));
cuePlayImageButton = Gtk::manage(
widgetFactory->createButton(WidgetFactory::cuePlayButton));
widgetFactory->createButton(WidgetConstants::cuePlayButton));
cuePlayImageButton->signal_clicked().connect(sigc::mem_fun(*this,
&TestWindow::onPlayButtonClicked));
cueStopImageButton = Gtk::manage(
widgetFactory->createButton(WidgetFactory::cueStopButton));
widgetFactory->createButton(WidgetConstants::cueStopButton));
cueStopImageButton->signal_clicked().connect(sigc::mem_fun(*this,
&TestWindow::onStopButtonClicked));

View file

@ -35,6 +35,8 @@
#include <iostream>
#include "LiveSupport/Widgets/WidgetFactory.h"
#include "LiveSupport/Widgets/WhiteWindow.h"
@ -55,7 +57,7 @@ using namespace LiveSupport::Widgets;
/*------------------------------------------------------------------------------
* Constructor for windows with image titles.
*----------------------------------------------------------------------------*/
WhiteWindow :: WhiteWindow(WidgetFactory::ImageType title,
WhiteWindow :: WhiteWindow(WidgetConstants::ImageType title,
Colors::ColorName backgroundColor,
Ptr<CornerImages>::Ref cornerImages,
int properties)
@ -133,7 +135,7 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
int padding = 5;
if (!(properties & isModal)) {
closeButton = Gtk::manage(wf->createButton(
WidgetFactory::windowCloseButton));
WidgetConstants::windowCloseButton));
cornerButtonBox->pack_end(*closeButton, Gtk::PACK_SHRINK, padding);
padding = 0;
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
@ -141,14 +143,14 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
}
if (properties & isResizable) {
maximizeButton = Gtk::manage(wf->createButton(
WidgetFactory::windowMaximizeButton));
WidgetConstants::windowMaximizeButton));
cornerButtonBox->pack_end(*maximizeButton, Gtk::PACK_SHRINK, padding);
padding = (padding == 0) ? 5 : 0;
maximizeButton->signal_clicked().connect(sigc::mem_fun(*this,
&WhiteWindow::onMaximizeButtonClicked));
minimizeButton = Gtk::manage(wf->createButton(
WidgetFactory::windowMinimizeButton));
WidgetConstants::windowMinimizeButton));
cornerButtonBox->pack_end(*minimizeButton, Gtk::PACK_SHRINK, padding);
minimizeButton->signal_clicked().connect(sigc::mem_fun(*this,
&WhiteWindow::onMinimizeButtonClicked));
@ -167,7 +169,7 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
// create the resize image
if (properties & isResizable) {
resizeImage = Gtk::manage(wf->createImage(WidgetFactory::resizeImage));
resizeImage = Gtk::manage(wf->createImage(WidgetConstants::resizeImage));
resizeEventBox = Gtk::manage(new Gtk::EventBox());
resizeEventBox->modify_bg(Gtk::STATE_NORMAL, bgColor);
resizeEventBox->add(*resizeImage);

View file

@ -37,7 +37,6 @@
#include <gtkmm/entry.h>
#include "LiveSupport/Widgets/Colors.h"
#include "LiveSupport/Widgets/ZebraTreeView.h"
#include "MessageWindow.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
@ -389,20 +388,21 @@ WidgetFactory :: configure(const xmlpp::Element & element)
whiteWindowImages.reset(new CornerImages(path + whiteWindowPath));
// load the miscellaneous images
imageTypePixbufs[resizeImage] = loadImage(resizeImageName);
imageTypePixbufs[scratchpadWindowTitleImage]
imageTypePixbufs[WidgetConstants::resizeImage]
= loadImage(resizeImageName);
imageTypePixbufs[WidgetConstants::scratchpadWindowTitleImage]
= loadImage(scratchpadWindowTitleImageName);
imageTypePixbufs[searchWindowTitleImage]
imageTypePixbufs[WidgetConstants::searchWindowTitleImage]
= loadImage(searchWindowTitleImageName);
imageTypePixbufs[liveModeWindowTitleImage]
imageTypePixbufs[WidgetConstants::liveModeWindowTitleImage]
= loadImage(liveModeWindowTitleImageName);
imageTypePixbufs[playlistsWindowTitleImage]
imageTypePixbufs[WidgetConstants::playlistsWindowTitleImage]
= loadImage(playlistsWindowTitleImageName);
imageTypePixbufs[schedulerWindowTitleImage]
imageTypePixbufs[WidgetConstants::schedulerWindowTitleImage]
= loadImage(schedulerWindowTitleImageName);
imageTypePixbufs[audioClipIconImage]
imageTypePixbufs[WidgetConstants::audioClipIconImage]
= loadImage(audioClipIconImageName);
imageTypePixbufs[playlistIconImage]
imageTypePixbufs[WidgetConstants::playlistIconImage]
= loadImage(playlistIconImageName);
}
@ -437,14 +437,14 @@ WidgetFactory :: loadImage(const std::string imageName)
* Create a button
*----------------------------------------------------------------------------*/
Button *
WidgetFactory :: createButton(const Glib::ustring & label,
ButtonType type) throw ()
WidgetFactory :: createButton(const Glib::ustring & label,
WidgetConstants::ButtonType type) throw ()
{
switch (type) {
case pushButton:
case WidgetConstants::pushButton:
return new Button(label, buttonImages);
case tabButton:
case WidgetConstants::tabButton:
return new Button(label, tabButtonImages);
default:
@ -529,83 +529,84 @@ WidgetFactory :: createEntryBin(void) throw ()
* Create a stock button
*----------------------------------------------------------------------------*/
ImageButton *
WidgetFactory :: createButton(ImageButtonType type) throw ()
WidgetFactory :: createButton(WidgetConstants::ImageButtonType type)
throw ()
{
Glib::RefPtr<Gdk::Pixbuf> passiveImage;
Glib::RefPtr<Gdk::Pixbuf> rollImage;
switch (type) {
case deleteButton:
case WidgetConstants::deleteButton:
passiveImage = loadImage(deleteButtonPassiveName);
rollImage = loadImage(deleteButtonRollName);
break;
case plusButton:
case WidgetConstants::plusButton:
passiveImage = loadImage(plusButtonPassiveName);
rollImage = loadImage(plusButtonRollName);
break;
case minusButton:
case WidgetConstants::minusButton:
passiveImage = loadImage(minusButtonPassiveName);
rollImage = loadImage(minusButtonRollName);
break;
case smallPlayButton:
case WidgetConstants::smallPlayButton:
passiveImage = loadImage(smallPlayButtonPassiveName);
rollImage = loadImage(smallPlayButtonRollName);
break;
case smallPauseButton:
case WidgetConstants::smallPauseButton:
passiveImage = loadImage(smallPauseButtonPassiveName);
rollImage = loadImage(smallPauseButtonRollName);
break;
case smallStopButton:
case WidgetConstants::smallStopButton:
passiveImage = loadImage(smallStopButtonPassiveName);
rollImage = loadImage(smallStopButtonRollName);
break;
case hugePlayButton:
case WidgetConstants::hugePlayButton:
passiveImage = loadImage(hugePlayButtonPassiveName);
rollImage = loadImage(hugePlayButtonRollName);
break;
case cuePlayButton:
case WidgetConstants::cuePlayButton:
passiveImage = loadImage(cuePlayButtonPassiveName);
rollImage = loadImage(cuePlayButtonRollName);
break;
case cueStopButton:
case WidgetConstants::cueStopButton:
passiveImage = loadImage(cueStopButtonPassiveName);
rollImage = loadImage(cueStopButtonRollName);
break;
case masterPlayButton:
case WidgetConstants::masterPlayButton:
passiveImage = loadImage(masterPlayButtonPassiveName);
rollImage = loadImage(masterPlayButtonRollName);
break;
case masterPauseButton:
case WidgetConstants::masterPauseButton:
passiveImage = loadImage(masterPauseButtonPassiveName);
rollImage = loadImage(masterPauseButtonRollName);
break;
case masterStopButton:
case WidgetConstants::masterStopButton:
passiveImage = loadImage(masterStopButtonPassiveName);
rollImage = loadImage(masterStopButtonRollName);
break;
case windowMinimizeButton:
case WidgetConstants::windowMinimizeButton:
passiveImage = loadImage(windowMinimizeButtonPassiveName);
rollImage = loadImage(windowMinimizeButtonRollName);
break;
case windowMaximizeButton:
case WidgetConstants::windowMaximizeButton:
passiveImage = loadImage(windowMaximizeButtonPassiveName);
rollImage = loadImage(windowMaximizeButtonRollName);
break;
case windowCloseButton:
case WidgetConstants::windowCloseButton:
passiveImage = loadImage(windowCloseButtonPassiveName);
rollImage = loadImage(windowCloseButtonRollName);
break;
@ -622,7 +623,7 @@ WidgetFactory :: createButton(ImageButtonType type) throw ()
* Return a Gdk::Pixbuf reference to a named image
*----------------------------------------------------------------------------*/
Glib::RefPtr<Gdk::Pixbuf>
WidgetFactory :: getPixbuf(ImageType imageName) throw ()
WidgetFactory :: getPixbuf(WidgetConstants::ImageType imageName) throw ()
{
return imageTypePixbufs[imageName];
}
@ -632,7 +633,7 @@ WidgetFactory :: getPixbuf(ImageType imageName) throw ()
* Create a Gtk::Image
*----------------------------------------------------------------------------*/
Gtk::Image *
WidgetFactory :: createImage(ImageType imageName) throw ()
WidgetFactory :: createImage(WidgetConstants::ImageType imageName) throw ()
{
return new Gtk::Image(getPixbuf(imageName));
}

View file

@ -36,6 +36,7 @@
#include <iostream>
#include <sstream>
#include "LiveSupport/Widgets/WidgetFactory.h"
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
#include "LiveSupport/Widgets/ZebraTreeView.h"
@ -155,7 +156,7 @@ ZebraTreeView :: appendColumn(
int
ZebraTreeView :: appendColumn(
const Glib::ustring & title,
WidgetFactory::ImageButtonType buttonType,
WidgetConstants::ImageButtonType buttonType,
int minimumWidth)
throw ()
{

View file

@ -89,12 +89,13 @@ AdvancedSearchItem :: AdvancedSearchItem(
pack_start(*valueEntry, Gtk::PACK_EXPAND_WIDGET, 5);
if (isFirst) {
plusButton = Gtk::manage(wf->createButton(WidgetFactory::plusButton));
plusButton = Gtk::manage(wf->createButton(WidgetConstants::plusButton));
pack_start(*plusButton, Gtk::PACK_SHRINK, 5);
plusButton->signal_clicked().connect(sigc::mem_fun(*this,
&AdvancedSearchItem::onPlusButtonClicked ));
} else {
closeButton = Gtk::manage(wf->createButton(WidgetFactory::minusButton));
closeButton = Gtk::manage(wf->createButton(
WidgetConstants::minusButton));
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
&AdvancedSearchItem::destroy_ ));
pack_start(*closeButton, Gtk::PACK_SHRINK, 5);

View file

@ -69,11 +69,11 @@ CuePlayer :: CuePlayer(Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
playButton = Gtk::manage(wf->createButton(
WidgetFactory::smallPlayButton ));
WidgetConstants::smallPlayButton ));
pauseButton = Gtk::manage(wf->createButton(
WidgetFactory::smallPauseButton ));
WidgetConstants::smallPauseButton ));
stopButton = Gtk::manage(wf->createButton(
WidgetFactory::smallStopButton ));
WidgetConstants::smallStopButton ));
playButton->signal_clicked().connect(sigc::mem_fun(*this,
&CuePlayer::onPlayButtonClicked ));

View file

@ -71,7 +71,7 @@ static const Glib::ustring windowName = "liveModeWindow";
LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle)
throw ()
: WhiteWindow(WidgetFactory::liveModeWindowTitleImage,
: WhiteWindow(WidgetConstants::liveModeWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),
@ -98,7 +98,7 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
// Add the TreeView's view columns:
try {
treeView->appendLineNumberColumn("", 2 /* offset */, 50);
// treeView->appendColumn("", WidgetFactory::hugePlayButton, 82);
// treeView->appendColumn("", WidgetConstants::hugePlayButton, 82);
treeView->appendColumn("", modelColumns.infoColumn, 200);
} catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl;
@ -124,7 +124,7 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
// Create the play etc buttons:
Gtk::HBox * buttonBox = Gtk::manage(new Gtk::HBox);
ImageButton * outputPlayButton = Gtk::manage(wf->createButton(
WidgetFactory::hugePlayButton ));
WidgetConstants::hugePlayButton ));
Gtk::VBox * cueAudioBox = Gtk::manage(new Gtk::VBox);
Gtk::HBox * cueAudioLabelBox = Gtk::manage(new Gtk::HBox);
Gtk::Label * cueAudioLabel;

View file

@ -75,7 +75,7 @@ MasterPanelUserInfoWidget :: MasterPanelUserInfoWidget (
logInOutButton->signal_clicked().connect(sigc::mem_fun(*this,
&MasterPanelUserInfoWidget::onLoginButtonClicked));
closeButton = Gtk::manage(wf->createButton(WidgetFactory::deleteButton));
closeButton = Gtk::manage(wf->createButton(WidgetConstants::deleteButton));
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
&MasterPanelUserInfoWidget::onCloseButtonClicked));

View file

@ -74,11 +74,11 @@ NowPlaying :: NowPlaying(Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
playButton = Gtk::manage(wf->createButton(
WidgetFactory::masterPlayButton ));
WidgetConstants::masterPlayButton ));
pauseButton = Gtk::manage(wf->createButton(
WidgetFactory::masterPauseButton ));
WidgetConstants::masterPauseButton ));
stopButton = Gtk::manage(wf->createButton(
WidgetFactory::masterStopButton ));
WidgetConstants::masterStopButton ));
playButton->signal_clicked().connect(sigc::mem_fun(*this,
&NowPlaying::onPlayButtonClicked ));

View file

@ -66,7 +66,7 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
Ptr<ResourceBundle>::Ref bundle,
Ptr<Playlist>::Ref playlist)
throw ()
: WhiteWindow(WidgetFactory::schedulerWindowTitleImage,
: WhiteWindow(WidgetConstants::schedulerWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),

View file

@ -68,7 +68,7 @@ static const Glib::ustring windowName = "schedulerWindow";
SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle)
throw ()
: WhiteWindow(WidgetFactory::schedulerWindowTitleImage,
: WhiteWindow(WidgetConstants::schedulerWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),

View file

@ -70,7 +70,7 @@ static const Glib::ustring windowName = "scratchpadWindow";
ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle)
throw ()
: WhiteWindow(WidgetFactory::scratchpadWindowTitleImage,
: WhiteWindow(WidgetConstants::scratchpadWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),
@ -575,17 +575,17 @@ ScratchpadWindow :: addItem(Ptr<Playable>::Ref playable)
switch (playable->getType()) {
case Playable::AudioClipType:
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetFactory::audioClipIconImage);
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetConstants::audioClipIconImage);
break;
case Playable::PlaylistType:
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetFactory::playlistIconImage);
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetConstants::playlistIconImage);
break;
}
row[modelColumns.titleColumn] = Glib::Markup::escape_text(
row[modelColumns.titleColumn] = Glib::Markup::escape_text(
*playable->getTitle());
// cache the item if it hasn't been cached yet

View file

@ -69,7 +69,7 @@ using namespace LiveSupport::GLiveSupport;
SearchWindow :: SearchWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle)
throw ()
: WhiteWindow(WidgetFactory::searchWindowTitleImage,
: WhiteWindow(WidgetConstants::searchWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),
@ -373,11 +373,11 @@ SearchWindow :: onSearch(Ptr<SearchCriteria>::Ref criteria)
switch (playable->getType()) {
case Playable::AudioClipType:
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetFactory::audioClipIconImage);
WidgetConstants::audioClipIconImage);
break;
case Playable::PlaylistType:
row[modelColumns.typeColumn] = widgetFactory->getPixbuf(
WidgetFactory::playlistIconImage);
WidgetConstants::playlistIconImage);
break;
default:
break;

View file

@ -70,7 +70,7 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow (
Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle)
throw ()
: WhiteWindow(WidgetFactory::playlistsWindowTitleImage,
: WhiteWindow(WidgetConstants::playlistsWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),