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

Source Code for Module rhn_finish_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  from rhn_register_firstboot_gui_window import RhnRegisterFirstbootGuiWindow 
20  from up2date_client import rhnreg 
21  from up2date_client import rhnregGui 
22  from up2date_client import config 
23   
24  import gtk 
25  from gtk import glade 
26  import gettext 
27  t = gettext.translation('rhn-client-tools', fallback=True) 
28  _ = t.ugettext 
29  gtk.glade.bindtextdomain("rhn-client-tools") 
30   
31   
32 -class RhnFinishWindow(RhnRegisterFirstbootGuiWindow, rhnregGui.FinishPage):
33 runPriority=109 34 moduleName = _("Finish Updates Setup") 35 windowTitle = moduleName 36 shortMessage = _("Connect to Red Hat Satellite") 37 needsparent = 1 38 needsnetwork = 1 39 noSidebar = True 40
41 - def __init__(self):
42 RhnRegisterFirstbootGuiWindow.__init__(self) 43 rhnregGui.FinishPage.__init__(self) 44 if rhnreg.registered(): 45 self.skipme = True
46
47 - def _getVbox(self):
48 return self.finishPageVbox()
49
50 - def updatePage(self):
51 ## if rhnregGui.hasBaseChannelAndUpdates(): 52 ## self.druid.finish.set_label(_("_Finish")) 53 ## title = _("Finish setting up software updates") 54 ## else: 55 ## self.druid.finish.set_label(_("_Exit registration process")) 56 ## title = _("Registration unsuccessful") 57 self.finishPagePrepare()
58 ## self.mainWin.set_title(title) 59 ## self.finishPage.set_title(title) 60
61 - def apply(self, *args):
62 """Returns None to stay on the same page. Anything else will cause 63 firstboot to advance but True is generally used. This is different from 64 the gnome druid in rhn_register. 65 66 """ 67 up2DateConfig = config.initUp2dateConfig() 68 up2DateConfig.save() 69 return True
70 71 72 childWindow = RhnFinishWindow 73