%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeFetcherKDE.cpython-312.pyc

�

B��e�&���	ddlmZe�dk(re�ddlmZddlmZmZmZddl	m
Z
ddlmZm
Z
mZmZddlZddlmZdd
lmZddlmZddlmZddl Z ddl!Z!ddl"m"Z"d�Z#d�Z$d�Z%Gd�de�Z&Gd�de!jNjPjR�Z*y#e$r%ddlmZmZmZdd	lmZm
Z
mZm
Z
dd
lmZddlmZY��wxYw)�)�get_dist�trusty�)�uic)�QTranslator�PYQT_VERSION�QLocale)�QIcon)�QDialog�QDialogButtonBox�QMessageBox�QApplication)�KIcon�KMessageBox�KStandardGuiItem)rrrr
)rN)�DistUpgradeFetcherCore)�gettext)�urlopen)�	HTTPError)�
QUrlOpenerc��tj�s�dtjd<dtjd<dtjd<dtjd<tdg�}t	|�}ttt�r'|jtj�d	d
d�n&|jtj�d	d
d�|j|�|Stj�S)
N�kde�QT_PLATFORM_PLUGIN�TRUE�KDE_FULL_SESSION�5�KDE_SESSION_VERSION�QT_QPA_PLATFORMTHEMEzubuntu-release-upgrader�qt�_z/usr/share/qt5/translationsz/usr/share/qt4/translations)r�instance�os�environr�
isinstancer�int�loadr	�system�installTranslator)�app�
translators  �C/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py�_ensureQApplicationr,Es���� � �"�+0��
�
�'�(�*0��
�
�%�&�-0��
�
�(�)�-2��
�
�)�*��5�6�7��
!��%�
��l�C�(��O�O�G�N�N�,�d�C�9�
;�
�O�O�G�N�N�,�d�C�9�
;����j�)��
�� � �"�"�c��ttt�rtjdd|�ytjd|d�y)N�)r$rr%r
�warningr�sorry)�texts r+�_warningr3ds0���,��$����D�"�d�+����$��b�)r-c�j�ttt�rtj|�St|�S�N)r$rr%r
�	fromThemer)�names r+�_iconr8ks%���,��$����t�$�$��T�{�r-c�$�eZdZd�Zd�Zd�Zd�Zy)�DistUpgradeFetcherKDEc��tj|||�t�|_|jj	td��||_t�j�tj�y)Nzsystem-software-update)r�__init__r,r)�
setWindowIconr8�datadirr�setupUrlHandlesr�
processEvents)�self�new_dist�progress�parentr>s     r+r<zDistUpgradeFetcherKDE.__init__tsW���'�'��h��A�&�(��������u�%=�>�?������$�$�&��"�"�$r-c��ttt�rtjd||�ytjd||�yr5)r$rr%r
�criticalrr1)rA�summary�messages   r+�errorzDistUpgradeFetcherKDE.error�s0���l�C�(�� � ��w��8����d�G�W�5r-c���tj�dk7r&tjdd|jdzg�ytj|j|jdg|jz�y)Nrz/usr/bin/pkexec�pkexecz --frontend=DistUpgradeViewKDEz--frontend=DistUpgradeViewKDE)r"�getuid�execv�script�run_options�rAs r+�runDistUpgraderz%DistUpgradeFetcherKDE.runDistUpgrader�se��
�9�9�;�!���H�H�&���k�k�$D�D�F�
G�
�H�H�T�[�[��k�k�#B�C��%�%�&�
'r-c���t�|_tj|jdz|j�|jj
j
tj�}|jtd��|jtd��|jj
j
tj�}|jtd��|jtd��|jjtd��|jj�|j j"��|j%|j j"�}d}	t'|�}|j)�j+dd�}|jj,j|�|jj/�}|tj6k(ryy#t0$r-d	td
�z}td�}t3|dz|z�Y�Jt4$r-d	td
�z}td�}t3|dz|z�Y�~wxYw)Nz/dialog_release_notes.uiz&Upgradez	dialog-okz&Cancelz
dialog-cancelz
Release NoteszUTF-8�replacez+<span weight="bold" size="larger">%s</span>z Could not find the release noteszThe server may be overloaded. z<br />z$Could not download the release notesz&Please check your internet connection.TF)r�dialogr�loadUir>�	buttonBox�buttonr�Ok�setTextr �setIconr8�Cancel�setWindowTitle�showrB�releaseNotesHtmlUri�
_expandUrir�read�decode�scrolled_notes�exec_rr3�IOError�Accepted)	rA�
upgradeButton�cancelButton�uri�result�
release_notes�notes�primary�	secondarys	         r+�showReleaseNotesz&DistUpgradeFetcherKDE.showReleaseNotes�s����i����
�
�4�<�<�"<�<�d�k�k�J����-�-�4�4�5E�5H�5H�I�
����a�
�m�,����e�K�0�1��{�{�,�,�3�3�4D�4K�4K�L�����Q�y�\�*����U�?�3�4����"�"�1�_�#5�6��������=�=�,�,�8��/�/�$�-�-�"C�"C�D�C��F�
9� '���
�%�*�*�,�3�3�G�Y�G�����*�*�2�2�5�9����*�*�,����)�)�)�����
9�K��>�?�@���>�?�	���8�+�i�7�8��
9�K��B�C�D���F�G�	���8�+�i�7�8�	
9�s�A*H�3I0�;2I0�/I0N)�__name__�
__module__�__qualname__r<rIrQrn�r-r+r:r:rs��
%�6�	'�$r-r:c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�KDEAcquireProgressAdapterc��t�|_t�|_tj
j
|d�}tj||j�|jjtd��|jjj|�|jjjj|j �d|_t%j&�y)Nzfetch-progress.ui�UpgradeT)r,r)rrTr"�path�joinrrUr\r �installingLabelrYrV�rejected�connect�abort�	_continuerr@)rArDr>�label�uiFiles     r+r<z"KDEAcquireProgressAdapter.__init__�s���&�(����i��������g�':�;���
�
�6�4�;�;�'����"�"�1�Y�<�0����#�#�+�+�E�2������&�&�.�.�t�z�z�:�
����"�"�$r-c��d|_y)NF)r}rPs r+r|zKDEAcquireProgressAdapter.abort�s	����r-c���|jjjtd��|jjjd�|jj
�y)N�'Downloading additional package files...r)rTryrYr �installationProgress�setValuer]rPs r+�startzKDEAcquireProgressAdapter.start�sK�����#�#�+�+�
�7�8�	:����(�(�1�1�!�4������r-c�8�|jj�yr5)rT�hiderPs r+�stopzKDEAcquireProgressAdapter.stop�s�������r-c	�,�tjjjj	||�|j
jjt|j|jzt|j|jz�zdz��|jdz}||jkDr|j}td�}|jdkDrF|td�|j|jt!j"|j�fzz
}n'|td�|j|jfzz
}|j
j$j'|�t)j*�|j,S)N�drr�rzFile %s of %s at %sB/sz
File %s of %s)�aptrC�base�AcquireProgress�pulserTr�r�r%�
current_bytes�
current_items�float�total_bytes�total_itemsr �current_cps�apt_pkg�size_to_strryrYrr@r})rA�owner�current_item�
label_texts    r+r�zKDEAcquireProgressAdapter.pulse�s\�������)�)�/�/��e�<����(�(�1�1�#�
�
�
�$�"4�"4�
4��$�"�"�T�%5�%5�5�6�
7�9<�
=�3>�	?��)�)�A�-���$�*�*�*��+�+�L��@�A�
����a���!�4�5��"�"�D�$4�$4��#�#�D�$4�$4�5�97�7�
7�J�
�!�O�,��"�"�D�$4�$4�06�6�
6�J����#�#�+�+�J�7��"�"�$��~�~�r-c���td�||fz}ttt�rSt	j
dtd�|tjtj�}|tjk(ryytjdtd�td�dz|ztj�tj��}|tjk(ryy)Nz&Please insert '%s' into the drive '%s'zMedia ChangeTz<br>F)r r$rr%r
�questionrXr[r�
questionYesNor�ok�cancel�Yes)rA�medium�drive�msg�changes     r+�mediaChangez%KDEAcquireProgressAdapter.mediaChange�s����8�9�V�U�O�K���l�C�(� �)�)�$��.�0A�3�*5�.�.�+�:L�:L�N�F�����'���
!�.�.�t�Q�~�5F�/0��/@�6�/I�/2�03�4D�4G�4G�4I�/?�/F�/F�/H�J�F�����(��r-N)	rorprqr<r|r�r�r�r�rrr-r+rtrt�s ��%�"����(r-rt)+�utilsr�ImportError�PyQt5r�PyQt5.QtCorerrr	�PyQt5.QtGuir
�PyQt5.QtWidgetsrrr
r�PyKDE4.kdeuirrr�PyQt4.QtGui�PyQt4.QtCore�PyQt4r��"DistUpgrade.DistUpgradeFetcherCorerrr �urllib.requestr�urllib.errorrr"r�rr,r3r8r:rCr�r�rtrrr-r+�<module>r�s���,� ��z�X�������!����E� �"�"�	�
�"�#�>*��C�2�C�L@���� 1� 1� A� A�@��c��A�A�J�J�)��	�s�4B�'C�C

Zerion Mini Shell 1.0