1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 import gtk
21 import gobject
22 import os
23 import functions
24
25 import gnome, gnome.ui
26 from gtk import glade
27
28 from rhn_register_firstboot_gui_window import RhnRegisterFirstbootGuiWindow
29
30 from up2date_client import rhnreg
31 from up2date_client import rhnregGui
32
33 import gettext
34 t = gettext.translation('rhn-client-tools', fallback=True)
35 _ = t.ugettext
36 gtk.glade.bindtextdomain("rhn-client-tools", "/usr/share/locale")
37
38
39
40 -class RhnLoginWindow(RhnRegisterFirstbootGuiWindow, rhnregGui.LoginPage):
41
42 runPriority = 108
43 moduleName = _("Red Hat Login")
44 windowTitle = moduleName
45 shortMessage = _("Register with Red Hat Satellite")
46 needsparent = 1
47 needsnetwork = 1
48 noSidebar = True
49
55
56 - def updatePage(self):
57
58 self.loginPagePrepare()
59 self.goingNextFromNewAccountDialog = False
60
62
63
64 self.loginXml.get_widget("loginUserEntry").grab_focus()
65
68
70 """Returns None to stay on the same page. Anything else will cause
71 firstboot to advance but True is generally used. This is different from
72 the gnome druid in rhn_register.
73
74 """
75 if self.doDebug:
76 print("applying rhn_login_gui")
77
78
79
80
81 if self.goingNextFromNewAccountDialog:
82 assert rhnregGui.newAccount is True
83 else:
84 if self.loginPageVerify():
85 return None
86
87 assert rhnregGui.newAccount is False
88
89 if self.loginPageApply():
90 return None
91
92
93 rhnregGui.try_to_activate_hardware()
94
95 self.parent.setPage('rhn_create_profile_gui')
96 return True
97
99
100 self.goingNextFromNewAccountDialog = True
101 self.parent.nextClicked()
102
103 - def onLoginPageNext(self, dummy=None, dummy2=None):
104
105 self.parent.nextClicked()
106
107 childWindow = RhnLoginWindow
108