MCPcopy Create free account
hub / github.com/NyarchLinux/DesktopPuppet / create_gtk_widget

Method create_gtk_widget

puppet_extension.py:187–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

185 GLib.timeout_add(2000, self.update_address)
186
187 def create_gtk_widget(self) -> Gtk.Widget:
188 threading.Thread(target=self.__start_webserver).start()
189 threading.Thread(target=self.start_desktop_puppet_process).start()
190 box = Gtk.Box()
191 box.set_hexpand(True)
192 box.set_vexpand(True)
193 reload_button = Gtk.Button(hexpand=True, vexpand=True)
194 label = Gtk.Label(label="Reload puppet")
195 reload_button.set_child(label)
196 reload_button.connect("clicked", lambda x : threading.Thread(target=self.update_address).start())
197 box.append(reload_button)
198
199 restart_button = Gtk.Button(hexpand=True, vexpand=True)
200 label = Gtk.Label(label="Restart puppet")
201 restart_button.set_child(label)
202 restart_button.connect("clicked", lambda x : threading.Thread(target=self.restart_puppet).start())
203 box.append(restart_button)
204 return box
205
206 def destroy(self, add=None):
207 if hasattr(self, 'httpd'):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected