Move the error perspective to the main window

No need to have a separate file for a few lines of code
pull/145/head
Peter Hutterer 2019-07-17 19:29:39 +10:00
parent bd66b8dbd3
commit 037d05babf
3 changed files with 16 additions and 31 deletions

View File

@ -12,7 +12,6 @@ tuhigui/application.py
tuhigui/config.py
tuhigui/drawing.py
tuhigui/drawingperspective.py
tuhigui/errorperspective.py
tuhigui/setupdialog.py
tuhigui/svg.py
tuhigui/tuhi.py

View File

@ -1,28 +0,0 @@
#!/usr/bin/env python3
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
from gi.repository import GObject, Gtk
import gi
gi.require_version("Gtk", "3.0")
@Gtk.Template(resource_path="/org/freedesktop/TuhiGui/ui/ErrorPerspective.ui")
class ErrorPerspective(Gtk.Box):
__gtype_name__ = "ErrorPerspective"
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@GObject.Property
def name(self):
return "error_perspective"

View File

@ -11,11 +11,10 @@
# GNU General Public License for more details.
#
from gi.repository import Gtk, Gio, GLib
from gi.repository import Gtk, Gio, GLib, GObject
from .setupdialog import SetupDialog
from .drawingperspective import DrawingPerspective
from .errorperspective import ErrorPerspective
from .tuhi import TuhiKeteManager
from .config import Config
@ -57,6 +56,21 @@ MENU_XML = """
"""
@Gtk.Template(resource_path="/org/freedesktop/TuhiGui/ui/ErrorPerspective.ui")
class ErrorPerspective(Gtk.Box):
'''
The page loaded when we cannot connect to the Tuhi DBus server.
'''
__gtype_name__ = "ErrorPerspective"
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@GObject.Property
def name(self):
return "error_perspective"
@Gtk.Template(resource_path='/org/freedesktop/TuhiGui/ui/MainWindow.ui')
class MainWindow(Gtk.ApplicationWindow):
__gtype_name__ = 'MainWindow'