File: location-widget-provider.py

package info (click to toggle)
python-caja 1.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 832 kB
  • sloc: xml: 1,745; ansic: 791; python: 297; makefile: 182; sh: 19
file content (11 lines) | stat: -rw-r--r-- 302 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
from gi.repository import Caja, Gtk, GObject

class LocationProviderExample(GObject.GObject, Caja.LocationWidgetProvider):
    def __init__(self):
        pass
    
    def get_widget(self, uri, window):
        entry = Gtk.Entry()
        entry.set_text(uri)
        entry.show()
        return entry