最後に、私はのpython3とGTK3ための答えを思い付きました。
私はここで全体のコードを掲載:https://github.com/elpraga/kodi-cli を私はここで関連ビットを掲載します:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
import subprocess
...
self.progressbar = Gtk.ProgressBar(text="Kodi is not playing at the moment")
self.progresseventbox = Gtk.EventBox()
self.progressbar.set_show_text(True)
を...
grid.attach(self.youtube_entry, 0, 0, 4, 1)
grid.attach_next_to(self.progresseventbox, self.youtube_entry, Gtk.PositionType.BOTTOM, 4, 1)
self.progresseventbox.add(self.progressbar)
を.. 。
self.progresseventbox.connect("button-press-event", self.on_mouse_click)
...
def on_mouse_click(self, widget, event):
width = self.progresseventbox.get_allocated_width()
percentage = event.x/width * 100
percentage = str(percentage)
output = (subprocess.check_output(["kodi-cli", "-g", percentage]))
# Let's get some response from kodi-cli
output = (subprocess.check_output(["kodi-cli", "-g"]))
output = output.decode('ascii')
# http://stackoverflow.com/questions/1798465/python-remove-last-3-characters-of-a-string
self.output_text.set_text(output)
...
Screenshot of the clickable progress bar I used after all