+
    5‹œi  ã                   óf   € ^ RI Ht ^ RI HtHtHt ^ RIt^ RItR t ! R R]P                  4      t	R# )é    )ÚPango)ÚGtkÚGObjectÚGdkNc                óˆ  € \         P                  P                  R4      '       d   RV .pMX\         P                  P                  R4      '       d   RV .pM.\         P                  P                  R4      '       d   RV .pMRV .p\         P                  ! 4       ^ 8X  d8   R\         P                  9   d#   R	R
\         P                  R,          .V,           pMX\         P                  ! 4       ^ 8X  d?   R\         P                  9   d*   R	RR
R\         P                  R,          ,           .V,           p\
        P                  ! V4       R# )z#Open the specified URL in a browserz/usr/bin/xdg-openzxdg-openz/usr/bin/exo-openzexo-openz/usr/bin/gnome-openz
gnome-openzx-www-browserÚ	SUDO_USERÚsudoz-uÚ
PKEXEC_UIDz-HÚ#N)ÚosÚpathÚexistsÚgetuidÚenvironÚ
subprocessÚPopen)ÚurlÚcommands   & Ú@/usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewer.pyÚopen_urlr   !   sé   € ô 
‡w�w‡~�~Ð)×*Ò*Ø˜sÐ#‰Ü	�‰�‰Ð+×	,Ò	,Ø˜sÐ#‰Ü	�‰�‰Ð-×	.Ò	.Ø Ð%‰à" CÐ(ˆä	‡y‚yƒ{�aÔ˜K¬2¯:©:Ô5Ø˜4¤§¡¨KÕ!8Ð9¸GÕC‰Ü	�Š‹˜Ô	˜l¬b¯j©jÔ8Ø˜4 ØœŸ™ LÕ1Õ1ð3Ø5<õ=ˆä×Ò�WÖó    c                   óJ   a € ] tR t^5t o R tR tR tR tR tR t	R t
RtV tR	# )
ÚReleaseNotesViewerc                óX  € \         P                   P                  V 4       RV n        RV n        V P	                  RR4       V P                  R4       V P                  \        P                  ! R4      4       \        P                  ! 4       V n        V P                  V P                  4       V P                  P                  V4       V P                  RV P                  4       V P                  RV P                   4       V P                  RV P"                  4       V P%                  4        R# )	zzInit the ReleaseNotesViewer as an Inheritance of the Gtk.TextView.
Load the notes into the buffer and make links clickableFTÚeditableÚ	monospacezbutton-press-eventzmotion-notify-eventzvisibility-notify-eventN)r   Ú__init__ÚhoveringÚfirstÚset_propertyÚset_cursor_visibleÚmodify_fontr   ÚFontDescriptionr   Ú
TextBufferÚbufferÚ
set_bufferÚset_textÚconnectÚbutton_press_eventÚmotion_notify_eventÚvisibility_notify_eventÚsearch_links)ÚselfÚnotess   &&r   r   ÚReleaseNotesViewer.__init__6   sÖ   € ô 	�‰× Ñ  Ô&àˆŒØˆŒ
à×Ñ˜* eÔ,Ø×Ñ Ô&Ø×Ñœ×.Ò.¨{Ó;Ô<Ü—n’nÓ&ˆŒØ�‰˜Ÿ™Ô$Ø�‰×Ñ˜UÔ#Ø�‰Ð)¨4×+BÑ+BÔCØ�‰Ð*¨D×,DÑ,DÔEØ�‰Ð.°×0LÑ0LÔMà×ÑÖr   c                ó¶   € V P                   P                  RR\        P                  P                  R7      pW4n        V P                   P                  WAV4       R# )z@Apply the tag that marks links to the specified buffer selectionNÚblue)Ú
foregroundÚ	underline)r%   Ú
create_tagr   Ú	UnderlineÚSINGLEr   Ú	apply_tag)r-   ÚstartÚendr   Útags   &&&& r   Útag_linkÚReleaseNotesViewer.tag_linkK   sF   € à�k‰k×$Ñ$ T°fÜ/4¯©×/EÑ/Eð %ó GˆàŒØ�‰×Ñ˜c¨#Ö.r   c                ó¢  € V P                   P                  ^ 4      p VP                  R\        P                  P
                  R4      pV'       g   R# Vw  r4VP                  4       p VP                  4       '       d   VP                  V4      pVR9   d   MMMVP                  4       pKD  VP                  V4      pV P                  W4V4       TpKµ  )zaSearch for http URLs in the buffer and call the tag_link method
