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
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.14 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.15 $
|
||||
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 >
|
||||
* </code></pre>
|
||||
*
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.14 $
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.15 $
|
||||
*/
|
||||
class WidgetFactory :
|
||||
virtual public Configurable
|
||||
|
@ -113,7 +113,8 @@ class WidgetFactory :
|
|||
* The list of available miscellaneous images.
|
||||
*/
|
||||
typedef enum { resizeImage,
|
||||
scratchpadWindowTitleImage }
|
||||
scratchpadWindowTitleImage,
|
||||
searchWindowTitleImage }
|
||||
ImageType;
|
||||
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.13 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.14 $
|
||||
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);
|
||||
defaultWidth = -1;
|
||||
defaultHeight = -1;
|
||||
set_resizable(resizable);
|
||||
|
||||
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.16 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.17 $
|
||||
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";
|
||||
|
||||
/**
|
||||
* 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
|
||||
= "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 */
|
||||
|
||||
|
@ -402,12 +408,20 @@ WidgetFactory :: createImage(ImageType imageName) throw ()
|
|||
Glib::RefPtr<Gdk::Pixbuf> rawImage;
|
||||
|
||||
switch (imageName) {
|
||||
|
||||
case resizeImage:
|
||||
rawImage = loadImage(resizeImageName);
|
||||
break;
|
||||
|
||||
|
||||
case scratchpadWindowTitleImage:
|
||||
rawImage = loadImage(scratchpadWindowTitleImageName);
|
||||
break;
|
||||
|
||||
case searchWindowTitleImage:
|
||||
rawImage = loadImage(searchWindowTitleImageName);
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Author : $Author: maroy $
|
||||
# Version : $Revision: 1.28 $
|
||||
# Author : $Author: fgerlits $
|
||||
# Version : $Revision: 1.29 $
|
||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
||||
#
|
||||
# @configure_input@
|
||||
|
@ -189,7 +189,8 @@ G_LIVESUPPORT_OBJS = ${TMP_DIR}/GLiveSupport.o \
|
|||
${TMP_DIR}/ScratchpadWindow.o \
|
||||
${TMP_DIR}/SimplePlaylistManagementWindow.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 \
|
||||
${TMP_DIR}/${PACKAGE_NAME}_en.res \
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.18 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.19 $
|
||||
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"));
|
||||
schedulerButton = wf->createButton(
|
||||
*getResourceUstring("schedulerButtonLabel"));
|
||||
searchButton = wf->createButton(
|
||||
*getResourceUstring("searchButtonLabel"));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
@ -219,6 +221,9 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
|||
buttonBar->attach(*schedulerButton, 3, 4, 0, 1,
|
||||
Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL,
|
||||
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
|
||||
uploadFileButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
|
@ -230,7 +235,8 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
|||
&MasterPanelWindow::onSimplePlaylistMgmtButtonClicked));
|
||||
schedulerButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&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
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
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 $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -53,6 +53,7 @@
|
|||
#include "ScratchpadWindow.h"
|
||||
#include "SimplePlaylistManagementWindow.h"
|
||||
#include "SchedulerWindow.h"
|
||||
#include "SearchWindow.h"
|
||||
|
||||
|
||||
namespace LiveSupport {
|
||||
|
@ -88,7 +89,7 @@ using namespace LiveSupport::Widgets;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.11 $
|
||||
* @version $Revision: 1.12 $
|
||||
*/
|
||||
class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
||||
{
|
||||
|
@ -199,6 +200,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
|||
*/
|
||||
Button * schedulerButton;
|
||||
|
||||
/**
|
||||
* The button to invoke the Search Window.
|
||||
*/
|
||||
Button * searchButton;
|
||||
|
||||
/**
|
||||
* The gLiveSupport object, handling the logic of the application.
|
||||
*/
|
||||
|
@ -219,6 +225,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
|||
*/
|
||||
Ptr<SchedulerWindow>::Ref schedulerWindow;
|
||||
|
||||
/**
|
||||
* The one and only search window.
|
||||
*/
|
||||
Ptr<SearchWindow>::Ref searchWindow;
|
||||
|
||||
/**
|
||||
* Function that updates timeLabel with the current time.
|
||||
* This is called by GTK at regular intervals.
|
||||
|
@ -274,6 +285,13 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
|||
virtual void
|
||||
onSchedulerButtonClicked(void) throw ();
|
||||
|
||||
/**
|
||||
* Function to catch the event of the Search button
|
||||
* button being pressed.
|
||||
*/
|
||||
virtual void
|
||||
onSearchButtonClicked(void) throw ();
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -365,6 +383,15 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
|
|||
schedulerWindow->showContents();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Search Window
|
||||
*/
|
||||
void
|
||||
updateSearchWindow(void) throw ()
|
||||
{
|
||||
// this will create, open and display the window.
|
||||
onSearchButtonClicked();
|
||||
}
|
||||
};
|
||||
|
||||
/* ================================================= external data structures */
|
||||
|
|
|
@ -9,6 +9,7 @@ hu:table
|
|||
scratchpadButtonLabel:string { "praktikus csupor" }
|
||||
simplePlaylistMgmtButtonLabel:string { "egyszerű playlist kezelés" }
|
||||
schedulerButtonLabel:string { "időzítő" }
|
||||
searchButtonLabel:string { "keresés" }
|
||||
|
||||
localeNotAvailableMsg:string { "A {0} nyelv nem elérhető" }
|
||||
schedulerNotReachableMsg:string { "Az időzitő szerver nem elérhető" }
|
||||
|
@ -127,5 +128,10 @@ hu:table
|
|||
scheduleButtonLabel:string { "időzít" }
|
||||
closeButtonLabel:string { "bezár" }
|
||||
}
|
||||
|
||||
searchWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Keresés Ablak" }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ root:table
|
|||
scratchpadButtonLabel:string { "scratchpad" }
|
||||
simplePlaylistMgmtButtonLabel:string { "simple playlist management" }
|
||||
schedulerButtonLabel:string { "scheduler" }
|
||||
searchButtonLabel:string { "search" }
|
||||
|
||||
localeNotAvailableMsg:string { "Locale {0} not available" }
|
||||
schedulerNotReachableMsg:string { "Scheduler server not available" }
|
||||
|
@ -130,5 +131,9 @@ root:table
|
|||
closeButtonLabel:string { "close" }
|
||||
}
|
||||
|
||||
searchWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Search/Browse Window" }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue