Created
October 13, 2019 17:52
-
-
Save benclarkk/259f5a8184452bb2cc98990f6053fb32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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