Module rhn_choose_server_gui
[hide private]
[frames] | no frames]

Source Code for Module rhn_choose_server_gui

 1  # Copyright 2006 Red Hat, Inc. 
 2  # 
 3  # This program is free software; you can redistribute it and/or modify 
 4  # it under the terms of the GNU General Public License as published by 
 5  # the Free Software Foundation; version 2 of the License. 
 6  # 
 7  # This program is distributed in the hope that it will be useful, 
 8  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
 9  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
10  # GNU General Public License for more details. 
11  # 
12  # You should have received a copy of the GNU General Public License 
13  # along with this program; if not, write to the Free Software 
14  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
15  # 
16  # Authors: 
17  #     Daniel Benamy <dbenamy@redhat.com> 
18   
19  import os 
20  from up2date_client import rhnreg 
21  from up2date_client import rhnregGui 
22  from up2date_client import up2dateErrors 
23  from rhn_register_firstboot_gui_window import RhnRegisterFirstbootGuiWindow 
24   
25  import gtk 
26  from gtk import glade 
27  import gettext 
28  t = gettext.translation('rhn-client-tools', fallback=True) 
29  _ = t.ugettext 
30   
31  gtk.glade.bindtextdomain("rhn-client-tools") 
32   
33   
34 -class RhnChooseServerWindow(RhnRegisterFirstbootGuiWindow, rhnregGui.ChooseServerPage):
35 runPriority=106.5 36 moduleName = _("Choose Server") 37 windowTitle = moduleName 38 shortMessage = _("Choose a Red Hat Satellite server") 39 needsparent = 1 40 needsnetwork = 1 41 noSidebar = True 42
43 - def __init__(self):
48
49 - def _getVbox(self):
50 return self.chooseServerPageVbox()
51
52 - def updatePage(self):
54
55 - def apply(self, *args):
56 """Returns True to change the page (to the one set).""" 57 try: 58 if self.chooseServerPageApply() is False: 59 self.parent.setPage("rhn_login_gui") 60 return True 61 else: 62 return None 63 except up2dateErrors.SSLCertificateVerifyFailedError: 64 self.parent.setPage("rhn_provide_certificate_gui") 65 return True
66 67 68 childWindow = RhnChooseServerWindow 69