client/rhel/rhn-client-tools/data/gui.glade | 23 --
client/rhel/rhn-client-tools/data/rh_register.glade | 108 ----------
client/rhel/rhn-client-tools/rhn-client-tools.spec | 1
client/rhel/rhn-client-tools/src/firstboot/Makefile | 2
client/rhel/rhn-client-tools/src/firstboot/rhn_choose_org_gui.py | 71 ------
client/rhel/rhn-client-tools/src/firstboot/rhn_login_gui.py | 4
client/rhel/rhn-client-tools/src/up2date_client/gui.py | 34 ---
client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 78 -------
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 78 -------
9 files changed, 5 insertions(+), 394 deletions(-)
New commits:
commit 15efd9c5d90e6c91fc4b27345c9fd95ccd100559
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 10:21:19 2010 +0100
As getPossibleOrgs was removed, PossibleOrgs is not used either, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 2db6b15..be12620 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -769,56 +769,6 @@ def activateHardwareInfo(username, password, hardwareInfo,
orgId=None):
raise up2dateErrors.CommunicationError(message)
-# TODO Move the PossibleOrg stuff to a seperate file
-class PossibleOrgsError(Exception):
- pass
-class InvalidDefaultError(PossibleOrgsError):
- pass
-class NoDefaultError(PossibleOrgsError):
- pass
-
-class PossibleOrgs:
- def __init__(self):
- self._orgs = {}
- self._default = None
-
- def setOrgs(self, orgsDict):
- """orgsDict must be a dict of org ids (as ints or strings that
contain
- ints) to org names (as strings).
-
- """
- self._orgs = {}
- for id, name in orgsDict.items():
- self._orgs[int(id)] = name
- self._default = None
-
- def setDefaultOrg(self, orgId):
- """Must refer to org that's already been added. Can be an int
or string
- containing an int.
-
- """
- if int(orgId) not in self._orgs.keys():
- raise InvalidDefaultError("Tried to set default org to %s. Valid "
- "values are %s" % (orgId,
self._orgs.keys()))
- self._default = int(orgId)
-
- def getOrgs(self):
- """Returns a dict of org ids (ints) to org names (strings). Can
return
- an empty dict.
-
- """
- return self._orgs
-
- def getDefaultOrg(self):
- """Returns the org id (int) of the default org.
- Raises NoDefaultError if setDefaultOrg was never called or wasn't called
- after setOrgs.
-
- """
- if self._default is None:
- raise NoDefaultError()
- return self._default
-
def spawnRhnCheckForUI():
if os.access("/usr/sbin/rhn_check", os.R_OK|os.X_OK):
from subprocess import Popen, PIPE
commit 867c6219d5ac1e722797f4846f5cbe32900f83a7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 10:19:47 2010 +0100
All invocations of getPossibleOrgs were removed, removing the function as well.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 169b610..2db6b15 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -41,8 +41,6 @@ REMIND_FILE = "%s/rhn_register_remind" % SYSID_DIR
# REG_NUM_FILE is the new rhel 5 number.
REG_NUM_FILE = "%s/install-num" % SYSID_DIR
-cachedOrgs = None
-
import config
cfg = config.initUp2dateConfig()
log = up2dateLog.initLog()
@@ -821,32 +819,6 @@ class PossibleOrgs:
raise NoDefaultError()
return self._default
-def getPossibleOrgs(username, password, useCache=False):
- """Gets the orgs the user belongs to and the default one.
-
- If useCache is set to true it will not talk to the server and will return
- the values from the most recent non-cached call. If there is nothing cached,
- it will get the current value from the server.
-
- Returns a PossibleOrgs.
-
- Can raise:
- * up2dateErrors2.UnknownMethodException if called on a server that doesn't
- support the necessary xmlrpc (satellites won't, at least for now)
- * The usual 'communication with a server' exceptions
-
- """
- global cachedOrgs
- if useCache and cachedOrgs is not None:
- return cachedOrgs
- s = rhnserver.RhnServer()
- orgsFromServer = s.registration.get_possible_orgs(username, password)
- cachedOrgs = PossibleOrgs()
- cachedOrgs.setOrgs(orgsFromServer['orgs'])
- cachedOrgs.setDefaultOrg(orgsFromServer['default_org'])
- return cachedOrgs
-
-
def spawnRhnCheckForUI():
if os.access("/usr/sbin/rhn_check", os.R_OK|os.X_OK):
from subprocess import Popen, PIPE
commit 6dbc2a294eb825082f62d5802d6ef53f63592244
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 10:11:51 2010 +0100
Class ChooseOrgPage not used, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index 202393c..d55a899 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -537,57 +537,6 @@ class LoginPage:
PrivacyDialog()
-class ChooseOrgPage:
- def __init__(self):
- self.chooseOrgXml = gtk.glade.XML(gladefile,
- "chooseOrgWindowVbox",
- domain="rhn-client-tools")
- # self.orgsList will have the org id in the 0th column and the
- # org name in the 1st column.
- self.orgsList = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING)
- self.orgsComboBox = self.chooseOrgXml.get_widget("orgsComboBox")
- self.orgsComboBox.set_model(self.orgsList)
- cell = gtk.CellRendererText()
- self.orgsComboBox.pack_start(cell, True)
- self.orgsComboBox.add_attribute(cell, 'text', 1)
- self.useCachedOrgs = False
-
- def chooseOrgPageVbox(self):
- return self.chooseOrgXml.get_widget("chooseOrgWindowVbox")
-
- def chooseOrgPagePrepare(self, useCachedOrgs=False):
- """The loose function chooseOrgShouldBeShown() should be used to
find
- out if this page should be shown or not.
-
- """
- # TODO add support for args to callAndFilterExceptions and pass
- # useCachedOrgs as an arg
- self.useCachedOrgs = useCachedOrgs
- callAndFilterExceptions(
- self._chooseOrgPagePrepare,
- [],
- _("There was an error while getting the list of
organizations.")
- )
-
- def _chooseOrgPagePrepare(self):
- """Functionality for chooseOrgPagePrepare but might raise
exceptions."""
- global username, password
- setBusyCursor()
- possibleOrgs = rhnreg.getPossibleOrgs(username, password,
- self.useCachedOrgs)
- setArrowCursor()
- self.orgsList.clear()
- for orgId, orgName in possibleOrgs.getOrgs().items():
- row = self.orgsList.append([orgId, orgName])
- if orgId == possibleOrgs.getDefaultOrg():
- self.orgsComboBox.set_active_iter(row)
-
- def chooseOrgPageApply(self):
- global organization
- activeIndex = self.orgsComboBox.get_active()
- organization = self.orgsList[activeIndex][0]
-
-
def activateSubscriptionShouldBeShown():
"""If we activate an EN from disk and/or hardware info (eg asset tag)
and
one of them provides an entitlement for the base channel the system needs
commit 45578481a0c7b97cf07d6b1ee3cfe0af13b6c618
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 10:11:26 2010 +0100
chooseOrgShouldBeShown is unused by now, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index 46ead3a..202393c 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -537,19 +537,6 @@ class LoginPage:
PrivacyDialog()
-def chooseOrgShouldBeShown():
- """Decides whether we should show the choose org page or not.
-
- Returns True if we're talking to hosted and the user belongs to at least 2
- orgs. If an error occurs, it is logged and True returned. Returns False
- otherwise.
-
- This is a loose function because it's difficult to use it in firstboot
- where we want to without a hack if it's in ChooseOrgPage.
-
- """
- return False
-
class ChooseOrgPage:
def __init__(self):
self.chooseOrgXml = gtk.glade.XML(gladefile,
commit 358c89dd8f5848af6a54f78483f8370f2d4e6e27
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 10:09:34 2010 +0100
Remove the chooseOrg* from glade as well.
diff --git a/client/rhel/rhn-client-tools/data/gui.glade
b/client/rhel/rhn-client-tools/data/gui.glade
index a6ec4eb..a69df88 100644
--- a/client/rhel/rhn-client-tools/data/gui.glade
+++ b/client/rhel/rhn-client-tools/data/gui.glade
@@ -101,29 +101,6 @@
</child>
<child>
- <widget class="GnomeDruidPageStandard" id="chooseOrgPage">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Select
organization</property>
- <property name="logo">shadowman-round-48.png</property>
- <signal name="next" handler="onChooseOrgPageNext"/>
- <signal name="prepare" handler="onChooseOrgPagePrepare"/>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="chooseOrgPageVbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
<widget class="GnomeDruidPageStandard"
id="activateSubscriptionPage">
<property name="visible">True</property>
<property name="title" translatable="yes">Access a
subscription</property>
diff --git a/client/rhel/rhn-client-tools/data/rh_register.glade
b/client/rhel/rhn-client-tools/data/rh_register.glade
index f948565..c42cb49 100644
--- a/client/rhel/rhn-client-tools/data/rh_register.glade
+++ b/client/rhel/rhn-client-tools/data/rh_register.glade
@@ -4079,114 +4079,6 @@ To keep your system updated, secure, and supported, please connect
this system t
</child>
</widget>
-<widget class="GtkWindow" id="chooseOrgWindow">
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property
name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
-
- <child>
- <widget class="GtkVBox" id="chooseOrgWindowVbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">20</property>
-
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="label" translatable="yes"
context="yes">Your account is associated with multiple
<b>organizations</b>. You will need to select an organization
to register this system to.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="orgsHbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="label" translatable="yes"
context="yes">_Organization:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkComboBox" id="orgsComboBox">
- <property name="visible">True</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
-</widget>
-
<widget class="GtkDialog" id="confirmAllUpdatesDialog">
<property name="title" translatable="yes">Confirm operation
system release selection</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
commit 4919ecc384367e1da832b36d39315c0cc6ced28c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 09:17:44 2010 +0100
With the removal of the if branch, ChooseOrgPage is not used either, removing the
invocation and related code.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index b7adf59..dd7ee7b 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -43,7 +43,7 @@ import rhnregGui
class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
- rhnregGui.ChooseOrgPage, rhnregGui.ActivateSubscriptionPage,
+ rhnregGui.ActivateSubscriptionPage,
rhnregGui.ReviewSubscriptionPage, rhnregGui.CreateProfilePage,
rhnregGui.ProvideCertificatePage, rhnregGui.FinishPage,
rhnregGui.ChooseChannelPage):
@@ -61,8 +61,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
"onChooseServerPageNext" : self.onChooseServerPageNext,
"onLoginPagePrepare" : self.onLoginPagePrepare,
"onLoginPageNext" : self.onLoginPageNext,
- "onChooseOrgPagePrepare" : self.onChooseOrgPagePrepare,
- "onChooseOrgPageNext" : self.onChooseOrgPageNext,
"onActivateSubscriptionPagePrepare" :
self.onActivateSubscriptionPagePrepare,
"onActivateSubscriptionPageBack" :
self.onActivateSubscriptionPageBack,
"onActivateSubscriptionPageNext" :
self.onActivateSubscriptionPageNext,
@@ -84,7 +82,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
rhnregGui.StartPage.__init__(self)
rhnregGui.ChooseServerPage.__init__(self)
rhnregGui.LoginPage.__init__(self)
- rhnregGui.ChooseOrgPage.__init__(self)
rhnregGui.ActivateSubscriptionPage.__init__(self)
rhnregGui.ChooseChannelPage.__init__(self)
rhnregGui.CreateProfilePage.__init__(self)
@@ -102,9 +99,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
contents = self.loginPageVbox()
container = self.xml.get_widget("loginPageVbox")
container.pack_start(contents, True)
- contents = self.chooseOrgPageVbox()
- container = self.xml.get_widget("chooseOrgPageVbox")
- container.pack_start(contents, True)
contents = self.activateSubscriptionPageVbox()
container = self.xml.get_widget("linkToSubscriptionPageVbox")
container.pack_start(contents, True)
@@ -127,7 +121,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
self.initProfile = False
self.oemInfo = {}
self.productInfo = {}
- self.showedChooseOrgPage = False
self.showedActivateSubscriptionPage = False
self.druid = self.xml.get_widget("druid")
@@ -142,7 +135,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
self.provideCertificatePage =
self.xml.get_widget("provideCertificatePage")
self.activateSubscriptionPage = \
self.xml.get_widget("activateSubscriptionPage")
- self.chooseOrgPage = self.xml.get_widget("chooseOrgPage")
self.loginPage = self.xml.get_widget("loginPage")
self.chooseChannelPage = self.xml.get_widget("chooseChannelPage")
self.createProfilePage = self.xml.get_widget("createProfilePage")
@@ -248,7 +240,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
"""This function is used by the create new account dialog so it
doesn't
need to have any knowledge of the screen mechanism or order.
"""
- self.showedChooseOrgPage = False
self.showedActivateSubscriptionPage = False
if rhnregGui.activateSubscriptionShouldBeShown():
self.druid.set_page(self.activateSubscriptionPage)
@@ -258,27 +249,12 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
self.druid.set_page(self.createProfilePage)
- def onChooseOrgPagePrepare(self, page, dummy):
- self.showedChooseOrgPage = True
- self.chooseOrgPagePrepare(useCachedOrgs=True)
-
- def onChooseOrgPageNext(self, page, dummy):
- self.chooseOrgPageApply()
- if rhnregGui.activateSubscriptionShouldBeShown():
- self.druid.set_page(self.activateSubscriptionPage)
- else:
- self.druid.set_page(self.createProfilePage)
- return True
-
def onActivateSubscriptionPagePrepare(self, page, dummy):
self.showedActivateSubscriptionPage = True
self.activateSubscriptionPagePrepare()
def onActivateSubscriptionPageBack(self, page, dummy):
- if self.showedChooseOrgPage:
- self.druid.set_page(self.chooseOrgPage)
- else:
- self.druid.set_page(self.loginPage)
+ self.druid.set_page(self.loginPage)
return True
def onActivateSubscriptionPageNext(self, page, dummy):
@@ -294,8 +270,6 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
def onChooseChannelPageBack(self, page, dummy):
if self.showedActivateSubscriptionPage == True:
self.druid.set_page(self.activateSubscriptionPage)
- elif self.showedChooseOrgPage == True:
- self.druid.set_page(self.chooseOrgPage)
else:
self.druid.set_page(self.loginPage)
commit 36064664b4bca4e23183ce65fa714e89a6a1b397
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 09:10:04 2010 +0100
With the removal of the if branch, rhn_choose_org_gui is not used either, removing.
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 567cd96..91490db 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -221,7 +221,6 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/firstboot/modules/rhn_choose_server_gui.*
%{_datadir}/firstboot/modules/rhn_provide_certificate_gui.*
%{_datadir}/firstboot/modules/rhn_create_profile_gui.*
-%{_datadir}/firstboot/modules/rhn_choose_org_gui.*
%{_datadir}/firstboot/modules/rhn_review_gui.*
%{_datadir}/firstboot/modules/rhn_finish_gui.*
diff --git a/client/rhel/rhn-client-tools/src/firstboot/Makefile
b/client/rhel/rhn-client-tools/src/firstboot/Makefile
index bbdea5f..0a9a461 100644
--- a/client/rhel/rhn-client-tools/src/firstboot/Makefile
+++ b/client/rhel/rhn-client-tools/src/firstboot/Makefile
@@ -4,7 +4,7 @@
MODULES = rhn_login_gui \
rhn_activate_gui rhn_register_firstboot_gui_window \
- rhn_start_gui rhn_choose_server_gui rhn_choose_org_gui \
+ rhn_start_gui rhn_choose_server_gui \
rhn_provide_certificate_gui rhn_create_profile_gui \
rhn_review_gui rhn_finish_gui
PYFILES = $(addsuffix .py, $(MODULES))
diff --git a/client/rhel/rhn-client-tools/src/firstboot/rhn_choose_org_gui.py
b/client/rhel/rhn-client-tools/src/firstboot/rhn_choose_org_gui.py
deleted file mode 100644
index a3b20c7..0000000
--- a/client/rhel/rhn-client-tools/src/firstboot/rhn_choose_org_gui.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 2006 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# Authors:
-# Daniel Benamy <dbenamy(a)redhat.com>
-
-import sys
-sys.path.append("/usr/share/rhn/up2date_client/")
-sys.path.append("/usr/share/rhn")
-import rhnreg
-import rhnregGui
-from rhn_register_firstboot_gui_window import RhnRegisterFirstbootGuiWindow
-
-import gtk
-from gtk import glade
-import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
-gtk.glade.bindtextdomain("rhn-client-tools")
-
-
-class RhnChooseOrgWindow(RhnRegisterFirstbootGuiWindow, rhnregGui.ChooseOrgPage):
- runPriority=108.2
- moduleName = _("Choose Organization")
- windowTitle = moduleName
- shortMessage = _("Choose an organization to use with this username")
- needsparent = 1
- needsnetwork = 1
- noSidebar = True
-
- def __init__(self):
- RhnRegisterFirstbootGuiWindow.__init__(self)
- rhnregGui.ChooseOrgPage.__init__(self)
- if rhnreg.registered():
- self.skipme = True
-
- def _getVbox(self):
- return self.chooseOrgPageVbox()
-
- def updatePage(self):
- self.chooseOrgPagePrepare()
-
- def apply(self, *args):
- """Returns None to stay on the same page. Anything else will cause
- firstboot to advance but True is generally used. This is different from
- the gnome druid in rhn_register.
-
- """
- self.chooseOrgPageApply()
- if rhnregGui.activateSubscriptionShouldBeShown():
- self.parent.setPage("rhn_activate_gui")
- else:
- self.parent.setPage("rhn_create_profile_gui")
- return True
-
-
-childWindow = RhnChooseOrgWindow
commit c59aae33576cdeb57937e66c40b3d8ec24db4d89
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 09:04:03 2010 +0100
As chooseOrgShouldBeShown always returns False now, dropping the if branches.
diff --git a/client/rhel/rhn-client-tools/src/firstboot/rhn_login_gui.py
b/client/rhel/rhn-client-tools/src/firstboot/rhn_login_gui.py
index 05e070c..05c52c7 100644
--- a/client/rhel/rhn-client-tools/src/firstboot/rhn_login_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot/rhn_login_gui.py
@@ -113,9 +113,7 @@ class RhnLoginWindow(RhnRegisterFirstbootGuiWindow,
rhnregGui.LoginPage):
if ret:
return None
- if rhnregGui.chooseOrgShouldBeShown():
- self.parent.setPage("rhn_choose_org_gui")
- elif rhnregGui.activateSubscriptionShouldBeShown():
+ if rhnregGui.activateSubscriptionShouldBeShown():
self.parent.setPage("rhn_activate_gui")
else:
self.parent.setPage('rhn_create_profile_gui')
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index 767d1b5..b7adf59 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -250,9 +250,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage,
rhnregGui.LoginPage,
"""
self.showedChooseOrgPage = False
self.showedActivateSubscriptionPage = False
- if rhnregGui.chooseOrgShouldBeShown():
- self.druid.set_page(self.chooseOrgPage)
- elif rhnregGui.activateSubscriptionShouldBeShown():
+ if rhnregGui.activateSubscriptionShouldBeShown():
self.druid.set_page(self.activateSubscriptionPage)
elif rhnregGui.chooseChannelShouldBeShown():
self.druid.set_page(self.chooseChannelPage)
commit 368773955a509665962226fc6bd646d5b586587d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 09:00:51 2010 +0100
As RHN hosted never returns more than one org, chooseOrgShouldBeShown can just return
False.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index 0ef8db6..46ead3a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -548,21 +548,7 @@ def chooseOrgShouldBeShown():
where we want to without a hack if it's in ChooseOrgPage.
"""
- global organization
- organization = None
- try:
- setBusyCursor()
- possibleOrgs = rhnreg.getPossibleOrgs(username, password)
- setArrowCursor()
- if len(possibleOrgs.getOrgs()) < 2:
- return False
- except:
- setArrowCursor()
- log.log_me("There was an exception while trying to get the list of
orgs"
- " to determine whether or not to show the choose org
screen:")
- log.log_exception(*sys.exc_info())
- return False
- return True
+ return False
class ChooseOrgPage:
def __init__(self):