renamed AudioClipWindow to AudioClipListWindow
setting title of all windows based on a localized resource
This commit is contained in:
parent
8f25fba4b3
commit
b5d3b9290a
7 changed files with 47 additions and 28 deletions
|
@ -21,7 +21,7 @@
|
|||
#
|
||||
#
|
||||
# Author : $Author: maroy $
|
||||
# Version : $Revision: 1.8 $
|
||||
# Version : $Revision: 1.9 $
|
||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
||||
#
|
||||
# @configure_input@
|
||||
|
@ -143,7 +143,7 @@ G_LIVESUPPORT_OBJS = ${TMP_DIR}/GLiveSupport.o \
|
|||
${TMP_DIR}/UiTestMainWindow.o \
|
||||
${TMP_DIR}/GtkLocalizedObject.o \
|
||||
${TMP_DIR}/LoginWindow.o \
|
||||
${TMP_DIR}/AudioClipWindow.o
|
||||
${TMP_DIR}/AudioClipListWindow.o
|
||||
|
||||
G_LIVESUPPORT_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
|
||||
${TMP_DIR}/${PACKAGE_NAME}_en.res \
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.1 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/AudioClipWindow.cxx,v $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/AudioClipListWindow.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "AudioClipWindow.h"
|
||||
#include "AudioClipListWindow.h"
|
||||
|
||||
|
||||
using namespace Glib;
|
||||
|
@ -58,7 +58,8 @@ using namespace LiveSupport::GLiveSupport;
|
|||
/*------------------------------------------------------------------------------
|
||||
* Constructor.
|
||||
*----------------------------------------------------------------------------*/
|
||||
AudioClipWindow :: AudioClipWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||
AudioClipListWindow :: AudioClipListWindow (
|
||||
Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||
Ptr<ResourceBundle>::Ref bundle)
|
||||
throw ()
|
||||
: GtkLocalizedObject(bundle)
|
||||
|
@ -66,6 +67,7 @@ AudioClipWindow :: AudioClipWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
this->gLiveSupport = gLiveSupport;
|
||||
|
||||
try {
|
||||
set_title(*getResourceUstring("windowTitle"));
|
||||
closeButton.reset(new Gtk::Button(
|
||||
*getResourceUstring("closeButtonLabel")));
|
||||
} catch (std::invalid_argument &e) {
|
||||
|
@ -78,10 +80,9 @@ AudioClipWindow :: AudioClipWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
closeButton->set_relief(Gtk::RELIEF_NORMAL);
|
||||
// Register the signal handler for the button getting clicked.
|
||||
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&AudioClipWindow::onCloseButtonClicked));
|
||||
&AudioClipListWindow::onCloseButtonClicked));
|
||||
|
||||
|
||||
set_title("LiveSupport Audio Clip Window");
|
||||
set_border_width(5);
|
||||
set_default_size(400, 200);
|
||||
|
||||
|
@ -128,7 +129,7 @@ AudioClipWindow :: AudioClipWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
* Show all audio clips
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
AudioClipWindow :: showAllAudioClips(void) throw ()
|
||||
AudioClipListWindow :: showAllAudioClips(void) throw ()
|
||||
{
|
||||
// list all audio clips
|
||||
Ptr<SessionId>::Ref sessionId;
|
||||
|
@ -166,7 +167,7 @@ AudioClipWindow :: showAllAudioClips(void) throw ()
|
|||
/*------------------------------------------------------------------------------
|
||||
* Destructor.
|
||||
*----------------------------------------------------------------------------*/
|
||||
AudioClipWindow :: ~AudioClipWindow (void) throw ()
|
||||
AudioClipListWindow :: ~AudioClipListWindow (void) throw ()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -175,7 +176,7 @@ AudioClipWindow :: ~AudioClipWindow (void) throw ()
|
|||
* Event handler for the close button getting clicked.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
AudioClipWindow :: onCloseButtonClicked (void) throw ()
|
||||
AudioClipListWindow :: onCloseButtonClicked (void) throw ()
|
||||
{
|
||||
hide();
|
||||
}
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.1 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/AudioClipWindow.h,v $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/AudioClipListWindow.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
#ifndef AudioClipWindow_h
|
||||
#define AudioClipWindow_h
|
||||
#ifndef AudioClipListWindow_h
|
||||
#define AudioClipListWindow_h
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error This is a C++ include file
|
||||
|
@ -69,7 +69,7 @@ using namespace LiveSupport::Core;
|
|||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.1 $
|
||||
*/
|
||||
class AudioClipWindow : public Gtk::Window, public GtkLocalizedObject
|
||||
class AudioClipListWindow : public Gtk::Window, public GtkLocalizedObject
|
||||
{
|
||||
|
||||
protected:
|
||||
|
@ -178,14 +178,14 @@ class AudioClipWindow : public Gtk::Window, public GtkLocalizedObject
|
|||
* @param bundle the resource bundle holding the localized
|
||||
* resources for this window
|
||||
*/
|
||||
AudioClipWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||
Ptr<ResourceBundle>::Ref bundle) throw ();
|
||||
AudioClipListWindow(Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||
Ptr<ResourceBundle>::Ref bundle) throw ();
|
||||
|
||||
/**
|
||||
* Virtual destructor.
|
||||
*/
|
||||
virtual
|
||||
~AudioClipWindow(void) throw ();
|
||||
~AudioClipListWindow(void) throw ();
|
||||
};
|
||||
|
||||
/* ================================================= external data structures */
|
||||
|
@ -197,5 +197,5 @@ class AudioClipWindow : public Gtk::Window, public GtkLocalizedObject
|
|||
} // namespace GLiveSupport
|
||||
} // namespace LiveSupport
|
||||
|
||||
#endif // AudioClipWindow_h
|
||||
#endif // AudioClipListWindow_h
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.4 $
|
||||
Version : $Revision: 1.5 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LoginWindow.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -63,7 +63,7 @@ LoginWindow :: LoginWindow (Ptr<ResourceBundle>::Ref bundle)
|
|||
: GtkLocalizedObject(bundle)
|
||||
{
|
||||
try {
|
||||
table.reset(new Gtk::Table(2, 2, false));
|
||||
set_title(*getResourceUstring("windowTitle"));
|
||||
loginLabel.reset(new Gtk::Label(*getResourceUstring("loginLabel")));
|
||||
passwordLabel.reset(new Gtk::Label(
|
||||
*getResourceUstring("passwordLabel")));
|
||||
|
@ -122,6 +122,7 @@ LoginWindow :: LoginWindow (Ptr<ResourceBundle>::Ref bundle)
|
|||
|
||||
// set up the table, which provides the layout, and place the widgets
|
||||
// inside the table
|
||||
table.reset(new Gtk::Table(2, 2, false));
|
||||
table->set_name("table");
|
||||
table->set_row_spacings(0);
|
||||
table->set_col_spacings(0);
|
||||
|
@ -143,7 +144,6 @@ LoginWindow :: LoginWindow (Ptr<ResourceBundle>::Ref bundle)
|
|||
|
||||
// set up the window itself
|
||||
set_name("loginWindow");
|
||||
set_title("LiveSupport login");
|
||||
set_modal(true);
|
||||
property_window_position().set_value(Gtk::WIN_POS_NONE);
|
||||
set_resizable(false);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.5 $
|
||||
Version : $Revision: 1.6 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/UiTestMainWindow.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include "LiveSupport/Core/TimeConversion.h"
|
||||
#include "LoginWindow.h"
|
||||
#include "AudioClipWindow.h"
|
||||
#include "AudioClipListWindow.h"
|
||||
#include "UiTestMainWindow.h"
|
||||
|
||||
|
||||
|
@ -67,8 +67,12 @@ UiTestMainWindow :: UiTestMainWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
{
|
||||
this->gLiveSupport = gLiveSupport;
|
||||
|
||||
// set up the status label
|
||||
statusLabel.reset(new Gtk::Label(*getResourceUstring("welcomeMsg")));
|
||||
try {
|
||||
set_title(*getResourceUstring("windowTitle"));
|
||||
statusLabel.reset(new Gtk::Label(*getResourceUstring("welcomeMsg")));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
||||
// set up the time label
|
||||
timeLabel.reset(new Gtk::Label(""));
|
||||
|
@ -157,7 +161,11 @@ void
|
|||
UiTestMainWindow :: onLogoutButtonClicked (void) throw ()
|
||||
{
|
||||
gLiveSupport->logout();
|
||||
statusLabel->set_label(*getResourceUstring("welcomeMsg"));
|
||||
try {
|
||||
statusLabel->set_label(*getResourceUstring("welcomeMsg"));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -241,8 +249,8 @@ UiTestMainWindow :: onAudioClipButtonClicked (void) throw ()
|
|||
return;
|
||||
}
|
||||
|
||||
Ptr<AudioClipWindow>::Ref audioClipWindow(
|
||||
new AudioClipWindow(gLiveSupport, bundle));
|
||||
Ptr<AudioClipListWindow>::Ref audioClipWindow(
|
||||
new AudioClipListWindow(gLiveSupport, bundle));
|
||||
|
||||
Gtk::Main::run(*audioClipWindow);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
hu:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Teszt Ablak" }
|
||||
welcomeMsg:string { "Üdvözöljük" }
|
||||
loggedInMsg:string { "Bejelentkezve {0} felhasználóként" }
|
||||
|
||||
loginWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Belépés Ablak" }
|
||||
|
||||
loginLabel:string { "azonositó:" }
|
||||
passwordLabel:string { "jelszó:" }
|
||||
okButtonLabel:string { "Belépés" }
|
||||
|
@ -12,6 +15,8 @@ hu:table
|
|||
|
||||
audioClipWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Hang Anyag Ablak" }
|
||||
|
||||
idColumnLabel:string { "azonositó" }
|
||||
lengthColumnLabel:string { "hossz" }
|
||||
uriColumnLabel:string { "URI" }
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
root:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Test Window" }
|
||||
welcomeMsg:string { "welcome" }
|
||||
loggedInMsg:string { "Logged in as {0}" }
|
||||
|
||||
loginWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Login Window" }
|
||||
|
||||
loginLabel:string { "login:" }
|
||||
passwordLabel:string { "password:" }
|
||||
okButtonLabel:string { "OK" }
|
||||
|
@ -12,6 +15,8 @@ root:table
|
|||
|
||||
audioClipWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Audio Clip Window" }
|
||||
|
||||
idColumnLabel:string { "id" }
|
||||
lengthColumnLabel:string { "length" }
|
||||
uriColumnLabel:string { "URI" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue