Ec@s0dZddklZdefdYZdS(s This module documents a class that creates the window for the document browser. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2006 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com i(tDialogtBookmarkWindowcBsMeZdZdZdZdZdZdZdZdZ RS(sB This class creates the window for the bookmark browser window. cCsdti||i|||i|iid|i|_|ii id|i |_ dS(sF Initialize an instance of this class. @param self: Reference to the BookmarkWindow instance. @type self: A BookmarkWindow object. @param manager: Reference to the BookmarkManager instance @type manager: A BookmarkManager object. @param editor: Reference to the text editor. @type editor: An Editor object. tdestroytupdatedN( Rt__init__t _BookmarkWindow__init_attributest_BookmarkWindow__set_propertiest_BookmarkWindow__managertconnectt"_BookmarkWindow__window_destroy_cbt_BookmarkWindow__signal_idt_BookmarkWindow__editortstoret!_BookmarkWindow__store_updated_cbt_BookmarkWindow__signal_id_1(tselftmanagerteditor((s!plugins/BookmarkBrowser/Window.pyR's  cCsy8|ip tn|ii}|p tnWn=tj o1ddkl}|iii|ddSnX|iid|ddkl }|iii |d|_ t i |dS(s Show the bookmark browser. @param self: Reference to the BookmarkWindow instance. @type self: A BookmarkWindow object. i(tmsg0005twarningNs show-dialog(tmsg0001tinfo(t!_BookmarkWindow__bookmark_managertAttributeErrortget_bookmarked_linesti18nRR tfeedbacktupdate_status_messagetemitRtset_modal_messaget_BookmarkWindow__status_idRt show_dialog(RtlinesRR((s!plugins/BookmarkBrowser/Window.pyR:s    cCs:|iid||iii|iti|dS(s Hide the bookmark browser. @param self: Reference to the BookmarkWindow instance. @type self: A BookmarkWindow object. s hide-dialogN(R RRtunset_modal_messageRRt hide_dialog(R((s!plugins/BookmarkBrowser/Window.pyR"Qs cCs|io-|ii|io|ii|in|io3|iii|io|iii|in|i|`|`|`|`|`|` ~d}dS(s Handles callback when "destroy" signal is emitted. @param self: Reference to the BookmarkWindow instance. @type self: An BookmarkWindow object. @param manager: Reference to the BookmarkManager. @type manager: An BookmarkManager object. N( R Rthandler_is_connectedt disconnectRR R RRRtNone(RR((s!plugins/BookmarkBrowser/Window.pyt__window_destroy_cb]s # cCsF||_||_d|_d|_d|_|iid|_dS(s< Initialize data attributes. @param self: Reference to the BookmarkWindow instance. @type self: A BookmarkWindow object. @param manager: Reference to the BookmarkManager instance @type manager: A BookmarkManager object. @param editor: Reference to the text editor. @type editor: An Editor object. tBookmarkManagerN( RR R%R RRR t get_objectR(RRR((s!plugins/BookmarkBrowser/Window.pyt__init_attributesqs     cCs|iddddkl}|id|ddkl}||iidd\}}|id ||id ||i|iid S( s Define the default behavior of the dialog. @param self: Reference to the BookmarkWindow instance. @type self: A BookmarkWindow object. tnamesscribes bookmark browser dialogi(tmsg0002ttitle(t!calculate_resolution_independencegdk?g&?s default-widthsdefault-heightN(t set_propertyRR+t SCRIBES.utilsR-R twindowtset_transient_for(RR+R-twidththeight((s!plugins/BookmarkBrowser/Window.pyt__set_propertiesscCs>|djo-|iio|iiid|_q:ndS(sF Handles callback when the "updated" signal is emitted. @param self: Reference to the BookmarkTreeView instance. @type self: A BookmarkTreeView object. @param store: Reference to a Store object. @type store: A Store object. @param name: The name of the object that was updated. @type name: A String object. R'N(sBookmarkManager(R R R(R(RR R*((s!plugins/BookmarkBrowser/Window.pyt__store_updated_cbs   ( t__name__t __module__t__doc__RRR"R RRR (((s!plugins/BookmarkBrowser/Window.pyR"s     N(R8tSCRIBES.sdialogRR(((s!plugins/BookmarkBrowser/Window.pyss