refactoring, stage 2:
* standalone windows now know their own bundle name, instead of having to be told at construction; * collected bundle, gLiveSupport, glade, and mainWindow initialization into the parent class.
This commit is contained in:
parent
669e054fb4
commit
cd8f824661
23 changed files with 341 additions and 358 deletions
|
@ -180,6 +180,20 @@ class LocalizedObject
|
||||||
this->bundle = bundle;
|
this->bundle = bundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a resource bundle nested inside our bundle.
|
||||||
|
*
|
||||||
|
* @param key the name of the resource bundle to get.
|
||||||
|
* @exception std::invalid_argument if there is no bundle by
|
||||||
|
* the specified key
|
||||||
|
*/
|
||||||
|
Ptr<ResourceBundle>::Ref
|
||||||
|
getBundle(const Glib::ustring & key)
|
||||||
|
throw (std::invalid_argument)
|
||||||
|
{
|
||||||
|
return getBundle(getBundle(), key.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a resource bundle nested inside our bundle.
|
* Get a resource bundle nested inside our bundle.
|
||||||
*
|
*
|
||||||
|
|
|
@ -258,7 +258,8 @@ LDFLAGS = @LDFLAGS@ -pthread \
|
||||||
G_LIVESUPPORT_OBJS = ${TMP_DIR}/GLiveSupport.o \
|
G_LIVESUPPORT_OBJS = ${TMP_DIR}/GLiveSupport.o \
|
||||||
${TMP_DIR}/MasterPanelWindow.o \
|
${TMP_DIR}/MasterPanelWindow.o \
|
||||||
${TMP_DIR}/NowPlaying.o \
|
${TMP_DIR}/NowPlaying.o \
|
||||||
${TMP_DIR}/BasicWindow.o \
|
${TMP_DIR}/GuiObject.o \
|
||||||
|
${TMP_DIR}/GuiWindow.o \
|
||||||
${TMP_DIR}/LoginWindow.o \
|
${TMP_DIR}/LoginWindow.o \
|
||||||
${TMP_DIR}/UploadFileWindow.o \
|
${TMP_DIR}/UploadFileWindow.o \
|
||||||
${TMP_DIR}/ScratchpadWindow.o \
|
${TMP_DIR}/ScratchpadWindow.o \
|
||||||
|
|
|
@ -1579,41 +1579,7 @@ GLiveSupport :: getLocalizedWindowName(
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: putWindowPosition(Ptr<const Gtk::Window>::Ref window)
|
GLiveSupport :: putWindowPosition(const GuiWindow * window)
|
||||||
throw ()
|
|
||||||
{
|
|
||||||
WindowPositionType pos;
|
|
||||||
window->get_position(pos.x, pos.y);
|
|
||||||
window->get_size(pos.width, pos.height);
|
|
||||||
|
|
||||||
windowPositions[window->get_name()] = pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Apply saved position and size data to the window.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
LiveSupport :: GLiveSupport ::
|
|
||||||
GLiveSupport :: getWindowPosition(Ptr<Gtk::Window>::Ref window)
|
|
||||||
throw ()
|
|
||||||
{
|
|
||||||
WindowPositionsListType::const_iterator it = windowPositions.find(
|
|
||||||
window->get_name());
|
|
||||||
if (it != windowPositions.end()) {
|
|
||||||
WindowPositionType pos = it->second;
|
|
||||||
window->move(pos.x, pos.y);
|
|
||||||
window->resize(pos.width, pos.height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Save the position and size of the window.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
LiveSupport :: GLiveSupport ::
|
|
||||||
GLiveSupport :: putWindowPosition(const BasicWindow * window)
|
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
WindowPositionType pos;
|
WindowPositionType pos;
|
||||||
|
@ -1629,7 +1595,7 @@ GLiveSupport :: putWindowPosition(const BasicWindow * window)
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: getWindowPosition(BasicWindow * window)
|
GLiveSupport :: getWindowPosition(GuiWindow * window)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
WindowPositionsListType::const_iterator it = windowPositions.find(
|
WindowPositionsListType::const_iterator it = windowPositions.find(
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include "KeyboardShortcutList.h"
|
#include "KeyboardShortcutList.h"
|
||||||
#include "TaskbarIcons.h"
|
#include "TaskbarIcons.h"
|
||||||
#include "ContentsStorable.h"
|
#include "ContentsStorable.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
|
@ -1206,8 +1206,6 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
/**
|
/**
|
||||||
* Save the position and size of the window.
|
* Save the position and size of the window.
|
||||||
*
|
*
|
||||||
* TODO: remove this function, and only use its overloaded pair.
|
|
||||||
*
|
|
||||||
* The coordinates of the window's North-West corner and the
|
* The coordinates of the window's North-West corner and the
|
||||||
* size of the window are read, and stored in a variable of the
|
* size of the window are read, and stored in a variable of the
|
||||||
* GLiveSupport object, indexed by the window's get_name().
|
* GLiveSupport object, indexed by the window's get_name().
|
||||||
|
@ -1216,35 +1214,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
* @see getWindowPosition()
|
* @see getWindowPosition()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
putWindowPosition(Ptr<const Gtk::Window>::Ref window) throw ();
|
putWindowPosition(const GuiWindow * window) throw ();
|
||||||
|
|
||||||
/**
|
|
||||||
* Apply saved position and size data to the window.
|
|
||||||
*
|
|
||||||
* TODO: remove this function, and only use its overloaded pair.
|
|
||||||
*
|
|
||||||
* If position and size data were previously saved for a window
|
|
||||||
* with the same get_name(), then these data are read and applied to
|
|
||||||
* the window, restoring its position and size.
|
|
||||||
*
|
|
||||||
* @param window the window to apply the position and size info to.
|
|
||||||
* @see putWindowPosition()
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
getWindowPosition(Ptr<Gtk::Window>::Ref window) throw ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the position and size of the window.
|
|
||||||
*
|
|
||||||
* The coordinates of the window's North-West corner and the
|
|
||||||
* size of the window are read, and stored in a variable of the
|
|
||||||
* GLiveSupport object, indexed by the window's get_name().
|
|
||||||
*
|
|
||||||
* @param window the window to save the position and size of.
|
|
||||||
* @see getWindowPosition()
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
putWindowPosition(const BasicWindow * window) throw ();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply saved position and size data to the window.
|
* Apply saved position and size data to the window.
|
||||||
|
@ -1257,7 +1227,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
* @see putWindowPosition()
|
* @see putWindowPosition()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
getWindowPosition(BasicWindow * window) throw ();
|
getWindowPosition(GuiWindow * window) throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the saved window positions.
|
* Store the saved window positions.
|
||||||
|
|
69
campcaster/src/products/gLiveSupport/src/GuiObject.cxx
Normal file
69
campcaster/src/products/gLiveSupport/src/GuiObject.cxx
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2004 Media Development Loan Fund
|
||||||
|
|
||||||
|
This file is part of the Campcaster project.
|
||||||
|
http://campcaster.campware.org/
|
||||||
|
To report bugs, send an e-mail to bugs@campware.org
|
||||||
|
|
||||||
|
Campcaster 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.
|
||||||
|
|
||||||
|
Campcaster 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 Campcaster; 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$
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* ============================================================ include files */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "configure.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "GLiveSupport.h"
|
||||||
|
#include "GuiObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace LiveSupport::Core;
|
||||||
|
using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
|
/* =================================================== local data structures */
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================ local constants & macros */
|
||||||
|
|
||||||
|
|
||||||
|
/* =============================================== local function prototypes */
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================= module code */
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Constructor.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
GuiObject :: GuiObject (const Glib::ustring & bundleName)
|
||||||
|
throw ()
|
||||||
|
: LocalizedObject()
|
||||||
|
{
|
||||||
|
gLiveSupport = GLiveSupport::getInstance();
|
||||||
|
|
||||||
|
if (bundleName == "") {
|
||||||
|
setBundle(gLiveSupport->getBundle());
|
||||||
|
} else {
|
||||||
|
setBundle(gLiveSupport->getBundle(bundleName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
109
campcaster/src/products/gLiveSupport/src/GuiObject.h
Normal file
109
campcaster/src/products/gLiveSupport/src/GuiObject.h
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2004 Media Development Loan Fund
|
||||||
|
|
||||||
|
This file is part of the Campcaster project.
|
||||||
|
http://campcaster.campware.org/
|
||||||
|
To report bugs, send an e-mail to bugs@campware.org
|
||||||
|
|
||||||
|
Campcaster 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.
|
||||||
|
|
||||||
|
Campcaster 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 Campcaster; 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 GuiObject_h
|
||||||
|
#define GuiObject_h
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#error This is a C++ include file
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================ include files */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "configure.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <unicode/resbund.h>
|
||||||
|
#include <gtkmm.h>
|
||||||
|
#include <libglademm.h>
|
||||||
|
|
||||||
|
#include "LiveSupport/Core/LocalizedObject.h"
|
||||||
|
|
||||||
|
namespace LiveSupport {
|
||||||
|
namespace GLiveSupport {
|
||||||
|
|
||||||
|
using namespace LiveSupport::Core;
|
||||||
|
|
||||||
|
class GLiveSupport;
|
||||||
|
|
||||||
|
/* ================================================================ constants */
|
||||||
|
|
||||||
|
|
||||||
|
/* =================================================================== macros */
|
||||||
|
|
||||||
|
|
||||||
|
/* =============================================================== data types */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The common ancestor of all windows and sub-windows in the GUI.
|
||||||
|
*
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$
|
||||||
|
*/
|
||||||
|
class GuiObject : public LocalizedObject
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The GLiveSupport object, holding the state of the application.
|
||||||
|
*/
|
||||||
|
Ptr<GLiveSupport>::Ref gLiveSupport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param bundleName the name of the sub-bundle for this object;
|
||||||
|
* can be "" to indicate the outermost bundle.
|
||||||
|
*/
|
||||||
|
GuiObject(const Glib::ustring & bundleName) throw ();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Virtual destructor.
|
||||||
|
*/
|
||||||
|
virtual
|
||||||
|
~GuiObject(void) throw ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ================================================= external data structures */
|
||||||
|
|
||||||
|
|
||||||
|
/* ====================================================== function prototypes */
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace GLiveSupport
|
||||||
|
} // namespace LiveSupport
|
||||||
|
|
||||||
|
#endif // GuiObject_h
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
using namespace LiveSupport::Core;
|
||||||
|
@ -62,22 +62,21 @@ const Glib::ustring applicationTitle = "Campcaster";
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
BasicWindow :: BasicWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
GuiWindow :: GuiWindow (const Glib::ustring & bundleName,
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
const Glib::ustring & gladeFileName,
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
Gtk::ToggleButton * windowOpenerButton)
|
||||||
const Glib::ustring & gladeFileName)
|
|
||||||
throw ()
|
throw ()
|
||||||
: LocalizedObject(bundle),
|
: GuiObject(bundleName),
|
||||||
gLiveSupport(gLiveSupport),
|
|
||||||
windowOpenerButton(windowOpenerButton)
|
windowOpenerButton(windowOpenerButton)
|
||||||
{
|
{
|
||||||
glade = Gnome::Glade::Xml::create(gladeFileName);
|
glade = Gnome::Glade::Xml::create(gLiveSupport->getGladeDir() +
|
||||||
|
gladeFileName);
|
||||||
|
|
||||||
glade->get_widget("mainWindow1", mainWindow);
|
glade->get_widget("mainWindow1", mainWindow);
|
||||||
setTitle(getResourceUstring("windowTitle"));
|
setTitle(getResourceUstring("windowTitle"));
|
||||||
|
|
||||||
mainWindow->signal_delete_event().connect(sigc::mem_fun(*this,
|
mainWindow->signal_delete_event().connect(sigc::mem_fun(*this,
|
||||||
&BasicWindow::onDeleteEvent));
|
&GuiWindow::onDeleteEvent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +84,7 @@ BasicWindow :: BasicWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
* Restore the window position and show the window.
|
* Restore the window position and show the window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
BasicWindow :: show (void) throw ()
|
GuiWindow :: show (void) throw ()
|
||||||
{
|
{
|
||||||
preShow();
|
preShow();
|
||||||
mainWindow->show();
|
mainWindow->show();
|
||||||
|
@ -96,7 +95,7 @@ BasicWindow :: show (void) throw ()
|
||||||
* Stuff to do before showing the window.
|
* Stuff to do before showing the window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
BasicWindow :: preShow (void) throw ()
|
GuiWindow :: preShow (void) throw ()
|
||||||
{
|
{
|
||||||
gLiveSupport->getWindowPosition(this);
|
gLiveSupport->getWindowPosition(this);
|
||||||
if (windowOpenerButton) {
|
if (windowOpenerButton) {
|
||||||
|
@ -109,7 +108,7 @@ BasicWindow :: preShow (void) throw ()
|
||||||
* Save the window position and hide the window.
|
* Save the window position and hide the window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
BasicWindow :: hide (void) throw ()
|
GuiWindow :: hide (void) throw ()
|
||||||
{
|
{
|
||||||
preHide();
|
preHide();
|
||||||
mainWindow->hide();
|
mainWindow->hide();
|
||||||
|
@ -120,7 +119,7 @@ BasicWindow :: hide (void) throw ()
|
||||||
* Signal handler for the close button getting clicked.
|
* Signal handler for the close button getting clicked.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
bool
|
bool
|
||||||
BasicWindow :: onDeleteEvent (GdkEventAny * event) throw ()
|
GuiWindow :: onDeleteEvent (GdkEventAny * event) throw ()
|
||||||
{
|
{
|
||||||
preHide();
|
preHide();
|
||||||
return false;
|
return false;
|
||||||
|
@ -131,7 +130,7 @@ BasicWindow :: onDeleteEvent (GdkEventAny * event) throw ()
|
||||||
* Stuff to do before hiding the window.
|
* Stuff to do before hiding the window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
BasicWindow :: preHide (void) throw ()
|
GuiWindow :: preHide (void) throw ()
|
||||||
{
|
{
|
||||||
gLiveSupport->putWindowPosition(this);
|
gLiveSupport->putWindowPosition(this);
|
||||||
if (windowOpenerButton) {
|
if (windowOpenerButton) {
|
||||||
|
@ -144,7 +143,7 @@ BasicWindow :: preHide (void) throw ()
|
||||||
* Set the title of the window.
|
* Set the title of the window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
BasicWindow :: setTitle (Ptr<const Glib::ustring>::Ref title)
|
GuiWindow :: setTitle (Ptr<const Glib::ustring>::Ref title)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
windowTitle = title;
|
windowTitle = title;
|
|
@ -26,8 +26,8 @@
|
||||||
Location : $URL$
|
Location : $URL$
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
#ifndef BasicWindow_h
|
#ifndef GuiWindow_h
|
||||||
#define BasicWindow_h
|
#define GuiWindow_h
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#error This is a C++ include file
|
#error This is a C++ include file
|
||||||
|
@ -40,19 +40,14 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <unicode/resbund.h>
|
#include "GuiObject.h"
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/LocalizedObject.h"
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
namespace GLiveSupport {
|
namespace GLiveSupport {
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
using namespace LiveSupport::Core;
|
||||||
|
|
||||||
class GLiveSupport;
|
|
||||||
|
|
||||||
/* ================================================================ constants */
|
/* ================================================================ constants */
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,12 +57,12 @@ class GLiveSupport;
|
||||||
/* =============================================================== data types */
|
/* =============================================================== data types */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The common ancestor of all openable and closable windows in the GUI.
|
* The common ancestor of all standalone windows in the GUI.
|
||||||
*
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class BasicWindow : public LocalizedObject
|
class GuiWindow : public GuiObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -92,9 +87,9 @@ class BasicWindow : public LocalizedObject
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GLiveSupport object, holding the state of the application.
|
* The Glade object, containing the visual design.
|
||||||
*/
|
*/
|
||||||
Ptr<GLiveSupport>::Ref gLiveSupport;
|
Glib::RefPtr<Gnome::Glade::Xml> glade;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The button which was used to open this window.
|
* The button which was used to open this window.
|
||||||
|
@ -106,41 +101,34 @@ class BasicWindow : public LocalizedObject
|
||||||
*/
|
*/
|
||||||
Gtk::Window * mainWindow;
|
Gtk::Window * mainWindow;
|
||||||
|
|
||||||
/**
|
|
||||||
* The Glade object, containing the visual design.
|
|
||||||
*/
|
|
||||||
Glib::RefPtr<Gnome::Glade::Xml> glade;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signal handler for the close button getting clicked.
|
* Signal handler for the close button getting clicked.
|
||||||
*/
|
*/
|
||||||
virtual bool
|
virtual bool
|
||||||
onDeleteEvent(GdkEventAny * event) throw ();
|
onDeleteEvent(GdkEventAny * event) throw ();
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the GLiveSupport application object.
|
* @param bundleName the name of the sub-bundle for this object;
|
||||||
* @param bundle the resource bundle holding the localized
|
* can be "" to indicate the outermost bundle.
|
||||||
* resources for this window.
|
* @param gladeFileName the name of the Glade file for this window.
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window (optional).
|
||||||
* @param gladeFileName the Glade file for this window.
|
|
||||||
*/
|
*/
|
||||||
BasicWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
GuiWindow(const Glib::ustring & bundleName,
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
const Glib::ustring & gladeFileName,
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
Gtk::ToggleButton * windowOpenerButton = 0)
|
||||||
const Glib::ustring & gladeFileName)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual destructor.
|
* Virtual destructor.
|
||||||
*/
|
*/
|
||||||
virtual
|
virtual
|
||||||
~BasicWindow(void) throw ()
|
~GuiWindow(void) throw ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,5 +194,5 @@ class BasicWindow : public LocalizedObject
|
||||||
} // namespace GLiveSupport
|
} // namespace GLiveSupport
|
||||||
} // namespace LiveSupport
|
} // namespace LiveSupport
|
||||||
|
|
||||||
#endif // BasicWindow_h
|
#endif // GuiWindow_h
|
||||||
|
|
|
@ -54,6 +54,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "liveModeWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -74,16 +79,11 @@ const Glib::ustring userPreferencesKeyName = "liveModeContents";
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
LiveModeWindow :: LiveModeWindow (Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton),
|
||||||
gladeDir + gladeFileName),
|
|
||||||
gladeDir(gladeDir),
|
|
||||||
isDeleting(false)
|
isDeleting(false)
|
||||||
{
|
{
|
||||||
glade->get_widget_derived("treeView1", treeView);
|
glade->get_widget_derived("treeView1", treeView);
|
||||||
|
@ -407,7 +407,7 @@ LiveModeWindow :: onSchedulePlaylist(void) throw ()
|
||||||
if (playlist) {
|
if (playlist) {
|
||||||
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(
|
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(
|
||||||
gLiveSupport,
|
gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
schedulePlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
schedulePlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
||||||
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
||||||
|
@ -430,7 +430,7 @@ LiveModeWindow :: onExportPlaylist(void) throw ()
|
||||||
if (playlist) {
|
if (playlist) {
|
||||||
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
||||||
gLiveSupport,
|
gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
exportPlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
exportPlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
||||||
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
||||||
|
@ -704,6 +704,6 @@ LiveModeWindow :: hide(void) throw ()
|
||||||
schedulePlaylistWindow->getWindow()->hide();
|
schedulePlaylistWindow->getWindow()->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicWindow::hide();
|
GuiWindow::hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,14 +41,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unicode/resbund.h>
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Widgets/PlayableTreeModelColumnRecord.h"
|
#include "LiveSupport/Widgets/PlayableTreeModelColumnRecord.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
#include "ContentsStorable.h"
|
#include "ContentsStorable.h"
|
||||||
#include "CuePlayer.h"
|
#include "CuePlayer.h"
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
|
@ -76,16 +73,11 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class LiveModeWindow : public BasicWindow,
|
class LiveModeWindow : public GuiWindow,
|
||||||
public ContentsStorable
|
public ContentsStorable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* The directory where the Glade files are.
|
|
||||||
*/
|
|
||||||
Glib::ustring gladeDir;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Playable item at the top of the window.
|
* The Playable item at the top of the window.
|
||||||
*/
|
*/
|
||||||
|
@ -310,18 +302,10 @@ class LiveModeWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
LiveModeWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
LiveModeWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -444,7 +428,7 @@ class LiveModeWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Hide the window.
|
* Hide the window.
|
||||||
*
|
*
|
||||||
* This overrides BasicWindow::hide(), and closes the Export Playlist
|
* This overrides GuiWindow::hide(), and closes the Export Playlist
|
||||||
* and Schedule Playlist pop-up windows, if they are still open.
|
* and Schedule Playlist pop-up windows, if they are still open.
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
|
|
|
@ -97,8 +97,8 @@ MasterPanelWindow :: MasterPanelWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
const Glib::ustring & gladeDir)
|
const Glib::ustring & gladeDir)
|
||||||
throw ()
|
throw ()
|
||||||
: LocalizedObject(bundle),
|
: LocalizedObject(bundle),
|
||||||
gLiveSupport(gLiveSupport),
|
|
||||||
gladeDir(gladeDir),
|
gladeDir(gladeDir),
|
||||||
|
gLiveSupport(gLiveSupport),
|
||||||
userIsLoggedIn(false)
|
userIsLoggedIn(false)
|
||||||
{
|
{
|
||||||
glade = Gnome::Glade::Xml::create(gladeDir + gladeFileName);
|
glade = Gnome::Glade::Xml::create(gladeDir + gladeFileName);
|
||||||
|
@ -350,12 +350,7 @@ MasterPanelWindow :: updateLiveModeWindow(Ptr<Playable>::Ref playable)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
if (!liveModeWindow.get()) {
|
if (!liveModeWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("liveModeWindow");
|
liveModeWindow.reset(new LiveModeWindow(liveModeButton));
|
||||||
|
|
||||||
liveModeWindow.reset(new LiveModeWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
liveModeButton,
|
|
||||||
gladeDir));
|
|
||||||
gLiveSupport->loadWindowContents(liveModeWindow);
|
gLiveSupport->loadWindowContents(liveModeWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,12 +370,7 @@ void
|
||||||
MasterPanelWindow :: updateUploadFileWindow(void) throw ()
|
MasterPanelWindow :: updateUploadFileWindow(void) throw ()
|
||||||
{
|
{
|
||||||
if (!uploadFileWindow.get()) {
|
if (!uploadFileWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("uploadFileWindow");
|
uploadFileWindow.reset(new UploadFileWindow(uploadFileButton));
|
||||||
|
|
||||||
uploadFileWindow.reset(new UploadFileWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
uploadFileButton,
|
|
||||||
gladeDir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadFileWindow->show();
|
uploadFileWindow->show();
|
||||||
|
@ -396,12 +386,7 @@ MasterPanelWindow :: createScratchpadWindow(void)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
if (!scratchpadWindow.get()) {
|
if (!scratchpadWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("scratchpadWindow");
|
scratchpadWindow.reset(new ScratchpadWindow(scratchpadButton));
|
||||||
|
|
||||||
scratchpadWindow.reset(new ScratchpadWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
scratchpadButton,
|
|
||||||
gladeDir));
|
|
||||||
gLiveSupport->loadWindowContents(scratchpadWindow);
|
gLiveSupport->loadWindowContents(scratchpadWindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -432,12 +417,7 @@ void
|
||||||
MasterPanelWindow :: updatePlaylistWindow(void) throw ()
|
MasterPanelWindow :: updatePlaylistWindow(void) throw ()
|
||||||
{
|
{
|
||||||
if (!playlistWindow.get()) {
|
if (!playlistWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("playlistWindow");
|
playlistWindow.reset(new PlaylistWindow(playlistButton));
|
||||||
|
|
||||||
playlistWindow.reset(new PlaylistWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
playlistButton,
|
|
||||||
gladeDir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playlistWindow->showContents();
|
playlistWindow->showContents();
|
||||||
|
@ -456,13 +436,9 @@ MasterPanelWindow :: updateSchedulerWindow(
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
if (!schedulerWindow.get()) {
|
if (!schedulerWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("schedulerWindow");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
schedulerWindow.reset(new SchedulerWindow(gLiveSupport,
|
schedulerWindow.reset(new SchedulerWindow(schedulerButton));
|
||||||
bundle,
|
|
||||||
schedulerButton,
|
|
||||||
gladeDir));
|
|
||||||
} catch (XmlRpcException &e) {
|
} catch (XmlRpcException &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
return;
|
return;
|
||||||
|
@ -492,12 +468,7 @@ void
|
||||||
MasterPanelWindow :: updateSearchWindow(void) throw ()
|
MasterPanelWindow :: updateSearchWindow(void) throw ()
|
||||||
{
|
{
|
||||||
if (!searchWindow.get()) {
|
if (!searchWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("searchWindow");
|
searchWindow.reset(new SearchWindow(searchButton));
|
||||||
|
|
||||||
searchWindow.reset(new SearchWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
searchButton,
|
|
||||||
gladeDir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
searchWindow->show();
|
searchWindow->show();
|
||||||
|
@ -512,12 +483,7 @@ void
|
||||||
MasterPanelWindow :: updateOptionsWindow(void) throw ()
|
MasterPanelWindow :: updateOptionsWindow(void) throw ()
|
||||||
{
|
{
|
||||||
if (!optionsWindow.get()) {
|
if (!optionsWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("optionsWindow");
|
optionsWindow.reset(new OptionsWindow(optionsButton));
|
||||||
|
|
||||||
optionsWindow.reset(new OptionsWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
optionsButton,
|
|
||||||
gladeDir));
|
|
||||||
Ptr<BackupList>::Ref backupList = optionsWindow->getBackupList();
|
Ptr<BackupList>::Ref backupList = optionsWindow->getBackupList();
|
||||||
if (backupList) {
|
if (backupList) {
|
||||||
gLiveSupport->loadWindowContents(backupList.get());
|
gLiveSupport->loadWindowContents(backupList.get());
|
||||||
|
@ -715,12 +681,7 @@ MasterPanelWindow :: uploadToHub(Ptr<Playable>::Ref playable)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
if (!searchWindow.get()) {
|
if (!searchWindow.get()) {
|
||||||
Ptr<ResourceBundle>::Ref bundle = getBundle("searchWindow");
|
searchWindow.reset(new SearchWindow(searchButton));
|
||||||
|
|
||||||
searchWindow.reset(new SearchWindow(gLiveSupport,
|
|
||||||
bundle,
|
|
||||||
searchButton,
|
|
||||||
gladeDir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
searchWindow->uploadToHub(playable);
|
searchWindow->uploadToHub(playable);
|
||||||
|
|
|
@ -46,6 +46,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "optionsWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -61,15 +66,11 @@ const Glib::ustring gladeFileName = "OptionsWindow.glade";
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
OptionsWindow :: OptionsWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
OptionsWindow :: OptionsWindow (Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton)
|
||||||
gladeDir + gladeFileName)
|
|
||||||
{
|
{
|
||||||
bool canBackup = (gLiveSupport->getSessionId()
|
bool canBackup = (gLiveSupport->getSessionId()
|
||||||
&& gLiveSupport->isStorageAvailable());
|
&& gLiveSupport->isStorageAvailable());
|
||||||
|
|
|
@ -40,16 +40,13 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Core/LocalizedObject.h"
|
#include "LiveSupport/Core/LocalizedObject.h"
|
||||||
#include "LiveSupport/Core/OptionsContainer.h"
|
#include "LiveSupport/Core/OptionsContainer.h"
|
||||||
#include "LiveSupport/Widgets/ComboBoxText.h"
|
#include "LiveSupport/Widgets/ComboBoxText.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
#include "BackupView.h"
|
#include "BackupView.h"
|
||||||
#include "RdsView.h"
|
#include "RdsView.h"
|
||||||
|
@ -86,7 +83,7 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class OptionsWindow : public BasicWindow
|
class OptionsWindow : public GuiWindow
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -401,18 +398,10 @@ class OptionsWindow : public BasicWindow
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
OptionsWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
OptionsWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,6 +53,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "playlistWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -68,15 +73,11 @@ const Glib::ustring gladeFileName = "PlaylistWindow.glade";
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
PlaylistWindow :: PlaylistWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
PlaylistWindow :: PlaylistWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton),
|
||||||
gladeDir + gladeFileName),
|
|
||||||
isPlaylistModified(false)
|
isPlaylistModified(false)
|
||||||
{
|
{
|
||||||
// set up the file name entry
|
// set up the file name entry
|
||||||
|
|
|
@ -40,16 +40,11 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <unicode/resbund.h>
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Core/LocalizedObject.h"
|
#include "LiveSupport/Core/LocalizedObject.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
|
@ -88,7 +83,7 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class PlaylistWindow : public BasicWindow
|
class PlaylistWindow : public GuiWindow
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -394,18 +389,10 @@ class PlaylistWindow : public BasicWindow
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
PlaylistWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
PlaylistWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,6 +53,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "schedulerWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -69,15 +74,11 @@ const Glib::ustring gladeFileName = "SchedulerWindow.glade";
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
SchedulerWindow :: SchedulerWindow (
|
SchedulerWindow :: SchedulerWindow (
|
||||||
Ptr<GLiveSupport>::Ref gLiveSupport,
|
Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw (XmlRpcException)
|
throw (XmlRpcException)
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton)
|
||||||
gladeDir + gladeFileName)
|
|
||||||
{
|
{
|
||||||
constructScheduleView();
|
constructScheduleView();
|
||||||
constructStatusView();
|
constructStatusView();
|
||||||
|
|
|
@ -40,17 +40,13 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||||
#include <unicode/resbund.h>
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Core/LocalizedObject.h"
|
#include "LiveSupport/Core/LocalizedObject.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
|
@ -95,7 +91,7 @@ using namespace LiveSupport::Core;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class SchedulerWindow : public BasicWindow
|
class SchedulerWindow : public GuiWindow
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -237,18 +233,10 @@ class SchedulerWindow : public BasicWindow
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
SchedulerWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
SchedulerWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -52,6 +52,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "scratchpadWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -73,16 +78,11 @@ const Glib::ustring userPreferencesKeyName = "scratchpadContents";
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
ScratchpadWindow :: ScratchpadWindow (
|
ScratchpadWindow :: ScratchpadWindow (
|
||||||
Ptr<GLiveSupport>::Ref gLiveSupport,
|
Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton)
|
||||||
gladeDir + gladeFileName),
|
|
||||||
gladeDir(gladeDir)
|
|
||||||
{
|
{
|
||||||
// create the tree view
|
// create the tree view
|
||||||
glade->get_widget_derived("treeView1", treeView);
|
glade->get_widget_derived("treeView1", treeView);
|
||||||
|
@ -315,7 +315,7 @@ ScratchpadWindow :: onSchedulePlaylist(void) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(gLiveSupport,
|
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
|
|
||||||
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
||||||
|
@ -335,7 +335,7 @@ ScratchpadWindow :: onExportPlaylist(void) throw ()
|
||||||
if (playlist) {
|
if (playlist) {
|
||||||
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
||||||
gLiveSupport,
|
gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
exportPlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
exportPlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
||||||
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
||||||
|
@ -630,6 +630,6 @@ ScratchpadWindow :: hide(void) throw ()
|
||||||
schedulePlaylistWindow->getWindow()->hide();
|
schedulePlaylistWindow->getWindow()->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicWindow::hide();
|
GuiWindow::hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,14 +41,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unicode/resbund.h>
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Widgets/PlayableTreeModelColumnRecord.h"
|
#include "LiveSupport/Widgets/PlayableTreeModelColumnRecord.h"
|
||||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "BasicWindow.h"
|
#include "GuiWindow.h"
|
||||||
#include "CuePlayer.h"
|
#include "CuePlayer.h"
|
||||||
#include "ContentsStorable.h"
|
#include "ContentsStorable.h"
|
||||||
#include "ExportPlaylistWindow.h"
|
#include "ExportPlaylistWindow.h"
|
||||||
|
@ -75,16 +72,11 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class ScratchpadWindow : public BasicWindow,
|
class ScratchpadWindow : public GuiWindow,
|
||||||
public ContentsStorable
|
public ContentsStorable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* The directory where the Glade files are.
|
|
||||||
*/
|
|
||||||
Glib::ustring gladeDir;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The user preferences key.
|
* The user preferences key.
|
||||||
*/
|
*/
|
||||||
|
@ -299,18 +291,10 @@ class ScratchpadWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
ScratchpadWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
ScratchpadWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -382,7 +366,7 @@ class ScratchpadWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Hide the window.
|
* Hide the window.
|
||||||
*
|
*
|
||||||
* This overrides BasicWindow::hide(), and closes the Export Playlist
|
* This overrides GuiWindow::hide(), and closes the Export Playlist
|
||||||
* and Schedule Playlist pop-up windows, if they are still open.
|
* and Schedule Playlist pop-up windows, if they are still open.
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
|
|
|
@ -58,6 +58,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "searchWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -78,16 +83,11 @@ const int searchResultsSize = 25;
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
SearchWindow :: SearchWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
SearchWindow :: SearchWindow (Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton)
|
||||||
gladeDir + gladeFileName),
|
|
||||||
gladeDir(gladeDir)
|
|
||||||
{
|
{
|
||||||
glade->get_widget("searchInputNoteBook1", searchInput);
|
glade->get_widget("searchInputNoteBook1", searchInput);
|
||||||
|
|
||||||
|
@ -763,7 +763,7 @@ SearchWindow :: onSchedulePlaylist(void) throw ()
|
||||||
if (playlist) {
|
if (playlist) {
|
||||||
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(
|
schedulePlaylistWindow.reset(new SchedulePlaylistWindow(
|
||||||
gLiveSupport,
|
gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
schedulePlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
schedulePlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
||||||
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
Gtk::Main::run(*schedulePlaylistWindow->getWindow());
|
||||||
|
@ -791,13 +791,14 @@ SearchWindow :: onExportPlaylist(void) throw ()
|
||||||
try {
|
try {
|
||||||
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
exportPlaylistWindow.reset(new ExportPlaylistWindow(
|
||||||
gLiveSupport,
|
gLiveSupport,
|
||||||
gladeDir,
|
gLiveSupport->getGladeDir(),
|
||||||
playlist));
|
playlist));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
exportPlaylistWindow->getWindow()->set_transient_for(*mainWindow);
|
exportPlaylistWindow->getWindow()->set_transient_for(
|
||||||
|
*mainWindow);
|
||||||
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
Gtk::Main::run(*exportPlaylistWindow->getWindow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -907,7 +908,7 @@ SearchWindow :: hide(void) throw ()
|
||||||
schedulePlaylistWindow->getWindow()->hide();
|
schedulePlaylistWindow->getWindow()->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicWindow::hide();
|
GuiWindow::hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,7 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include "GuiWindow.h"
|
||||||
#include <unicode/resbund.h>
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "BasicWindow.h"
|
|
||||||
#include "LiveSupport/Core/NumericTools.h"
|
#include "LiveSupport/Core/NumericTools.h"
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
|
@ -79,16 +74,11 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class SearchWindow : public BasicWindow,
|
class SearchWindow : public GuiWindow,
|
||||||
private NumericTools
|
private NumericTools
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* The directory where the Glade files are.
|
|
||||||
*/
|
|
||||||
Glib::ustring gladeDir;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The criteria for the last local search.
|
* The criteria for the last local search.
|
||||||
*/
|
*/
|
||||||
|
@ -600,18 +590,10 @@ class SearchWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
SearchWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
SearchWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -641,7 +623,7 @@ class SearchWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Hide the window.
|
* Hide the window.
|
||||||
*
|
*
|
||||||
* This overrides BasicWindow::hide(), and closes the Export Playlist
|
* This overrides GuiWindow::hide(), and closes the Export Playlist
|
||||||
* and Schedule Playlist windows, if they are still open.
|
* and Schedule Playlist windows, if they are still open.
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
|
|
|
@ -56,6 +56,11 @@ using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The name of the localization resource bundle.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
const Glib::ustring bundleName = "uploadFileWindow";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the glade file.
|
* The name of the glade file.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -72,15 +77,11 @@ const Glib::ustring gladeFileName = "UploadFileWindow.glade";
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
UploadFileWindow :: UploadFileWindow (
|
UploadFileWindow :: UploadFileWindow (
|
||||||
Ptr<GLiveSupport>::Ref gLiveSupport,
|
Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ()
|
throw ()
|
||||||
: BasicWindow(gLiveSupport,
|
: GuiWindow(bundleName,
|
||||||
bundle,
|
gladeFileName,
|
||||||
windowOpenerButton,
|
windowOpenerButton),
|
||||||
gladeDir + gladeFileName),
|
|
||||||
fileType(invalidType)
|
fileType(invalidType)
|
||||||
{
|
{
|
||||||
Gtk::Label * fileNameLabel;
|
Gtk::Label * fileNameLabel;
|
||||||
|
@ -210,7 +211,6 @@ UploadFileWindow :: onBrowseButtonClicked(void) throw ()
|
||||||
*getResourceUstring("fileChooserDialogTitle"),
|
*getResourceUstring("fileChooserDialogTitle"),
|
||||||
Gtk::FILE_CHOOSER_ACTION_OPEN));
|
Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||||
dialog->set_name("uploadFileChooserDialog");
|
dialog->set_name("uploadFileChooserDialog");
|
||||||
gLiveSupport->getWindowPosition(dialog);
|
|
||||||
|
|
||||||
dialog->set_current_folder(fileChooserFolder);
|
dialog->set_current_folder(fileChooserFolder);
|
||||||
dialog->set_transient_for(*mainWindow);
|
dialog->set_transient_for(*mainWindow);
|
||||||
|
@ -226,7 +226,6 @@ UploadFileWindow :: onBrowseButtonClicked(void) throw ()
|
||||||
fileNameEntry->set_text(dialog->get_filename());
|
fileNameEntry->set_text(dialog->get_filename());
|
||||||
updateFileInfo();
|
updateFileInfo();
|
||||||
fileChooserFolder = dialog->get_current_folder();
|
fileChooserFolder = dialog->get_current_folder();
|
||||||
gLiveSupport->putWindowPosition(dialog);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,7 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include "GuiWindow.h"
|
||||||
#include <libglademm.h>
|
|
||||||
|
|
||||||
#include "BasicWindow.h"
|
|
||||||
#include "LiveSupport/Core/NumericTools.h"
|
#include "LiveSupport/Core/NumericTools.h"
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
|
@ -75,7 +72,7 @@ using namespace LiveSupport::Widgets;
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class UploadFileWindow : public BasicWindow,
|
class UploadFileWindow : public GuiWindow,
|
||||||
private NumericTools
|
private NumericTools
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -310,18 +307,10 @@ class UploadFileWindow : public BasicWindow,
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param gLiveSupport the gLiveSupport object, containing
|
|
||||||
* all the vital info.
|
|
||||||
* @param bundle the resource bundle holding the localized
|
|
||||||
* resources for this window.
|
|
||||||
* @param windowOpenerButton the button which was pressed to open
|
* @param windowOpenerButton the button which was pressed to open
|
||||||
* this window.
|
* this window.
|
||||||
* @param gladeDir the directory where the glade file is.
|
|
||||||
*/
|
*/
|
||||||
UploadFileWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
UploadFileWindow(Gtk::ToggleButton * windowOpenerButton)
|
||||||
Ptr<ResourceBundle>::Ref bundle,
|
|
||||||
Gtk::ToggleButton * windowOpenerButton,
|
|
||||||
const Glib::ustring & gladeDir)
|
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue