calendar/src/source/_window.py

23 lines
556 B
Python

#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class Window(Gtk.Window):
def __init__(self, title = 'Untitled window', width = 840, height = 520):
Gtk.Window.__init__(self, title = title)
self.set_default_size(width, height)
self.resize(width, height)
self.set_wmclass('Hosts-Switch', 'Hosts-Switch')
self.set_title('Hosts-Switch')
self.set_icon_name('hosts-switch')
def toggle_visible(self, icon):
if self.is_visible():
self.hide()
else:
self.present()
Python 50.2%
JavaScript 25.6%
HTML 24.2%