added Play button to Scratchpad;
renamed DJ Bag to Scratchpad in resource bundle files; put loginEntry->grab_focus() in LoginWindow; fixed crash in GLiveSupport::login() on incorrect login name and password
This commit is contained in:
parent
96e5fd0f1a
commit
ffaee61d4d
9 changed files with 55 additions and 21 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.7 $
|
||||
Version : $Revision: 1.8 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/include/LiveSupport/Authentication/AuthenticationClientInterface.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -69,7 +69,7 @@ using namespace LiveSupport::Core;
|
|||
* An interface for authentication clients.
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.7 $
|
||||
* @version $Revision: 1.8 $
|
||||
*/
|
||||
class AuthenticationClientInterface
|
||||
{
|
||||
|
@ -79,6 +79,9 @@ class AuthenticationClientInterface
|
|||
* Login to the authentication server.
|
||||
* Returns a new session ID; in case of an error, throws
|
||||
* AuthenticationException or one of its subclasses.
|
||||
* Note that an incorrect login or password is considered an error
|
||||
* and will throw an XmlRpcException (in the case of WebStorageClient,
|
||||
* an XmlRpcMethodFaultException, which is also an XmlRpcException).
|
||||
*
|
||||
* @param login the login to the server
|
||||
* @param password the password to the server
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.8 $
|
||||
Version : $Revision: 1.9 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -95,7 +95,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.8 $
|
||||
* @version $Revision: 1.9 $
|
||||
*/
|
||||
class TestAuthenticationClient :
|
||||
virtual public Configurable,
|
||||
|
@ -185,6 +185,8 @@ class TestAuthenticationClient :
|
|||
* configuration file.
|
||||
* Returns a new session ID; in case of an error, returns a
|
||||
* null pointer.
|
||||
* Note that an incorrect login or password is considered an error
|
||||
* and will throw an XmlRpcException.
|
||||
*
|
||||
* @return the new session ID
|
||||
* @exception XmlRpcException login or password is incorrect
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.5 $
|
||||
Version : $Revision: 1.6 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -93,7 +93,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.5 $
|
||||
* @version $Revision: 1.6 $
|
||||
*/
|
||||
class WebAuthenticationClient :
|
||||
virtual public Configurable,
|
||||
|
@ -163,6 +163,8 @@ class WebAuthenticationClient :
|
|||
* configuration file.
|
||||
* Returns a new session ID; in case of an error, throws one of three
|
||||
* types of AuthenticationException.
|
||||
* Note that an incorrect login or password is considered an error
|
||||
* and will throw an XmlRpcMethodFaultException.
|
||||
*
|
||||
* @param login the login to the server
|
||||
* @param password the password to the server
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.7 $
|
||||
Version : $Revision: 1.8 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/DjBagWindow.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -68,12 +68,22 @@ DjBagWindow :: DjBagWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
|
||||
try {
|
||||
set_title(*getResourceUstring("windowTitle"));
|
||||
playButton.reset(new Gtk::Button(
|
||||
*getResourceUstring("playButtonLabel")));
|
||||
closeButton.reset(new Gtk::Button(
|
||||
*getResourceUstring("closeButtonLabel")));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
||||
// set up the play button
|
||||
playButton->set_name("playButton");
|
||||
playButton->set_flags(Gtk::CAN_FOCUS|Gtk::CAN_DEFAULT|Gtk::HAS_DEFAULT);
|
||||
playButton->set_relief(Gtk::RELIEF_NORMAL);
|
||||
// Register the signal handler for the button getting clicked.
|
||||
playButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&DjBagWindow::onPlayItem));
|
||||
|
||||
// set up the close button
|
||||
closeButton->set_name("closeButton");
|
||||
closeButton->set_flags(Gtk::CAN_FOCUS|Gtk::CAN_DEFAULT|Gtk::HAS_DEFAULT);
|
||||
|
@ -82,7 +92,6 @@ DjBagWindow :: DjBagWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&DjBagWindow::onCloseButtonClicked));
|
||||
|
||||
|
||||
set_border_width(5);
|
||||
set_default_size(400, 200);
|
||||
|
||||
|
@ -94,9 +103,14 @@ DjBagWindow :: DjBagWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
// Only show the scrollbars when they are necessary:
|
||||
scrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
vBox.pack_start(playButtonBox, Gtk::PACK_SHRINK);
|
||||
vBox.pack_start(scrolledWindow);
|
||||
vBox.pack_start(buttonBox, Gtk::PACK_SHRINK);
|
||||
|
||||
playButtonBox.pack_start(*playButton, Gtk::PACK_SHRINK);
|
||||
playButtonBox.set_border_width(5);
|
||||
playButtonBox.set_layout(Gtk::BUTTONBOX_SPREAD);
|
||||
|
||||
buttonBox.pack_start(*closeButton, Gtk::PACK_SHRINK);
|
||||
buttonBox.set_border_width(5);
|
||||
buttonBox.set_layout(Gtk::BUTTONBOX_END);
|
||||
|
|
|
@ -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/Attic/DjBagWindow.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -68,7 +68,7 @@ using namespace LiveSupport::Core;
|
|||
* playlists.
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.5 $
|
||||
* @version $Revision: 1.6 $
|
||||
*/
|
||||
class DjBagWindow : public Gtk::Window, public LocalizedObject
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ class DjBagWindow : public Gtk::Window, public LocalizedObject
|
|||
* Lists one clip per row.
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.5 $
|
||||
* @version $Revision: 1.6 $
|
||||
*/
|
||||
class ModelColumns : public Gtk::TreeModel::ColumnRecord
|
||||
{
|
||||
|
@ -142,6 +142,16 @@ class DjBagWindow : public Gtk::Window, public LocalizedObject
|
|||
*/
|
||||
Glib::RefPtr<Gtk::ListStore> treeModel;
|
||||
|
||||
/**
|
||||
* The box containing the play button.
|
||||
*/
|
||||
Gtk::HButtonBox playButtonBox;
|
||||
|
||||
/**
|
||||
* The play button.
|
||||
*/
|
||||
Ptr<Gtk::Button>::Ref playButton;
|
||||
|
||||
/**
|
||||
* The box containing the close button.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.21 $
|
||||
Version : $Revision: 1.22 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -259,11 +259,11 @@ LiveSupport :: GLiveSupport ::
|
|||
GLiveSupport :: login(const std::string & login,
|
||||
const std::string & password) throw ()
|
||||
{
|
||||
sessionId = authentication->login(login, password);
|
||||
if (sessionId.get()) {
|
||||
try {
|
||||
sessionId = authentication->login(login, password);
|
||||
loadDjBagContents();
|
||||
return true;
|
||||
} else {
|
||||
} catch (XmlRpcException &e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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/LoginWindow.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -198,6 +198,7 @@ LoginWindow :: LoginWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
|
||||
// add the table to the window, and show everything
|
||||
add(*table);
|
||||
loginEntry->grab_focus();
|
||||
show_all();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ hu:table
|
|||
loginButtonLabel:string { "bejelentkezés" }
|
||||
logoutButtonLabel:string { "kijelentkezés" }
|
||||
uploadFileButtonLabel:string { "file feltöltés" }
|
||||
djBagButtonLabel:string { "dj táska" }
|
||||
djBagButtonLabel:string { "praktikus csupor" }
|
||||
simplePlaylistMgmtButtonLabel:string { "egyszerű playlist kezelés" }
|
||||
schedulerButtonLabel:string { "időzítő" }
|
||||
|
||||
|
@ -34,11 +34,12 @@ hu:table
|
|||
|
||||
djBagWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Dj Táska" }
|
||||
windowTitle:string { "LiveSupport Praktikus Csupor" }
|
||||
|
||||
typeColumnLabel:string { "típus" }
|
||||
titleColumnLabel:string { "cím" }
|
||||
closeButtonLabel:string { "bezár" }
|
||||
playButtonLabel:string { "lejátszás" }
|
||||
|
||||
upMenuItem:string { "_Fel" }
|
||||
downMenuItem:string { "_Le" }
|
||||
|
|
|
@ -6,7 +6,7 @@ root:table
|
|||
loginButtonLabel:string { "log in" }
|
||||
logoutButtonLabel:string { "log out" }
|
||||
uploadFileButtonLabel:string { "upload file" }
|
||||
djBagButtonLabel:string { "dj bag" }
|
||||
djBagButtonLabel:string { "scratchpad" }
|
||||
simplePlaylistMgmtButtonLabel:string { "simple playlist management" }
|
||||
schedulerButtonLabel:string { "scheduler" }
|
||||
|
||||
|
@ -34,11 +34,12 @@ root:table
|
|||
|
||||
djBagWindow:table
|
||||
{
|
||||
windowTitle:string { "LiveSupport Dj Bag" }
|
||||
windowTitle:string { "LiveSupport Scratchpad" }
|
||||
|
||||
typeColumnLabel:string { "type" }
|
||||
titleColumnLabel:string { "title" }
|
||||
closeButtonLabel:string { "close" }
|
||||
playButtonLabel:string { "play" }
|
||||
|
||||
upMenuItem:string { "Move _Up" }
|
||||
downMenuItem:string { "Move D_own" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue