diff --git a/livesupport/products/gLiveSupport/etc/Makefile.in b/livesupport/products/gLiveSupport/etc/Makefile.in index 1ca3a5b6b..5c114d6c2 100644 --- a/livesupport/products/gLiveSupport/etc/Makefile.in +++ b/livesupport/products/gLiveSupport/etc/Makefile.in @@ -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 \ diff --git a/livesupport/products/gLiveSupport/src/AudioClipWindow.cxx b/livesupport/products/gLiveSupport/src/AudioClipListWindow.cxx similarity index 91% rename from livesupport/products/gLiveSupport/src/AudioClipWindow.cxx rename to livesupport/products/gLiveSupport/src/AudioClipListWindow.cxx index a81ea53f7..cda02e958 100644 --- a/livesupport/products/gLiveSupport/src/AudioClipWindow.cxx +++ b/livesupport/products/gLiveSupport/src/AudioClipListWindow.cxx @@ -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 #include -#include "AudioClipWindow.h" +#include "AudioClipListWindow.h" using namespace Glib; @@ -58,7 +58,8 @@ using namespace LiveSupport::GLiveSupport; /*------------------------------------------------------------------------------ * Constructor. *----------------------------------------------------------------------------*/ -AudioClipWindow :: AudioClipWindow (Ptr::Ref gLiveSupport, +AudioClipListWindow :: AudioClipListWindow ( + Ptr::Ref gLiveSupport, Ptr::Ref bundle) throw () : GtkLocalizedObject(bundle) @@ -66,6 +67,7 @@ AudioClipWindow :: AudioClipWindow (Ptr::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::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::Ref gLiveSupport, * Show all audio clips *----------------------------------------------------------------------------*/ void -AudioClipWindow :: showAllAudioClips(void) throw () +AudioClipListWindow :: showAllAudioClips(void) throw () { // list all audio clips Ptr::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(); } diff --git a/livesupport/products/gLiveSupport/src/AudioClipWindow.h b/livesupport/products/gLiveSupport/src/AudioClipListWindow.h similarity index 91% rename from livesupport/products/gLiveSupport/src/AudioClipWindow.h rename to livesupport/products/gLiveSupport/src/AudioClipListWindow.h index 811e2a293..448874d1d 100644 --- a/livesupport/products/gLiveSupport/src/AudioClipWindow.h +++ b/livesupport/products/gLiveSupport/src/AudioClipListWindow.h @@ -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::Ref gLiveSupport, - Ptr::Ref bundle) throw (); + AudioClipListWindow(Ptr::Ref gLiveSupport, + Ptr::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 diff --git a/livesupport/products/gLiveSupport/src/LoginWindow.cxx b/livesupport/products/gLiveSupport/src/LoginWindow.cxx index f4319cc65..a8fd2552b 100644 --- a/livesupport/products/gLiveSupport/src/LoginWindow.cxx +++ b/livesupport/products/gLiveSupport/src/LoginWindow.cxx @@ -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::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::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::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); diff --git a/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx b/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx index 4a7d8ac3f..5ba0b5e4f 100644 --- a/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx +++ b/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx @@ -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::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::Ref audioClipWindow( - new AudioClipWindow(gLiveSupport, bundle)); + Ptr::Ref audioClipWindow( + new AudioClipListWindow(gLiveSupport, bundle)); Gtk::Main::run(*audioClipWindow); } diff --git a/livesupport/products/gLiveSupport/var/hu.txt b/livesupport/products/gLiveSupport/var/hu.txt index f15183c05..b7f7744a9 100644 --- a/livesupport/products/gLiveSupport/var/hu.txt +++ b/livesupport/products/gLiveSupport/var/hu.txt @@ -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" } diff --git a/livesupport/products/gLiveSupport/var/root.txt b/livesupport/products/gLiveSupport/var/root.txt index aa45eda16..21f628b7f 100644 --- a/livesupport/products/gLiveSupport/var/root.txt +++ b/livesupport/products/gLiveSupport/var/root.txt @@ -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" }