added (so far, empty) Search window
This commit is contained in:
parent
e8adb2ad08
commit
782617cd74
8 changed files with 103 additions and 18 deletions
|
@ -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: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.14 $
|
Version : $Revision: 1.15 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -88,8 +88,8 @@ class WhiteWindow;
|
||||||
* <!ATTLIST widgetFactory path CDATA #REQUIRED >
|
* <!ATTLIST widgetFactory path CDATA #REQUIRED >
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: maroy $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.14 $
|
* @version $Revision: 1.15 $
|
||||||
*/
|
*/
|
||||||
class WidgetFactory :
|
class WidgetFactory :
|
||||||
virtual public Configurable
|
virtual public Configurable
|
||||||
|
@ -113,7 +113,8 @@ class WidgetFactory :
|
||||||
* The list of available miscellaneous images.
|
* The list of available miscellaneous images.
|
||||||
*/
|
*/
|
||||||
typedef enum { resizeImage,
|
typedef enum { resizeImage,
|
||||||
scratchpadWindowTitleImage }
|
scratchpadWindowTitleImage,
|
||||||
|
searchWindowTitleImage }
|
||||||
ImageType;
|
ImageType;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.13 $
|
Version : $Revision: 1.14 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -104,6 +104,7 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
|
||||||
set_decorated(false);
|
set_decorated(false);
|
||||||
defaultWidth = -1;
|
defaultWidth = -1;
|
||||||
defaultHeight = -1;
|
defaultHeight = -1;
|
||||||
|
set_resizable(resizable);
|
||||||
|
|
||||||
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||||
|
|
||||||
|
|
|
@ -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: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.16 $
|
Version : $Revision: 1.17 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -196,11 +196,17 @@ static const std::string comboBoxRightName = "combo/right.png";
|
||||||
static const std::string resizeImageName = "whiteWindow/resize.png";
|
static const std::string resizeImageName = "whiteWindow/resize.png";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the image for the title of the login window.
|
* The name of the image for the title of the scratchpad window.
|
||||||
*/
|
*/
|
||||||
static const std::string scratchpadWindowTitleImageName
|
static const std::string scratchpadWindowTitleImageName
|
||||||
= "titleImages/scratchpadWindowTitle.png";
|
= "titleImages/scratchpadWindowTitle.png";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the image for the title of the search window.
|
||||||
|
*/
|
||||||
|
static const std::string searchWindowTitleImageName
|
||||||
|
= "titleImages/searchWindowTitle.png";
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== local function prototypes */
|
/* =============================================== local function prototypes */
|
||||||
|
|
||||||
|
@ -402,12 +408,20 @@ WidgetFactory :: createImage(ImageType imageName) throw ()
|
||||||
Glib::RefPtr<Gdk::Pixbuf> rawImage;
|
Glib::RefPtr<Gdk::Pixbuf> rawImage;
|
||||||
|
|
||||||
switch (imageName) {
|
switch (imageName) {
|
||||||
|
|
||||||
case resizeImage:
|
case resizeImage:
|
||||||
rawImage = loadImage(resizeImageName);
|
rawImage = loadImage(resizeImageName);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case scratchpadWindowTitleImage:
|
case scratchpadWindowTitleImage:
|
||||||
rawImage = loadImage(scratchpadWindowTitleImageName);
|
rawImage = loadImage(scratchpadWindowTitleImageName);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case searchWindowTitleImage:
|
||||||
|
rawImage = loadImage(searchWindowTitleImageName);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: maroy $
|
# Author : $Author: fgerlits $
|
||||||
# Version : $Revision: 1.28 $
|
# Version : $Revision: 1.29 $
|
||||||
# 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@
|
||||||
|
@ -189,7 +189,8 @@ G_LIVESUPPORT_OBJS = ${TMP_DIR}/GLiveSupport.o \
|
||||||
${TMP_DIR}/ScratchpadWindow.o \
|
${TMP_DIR}/ScratchpadWindow.o \
|
||||||
${TMP_DIR}/SimplePlaylistManagementWindow.o \
|
${TMP_DIR}/SimplePlaylistManagementWindow.o \
|
||||||
${TMP_DIR}/SchedulerWindow.o \
|
${TMP_DIR}/SchedulerWindow.o \
|
||||||
${TMP_DIR}/SchedulePlaylistWindow.o
|
${TMP_DIR}/SchedulePlaylistWindow.o \
|
||||||
|
${TMP_DIR}/SearchWindow.o
|
||||||
|
|
||||||
G_LIVESUPPORT_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
|
G_LIVESUPPORT_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
|
||||||
${TMP_DIR}/${PACKAGE_NAME}_en.res \
|
${TMP_DIR}/${PACKAGE_NAME}_en.res \
|
||||||
|
|
|
@ -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: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.18 $
|
Version : $Revision: 1.19 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -200,6 +200,8 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
*getResourceUstring("simplePlaylistMgmtButtonLabel"));
|
*getResourceUstring("simplePlaylistMgmtButtonLabel"));
|
||||||
schedulerButton = wf->createButton(
|
schedulerButton = wf->createButton(
|
||||||
*getResourceUstring("schedulerButtonLabel"));
|
*getResourceUstring("schedulerButtonLabel"));
|
||||||
|
searchButton = wf->createButton(
|
||||||
|
*getResourceUstring("searchButtonLabel"));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -219,6 +221,9 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
buttonBar->attach(*schedulerButton, 3, 4, 0, 1,
|
buttonBar->attach(*schedulerButton, 3, 4, 0, 1,
|
||||||
Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL,
|
Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL,
|
||||||
5, 0);
|
5, 0);
|
||||||
|
buttonBar->attach(*searchButton, 4, 5, 0, 1,
|
||||||
|
Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL,
|
||||||
|
5, 0);
|
||||||
|
|
||||||
// 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,
|
||||||
|
@ -230,7 +235,8 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
&MasterPanelWindow::onSimplePlaylistMgmtButtonClicked));
|
&MasterPanelWindow::onSimplePlaylistMgmtButtonClicked));
|
||||||
schedulerButton->signal_clicked().connect(sigc::mem_fun(*this,
|
schedulerButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||||
&MasterPanelWindow::onSchedulerButtonClicked));
|
&MasterPanelWindow::onSchedulerButtonClicked));
|
||||||
|
searchButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||||
|
&MasterPanelWindow::onSearchButtonClicked));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -386,6 +392,30 @@ MasterPanelWindow :: onSchedulerButtonClicked(void) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* The event when the Search button has been clicked.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
MasterPanelWindow :: onSearchButtonClicked(void) throw ()
|
||||||
|
{
|
||||||
|
if (!searchWindow.get()) {
|
||||||
|
Ptr<ResourceBundle>::Ref bundle;
|
||||||
|
try {
|
||||||
|
bundle = getBundle("searchWindow");
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
searchWindow.reset(new SearchWindow(gLiveSupport, bundle));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!searchWindow->is_visible()) {
|
||||||
|
searchWindow->show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Show only the UI components that are visible when no one is logged in
|
* Show only the UI components that are visible when no one is logged in
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.11 $
|
Version : $Revision: 1.12 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
#include "ScratchpadWindow.h"
|
#include "ScratchpadWindow.h"
|
||||||
#include "SimplePlaylistManagementWindow.h"
|
#include "SimplePlaylistManagementWindow.h"
|
||||||
#include "SchedulerWindow.h"
|
#include "SchedulerWindow.h"
|
||||||
|
#include "SearchWindow.h"
|
||||||
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
|
@ -88,7 +89,7 @@ using namespace LiveSupport::Widgets;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.11 $
|
* @version $Revision: 1.12 $
|
||||||
*/
|
*/
|
||||||
class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
{
|
{
|
||||||
|
@ -199,6 +200,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
*/
|
*/
|
||||||
Button * schedulerButton;
|
Button * schedulerButton;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The button to invoke the Search Window.
|
||||||
|
*/
|
||||||
|
Button * searchButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The gLiveSupport object, handling the logic of the application.
|
* The gLiveSupport object, handling the logic of the application.
|
||||||
*/
|
*/
|
||||||
|
@ -219,6 +225,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
*/
|
*/
|
||||||
Ptr<SchedulerWindow>::Ref schedulerWindow;
|
Ptr<SchedulerWindow>::Ref schedulerWindow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The one and only search window.
|
||||||
|
*/
|
||||||
|
Ptr<SearchWindow>::Ref searchWindow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function that updates timeLabel with the current time.
|
* Function that updates timeLabel with the current time.
|
||||||
* This is called by GTK at regular intervals.
|
* This is called by GTK at regular intervals.
|
||||||
|
@ -274,6 +285,13 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
virtual void
|
virtual void
|
||||||
onSchedulerButtonClicked(void) throw ();
|
onSchedulerButtonClicked(void) throw ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to catch the event of the Search button
|
||||||
|
* button being pressed.
|
||||||
|
*/
|
||||||
|
virtual void
|
||||||
|
onSearchButtonClicked(void) throw ();
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -365,6 +383,15 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||||
schedulerWindow->showContents();
|
schedulerWindow->showContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the Search Window
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
updateSearchWindow(void) throw ()
|
||||||
|
{
|
||||||
|
// this will create, open and display the window.
|
||||||
|
onSearchButtonClicked();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
/* ================================================= external data structures */
|
||||||
|
|
|
@ -9,6 +9,7 @@ hu:table
|
||||||
scratchpadButtonLabel:string { "praktikus csupor" }
|
scratchpadButtonLabel:string { "praktikus csupor" }
|
||||||
simplePlaylistMgmtButtonLabel:string { "egyszerű playlist kezelés" }
|
simplePlaylistMgmtButtonLabel:string { "egyszerű playlist kezelés" }
|
||||||
schedulerButtonLabel:string { "időzítő" }
|
schedulerButtonLabel:string { "időzítő" }
|
||||||
|
searchButtonLabel:string { "keresés" }
|
||||||
|
|
||||||
localeNotAvailableMsg:string { "A {0} nyelv nem elérhető" }
|
localeNotAvailableMsg:string { "A {0} nyelv nem elérhető" }
|
||||||
schedulerNotReachableMsg:string { "Az időzitő szerver nem elérhető" }
|
schedulerNotReachableMsg:string { "Az időzitő szerver nem elérhető" }
|
||||||
|
@ -127,5 +128,10 @@ hu:table
|
||||||
scheduleButtonLabel:string { "időzít" }
|
scheduleButtonLabel:string { "időzít" }
|
||||||
closeButtonLabel:string { "bezár" }
|
closeButtonLabel:string { "bezár" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchWindow:table
|
||||||
|
{
|
||||||
|
windowTitle:string { "LiveSupport Keresés Ablak" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ root:table
|
||||||
scratchpadButtonLabel:string { "scratchpad" }
|
scratchpadButtonLabel:string { "scratchpad" }
|
||||||
simplePlaylistMgmtButtonLabel:string { "simple playlist management" }
|
simplePlaylistMgmtButtonLabel:string { "simple playlist management" }
|
||||||
schedulerButtonLabel:string { "scheduler" }
|
schedulerButtonLabel:string { "scheduler" }
|
||||||
|
searchButtonLabel:string { "search" }
|
||||||
|
|
||||||
localeNotAvailableMsg:string { "Locale {0} not available" }
|
localeNotAvailableMsg:string { "Locale {0} not available" }
|
||||||
schedulerNotReachableMsg:string { "Scheduler server not available" }
|
schedulerNotReachableMsg:string { "Scheduler server not available" }
|
||||||
|
@ -130,5 +131,9 @@ root:table
|
||||||
closeButtonLabel:string { "close" }
|
closeButtonLabel:string { "close" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchWindow:table
|
||||||
|
{
|
||||||
|
windowTitle:string { "LiveSupport Search/Browse Window" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue