From: <umg...@us...> - 2007-04-06 20:07:58
|
Revision: 406 http://svn.sourceforge.net/pybridge/?rev=406&view=rev Author: umgangee Date: 2007-04-06 13:07:59 -0700 (Fri, 06 Apr 2007) Log Message: ----------- Fix call to client.joinTable(), improve "Could not create table" error message. Modified Paths: -------------- trunk/pybridge/pybridge/ui/dialog_newtable.py Modified: trunk/pybridge/pybridge/ui/dialog_newtable.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_newtable.py 2007-04-06 20:07:13 UTC (rev 405) +++ trunk/pybridge/pybridge/ui/dialog_newtable.py 2007-04-06 20:07:59 UTC (rev 406) @@ -19,6 +19,7 @@ import gtk from wrapper import GladeWrapper +from pybridge.network.client import client from manager import wm @@ -38,9 +39,9 @@ def createFailure(self, reason): error = reason.getErrorMessage() dialog = gtk.MessageDialog(parent=self.window, flags=gtk.DIALOG_MODAL, - type=gtk.MESSAGE_ERROR, - buttons=gtk.BUTTONS_OK) - dialog.set_markup(_('Could not create new table.')) + type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + dialog.set_title(_('Could not create table')) + dialog.set_markup(_('The table could not be created.')) dialog.format_secondary_text(_('Reason: %s') % error) dialog.run() @@ -56,11 +57,12 @@ def on_okbutton_clicked(self, widget, *args): tableid = self.entry_tablename.get_text() - d = self.parent.joinTable(tableid, host=True) + d = client.joinTable(tableid, host=True) d.addCallbacks(self.createSuccess, self.createFailure) def on_tablename_changed(self, widget, *args): + # Disable the OK button if the table name field is empty. sensitive = self.entry_tablename.get_text() != "" self.okbutton.set_property('sensitive', sensitive) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |