added more descriptive error message to LocalizedObject::getResourceUstring();
added exit() statements to catch blocks where getting resource failed
This commit is contained in:
parent
27b8a27807
commit
49c6517346
11 changed files with 122 additions and 60 deletions
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.7 $
|
Version : $Revision: 1.8 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/LocalizedObject.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/LocalizedObject.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -119,7 +119,12 @@ LocalizedObject :: getBundle(const char * key)
|
||||||
Ptr<ResourceBundle>::Ref resourceBundle(new ResourceBundle(
|
Ptr<ResourceBundle>::Ref resourceBundle(new ResourceBundle(
|
||||||
bundle->getWithFallback(key, status)));
|
bundle->getWithFallback(key, status)));
|
||||||
if (!U_SUCCESS(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;
|
return resourceBundle;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
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 $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LoginWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -91,7 +91,8 @@ LoginWindow :: LoginWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
cancelButton = Gtk::manage(widgetFactory->createButton(
|
cancelButton = Gtk::manage(widgetFactory->createButton(
|
||||||
*getResourceUstring("cancelButtonLabel")));
|
*getResourceUstring("cancelButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} 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
|
// set up the login label
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.8 $
|
Version : $Revision: 1.9 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx,v $
|
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");
|
notLoggedInMsg = getResourceUstring("notLoggedInMsg");
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
return;
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
userInfoLabel->set_label(*notLoggedInMsg);
|
userInfoLabel->set_label(*notLoggedInMsg);
|
||||||
|
@ -176,7 +176,12 @@ MasterPanelUserInfoWidget :: onLoginButtonClicked (void) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loggedIn) {
|
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
|
// change the login button to a logout button
|
||||||
logInOutSignalConnection.disconnect();
|
logInOutSignalConnection.disconnect();
|
||||||
|
@ -209,7 +214,12 @@ MasterPanelUserInfoWidget :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
setBundle(bundle);
|
setBundle(bundle);
|
||||||
updateStrings();
|
try {
|
||||||
|
updateStrings();
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
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 $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -204,6 +204,7 @@ MasterPanelWindow :: changeLanguage(Ptr<ResourceBundle>::Ref bundle)
|
||||||
*getResourceUstring("searchButtonLabel"));
|
*getResourceUstring("searchButtonLabel"));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
userInfoWidget->changeLanguage(bundle);
|
userInfoWidget->changeLanguage(bundle);
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.6 $
|
Version : $Revision: 1.7 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/PlaylistListWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/PlaylistListWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -78,6 +78,7 @@ PlaylistListWindow :: PlaylistListWindow (
|
||||||
*getResourceUstring("closeButtonLabel")));
|
*getResourceUstring("closeButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
mainBox = Gtk::manage(new Gtk::VBox());
|
mainBox = Gtk::manage(new Gtk::VBox());
|
||||||
|
@ -133,6 +134,7 @@ PlaylistListWindow :: PlaylistListWindow (
|
||||||
modelColumns.tokenColumn);
|
modelColumns.tokenColumn);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// attach the event handler for the user selecting a playlist from
|
// attach the event handler for the user selecting a playlist from
|
||||||
|
@ -163,6 +165,7 @@ PlaylistListWindow :: PlaylistListWindow (
|
||||||
modelColumns.tokenColumn);
|
modelColumns.tokenColumn);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// attach the event handler for the user selecting an entry from
|
// attach the event handler for the user selecting an entry from
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.4 $
|
Version : $Revision: 1.5 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -69,7 +69,6 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
|
||||||
{
|
{
|
||||||
this->gLiveSupport = gLiveSupport;
|
this->gLiveSupport = gLiveSupport;
|
||||||
this->playlist = playlist;
|
this->playlist = playlist;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
set_title(*getResourceUstring("windowTitle"));
|
set_title(*getResourceUstring("windowTitle"));
|
||||||
hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring(
|
hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring(
|
||||||
|
@ -82,6 +81,7 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
|
||||||
*getResourceUstring("closeButtonLabel")));
|
*getResourceUstring("closeButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle()));
|
playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle()));
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.6 $
|
Version : $Revision: 1.7 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -73,6 +73,7 @@ SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
*getResourceUstring("closeButtonLabel")));
|
*getResourceUstring("closeButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
calendar = Gtk::manage(new Gtk::Calendar());
|
calendar = Gtk::manage(new Gtk::Calendar());
|
||||||
|
@ -94,6 +95,7 @@ SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
entryColumns->endColumn);
|
entryColumns->endColumn);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// register the signal handler for entries view entries being clicked
|
// register the signal handler for entries view entries being clicked
|
||||||
|
@ -104,10 +106,16 @@ SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
entryMenu = Gtk::manage(new Gtk::Menu());
|
entryMenu = Gtk::manage(new Gtk::Menu());
|
||||||
Gtk::Menu::MenuList& menuList = entryMenu->items();
|
Gtk::Menu::MenuList& menuList = entryMenu->items();
|
||||||
// register the signal handlers for the popup menu
|
// 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"),
|
*getResourceUstring("deleteMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&SchedulerWindow::onDeleteItem)));
|
&SchedulerWindow::onDeleteItem)));
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
entryMenu->accelerate(*this);
|
entryMenu->accelerate(*this);
|
||||||
|
|
||||||
layout = Gtk::manage(new Gtk::Table());
|
layout = Gtk::manage(new Gtk::Table());
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
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 $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -86,6 +86,7 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
*getResourceUstring("removeButtonLabel")));
|
*getResourceUstring("removeButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
playButton->set_name("playButton");
|
playButton->set_name("playButton");
|
||||||
|
@ -122,6 +123,7 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
modelColumns.titleColumn);
|
modelColumns.titleColumn);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// color the columns blue
|
// color the columns blue
|
||||||
|
@ -157,64 +159,77 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
audioClipMenu = Gtk::manage(new Gtk::Menu());
|
audioClipMenu = Gtk::manage(new Gtk::Menu());
|
||||||
Gtk::Menu::MenuList& audioClipMenuList = audioClipMenu->items();
|
Gtk::Menu::MenuList& audioClipMenuList = audioClipMenu->items();
|
||||||
// register the signal handlers for the popup menu
|
// 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"),
|
*getResourceUstring("addToPlaylistMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onAddToPlaylist)));
|
&ScratchpadWindow::onAddToPlaylist)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("upMenuItem"),
|
*getResourceUstring("upMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onUpItem)));
|
&ScratchpadWindow::onUpItem)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("downMenuItem"),
|
*getResourceUstring("downMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onDownItem)));
|
&ScratchpadWindow::onDownItem)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("removeMenuItem"),
|
*getResourceUstring("removeMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onRemoveItem)));
|
&ScratchpadWindow::onRemoveItem)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("deleteMenuItem"),
|
*getResourceUstring("deleteMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onDeleteItem)));
|
&ScratchpadWindow::onDeleteItem)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("playMenuItem"),
|
*getResourceUstring("playMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onPlayItem)));
|
&ScratchpadWindow::onPlayItem)));
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
audioClipMenu->accelerate(*this);
|
audioClipMenu->accelerate(*this);
|
||||||
|
|
||||||
// create the right-click entry context menu for playlists
|
// create the right-click entry context menu for playlists
|
||||||
playlistMenu = Gtk::manage(new Gtk::Menu());
|
playlistMenu = Gtk::manage(new Gtk::Menu());
|
||||||
Gtk::Menu::MenuList& playlistMenuList = playlistMenu->items();
|
Gtk::Menu::MenuList& playlistMenuList = playlistMenu->items();
|
||||||
// register the signal handlers for the popup menu
|
// 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"),
|
*getResourceUstring("addToPlaylistMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onAddToPlaylist)));
|
&ScratchpadWindow::onAddToPlaylist)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("schedulePlaylistMenuItem"),
|
*getResourceUstring("schedulePlaylistMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onSchedulePlaylist)));
|
&ScratchpadWindow::onSchedulePlaylist)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("upMenuItem"),
|
*getResourceUstring("upMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onUpItem)));
|
&ScratchpadWindow::onUpItem)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("downMenuItem"),
|
*getResourceUstring("downMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onDownItem)));
|
&ScratchpadWindow::onDownItem)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("removeMenuItem"),
|
*getResourceUstring("removeMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onRemoveItem)));
|
&ScratchpadWindow::onRemoveItem)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("deleteMenuItem"),
|
*getResourceUstring("deleteMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onDeleteItem)));
|
&ScratchpadWindow::onDeleteItem)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("playMenuItem"),
|
*getResourceUstring("playMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onPlayItem)));
|
&ScratchpadWindow::onPlayItem)));
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
playlistMenu->accelerate(*this);
|
playlistMenu->accelerate(*this);
|
||||||
|
|
||||||
// show
|
// show
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
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 $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -81,10 +81,15 @@ SearchWindow :: SearchWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
Gtk::VBox * browseView = Gtk::manage(new Gtk::VBox);
|
Gtk::VBox * browseView = Gtk::manage(new Gtk::VBox);
|
||||||
|
|
||||||
Notebook * views = Gtk::manage(new Notebook);
|
Notebook * views = Gtk::manage(new Notebook);
|
||||||
views->appendPage(*searchView, *getResourceUstring("searchTab"));
|
try {
|
||||||
views->appendPage(*advancedSearchView, *getResourceUstring(
|
views->appendPage(*searchView, *getResourceUstring("searchTab"));
|
||||||
|
views->appendPage(*advancedSearchView, *getResourceUstring(
|
||||||
"advancedSearchTab"));
|
"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);
|
add(*views);
|
||||||
|
|
||||||
|
@ -128,39 +133,44 @@ SearchWindow :: constructAdvancedSearchView(void) throw ()
|
||||||
view->pack_start(*searchResults, Gtk::PACK_SHRINK, 5);
|
view->pack_start(*searchResults, Gtk::PACK_SHRINK, 5);
|
||||||
|
|
||||||
// set up the search options box
|
// 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") ));
|
*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());
|
ComboBoxText * metadataType = Gtk::manage(wf->createComboBoxText());
|
||||||
metadataType->append_text("Title");
|
metadataType->append_text("Title");
|
||||||
metadataType->append_text("Creator");
|
metadataType->append_text("Creator");
|
||||||
metadataType->append_text("Length");
|
metadataType->append_text("Length");
|
||||||
metadataType->set_active_text("Title");
|
metadataType->set_active_text("Title");
|
||||||
|
searchOptionsBox->pack_start(*metadataType, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
|
||||||
ComboBoxText * operatorType = Gtk::manage(wf->createComboBoxText());
|
ComboBoxText * operatorType = Gtk::manage(wf->createComboBoxText());
|
||||||
operatorType->append_text("contains");
|
operatorType->append_text("contains");
|
||||||
operatorType->append_text("equals");
|
operatorType->append_text("equals");
|
||||||
operatorType->append_text(">=");
|
operatorType->append_text(">=");
|
||||||
operatorType->append_text("<");
|
operatorType->append_text("<");
|
||||||
operatorType->set_active_text("contains");
|
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);
|
searchOptionsBox->pack_start(*operatorType, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
|
||||||
|
EntryBin * entryBin = Gtk::manage(wf->createEntryBin());
|
||||||
searchOptionsBox->pack_start(*entryBin, Gtk::PACK_EXPAND_WIDGET, 5);
|
searchOptionsBox->pack_start(*entryBin, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
|
||||||
// set up the search button box
|
// set up the search button box
|
||||||
Button * searchButton = Gtk::manage(wf->createButton(
|
try {
|
||||||
|
Button * searchButton = Gtk::manage(wf->createButton(
|
||||||
*getResourceUstring("searchButtonLabel") ));
|
*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;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.8 $
|
Version : $Revision: 1.9 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -76,6 +76,7 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow (
|
||||||
*getResourceUstring("closeButtonLabel")));
|
*getResourceUstring("closeButtonLabel")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
nameEntry = Gtk::manage(new Gtk::Entry());
|
nameEntry = Gtk::manage(new Gtk::Entry());
|
||||||
|
@ -99,12 +100,14 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow (
|
||||||
modelColumns.titleColumn);
|
modelColumns.titleColumn);
|
||||||
entriesView->append_column(*getResourceUstring("lengthColumnLabel"),
|
entriesView->append_column(*getResourceUstring("lengthColumnLabel"),
|
||||||
modelColumns.lengthColumn);
|
modelColumns.lengthColumn);
|
||||||
|
|
||||||
|
statusBar = Gtk::manage(new Gtk::Label(
|
||||||
|
*getResourceUstring("statusBar")));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
statusBar = Gtk::manage(new Gtk::Label(*getResourceUstring("statusBar")));
|
|
||||||
|
|
||||||
// set up the layout
|
// set up the layout
|
||||||
layout = Gtk::manage(new Gtk::Table());
|
layout = Gtk::manage(new Gtk::Table());
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.7 $
|
Version : $Revision: 1.8 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -131,6 +131,7 @@ UploadFileWindow :: UploadFileWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
// TODO: signal error
|
// TODO: signal error
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// build up the main section
|
// build up the main section
|
||||||
|
@ -191,9 +192,14 @@ UploadFileWindow :: onChooseFileButtonClicked(void) throw ()
|
||||||
{
|
{
|
||||||
Ptr<Gtk::FileChooserDialog>::Ref dialog;
|
Ptr<Gtk::FileChooserDialog>::Ref dialog;
|
||||||
|
|
||||||
dialog.reset(new Gtk::FileChooserDialog(
|
try {
|
||||||
|
dialog.reset(new Gtk::FileChooserDialog(
|
||||||
*getResourceUstring("fileChooserDialogTitle"),
|
*getResourceUstring("fileChooserDialogTitle"),
|
||||||
Gtk::FILE_CHOOSER_ACTION_OPEN));
|
Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
dialog->set_transient_for(*this);
|
dialog->set_transient_for(*this);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue