Skip to content

Instantly share code, notes, and snippets.

@benclarkk
Created October 13, 2019 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benclarkk/259f5a8184452bb2cc98990f6053fb32 to your computer and use it in GitHub Desktop.
Save benclarkk/259f5a8184452bb2cc98990f6053fb32 to your computer and use it in GitHub Desktop.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gio, Handy
from .window import ServersWindow
class Application(Gtk.Application):
def __init__(self):
super().__init__(application_id='xyz.benclark06.servers',
flags=Gio.ApplicationFlags.FLAGS_NONE)
hdy_init()
def do_activate(self):
win = self.props.active_window
if not win:
win = ServersWindow(application=self)
win.present()
def main(version):
app = Application()
return app.run(sys.argv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment