Baul.LocationWidgetProvider

Baul.LocationWidgetProvider — Baul.LocationWidgetProvider Reference

Synopsis

class Baul.LocationWidgetProvider:
    def get_widget(uri, window)

Description

If subclassed, Baul will request a widget to be displayed at the top of the directory listing.

Example 4. Baul.LocationWidgetProvider Example

from gi.repository import Baul, GObject, Ctk

class ColumnExtension(GObject.GObject, Baul.LocationWidgetProvider):
    def __init__(self):
        pass
    
    def get_widget(self, uri, window):
        entry = Ctk.Entry()
        entry.set_text(uri)
        entry.show()
        return entry
    

Passive Methods

Baul.LocationWidgetProvider.get_widget

    def get_widget(uri, window)

uri :

the current folder uri

window :

the current ctk.Window instance

Returns :

a ctk.Widget object

This function is called by Baul when it wants a location widget from the extension. It is called in the main thread before a directory listing is shown, so it should return quickly.