x4Fc@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(tDialogt BrowserWindowcBsDeZdZdZdZdZdZdZdZRS(sB This class creates the window for the document browser window. cCsFti||i|||i|iid|i|_dS(sD Initialize an instance of this class. @param self: Reference to the BrowserWindow instance. @type self: A BrowserWindow 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. tdestroyN(Rt__init__t_BrowserWindow__init_attributest_BrowserWindow__set_propertiest_BrowserWindow__managertconnectt!_BrowserWindow__window_destroy_cbt_BrowserWindow__signal_id(tselftmanagerteditor((s!plugins/DocumentBrowser/Window.pyR's  cCsi|ii|iid|ddkl}|iii|d|_ti ||iidS(s Show the document browser. @param self: Reference to the BrowserWindow instance. @type self: A BrowserWindow object. s show-dialogi(tmsg0001topenN( t_BrowserWindow__editortresponsetemitti18nR tfeedbacktset_modal_messaget_BrowserWindow__status_idRt show_dialog(R R ((s!plugins/DocumentBrowser/Window.pyR9s   cCsT|ii|iid||iii|iti||iidS(s Hide the document browser. @param self: Reference to the BrowserWindow instance. @type self: A BrowserWindow object. s hide-dialogN(RRRRtunset_modal_messageRRt hide_dialog(R ((s!plugins/DocumentBrowser/Window.pyRHs    cCsJddkl}l}||i|i|i||~d}dS(s Handles callback when "destroy" signal is emitted. @param self: Reference to the BrowserWindow instance. @type self: An BrowserWindow object. @param manager: Reference to the BookmarkManager. @type manager: An BookmarkManager object. i(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsRRR RRtNone(R R RR((s!plugins/DocumentBrowser/Window.pyt__window_destroy_cbVs   cCs(||_||_d|_d|_dS(s: Initialize data attributes. @param self: Reference to the BrowserWindow instance. @type self: A BrowserWindow 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. N(RRRR R(R R R ((s!plugins/DocumentBrowser/Window.pyt__init_attributeshs    cCs|iddddkl}|id|ddkl}||iidd\}}|id ||id ||i|ii|it d S( s Define the default behavior of the dialog. @param self: Reference to the BrowserWindow instance. @type self: A BrowserWindow object. tnametDocumentBrowserDialogi(tmsg0002ttitle(t!calculate_resolution_independenceg?g@s default-widthsdefault-heightN( t set_propertyRR!RR#Rtwindowtset_transient_fortset_keep_abovetTrue(R R!R#twidththeight((s!plugins/DocumentBrowser/Window.pyt__set_properties{s ( t__name__t __module__t__doc__RRRRRR(((s!plugins/DocumentBrowser/Window.pyR"s     N(R.tSCRIBES.sdialogRR(((s!plugins/DocumentBrowser/Window.pyss