Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ‰å<_Ýãã@sÂddlZddlZddlZddlmZddlmZmZddlm Z m Z m Z ddl m Z ddlmZejdkrpeZneZe d ƒZgZejd kršd ZejeeƒGd d „d eƒZejd ƒdd„Zejdƒdd„Zejdƒdd„ZGdd„dejƒZe eƒZejdƒGdd„dej eƒZ e e ƒZ ejdƒGdd„dej!ƒZ!e e!ƒZ!ejdƒejd€k�rêGdd„dej"ƒZ"e e"ƒZ"ejdƒGdd„dej#ƒZ#e e#ƒZ#ejdƒGdd „d ej$ƒZ$e e$ƒZ$ejd ƒGd!d"„d"ej%ƒZ%e e%ƒZ%ejd"ƒGd#d$„d$ej&e ƒZ&e e&ƒZ&ejd$ƒGd%d&„d&ej'ƒZ'e e'ƒZ'ejd&ƒGd'd(„d(ej(ƒZ(e e(ƒZ(ejd(ƒGd)d*„d*ej)ƒZ)e e)ƒZ)ejd*ƒGd+d,„d,ej*ƒZ*e e*ƒZ*ejd,ƒGd-d.„d.ej+ƒZ+e e+ƒZ+ejd.ƒGd/d0„d0ej,e ƒZ,e e,ƒZ,ejd0ƒGd1d2„d2ej-e,ƒZ-e e-ƒZ-ejd2ƒejd�k�r@Gd3d4„d4ej.ƒZ.e e.ƒZ.ejd4ƒGd5d6„d6ej/ƒZ/e e/ƒZ/ejd6ƒejd‚k�r”Gd7d8„d8ej0ƒZ0e e0ƒZ0ejd8ƒGd9d:„d:ej1ƒZ1e e1ƒZ1ejd:ƒGd;d<„d„d>ej3ƒZ3e e3ƒZ3ejd>ƒGd?d@„d@ej4ƒZ4e e4ƒZ4ejd@ƒGdAdB„dBej5ƒZ5e e5ƒZ5ejdBƒGdCdD„dDej6ƒZ6e e6ƒZ6ejdDƒGdEdF„dFej7ƒZ7e e7ƒZ7ejdFƒGdGdH„dHej8ƒZ8e e8ƒZ8ejdHƒGdIdJ„dJej9ƒZ9e e9ƒZ9ejdJƒGdKdL„dLej:ƒZ:e e:ƒZ:ejdLƒGdMdN„dNej;e8e9ƒZ;e e;ƒZ;ejdNƒGdOdP„dPe<ƒZ=ejdPƒGdQdR„dRe<ƒZ>ejdRƒGdSdT„dTej?ƒZ?e e?ƒZ?ejdTƒGdUdV„dVej@e8e9ƒZ@e e@ƒZ@ejdVƒGdWdX„dXejAe ƒZAe eAƒZAejdXƒGdYdZ„dZejBƒZBe eBƒZBejdZƒGd[d\„d\ejCƒZCe eCƒZCejd\ƒGd]d^„d^ejDe ƒZDe eDƒZDejd^ƒGd_d`„d`ejEƒZEe eEƒZEejd`ƒGdadb„dbejFƒZFe eFƒZFejdbƒGdcdd„ddejGƒZGe eGƒZGejddƒejdƒk�rÖGdedf„dfejHe ƒZHe eHƒZHejdfƒGdgdh„dhejIƒZIe eIƒZIejdhƒejd„k�rNGdidj„djejJƒZJe eJƒZJejdjƒGdkdl„dlejKƒZKe eKƒZKejdlƒGdmdn„dnejLƒZLe eLƒZLejdnƒejd…k�rÆGdodp„dpejMƒZMe eMƒZMejdpƒGdqdr„drejNƒZNe eNƒZNejdrƒGdsdt„dtejOƒZOe eOƒZOejdtƒGdudv„dvejPƒZPe ePƒZPejdvƒejd k�r>Gdwdx„dxejQƒZQe eQƒZQejdxƒejRZSe ejRƒdydz„ƒZRejTZUe ejTƒd{d|„ƒZTejd†k�rŽe ejVƒZVejd}ƒejd~k�r¤ejWƒnejWejXƒ\ZYZXeZeXƒe_XdS)‡éN)ÚGObjecté)Úwakeup_on_signalÚregister_sigint_fallback)ÚoverrideÚstrip_boolean_resultÚdeprecated_init)Úget_introspection_module)ÚPyGIDeprecationWarningéÚGtkú2.0aBYou have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0c@s eZdZdS)ÚPyGTKDeprecationWarningN)Ú__name__Ú __module__Ú __qualname__©rrú/usr/lib64/python3.6/Gtk.pyr4srcCs8g}x.|D]&}t|tjƒs&tjj|Ž}|j|ƒq W|S)zÝCreate a list of TargetEntry items from a list of tuples in the form (target, flags, info) The list can also contain existing TargetEntry items in which case the existing entry is re-used in the return list. )Ú isinstancer Z TargetEntryÚnewÚappend)ÚtargetsÚtarget_entriesÚentryrrrÚ_construct_target_list;s    rcCs˜d}t|tjƒr|j|dƒ}n t||dƒ}|dkr>td|ƒ‚f}t|tjƒr|t|ƒdkrftd|ƒ‚|dd…}|d}nt |ƒs�td|ƒ‚||fS)NzHandler %s not foundrz!Handler %s tuple can not be emptyéz-Handler %s is not a method, function or tuple) rÚ collectionsÚMappingÚgetÚgetattrÚAttributeErrorÚSequenceÚlenÚ TypeErrorÚcallable)Ú obj_or_mapÚ handler_nameÚhandlerÚargsrrrÚ_extract_handler_and_argsLs         r)c Cs€t||ƒ\}}|tjj@} |dk rR| r<|j|||f|žŽq||j|||f|žŽn*| rj|j||f|žŽn|j||f|žŽdS)N)r)rZ ConnectFlagsZAFTERZconnect_object_afterZconnect_objectZ connect_afterÚconnect) ZbuilderZgobjZ signal_namer&Z connect_objÚflagsr%r'r(ÚafterrrrÚ_builder_connect_callbackgs r-cs>eZdZeejjƒZ‡fdd„Z‡fdd„Zddd„Z ‡Z S) ÚWidgetcs:|dk r&t|tjƒ r&tjjt|ƒƒ}tt|ƒj|ƒdS)N)rr Ú TargetListrrÚsuperr.Údrag_dest_set_target_list)ÚselfÚ target_list)Ú __class__rrr1{sz Widget.drag_dest_set_target_listcs:|dk r&t|tjƒ r&tjjt|ƒƒ}tt|ƒj|ƒdS)N)rr r/rrr0r.Údrag_source_set_target_list)r2r3)r4rrr5€sz"Widget.drag_source_set_target_listNcCsN|dkr6|j|ƒ}|dkr*td||fƒ‚tj|jƒ}tjj|||ƒ|jƒS)Nz/Class "%s" does not contain style property "%s") Zfind_style_propertyÚ ValueErrorrÚValueÚ value_typer r.Ústyle_get_propertyÚ get_value)r2Ú property_nameÚvalueÚproprrrr9…s   zWidget.style_get_property)N) rrrrr r.Ztranslate_coordinatesr1r5r9Ú __classcell__rr)r4rr.ws   r.c@sVeZdZdd„Zdd„Zdd„Zdd„ZeZee j j ƒZ dd d „Z d d „Z dd„Zd S)Ú ContainercCs t|jƒƒS)N)r"Ú get_children)r2rrrÚ__len__—szContainer.__len__cCs ||jƒkS)N)r@)r2ÚchildrrrÚ __contains__šszContainer.__contains__cCs t|jƒƒS)N)Úiterr@)r2rrrÚ__iter__�szContainer.__iter__cCsdS)NTr)r2rrrÚ__bool__ szContainer.__bool__NcCsP|dkr6|j|ƒ}|dkr*td||fƒ‚tj|jƒ}tjj||||ƒ|jƒS)Nz/Class "%s" does not contain child property "%s") Zfind_child_propertyr6rr7r8r r?Úchild_get_propertyr:)r2rBr;r<r=rrrrG¨s   zContainer.child_get_propertycs‡‡fdd„|DƒS)zµsz'Container.child_get..r)r2rBZ prop_namesr)rBr2rÚ child_get³szContainer.child_getcKs4x.|jƒD]"\}}|jddƒ}|j|||ƒq WdS)z=Set a child properties on the given child to key/value pairs.Ú_ú-N)ÚitemsÚreplaceZchild_set_property)r2rBÚkwargsrIr<rrrÚ child_set·s zContainer.child_set)N)rrrrArCrErFÚ __nonzero__rr r?Zget_focus_chainrGrKrQrrrrr?•s  r?cs,eZdZ‡fdd„Zeejjfd�Z‡ZS)ÚEditablecstt|ƒj|d|ƒS)Nréÿÿÿÿ)r0rSÚ insert_text)r2ÚtextÚposition)r4rrrUÄszEditable.insert_text)Úfail_ret) rrrrUrr rSÚget_selection_boundsr>rr)r4rrSÂs rSú3.0c@seZdZeejjded�ZdS)ÚActionrIÚlabelÚtooltipÚstock_id)Ú arg_namesÚcategoryN)rIr\r]r^)rrrrr r[Ú__init__rrrrrr[Ïsr[c@seZdZeejjded�ZdS) Ú RadioActionrIr\r]r^r<)r_r`N)rIr\r]r^r<)rrrrr rbrarrrrrrb×srbc@s<eZdZeejjd ed�Zd dd„Zd dd„Z d dd „Z dS)Ú ActionGrouprI)r_r`Nc sTy t|ƒWntk r(tdƒ‚YnXd‡‡fdd„ }x|D] }||Žq@WdS)aã The add_actions() method is a convenience method that creates a number of gtk.Action objects based on the information in the list of action entry tuples contained in entries and adds them to the action group. The entry tuples can vary in size from one to six items with the following information: * The name of the action. Must be specified. * The stock id for the action. Optional with a default value of None if a label is specified. * The label for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None if a stock id is specified. * The accelerator for the action, in the format understood by the gtk.accelerator_parse() function. Optional with a default value of None. * The tooltip for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None. * The callback function invoked when the action is activated. Optional with a default value of None. The "activate" signals of the actions are connected to the callbacks and their accel paths are set to /group-name/action-name. zentries must be iterableNcsLt||||d�}|dk r<ˆdkr.|jd|ƒn|jd|ˆƒˆj||ƒdS)N)rIr\r]r^Úactivate)r[r*Úadd_action_with_accel)rIr^r\Ú acceleratorr]ÚcallbackÚaction)r2Ú user_datarrÚ_process_actions z0ActionGroup.add_actions.._process_action)NNNNN)rDr#)r2ÚentriesrirjÚer)r2rirÚ add_actionsäs  zActionGroup.add_actionscsTy t|ƒWntk r(tdƒ‚YnXd‡‡fdd„ }x|D] }||Žq@WdS)a‚ The add_toggle_actions() method is a convenience method that creates a number of gtk.ToggleAction objects based on the information in the list of action entry tuples contained in entries and adds them to the action group. The toggle action entry tuples can vary in size from one to seven items with the following information: * The name of the action. Must be specified. * The stock id for the action. Optional with a default value of None if a label is specified. * The label for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None if a stock id is specified. * The accelerator for the action, in the format understood by the gtk.accelerator_parse() function. Optional with a default value of None. * The tooltip for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None. * The callback function invoked when the action is activated. Optional with a default value of None. * A flag indicating whether the toggle action is active. Optional with a default value of False. The "activate" signals of the actions are connected to the callbacks and their accel paths are set to /group-name/action-name. zentries must be iterableNFcsXtj||||d�}|j|ƒ|dk rHˆdkr:|jd|ƒn|jd|ˆƒˆj||ƒdS)N)rIr\r]r^rd)r Z ToggleActionÚ set_activer*re)rIr^r\rfr]rgZ is_activerh)r2rirrrj3s z7ActionGroup.add_toggle_actions.._process_action)NNNNNF)rDr#)r2rkrirjrlr)r2rirÚadd_toggle_actionss  zActionGroup.add_toggle_actionsc sžy t|ƒWntk r(tdƒ‚YnXd}d‡‡fdd„ }x&|D]}||f|žŽ}|dkrD|}qDW|dk rš|dk rš|dkrŒ|jd|ƒn|jd||ƒdS)a• The add_radio_actions() method is a convenience method that creates a number of gtk.RadioAction objects based on the information in the list of action entry tuples contained in entries and adds them to the action group. The entry tuples can vary in size from one to six items with the following information: * The name of the action. Must be specified. * The stock id for the action. Optional with a default value of None if a label is specified. * The label for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None if a stock id is specified. * The accelerator for the action, in the format understood by the gtk.accelerator_parse() function. Optional with a default value of None. * The tooltip for the action. This field should typically be marked for translation, see the set_translation_domain() method. Optional with a default value of None. * The value to set on the radio action. Optional with a default value of 0. Should be specified in applications. The value parameter specifies the radio action that should be set active. The "changed" signal of the first radio action is connected to the on_change callback (if specified and not None) and the accel paths of the actions are set to /group-name/action-name. zentries must be iterableNrcsHt|||||d�}t|dƒr&|j|ƒˆ|kr8|jdƒˆj||ƒ|S)N)rIr\r]r^r<Ú join_groupT)rbÚhasattrrprnre)Z group_sourcerIr^r\rfr]Z entry_valuerh)r2r<rrrjes    z6ActionGroup.add_radio_actions.._process_actionZchanged)NNNNr)rDr#r*) r2rkr<Z on_changeriZ first_actionrjrlrhr)r2r<rÚadd_radio_actionsBs  zActionGroup.add_radio_actions)rI)N)N)NNN) rrrrr rcrarrmrorrrrrrrcßs  - 1rcc@seZdZdd„Zddd„ZdS) Ú UIManagercCs0t|tƒstdƒ‚t|jdƒƒ}tjj|||ƒS)Nzbuffer must be a stringzUTF-8)rÚ _basestringr#r"Úencoder rsÚadd_ui_from_string)r2ÚbufferÚlengthrrrrv†s zUIManager.add_ui_from_stringrcCstjj|||ƒS)N)r rsÚinsert_action_group)r2rwrxrrrryŽszUIManager.insert_action_groupNrT)rT)rrrrvryrrrrrs…srsc@seZdZeejjƒZdS)ÚComboBoxN)rrrrr rzZget_active_iterrrrrrz•srzc@seZdZeejjded�ZdS)ÚBoxÚ homogeneousÚspacing)r_r`N)r|r})rrrrr r{rarrrrrr{�sr{c@s(eZdZeejjddejjie d�ZdS)Ú SizeGroupÚmode)r_Zdeprecated_defaultsr`N)r) rrrrr r~raZ SizeGroupModeZVERTICALrrrrrr~§s r~c@seZdZeejjded�ZdS)ÚMenuItemr\)r_r`N)r\)rrrrr r€rarrrrrr€²sr€c@s$eZdZdd„Zdd„Zdd„ZdS)ÚBuildercCs|jt|ƒdS)aôConnect signals specified by this builder to a name, handler mapping. Connect signal, name, and handler sets specified in the builder with the given mapping "obj_or_map". The handler/value aspect of the mapping can also contain a tuple in the form of (handler [,arg1 [,argN]]) allowing for extra arguments to be passed to the handler. For example: .. code-block:: python builder.connect_signals({'on_clicked': (on_clicked, arg1, arg2)}) N)Zconnect_signals_fullr-)r2r%rrrÚconnect_signals½s zBuilder.connect_signalscCs*t|tƒstdƒ‚t|ƒ}tjj|||ƒS)Nzbuffer must be a string)rrtr#r"r r�Úadd_from_string)r2rwrxrrrrƒËs zBuilder.add_from_stringcCs,t|tƒstdƒ‚t|ƒ}tjj||||ƒS)Nzbuffer must be a string)rrtr#r"r r�Úadd_objects_from_string)r2rwZ object_idsrxrrrr„Ós zBuilder.add_objects_from_stringN)rrrr‚rƒr„rrrrr�¼sr�c@seZdZeejjded�ZdS)ÚWindowÚtype)r_r`N)r†)rrrrr r…rarrrrrr…äsr…c@s\eZdZdZeejjdddddœed �Z d d „Zd d „Z e dd„ƒZ e dd„ƒZ dd„ZdS)ÚDialogÚtitleÚparentr+ÚbuttonsÚ_buttons_propertyÚ transient_forÚ add_buttons)rŒrŠ)r_ÚignoreÚdeprecated_aliasesr`cOsò|jƒ}tt|j|ƒƒ}|j|ƒd}|jtkrF|jjtjkrF|d7}|jddƒ}|dk rˆt |t j ƒ rˆt j dt|d�d|krŒ|d=nd}|jddƒ}|rÔt j dt|d�|t jj@rÀd |d <|t jj@rÔd |d <|j||Ž|rî|j|ŽdS) NrrrŠz²The "buttons" argument must be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations)Ú stacklevelr+rzÆThe "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsTZmodalZdestroy_with_parent)ÚcopyÚdictÚzipÚ_old_arg_namesÚupdater4r‡rarrr Z ButtonsTypeÚwarningsÚwarnrZ DialogFlagsZMODALZDESTROY_WITH_PARENTÚ_initr�)r2r(rPÚ new_kwargsZ old_kwargsr�r�r+rrrraøs0        zDialog.__init__cOs<t|jƒ�(tƒ�tjj|f|ž|ŽSQRXWdQRXdS)N)rZdestroyrr r‡Úrun)r2r(rPrrrrš#s z Dialog.runcCs|jƒS)N)Zget_action_area)ÚdialogrrrÚ(szDialog.cCs|jƒS)N)Zget_content_area)r›rrrrœ)sc GsPdd„}y&x ||ƒD]\}}|j||ƒqWWntk rJtdƒ‚YnXdS)a The add_buttons() method adds several buttons to the Gtk.Dialog using the button data passed as arguments to the method. This method is the same as calling the Gtk.Dialog.add_button() repeatedly. The button data pairs - button text (or stock ID) and a response ID integer are passed individually. For example: .. code-block:: python dialog.add_buttons(Gtk.STOCK_OPEN, 42, "Close", Gtk.ResponseType.CLOSE) will add "Open" and "Close" buttons to dialog. css4x.|r.|dd…\}}|dd…}||fVqWdS)Nrrr)ÚbÚtÚrrrrÚ_button9s z#Dialog.add_buttons.._buttonz%Must pass an even number of argumentsN)Z add_buttonÚ IndexErrorr#)r2r(r rVZresponserrrr�+s zDialog.add_buttonsN)rˆr‰r+rŠr‹)rˆrŒr+r�rŠ)r+r�)rrrr”rr r‡rarr˜ršÚpropertyZ action_areaZvboxr�rrrrr‡îs+  r‡c@s6eZdZeejjddddœed�Zd d „Zd d „Z d S)Ú MessageDialogr‰r+Ú message_typerŠÚmessage_formatr†)rVr¤)r_r�r`cCs|jddƒ|jd|ƒdS)Nzsecondary-use-markupFzsecondary-text)Ú set_property)r2r¥rrrÚformat_secondary_textRs z#MessageDialog.format_secondary_textcCs|jddƒ|jd|ƒdS)Nzsecondary-use-markupTzsecondary-text)r¦)r2r¥rrrÚformat_secondary_markupVs z%MessageDialog.format_secondary_markupN)r‰r+r¤rŠr¥) rrrrr r£rarr§r¨rrrrr£Jsr£c@seZdZeejjded�ZdS)ÚColorSelectionDialogrˆ)r_r`N)rˆ)rrrrr r©rarrrrrr©`sr©c@seZdZeejjded�ZdS)ÚFileChooserDialogrˆr‰rhrŠ)r_r`N)rˆr‰rhrŠ)rrrrr rªrarrrrrrªisrªc@seZdZeejjded�ZdS)ÚFontSelectionDialogrˆ)r_r`N)rˆ)rrrrr r«rarrrrrr«tsr«c@s$eZdZeejjdddied�ZdS) ÚRecentChooserDialogrˆr‰Úrecent_managerrŠZmanager)r_r�r`N)rˆr‰r­rŠ)rrrrr r¬rarrrrrr¬}sr¬c@sBeZdZeejjded�Zeejj ƒZ eejj ƒZ eejj ƒZ dS)ÚIconViewÚmodel)r_r`N)r¯) rrrrr r®rarrZget_item_at_posÚget_visible_rangeZget_dest_item_at_posrrrrr®Šs   r®c@seZdZeejjded�ZdS)Ú ToolButtonr^)r_r`N)r^)rrrrr r±rarrrrrr±˜sr±c@seZdZeejjƒZdS)Ú IMContextN)rrrrr r²Zget_surroundingrrrrr²¢sr²c@seZdZeejjƒZdS)Ú RecentInfoN)rrrrr r³Zget_application_inforrrrr³ªsr³c@sfeZdZdd„Zddd„Zddd„Zdd d „Zdd d „Zdd„Zdd„Z ddd„Z e e j jfd�ZdS)Ú TextBuffercCs&|jƒ}|dkr"tjƒ}|j|ƒ|S)N)Ú get_tag_tabler Z TextTagTableZ set_tag_table)r2ÚtablerrrÚ_get_or_create_tag_table³s  z#TextBuffer._get_or_create_tag_tableNcKs&tjfd|i|—Ž}|jƒj|ƒ|S)aùCreates a tag and adds it to the tag table of the TextBuffer. :param str tag_name: Name of the new tag, or None :param **properties: Keyword list of properties and their values This is equivalent to creating a Gtk.TextTag and then adding the tag to the buffer's tag table. The returned tag is owned by the buffer's tag table. If ``tag_name`` is None, the tag is anonymous. If ``tag_name`` is not None, a tag called ``tag_name`` must not already exist in the tag table for this buffer. Properties are passed as a keyword list of names and values (e.g. foreground='DodgerBlue', weight=Pango.Weight.BOLD) :returns: A new tag. rI)r ZTextTagr·Úadd)r2Ztag_nameZ propertiesÚtagrrrÚ create_tag»szTextBuffer.create_tagFcCstjj||||ƒS)N)r r´Ú create_mark)r2Z mark_nameÚwhereZ left_gravityrrrr»×szTextBuffer.create_markrcCstjj|||ƒdS)N)r r´Úset_text)r2rVrxrrrr½ÚszTextBuffer.set_textcCs0t|tƒstdt|ƒƒ‚tjj||||ƒdS)Nztext must be a string, not %s)rrtr#r†r r´Úinsert)r2rDrVrxrrrr¾Ýs zTextBuffer.insertcGsF|jƒ}|j||ƒ|sdS|j|ƒ}x|D]}|j|||ƒq,WdS)N)Z get_offsetr¾Zget_iter_at_offsetZ apply_tag)r2rDrVÚtagsZ start_offsetÚstartr¹rrrÚinsert_with_tagsãs   zTextBuffer.insert_with_tagscGsPg}x4|D],}|jƒj|ƒ}|s,td|ƒ‚|j|ƒq W|j||f|žŽdS)Nzunknown text tag: %s)rµÚlookupr6rrÁ)r2rDrVr¿Ztag_objsr¹Ztag_objrrrÚinsert_with_tags_by_nameïs  z#TextBuffer.insert_with_tags_by_namecCs.t|tƒstdt|ƒƒ‚tjj|||ƒdS)Nztext must be a string, not %s)rrtr#r†r r´Úinsert_at_cursor)r2rVrxrrrrÄús zTextBuffer.insert_at_cursor)rX)N)FrT)rTrT)rTrT)rT)rrrr·rºr»r½r¾rÁrÃrÄrr r´rYrrrrr´²s      r´c@s$eZdZeejjƒZeejjƒZdS)ÚTextIterN)rrrrr rÅZforward_searchZbackward_searchrrrrrÅs rÅcseZdZdd„Zdd„ZeZdd„Zdd„Zd d „Zd d „Z d d„Z dd„Z e e jjƒZe e jjƒZe e jjƒZe e jjƒZe e jjedƒZ‡fdd„Z‡fdd„Z‡fdd„Zdd„Zdd„Zdd„Zdd„Z‡fd d!„Z‡fd"d#„Z‡fd$d%„Z‡fd&d'„Z‡fd(d)„Z ‡Z!S)*Ú TreeModelcCs |jdƒS)N)Ziter_n_children)r2rrrrAszTreeModel.__len__cCsdS)NTr)r2rrrrFszTreeModel.__bool__c Cs®t|tjƒr|St|tƒrv|dkrvt|ƒ|}|dkrBtd|ƒ‚y|j|ƒ}Wn tk rptd|ƒ‚YnX|Sy|j|ƒ}Wn tk r¤td|ƒ‚YnX|SdS)Nrzrow index is out of bounds: %dzcould not find tree path '%s')rr ÚTreeIterÚintr"r¡Úget_iterr6)r2ÚkeyÚindexÚaiterrrrÚ_getiters    zTreeModel._getitercCst|tjƒr|St|ƒSdS)N)rr ÚTreePath)r2ÚpathrrrÚ _coerce_path-s zTreeModel._coerce_pathcCs|j|ƒ}t||ƒS)N)rÍÚ TreeModelRow)r2rÊrÌrrrÚ __getitem__3s zTreeModel.__getitem__cCs||}|j|j|ƒdS)N)Úset_rowrD)r2rÊr<ÚrowrrrÚ __setitem__7szTreeModel.__setitem__cCs|j|ƒ}|j|ƒdS)N)rÍÚremove)r2rÊrÌrrrÚ __delitem__;s zTreeModel.__delitem__cCst||jƒƒS)N)ÚTreeModelRowIterÚget_iter_first)r2rrrrE?szTreeModel.__iter__zinvalid tree pathcs2|j|ƒ}tt|ƒj|ƒ\}}|s.td|ƒ‚|S)Nzinvalid tree path '%s')rÐr0rÆrÉr6)r2rÏÚsuccessrÌ)r4rrrÉIs   zTreeModel.get_itercs$|jƒ}tt|ƒj|ƒ}|r |SdS)N)r‘r0rÆÚ iter_next)r2rÌÚ next_iterrÚ)r4rrrÛPszTreeModel.iter_nextcs$|jƒ}tt|ƒj|ƒ}|r |SdS)N)r‘r0rÆÚ iter_previous)r2rÌÚ prev_iterrÚ)r4rrrÝVszTreeModel.iter_previouscCszt|tƒrtdƒ‚|jƒ}t|ƒ|kr.tdƒ‚g}g}x:t|ƒD].\}}|dkrRq@|j|j||ƒƒ|j|ƒq@W||fS)Nz%Expected a list or tuple, but got strz1row sequence has the incorrect number of elements) rÚstrr#Ú get_n_columnsr"r6Ú enumeraterÚ_convert_value)r2rÔÚ n_columnsÚresultÚcolumnsZcur_colr<rrrÚ _convert_row\s  zTreeModel._convert_rowcCs@|j|ƒ\}}x,|D]$}||}|dkr*q|j|||ƒqWdS)N)ræÚ set_value)r2ÚtreeiterrÔZ converted_rowråÚcolumnr<rrrrÓps  zTreeModel.set_rowcCs"t|tjƒr|Stj|j|ƒ|ƒS)z5Convert value to a GObject.Value of the expected type)rrr7Zget_column_type)r2rér<rrrrâys zTreeModel._convert_valuecGs^|jƒ}g}xH|D]@}t|tƒs(tdƒ‚|dks8||kr@tdƒ‚|j|j||ƒƒqWt|ƒS)Nzcolumn numbers must be intsrzcolumn number is out of range)ràrrÈr#r6rr:Útuple)r2rèrårãÚvaluesÚcolrrrr€s  z TreeModel.getcstt|ƒj|j|ƒ|ƒS)N)r0rÆÚ row_changedrÐ)r2rÏrD)r4rrrí’szTreeModel.row_changedcstt|ƒj|j|ƒ|ƒS)N)r0rÆÚ row_insertedrÐ)r2rÏrD)r4rrrî•szTreeModel.row_insertedcstt|ƒj|j|ƒ|ƒS)N)r0rÆÚrow_has_child_toggledrÐ)r2rÏrD)r4rrrï˜szTreeModel.row_has_child_toggledcstt|ƒj|j|ƒƒS)N)r0rÆÚ row_deletedrÐ)r2rÏ)r4rrrðœszTreeModel.row_deletedcstt|ƒj|j|ƒ||ƒS)N)r0rÆÚrows_reorderedrÐ)r2rÏrDZ new_order)r4rrrñŸszTreeModel.rows_reordered)"rrrrArFrRrÍrÐrÒrÕr×rErr rÆrÙÚ iter_childrenZiter_nth_childÚ iter_parentZget_iter_from_stringr6rÉrÛrÝrærÓrârrírîrïrðrñr>rr)r4rrÆs6            rÆcs<eZdZeejjdd�Zd‡fdd„ Zd ‡fdd„ Z‡Z S) Ú TreeSortableN)rXcstt|ƒj|||ƒdS)N)r0rôÚ set_sort_func)r2Zsort_column_idÚ sort_funcri)r4rrrõ¬szTreeSortable.set_sort_funccstt|ƒj||ƒdS)N)r0rôÚset_default_sort_func)r2röri)r4rrr÷¯sz"TreeSortable.set_default_sort_func)NN)N)N) rrrrr rôZget_sort_column_idrõr÷r>rr)r4rrô¨srôc@seZdZeejjded�ZdS)Ú TreeModelSortr¯)r_r`N)r¯)rrrrr rørarrrrrrø·srøc@s^eZdZdd„Zdd„Zddd„Zddd „Zdd d „Zdd d „Zddd„Z dd„Z dd„Z dS)Ú ListStorecGstjj|ƒ|j|ƒdS)N)r rùraÚset_column_types)r2Ú column_typesrrrraÂs zListStore.__init__cCs8|dk r&|j|ƒ\}}|j|||ƒ}ntjj||ƒ}|S)N)ræZinsert_with_valuesvr rùr¾)r2rWrÔrårèrrrÚ _do_insertÆs zListStore._do_insertNcCs |r|jd|ƒStjj|ƒSdS)NrrT)rür rùr)r2rÔrrrrÏs zListStore.appendcCs |jd|ƒS)Nr)rü)r2rÔrrrÚprepend×szListStore.prependcCs |j||ƒS)N)rü)r2rWrÔrrrr¾ÚszListStore.insertcCs&tjj||ƒ}|dk r"|j||ƒ|S)N)r rùÚ insert_beforerÓ)r2ÚsiblingrÔrèrrrrþàs zListStore.insert_beforecCs&tjj||ƒ}|dk r"|j||ƒ|S)N)r rùÚ insert_afterrÓ)r2rÿrÔrèrrrrës zListStore.insert_aftercCs"|j||ƒ}tjj||||ƒdS)N)râr rùrç)r2rèrér<rrrrçós zListStore.set_valuecs°‡‡fdd„}|r¬t|dtƒr@||ddd…|ddd…ƒnlt|dttfƒrzt|ƒdkrftdƒ‚||d|dƒn2t|dtƒr¤|t|dƒ|djƒƒntdƒ‚dS)Ncs|t|ƒt|ƒkrtdƒ‚g}g}xDt||ƒD]6\}}t|tƒsFtdƒ‚|j|ƒ|jˆj||ƒƒq,Wtjj ˆˆ||ƒdS)Nz7The number of columns do not match the number of valuesz0TypeError: Expected integer argument for column.) r"r#r“rrÈrrâr rùÚset)ÚcolsÚvalsrårëÚcol_numr<)r2rèrrÚ _set_listsøs  z!ListStore.set.._set_listsrrrzToo many argumentsz‹Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}. No -1 termination is needed.)rrÈrêÚlistr"r#r’rë)r2rèr(rr)r2rèrr÷s  z ListStore.set)N)N)N)N)N) rrrrarürrýr¾rþrrçrrrrrrùÁs    rùc@s|eZdZdd„Zedd„ƒZedd„ƒZedd„ƒZed d „ƒZd d „Z d d„Z dd„Z dd„Z dd„Z dd„Zdd„ZdS)rÑcCsht|tjƒstdt|ƒjƒ‚||_t|tjƒr>|j|ƒ|_ n&t|tj ƒrR||_ ntdt|ƒjƒ‚dS)Nz expected Gtk.TreeModel, %s foundz?expected Gtk.TreeIter or Gtk.TreePath, %s found) rr rÆr#r†rr¯rÎrÉrDrÇ)r2r¯Z iter_or_pathrrrras   zTreeModelRow.__init__cCs|jj|jƒS)N)r¯Úget_pathrD)r2rrrrÏ&szTreeModelRow.pathcCs|jƒS)N)Úget_next)r2rrrÚnext*szTreeModelRow.nextcCs|jƒS)N)Ú get_previous)r2rrrÚprevious.szTreeModelRow.previouscCs|jƒS)N)Ú get_parent)r2rrrr‰2szTreeModelRow.parentcCs"|jj|jƒ}|rt|j|ƒSdS)N)r¯rÛrDrÑ)r2rÜrrrr6szTreeModelRow.get_nextcCs"|jj|jƒ}|rt|j|ƒSdS)N)r¯rÝrDrÑ)r2rÞrrrr ;szTreeModelRow.get_previouscCs"|jj|jƒ}|rt|j|ƒSdS)N)r¯rórDrÑ)r2Z parent_iterrrrr @szTreeModelRow.get_parentcsÎt|tƒrH|ˆjjƒkr&td|ƒ‚n|dkr8ˆj|ƒ}ˆjjˆj|ƒSt|tƒrœ|j ˆjjƒƒ\}}}g}x*t |||ƒD]}|j ˆjjˆj|ƒƒqzW|St|t ƒr¸‡fdd„|DƒSt dt|ƒjƒ‚dS)Nz!column index is out of bounds: %drcsg|] }ˆ|‘qSrr)rHÚk)r2rrrJSsz,TreeModelRow.__getitem__..z0indices must be integers, slice or tuple, not %s)rrÈr¯ràr¡Ú_convert_negative_indexr:rDÚsliceÚindicesÚrangerrêr#r†r)r2rÊrÀÚstopÚstepZalistÚir)r2rrÒEs     zTreeModelRow.__getitem__c Cs>t|tƒrL||jjƒkr&td|ƒ‚n|dkr8|j|ƒ}|jj|j||ƒnît|tƒrÎ|j |jjƒƒ\}}}t |||ƒ}t |ƒt |ƒkr t dt |ƒt |ƒfƒ‚x˜t |ƒD]\}}|jj|j|||ƒqªWnlt|tƒ�r(t |ƒt |ƒk�rt dt |ƒt |ƒfƒ‚x4t||ƒD]\} }||| <�qWntdt|ƒjƒ‚dS)Nz!column index is out of bounds: %drz9attempt to assign sequence of size %d to slice of size %dzŸsz#TreePath.__new__..rz-could not parse subscript '%s' as a tree path) rrÈrßrtÚjoinr"r#rÎZnew_from_string)ÚclsrÏrrrÚ__new__›s      zTreePath.__new__cstt|ƒjƒdS)N)r0rÎra)r2r(rP)r4rrra¨szTreePath.__init__cCs |jƒp dS)NÚ)Z to_string)r2rrrÚ__str__«szTreePath.__str__cCs|dk o|j|ƒdkS)Nr)Úcompare)r2ÚotherrrrÚ__lt__®szTreePath.__lt__cCs|dk o|j|ƒdkS)Nr)r!)r2r"rrrÚ__le__±szTreePath.__le__cCs|dk o|j|ƒdkS)Nr)r!)r2r"rrrÚ__eq__´szTreePath.__eq__cCs|dkp|j|ƒdkS)Nr)r!)r2r"rrrÚ__ne__·szTreePath.__ne__cCs|dkp|j|ƒdkS)Nr)r!)r2r"rrrÚ__gt__ºszTreePath.__gt__cCs|dkp|j|ƒdkS)Nr)r!)r2r"rrrÚ__ge__½szTreePath.__ge__cCs t|jƒƒS)N)rDÚ get_indices)r2rrrrEÀszTreePath.__iter__cCs|jƒS)N)Z get_depth)r2rrrrAÃszTreePath.__len__cCs |jƒ|S)N)r))r2rËrrrrÒÆszTreePath.__getitem__)r)rrrrrar r#r$r%r&r'r(rErArÒr>rr)r4rrΙs rÎc@s^eZdZdd„Zdd„Zddd„Zddd „Zdd d „Zdd d „Zddd„Z dd„Z dd„Z dS)Ú TreeStorecGstjj|ƒ|j|ƒdS)N)r r*rarú)r2rûrrrraÏs zTreeStore.__init__cCs<|dk r(|j|ƒ\}}|j||||ƒ}ntjj|||ƒ}|S)N)ræZinsert_with_valuesr r*r¾)r2r‰rWrÔrårèrrrrüÓs zTreeStore._do_insertNcCs|j|d|ƒS)NrrT)rü)r2r‰rÔrrrrÜszTreeStore.appendcCs|j|d|ƒS)Nr)rü)r2r‰rÔrrrrýßszTreeStore.prependcCs|j|||ƒS)N)rü)r2r‰rWrÔrrrr¾âszTreeStore.insertcCs(tjj|||ƒ}|dk r$|j||ƒ|S)N)r r*rþrÓ)r2r‰rÿrÔrèrrrrþès zTreeStore.insert_beforecCs(tjj|||ƒ}|dk r$|j||ƒ|S)N)r r*rrÓ)r2r‰rÿrÔrèrrrrós zTreeStore.insert_aftercCs"|j||ƒ}tjj||||ƒdS)N)râr r*rç)r2rèrér<rrrrçûs zTreeStore.set_valuecs°‡‡fdd„}|r¬t|dtƒr@||ddd…|ddd…ƒnlt|dttfƒrzt|ƒdkrftdƒ‚||d|dƒn2t|dtƒr¤||djƒ|djƒƒntdƒ‚dS)Ncs|t|ƒt|ƒkrtdƒ‚g}g}xDt||ƒD]6\}}t|tƒsFtdƒ‚|j|ƒ|jˆj||ƒƒq,Wtjj ˆˆ||ƒdS)Nz7The number of columns do not match the number of valuesz0TypeError: Expected integer argument for column.) r"r#r“rrÈrrâr r*r)rrrårërr<)r2rèrrrs  z!TreeStore.set.._set_listsrrrzToo many argumentsz‹Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}. No -1 termination is needed.) rrÈrêrr"r#r’Úkeysrë)r2rèr(rr)r2rèrrÿs  z TreeStore.set)N)N)N)N)N) rrrrarürrýr¾rþrrçrrrrrr*Îs    r*cs�eZdZeejjded�Zeejj ƒZ eejj ƒZ eejj ƒZ ‡fdd„Z ‡fdd„Z d‡fd d „ Zd‡fd d „ Zd‡fdd„ Zdd„Z‡ZS)ÚTreeViewr¯)r_r`cs t|ƒ}tt|ƒj|||ƒdS)N)rr0r,Úenable_model_drag_source)r2Zstart_button_maskrÚactionsr)r4rrr-)s z!TreeView.enable_model_drag_sourcecst|ƒ}tt|ƒj||ƒdS)N)rr0r,Úenable_model_drag_dest)r2rr.r)r4rrr//s zTreeView.enable_model_drag_destNFçcs0t|tjƒst|ƒ}tt|ƒj|||||ƒdS)N)rr rÎr0r,Úscroll_to_cell)r2rÏréZ use_alignZ row_alignZ col_align)r4rrr14s zTreeView.scroll_to_cellcs,t|tjƒst|ƒ}tt|ƒj|||ƒdS)N)rr rÎr0r,Ú set_cursor)r2rÏréZ start_editing)r4rrr29s zTreeView.set_cursorcs&t|tjƒst|ƒ}tt|ƒj||ƒS)N)rr rÎr0r,Ú get_cell_area)r2rÏré)r4rrr3>s zTreeView.get_cell_areacKs:tƒ}|j|ƒ|j|dƒ|j||ƒ|j|f|ŽdS)NF)ÚTreeViewColumnZ set_titleÚ pack_startZ insert_columnÚset_attributes)r2rWrˆZcellrPrérrrÚinsert_column_with_attributesCs    z&TreeView.insert_column_with_attributes)r¯)NFr0r0)NF)N)rrrrr r,rarrZget_path_at_posr°Zget_dest_row_at_posr-r/r1r2r3r7r>rr)r4rr, s     r,cs<eZdZd dd„ZeejjƒZd ‡fdd„ Zdd„Z ‡Z S) r4rNcKsHtjj||d�|r |j|dƒx"|jƒD]\}}|j|||ƒq*WdS)N)rˆT)r r4rar5rNÚ add_attribute)r2rˆÚ cell_rendererÚ attributesrIr<rrrraPs  zTreeViewColumn.__init__cstt|ƒj|||ƒdS)N)r0r4Úset_cell_data_func)r2r9ÚfuncZ func_data)r4rrr;\sz!TreeViewColumn.set_cell_data_funccKs:tjj||ƒx&|jƒD]\}}tjj||||ƒqWdS)N)r Z CellLayoutZclear_attributesrNr8)r2r9r:rIr<rrrr6_szTreeViewColumn.set_attributes)rN)N) rrrrarr r4Zcell_get_positionr;r6r>rr)r4rr4Os  r4cs4eZdZ‡fdd„Z‡fdd„Z‡fdd„Z‡ZS)Ú TreeSelectioncs(t|tjƒst|ƒ}tt|ƒj|ƒdS)N)rr rÎr0r=Ú select_path)r2rÏ)r4rrr>ls zTreeSelection.select_pathcs,tt|ƒjƒ\}}}|r ||fS|dfSdS)N)r0r=Ú get_selected)r2rÚr¯rÌ)r4rrr?qszTreeSelection.get_selectedcstt|ƒjƒ\}}||fS)N)r0r=Úget_selected_rows)r2Úrowsr¯)r4rrr@zszTreeSelection.get_selected_rows)rrrr>r?r@r>rr)r4rr=js  r=c@s*eZdZeejjd d edd�Zdd„Zd S) ÚButtonr\ÚstockÚ use_stockÚ use_underliner )r_rŽr`r�cOsld|kr\|dr\tjdtdd�|jƒ}|d|d<d|d<d|d<|d=tjj|f|Žn |j||ŽdS) NrCzKStock items are deprecated. Please use: Gtk.Button.new_with_mnemonic(label)r)r�r\TrDrE)r–r—rr‘r rBrar˜)r2r(rPr™rrrraŠs  zButton.__init__N)r\rCrDrE)rC) rrrrr rBrarr˜rrrrrBƒs rBc@seZdZeejjded�ZdS)Ú LinkButtonÚurir\)r_r`N)rGr\)rrrrr rFrarrrrrrF¡srFc@seZdZeejjded�ZdS)ÚLabelr\)r_r`N)r\)rrrrr rHrarrrrrrH«srHc@s0eZdZeejjdddd œed d �Zd d „ZdS)Ú Adjustmentr<ÚlowerÚupperÚstep_incrementÚpage_incrementÚ page_sizeZ page_incrZ step_incr)rMrLr )r_r�r`r�cOsB|j||Žd|kr$|j|dƒnt|ƒdkr>|j|dƒdS)Nr<rr)r˜rçr")r2r(rPrrrra¾s   zAdjustment.__init__N)r<rJrKrLrMrN) rrrrr rIrarr˜rrrrrIµsrIc@sPeZdZeejjd dddœed�Zejj ejj Bejj ejj Bddfd d „Z d S) ÚTableÚn_rowsrãr|rArå)rPrã)r_r�r`rc Cs"tjj|||||||||| ƒ dS)N)r rOÚattach) r2rBZ left_attachZ right_attachZ top_attachZ bottom_attachZxoptionsZyoptionsZxpaddingZypaddingrrrrQÕsz Table.attachN)rPrãr|) rrrrr rOrarZ AttachOptionsZEXPANDZFILLrQrrrrrOÏs rOc@seZdZeejjded�ZdS)ÚScrolledWindowÚ hadjustmentÚ vadjustment)r_r`N)rSrT)rrrrr rRrarrrrrrRÜsrRc@seZdZeejjded�ZdS)Ú HScrollbarÚ adjustment)r_r`N)rV)rrrrr rUrarrrrrrUçsrUc@seZdZeejjded�ZdS)Ú VScrollbarrV)r_r`N)rV)rrrrr rWrarrrrrrWïsrWcs,eZdZd‡fdd„ Zd‡fdd„ Z‡ZS) ÚPanedFTcstt|ƒj|||ƒdS)N)r0rXÚpack1)r2rBÚresizeÚshrink)r4rrrYùsz Paned.pack1cstt|ƒj|||ƒdS)N)r0rXÚpack2)r2rBrZr[)r4rrr\üsz Paned.pack2)FT)TT)rrrrYr\r>rr)r4rrXøsrXc@seZdZeejjded�ZdS)ÚArrowÚ arrow_typeÚ shadow_type)r_r`N)r^r_)rrrrr r]rarrrrrr]sr]cs&eZdZddd„Z‡fdd„Z‡ZS)ÚIconSetNcCs6|dk r&tjdtdd�tjj|ƒ}n tjj|ƒ}|S)NzXGtk.IconSet(pixbuf) has been deprecated. Please use: Gtk.IconSet.new_from_pixbuf(pixbuf)r)r�)r–r—rr r`Znew_from_pixbufr)rZpixbufZiconsetrrrrs   zIconSet.__new__cstt|ƒjƒS)N)r0r`ra)r2r(rP)r4rrraszIconSet.__init__)N)rrrrrar>rr)r4rr` s r`c@seZdZeejjded�ZdS)ÚViewportrSrT)r_r`N)rSrT)rrrrr rararrrrrrasracs&eZdZd‡fdd„ Zdd„Z‡ZS)ÚTreeModelFilterNcstt|ƒj||ƒdS)N)r0rbÚset_visible_func)r2r<Údata)r4rrrc*sz TreeModelFilter.set_visible_funccCs |j|ƒ}|jƒj|||ƒdS)N)Zconvert_iter_to_child_iterZ get_modelrç)r2rDrér<rrrrç-s zTreeModelFilter.set_value)N)rrrrcrçr>rr)r4rrb)srbc@seZdZdd„ZdS)ÚMenucCs|jd||||||ƒdS)N)Zpopup_for_device)r2Zparent_menu_shellZparent_menu_itemr<rdZbuttonZ activate_timerrrÚpopup8sz Menu.popupN)rrrrfrrrrre7srecGs tƒdS)N)Ú_Gtk_main_quit)r(rrrÚ main_quit@srhcOs2ttjƒ�tƒ� t||ŽSQRXWdQRXdS)N)rr rhrÚ _Gtk_main)r(rPrrrÚmainHs rjÚ stock_lookupz4.0)r r)r rZ)r rZ)r rZ)r rZ)r rZ)r rZ)r rZ)[rÚsysr–Z gi.repositoryrZ _ossighelperrrZ overridesrrrÚmoduler Zgir Ú version_inforßrtZ basestringr Ú__all__Z_versionZwarn_msgr—ÚRuntimeWarningrrrr)r-r.r?rSr[rbrcrsrzr{r~r€r�r…r‡r£r©rªr«r¬r®r±r²r³r´rÅrÆrôrørùÚobjectrÑrØrÎr*r,r4r=rBrFrHrIrOrRrUrWrXr]r`rarbrerhrgrjrirkZ init_checkÚargvZ initializedrrrrrÚs|          )     $          X              Q      S g  1 N +