/usr/lib/python3/dist-packages/DistUpgrade/__pycache__
NameSizeModeActions
apt_btrfs_snapshot.cpython-310.pyc93400644editdlrm
apt_clone.cpython-310.pyc222920644editdlrm
dist-upgrade.cpython-310.pyc2780644editdlrm
distro.cpython-310.pyc147090644editdlrm
DistUpgradeApport.cpython-310.pyc37340644editdlrm
DistUpgradeCache.cpython-310.pyc355350644editdlrm
DistUpgradeConfigParser.cpython-310.pyc30060644editdlrm
DistUpgradeController.cpython-310.pyc540930644editdlrm
DistUpgradeFetcher.cpython-310.pyc37880644editdlrm
DistUpgradeFetcherCore.cpython-310.pyc91910644editdlrm
DistUpgradeFetcherKDE.cpython-310.pyc65270644editdlrm
DistUpgradeFetcherSelf.cpython-310.pyc12960644editdlrm
DistUpgradeGettext.cpython-310.pyc20290644editdlrm
DistUpgradeMain.cpython-310.pyc60550644editdlrm
DistUpgradePatcher.cpython-310.pyc18640644editdlrm
DistUpgradeQuirks.cpython-310.pyc462210644editdlrm
DistUpgradeVersion.cpython-310.pyc1770644editdlrm
DistUpgradeView.cpython-310.pyc148250644editdlrm
DistUpgradeViewGtk3.cpython-310.pyc262760644editdlrm
DistUpgradeViewKDE.cpython-310.pyc302080644editdlrm
DistUpgradeViewNonInteractive.cpython-310.pyc114330644editdlrm
DistUpgradeViewText.cpython-310.pyc109400644editdlrm
GtkProgress.cpython-310.pyc25810644editdlrm
MetaRelease.cpython-310.pyc94720644editdlrm
QUrlOpener.cpython-310.pyc19450644editdlrm
ReleaseNotesViewer.cpython-310.pyc50150644editdlrm
ReleaseNotesViewerWebkit.cpython-310.pyc20580644editdlrm
SimpleGtk3builderApp.cpython-310.pyc17590644editdlrm
SimpleGtkbuilderApp.cpython-310.pyc17320644editdlrm
telemetry.cpython-310.pyc29790644editdlrm
utils.cpython-310.pyc151910644editdlrm
xorg_fix_proprietary.cpython-310.pyc30700644editdlrm
__init__.cpython-310.pyc1470644editdlrm
Edit: /usr/lib/python3/dist-packages/DistUpgrade/__pycache__/ReleaseNotesViewer.cpython-310.pyc (5015B)
o >Ic@sddlmZddlmZmZmZddlZddlZddZGdddejZ e dkrDe Z e e d Ze ee edSdS) )Pango)GtkGObjectGdkNcCstjdr d|g}ntjdrd|g}ntjdr!d|g}nd|g}tdkr;d tjvr;d d tjd g|}ntdkrSd tjvrSd d d dtjd g|}t|dS)z#Open the specified URL in a browserz/usr/bin/xdg-openzxdg-openz/usr/bin/exo-openzexo-openz/usr/bin/gnome-openz gnome-openz x-www-browserr SUDO_USERsudoz-u PKEXEC_UIDz-H#N)ospathexistsgetuidenviron subprocessPopen)urlcommandr@/usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewer.pyopen_url!s       rc@sDeZdZddZddZddZddZd d Zd d Zd dZ dS)ReleaseNotesViewercCstj|d|_d|_|dd|d|tdt |_ | |j |j ||d|j|d|j|d|j|dS) zInit the ReleaseNotesViewer as an Inheritance of the Gtk.TextView. Load the notes into the buffer and make links clickableFTeditable monospacezbutton-press-eventzmotion-notify-eventzvisibility-notify-eventN)r__init__hoveringfirst set_propertyset_cursor_visible modify_fontrFontDescriptionr TextBufferbuffer set_bufferset_textconnectbutton_press_eventmotion_notify_eventvisibility_notify_event search_links)selfnotesrrrr6s       zReleaseNotesViewer.__init__cCs0|jjddtjjd}||_|j|||dS)z@Apply the tag that marks links to the specified buffer selectionNblue) foreground underline)r! create_tagr UnderlineSINGLEr apply_tag)r)startendrtagrrrtag_linkKs zReleaseNotesViewer.tag_linkcCs|jd} |dtjjd}|sdS|\}}|} |r,||}|dvr+nnn|}q||}| ||||}q)zlSearch for http URLs in the buffer and call the tag_link method for each one to tag them as linksrzhttp://N) )]  ) r!get_iter_at_offsetforward_searchrTextSearchFlags VISIBLE_ONLYcopy forward_charget_textr5)r)iterret match_start match_end match_tmptextrrrrr(Rs.   zReleaseNotesViewer.search_linksc Cs|jdkrdSz |j\}}Wn tyYn w||kr$dS|tjjt |j t |j \}}| ||}| }|D]} t| dd} | dkrTt| dSqAdS)zcallback for mouse click eventsr6FrN)buttonr!get_selection_bounds ValueError get_offsetwindow_to_buffer_coordsrTextWindowTypeWIDGETintxyget_iter_at_locationget_tagsgetattrr) r) text_vieweventr2r3rRrSrCtagsr4rrrrr%qs*     z%ReleaseNotesViewer.button_press_eventcCsD|tjjt|jt|j\}}||||tjj  dS)z{callback for the mouse movement event, that calls the check_hovering method with the mouse postition coordiantesF) rNrrOrPrQrRrScheck_hovering get_windowTEXT get_pointer)r)rWrXrRrSrrrr&s  z&ReleaseNotesViewer.motion_notify_eventc CsD|tjj}|\}}}}|tjj||\}} ||| dS)zcallback if the widgets gets visible (e.g. moves to the foreground) that calls the check_hovering method with the mouse position coordinatesF)r[rrOr\r]rNrPrZ) r)rWrXwindowscreenwxwymodbxbyrrrr's  z*ReleaseNotesViewer.visibility_notify_eventcCsd}|||}|}|D]}t|dd}|dkrd}nq||jks'|jrTd|_||_|jrB|tjj t j t j jdS|tjj t j t j jdSdS)zRCheck if the mouse is above a tagged link and if yes show a hand cursorFrNrIT)rTrUrVrrr[rrOr\ set_cursorrCursornew CursorTypeHAND2LEFT_PTR)r)rRrS _hoveringrCrYr4rrrrrZs(  z!ReleaseNotesViewer.check_hoveringN) __name__ __module__ __qualname__rr5r(r%r&r'rZrrrrr5s r__main__z"../DistUpgrade/ReleaseAnnouncement) gi.repositoryrrrrr rrTextViewrrlWindowwinopenreadrvaddshow_allmainrrrrs