diff --git a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml index 49be691fc..9c267296d 100644 --- a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml +++ b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml @@ -1,7 +1,12 @@ + + + + + @@ -14,6 +19,9 @@ ]> + diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx index 55588e290..dec99011d 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $ ------------------------------------------------------------------------------*/ @@ -82,6 +82,14 @@ GLiveSupport :: configure(const xmlpp::Element & element) xmlpp::Node::NodeList nodes; + // configure the resource bundle + nodes = element.get_children(LocalizedObject::getConfigElementName()); + if (nodes.size() < 1) { + throw std::invalid_argument("no resourceBundle element"); + } + resourceBundle = LocalizedObject::getBundle( + *((const xmlpp::Element*) *(nodes.begin())) ); + // configure the AuthenticationClientFactory nodes = element.get_children( AuthenticationClientFactory::getConfigElementName()); @@ -93,16 +101,6 @@ GLiveSupport :: configure(const xmlpp::Element & element) acf->configure( *((const xmlpp::Element*) *(nodes.begin())) ); authentication = acf->getAuthenticationClient(); - - // load the resource bundle - // TODO: get resource bundle path from config file - UErrorCode status = U_ZERO_ERROR; - resourceBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, - "en", - status)); - if (!U_SUCCESS(status)) { - throw std::invalid_argument("opening resource bundle a failure"); - } } diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.h b/livesupport/products/gLiveSupport/src/GLiveSupport.h index 2aede2a35..b3911cd23 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.h +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.h @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $ ------------------------------------------------------------------------------*/ @@ -64,8 +64,23 @@ using namespace LiveSupport::Core; /** * The main application object for the gLiveSupport GUI. * + * The configuration file for this object is based on configuration + * elements used by the object. The DTD for the root element of the + * configuration file is: + * + *

+ *  
+ *  
+ * + * For a description of the resourceBundle and + * authenticationClientFactory elements see their + * respective documentation. + * * @author $Author: maroy $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ + * @see LocalizedObject#getBundle(const xmlpp::Element &) + * @see AuthenticationClientFactory */ class GLiveSupport : public Configurable, public boost::enable_shared_from_this diff --git a/livesupport/products/gLiveSupport/src/UiTestMainWindow.h b/livesupport/products/gLiveSupport/src/UiTestMainWindow.h index e011391e2..4d575d016 100644 --- a/livesupport/products/gLiveSupport/src/UiTestMainWindow.h +++ b/livesupport/products/gLiveSupport/src/UiTestMainWindow.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/Attic/UiTestMainWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -66,7 +66,7 @@ using namespace LiveSupport::Core; * A window, enabling interactive testing of UI components. * * @author $Author: maroy $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class UiTestMainWindow : public Gtk::Window, public GtkLocalizedObject { @@ -134,7 +134,7 @@ class UiTestMainWindow : public Gtk::Window, public GtkLocalizedObject * Function that updates timeLabel with the current time. * This is called by GTK at regular intervals. * - * @param param a dummy, unused parameter + * @param dummy a dummy, unused parameter * @return true if the timer should call this function again, * false if the timer should be canceled */