diff --git a/livesupport/modules/core/src/LocalizedObject.cxx b/livesupport/modules/core/src/LocalizedObject.cxx index 5f042f6ff..8eff84d95 100644 --- a/livesupport/modules/core/src/LocalizedObject.cxx +++ b/livesupport/modules/core/src/LocalizedObject.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.7 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/LocalizedObject.cxx,v $ ------------------------------------------------------------------------------*/ @@ -119,7 +119,12 @@ LocalizedObject :: getBundle(const char * key) Ptr::Ref resourceBundle(new ResourceBundle( bundle->getWithFallback(key, status))); if (!U_SUCCESS(status)) { - throw std::invalid_argument("can't get resource bundle"); + std::string eMsg = "can't get resource bundle for key '"; + eMsg += key; + eMsg += "' and locale '"; + eMsg += bundle->getLocale().getName(); + eMsg += "'"; + throw std::invalid_argument(eMsg); } return resourceBundle; diff --git a/livesupport/products/gLiveSupport/src/LoginWindow.cxx b/livesupport/products/gLiveSupport/src/LoginWindow.cxx index ad29da250..172334b56 100644 --- a/livesupport/products/gLiveSupport/src/LoginWindow.cxx +++ b/livesupport/products/gLiveSupport/src/LoginWindow.cxx @@ -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/LoginWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -91,7 +91,8 @@ LoginWindow :: LoginWindow (Ptr::Ref gLiveSupport, cancelButton = Gtk::manage(widgetFactory->createButton( *getResourceUstring("cancelButtonLabel"))); } catch (std::invalid_argument &e) { - std::cerr << e.what() << std::endl; + std::cerr << e.what() << std::endl;\ + std::exit(1); } // set up the login label diff --git a/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx b/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx index 198e5b7cf..2410ae6af 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.8 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx,v $ ------------------------------------------------------------------------------*/ @@ -127,7 +127,7 @@ MasterPanelUserInfoWidget :: onLogoutButtonClicked (void) throw () notLoggedInMsg = getResourceUstring("notLoggedInMsg"); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; - return; + std::exit(1); } userInfoLabel->set_label(*notLoggedInMsg); @@ -176,7 +176,12 @@ MasterPanelUserInfoWidget :: onLoginButtonClicked (void) throw () } if (loggedIn) { - updateStrings(); + try { + updateStrings(); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } // change the login button to a logout button logInOutSignalConnection.disconnect(); @@ -209,7 +214,12 @@ MasterPanelUserInfoWidget :: changeLanguage(Ptr::Ref bundle) throw () { setBundle(bundle); - updateStrings(); + try { + updateStrings(); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } } diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index d0465a54e..cd50bbf1b 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.19 $ + Version : $Revision: 1.20 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -204,6 +204,7 @@ MasterPanelWindow :: changeLanguage(Ptr::Ref bundle) *getResourceUstring("searchButtonLabel")); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } userInfoWidget->changeLanguage(bundle); diff --git a/livesupport/products/gLiveSupport/src/PlaylistListWindow.cxx b/livesupport/products/gLiveSupport/src/PlaylistListWindow.cxx index 267811b47..9944c29b0 100644 --- a/livesupport/products/gLiveSupport/src/PlaylistListWindow.cxx +++ b/livesupport/products/gLiveSupport/src/PlaylistListWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.6 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/PlaylistListWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -78,6 +78,7 @@ PlaylistListWindow :: PlaylistListWindow ( *getResourceUstring("closeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } mainBox = Gtk::manage(new Gtk::VBox()); @@ -133,6 +134,7 @@ PlaylistListWindow :: PlaylistListWindow ( modelColumns.tokenColumn); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } // attach the event handler for the user selecting a playlist from @@ -163,6 +165,7 @@ PlaylistListWindow :: PlaylistListWindow ( modelColumns.tokenColumn); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } // attach the event handler for the user selecting an entry from diff --git a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx index a7a6427d2..c53863307 100644 --- a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.4 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -69,7 +69,6 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow ( { this->gLiveSupport = gLiveSupport; this->playlist = playlist; - try { set_title(*getResourceUstring("windowTitle")); hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring( @@ -82,6 +81,7 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow ( *getResourceUstring("closeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle())); diff --git a/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx b/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx index 69d4209d8..5d45b1688 100644 --- a/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.6 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -73,6 +73,7 @@ SchedulerWindow :: SchedulerWindow (Ptr::Ref gLiveSupport, *getResourceUstring("closeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } calendar = Gtk::manage(new Gtk::Calendar()); @@ -94,6 +95,7 @@ SchedulerWindow :: SchedulerWindow (Ptr::Ref gLiveSupport, entryColumns->endColumn); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } // register the signal handler for entries view entries being clicked @@ -104,10 +106,16 @@ SchedulerWindow :: SchedulerWindow (Ptr::Ref gLiveSupport, entryMenu = Gtk::manage(new Gtk::Menu()); Gtk::Menu::MenuList& menuList = entryMenu->items(); // register the signal handlers for the popup menu - menuList.push_back(Gtk::Menu_Helpers::MenuElem( + try { + menuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("deleteMenuItem"), sigc::mem_fun(*this, &SchedulerWindow::onDeleteItem))); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } + entryMenu->accelerate(*this); layout = Gtk::manage(new Gtk::Table()); diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx index e08d60eca..6295e8f8c 100644 --- a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx +++ b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -86,6 +86,7 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, *getResourceUstring("removeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } playButton->set_name("playButton"); @@ -122,6 +123,7 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, modelColumns.titleColumn); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } // color the columns blue @@ -157,64 +159,77 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, audioClipMenu = Gtk::manage(new Gtk::Menu()); Gtk::Menu::MenuList& audioClipMenuList = audioClipMenu->items(); // register the signal handlers for the popup menu - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + try { + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("addToPlaylistMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onAddToPlaylist))); - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("upMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onUpItem))); - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("downMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onDownItem))); - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("removeMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onRemoveItem))); - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("deleteMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onDeleteItem))); - audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("playMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onPlayItem))); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } + audioClipMenu->accelerate(*this); // create the right-click entry context menu for playlists playlistMenu = Gtk::manage(new Gtk::Menu()); Gtk::Menu::MenuList& playlistMenuList = playlistMenu->items(); // register the signal handlers for the popup menu - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + + try{ + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("addToPlaylistMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onAddToPlaylist))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("schedulePlaylistMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onSchedulePlaylist))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("upMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onUpItem))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("downMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onDownItem))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("removeMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onRemoveItem))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("deleteMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onDeleteItem))); - playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("playMenuItem"), sigc::mem_fun(*this, &ScratchpadWindow::onPlayItem))); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } + playlistMenu->accelerate(*this); // show diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/products/gLiveSupport/src/SearchWindow.cxx index a31b8a907..a835bff12 100644 --- a/livesupport/products/gLiveSupport/src/SearchWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SearchWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -80,11 +80,16 @@ SearchWindow :: SearchWindow (Ptr::Ref gLiveSupport, Gtk::VBox * advancedSearchView = constructAdvancedSearchView(); Gtk::VBox * browseView = Gtk::manage(new Gtk::VBox); - Notebook * views = Gtk::manage(new Notebook); - views->appendPage(*searchView, *getResourceUstring("searchTab")); - views->appendPage(*advancedSearchView, *getResourceUstring( + Notebook * views = Gtk::manage(new Notebook); + try { + views->appendPage(*searchView, *getResourceUstring("searchTab")); + views->appendPage(*advancedSearchView, *getResourceUstring( "advancedSearchTab")); - views->appendPage(*browseView, *getResourceUstring("browseTab")); + views->appendPage(*browseView, *getResourceUstring("browseTab")); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } add(*views); @@ -128,39 +133,44 @@ SearchWindow :: constructAdvancedSearchView(void) throw () view->pack_start(*searchResults, Gtk::PACK_SHRINK, 5); // set up the search options box - Gtk::Label * searchByLabel = Gtk::manage(new Gtk::Label( + try { + Gtk::Label * searchByLabel = Gtk::manage(new Gtk::Label( *getResourceUstring("searchByTextLabel") )); + searchOptionsBox->pack_start(*searchByLabel, Gtk::PACK_SHRINK, 5); + + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } ComboBoxText * metadataType = Gtk::manage(wf->createComboBoxText()); metadataType->append_text("Title"); metadataType->append_text("Creator"); metadataType->append_text("Length"); metadataType->set_active_text("Title"); + searchOptionsBox->pack_start(*metadataType, Gtk::PACK_EXPAND_WIDGET, 5); + ComboBoxText * operatorType = Gtk::manage(wf->createComboBoxText()); operatorType->append_text("contains"); operatorType->append_text("equals"); operatorType->append_text(">="); operatorType->append_text("<"); operatorType->set_active_text("contains"); - EntryBin * entryBin = Gtk::manage(wf->createEntryBin()); - searchOptionsBox->pack_start(*searchByLabel, Gtk::PACK_SHRINK, 5); - searchOptionsBox->pack_start(*metadataType, Gtk::PACK_EXPAND_WIDGET, 5); searchOptionsBox->pack_start(*operatorType, Gtk::PACK_EXPAND_WIDGET, 5); + + EntryBin * entryBin = Gtk::manage(wf->createEntryBin()); searchOptionsBox->pack_start(*entryBin, Gtk::PACK_EXPAND_WIDGET, 5); // set up the search button box - Button * searchButton = Gtk::manage(wf->createButton( + try { + Button * searchButton = Gtk::manage(wf->createButton( *getResourceUstring("searchButtonLabel") )); - searchButtonBox->pack_start(*searchButton, Gtk::PACK_SHRINK, 5); + searchButtonBox->pack_start(*searchButton, Gtk::PACK_SHRINK, 5); + + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } return view; } - - - - - - - - - diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx index 186678ccc..18e9d0857 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.8 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -76,6 +76,7 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow ( *getResourceUstring("closeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } nameEntry = Gtk::manage(new Gtk::Entry()); @@ -99,12 +100,14 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow ( modelColumns.titleColumn); entriesView->append_column(*getResourceUstring("lengthColumnLabel"), modelColumns.lengthColumn); + + statusBar = Gtk::manage(new Gtk::Label( + *getResourceUstring("statusBar"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; + std::exit(1); } - statusBar = Gtk::manage(new Gtk::Label(*getResourceUstring("statusBar"))); - // set up the layout layout = Gtk::manage(new Gtk::Table()); diff --git a/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx b/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx index 1231f320f..2d3aacbd4 100644 --- a/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx +++ b/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.7 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -131,6 +131,7 @@ UploadFileWindow :: UploadFileWindow (Ptr::Ref gLiveSupport, } catch (std::invalid_argument &e) { // TODO: signal error std::cerr << e.what() << std::endl; + std::exit(1); } // build up the main section @@ -191,9 +192,14 @@ UploadFileWindow :: onChooseFileButtonClicked(void) throw () { Ptr::Ref dialog; - dialog.reset(new Gtk::FileChooserDialog( + try { + dialog.reset(new Gtk::FileChooserDialog( *getResourceUstring("fileChooserDialogTitle"), Gtk::FILE_CHOOSER_ACTION_OPEN)); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + std::exit(1); + } dialog->set_transient_for(*this);