Initial version, with less-than-half ready UI
This commit is contained in:
70
src/dnd_charsheet.vala
Normal file
70
src/dnd_charsheet.vala
Normal file
@@ -0,0 +1,70 @@
|
||||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
|
||||
/*
|
||||
* main.c
|
||||
* Copyright (C) 2013 Polonkai Gergely <gergely@polonkai.eu>
|
||||
*
|
||||
* dnd-charsheet 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* dnd-charsheet 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using GLib;
|
||||
using Gtk;
|
||||
|
||||
public class Main : Object
|
||||
{
|
||||
|
||||
/*
|
||||
* Uncomment this line when you are done testing and building a tarball
|
||||
* or installing
|
||||
*/
|
||||
//const string UI_FILE = Config.PACKAGE_DATA_DIR + "/" + "dnd_charsheet.ui";
|
||||
const string UI_FILE = "src/dnd_charsheet.ui";
|
||||
|
||||
/* ANJUTA: Widgets declaration for dnd_charsheet.ui - DO NOT REMOVE */
|
||||
|
||||
|
||||
public Main ()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var builder = new Builder ();
|
||||
builder.add_from_file (UI_FILE);
|
||||
builder.connect_signals (this);
|
||||
|
||||
var window = builder.get_object ("window") as Window;
|
||||
/* ANJUTA: Widgets initialization for dnd_charsheet.ui - DO NOT REMOVE */
|
||||
window.show_all ();
|
||||
}
|
||||
catch (Error e) {
|
||||
stderr.printf ("Could not load UI: %s\n", e.message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[CCode (instance_pos = -1)]
|
||||
public void on_destroy (Widget window)
|
||||
{
|
||||
Gtk.main_quit();
|
||||
}
|
||||
|
||||
static int main (string[] args)
|
||||
{
|
||||
Gtk.init (ref args);
|
||||
var app = new Main ();
|
||||
|
||||
Gtk.main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user