Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/ui/controller/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyc

ó
ÍÿŠTc@s±ddlZddlmZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZd	Zd
Zdejfd„ƒYZdS(
iÿÿÿÿN(tgettext(tGiotGtktNotify(tConfigurationProxy(tConfigurationModel(t
UISettings(tClientSettingsDialog(tConfigControllers*com.canonical.landscape-client.settings.uisLandscape management servicetSettingsApplicationControllercBseeZdZgd„Zd„Zd„Zd„Zd„Zd	d„Z	d	d„Z
d	ed„ZRS(
sM
    Core application controller for the landscape settings application.
    cCs9tt|ƒjdtƒ||_|jd|jƒdS(Ntapplication_idtactivate(tsuperR	t__init__tAPPLICATION_IDt_argstconnecttsetup_ui(tselftargs((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyR
s	cCstƒS(N(R(R((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyt
get_configscCs
ttjƒS(N(RRtSettings(R((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pytget_uisettings scCs&tjjt|dƒ}|jƒdS(Nsdialog-information(RtNotificationtnewt	NOTIFY_IDtshow(Rtmessagetnotification((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyt	on_notify#s	cCs&tjjt|dƒ}|jƒdS(Nsdialog-information(RRRRR(RRR((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyton_error(s	cCsA|r|}ntdƒ}tjjt|dƒ}|jƒdS(NsSuccess.sdialog-information(t_RRRRR(RtactionRR((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyt
on_succeed-s		cCsA|r|}ntdƒ}tjjt|dƒ}|jƒdS(NsFailure.sdialog-information(RRRRRR(RR RR((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyton_fail6s		cCsôtjtƒ|jƒ}|jƒ}td|d|jd|ƒ}t|ƒ}|jƒrÊt	|ƒ|_
|j
jƒtj
jkrª|j|j|j|j|jƒn|jd|ƒ|j
jƒn&|jdtdƒƒtjjdƒdS(	s
        L{setup_ui} wires the model to the L{ConfigurationController} and then
        invokes the view with the controller.  When the dialog exits
        appropriate termination is triggered.

        @param data: the Gtk callback could pass this, but it is always None in
        practice.
        @param asynchronous: a parameter passed through to
        L{ConfigurationController.exit}, it indicates whether the exit method
        should be called asynchronously.  Is makes testing easier to use it
        synchronously.
        tproxytproxy_loadargst
uisettingstasynchronousR sAuthentication failedsAuthentication failed.
N(RtinitRRRRRRtloadRtsettings_dialogtrunRtResponseTypetOKtpersistRRR!R"texittdestroyRtsyststderrtwrite(RtdataR&tconfigR%tmodelt
controller((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyR?s

	N(
t__name__t
__module__t__doc__R
RRRRtNoneR!R"tTrueR(((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyR	s						(R0RRt
gi.repositoryRRRt&landscape.ui.model.configuration.proxyRt&landscape.ui.model.configuration.stateRt+landscape.ui.model.configuration.uisettingsRtlandscape.ui.view.configurationRt%landscape.ui.controller.configurationRRRtApplicationR	(((s?/usr/lib/python2.7/dist-packages/landscape/ui/controller/app.pyt<module>s