for each one to tag them as linkszhttp://N)Ú Ú)Ú]Ú
Ú	)
r%   Úget_iter_at_offsetÚforward_searchr   ÚTextSearchFlagsÚVISIBLE_ONLYÚcopyÚforward_charÚget_textr;   )r-   ÚiterÚretÚmatch_startÚ	match_endÚ	match_tmpÚtextr   s   &       r   r,   ÚReleaseNotesViewer.search_linksR   sÂ   € ð �{‰{×-Ñ-¨aÓ0ˆØà×%Ñ% iÜ&)×&9Ñ&9×&FÑ&FØ&*ó,ˆC÷ Ùà'*Ñ$ˆ[Ø!Ÿ™Ó(ˆIØà×)Ñ)×+Ò+Ø$×-Ñ-¨iÓ8�DØÐ:Ô:Øð ;ð Ø%ŸN™NÓ,’	à×&Ñ& yÓ1ˆCØ�M‰M˜+°#Ô6àŠDr   c                ó  € VP                   ^8w  d   R#  V P                  P                  4       w  r4VP                  4       VP                  4       8w  d   R#  V P                  \        P                  P                  \        VP                  4      \        VP                  4      4      w  rVV P                  WV4      pVP                  4       pV F%  p	\        V	RR4      p
V
R8w  g   K  \        V
4        R# 	  R#   \         d     L®i ; i)zcallback for mouse click eventsFr   NÚ )Úbuttonr%   Úget_selection_boundsÚ
get_offsetÚ
ValueErrorÚwindow_to_buffer_coordsr   ÚTextWindowTypeÚWIDGETÚintÚxÚyÚget_iter_at_locationÚget_tagsÚgetattrr   )r-   Ú	text_viewÚeventr8   r9   r[   r\   rJ   Útagsr:   r   s   &&&        r   r)   Ú%ReleaseNotesViewer.button_press_eventq   sÞ   € à�<‰<˜1ÔÙð	ØŸ;™;×;Ñ;Ó=‰LˆUð ×ÑÓ! S§^¡^Ó%5Ô5Ùð 6ð ×-Ñ-¬c×.@Ñ.@×.GÑ.GÜ.1°%·'±'«l¼CÀÇÁ»LóJ‰ˆà×(Ñ(¨Ó.ˆð �}‰}‹ˆÛˆCÜ˜#˜u dÓ+ˆCØ�bŽyÜ˜”Úó	 øô ô 	Ùð	ús   •C8 Ã8DÄDc                ó<  € VP                  \        P                  P                  \	        VP
                  4      \	        VP                  4      4      w  r4V P                  W44       V P                  \        P                  P                  4      P                  4        R# )zpcallback for the mouse movement event, that calls the
check_hovering method with the mouse postition coordiantesF)rW   r   rX   rY   rZ   r[   r\   Úcheck_hoveringÚ
get_windowÚTEXTÚget_pointer)r-   r`   ra   r[   r\   s   &&&  r   r*   Ú&ReleaseNotesViewer.motion_notify_eventŒ   sl   € ð ×0Ñ0´×1CÑ1C×1JÑ1JÜ14°U·W±W³¼sÀ5Ç7Á7»|óM‰ˆà×Ñ˜AÔ!Ø�‰œ×*Ñ*×/Ñ/Ó0×<Ñ<Ô>Ùr   c                óø   € VP                  \        P                  P                  4      pVP	                  4       w  rErgVP                  \        P                  P                  WV4      w  r‰V P                  W‰4       R# )zŒcallback if the widgets gets visible (e.g. moves to the foreground)
that calls the check_hovering method with the mouse position
coordinatesF)rf   r   rX   rg   rh   rW   rY   re   )
r-   r`   ra   ÚwindowÚscreenÚwxÚwyÚmodÚbxÚbys
   &&&       r   r+   Ú*ReleaseNotesViewer.visibility_notify_event•   sg   € ð ×%Ñ%¤c×&8Ñ&8×&=Ñ&=Ó>ˆØ &× 2Ñ 2Ó 4Ñˆ�RØ×4Ñ4Ü×Ñ×%Ñ% ró/‰ˆà×Ñ˜BÔ#Ùr   c                óÌ  € RpV P                  W4      pVP                  4       pV F  p\        VRR4      pVR8w  g   K  Rp M	  W0P                  8w  g   V P                  '       dþ   RV n        W0n        V P                  '       dp   V P                  \        P                  P                  4      P                  \        P                  P                  \        P                  P                  4      4       R# V P                  \        P                  P                  4      P                  \        P                  P                  \        P                  P                  4      4       R# R# )zGCheck if the mouse is above a tagged link and if yes show
a hand cursorFr   NrR   T)r]   r^   r_   r   r   rf   r   rX   rg   Ú
set_cursorr   ÚCursorÚnewÚ
CursorTypeÚHAND2ÚLEFT_PTR)r-   r[   r\   Ú	_hoveringrJ   rb   r:   r   s   &&&     r   re   Ú!ReleaseNotesViewer.check_hovering    s÷   € ð ˆ	à×(Ñ(¨Ó.ˆð �}‰}‹ˆÛˆCÜ˜#˜u dÓ+ˆCØ�bŽyØ �	Ùñ	 ð Ÿ™Ô%¨¯¯¨ØˆDŒJØ%ŒMà�}�}ˆ}Ø—‘¤× 2Ñ 2× 7Ñ 7Ó8×CÑCÜ—J‘J—N‘N¤3§>¡>×#7Ñ#7Ó8ö:ð —‘¤× 2Ñ 2× 7Ñ 7Ó8×CÑCÜ—J‘J—N‘N¤3§>¡>×#:Ñ#:Ó;ö=ñ *4r   )r%   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r;   r,   r)   r*   r+   re   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   5   s-   ø‡ € òò*/òò>ò6ò	÷=ð =r   r   )
Úgi.repositoryr   r   r   r   r   r   r   ÚTextViewr   © r   r   Ú<module>r†      s-   ðõ6  ß +Ñ +Û 	Û òô(D=˜Ÿ™ö D=r   