Initial version, with less-than-half ready UI
This commit is contained in:
40
src/Makefile.am
Normal file
40
src/Makefile.am
Normal file
@@ -0,0 +1,40 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Created by Anjuta
|
||||
|
||||
|
||||
uidir = $(pkgdatadir)/ui
|
||||
ui_DATA = dnd_charsheet.ui
|
||||
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
|
||||
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
|
||||
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
|
||||
$(DND_CHARSHEET_CFLAGS)
|
||||
|
||||
AM_CFLAGS =\
|
||||
-Wall\
|
||||
-g
|
||||
|
||||
bin_PROGRAMS = dnd_charsheet
|
||||
|
||||
dnd_charsheet_SOURCES = \
|
||||
dnd_charsheet.vala config.vapi
|
||||
|
||||
dnd_charsheet_VALAFLAGS = \
|
||||
--pkg gtk+-3.0
|
||||
|
||||
dnd_charsheet_LDFLAGS = \
|
||||
-Wl,--export-dynamic
|
||||
|
||||
dnd_charsheet_LDADD = $(DND_CHARSHEET_LIBS)
|
||||
|
||||
|
||||
EXTRA_DIST = $(ui_DATA)
|
||||
|
||||
# Remove ui directory on uninstall
|
||||
uninstall-local:
|
||||
-rm -r $(uidir)
|
||||
-rm -r $(pkgdatadir)
|
||||
|
11
src/config.vapi
Normal file
11
src/config.vapi
Normal file
@@ -0,0 +1,11 @@
|
||||
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
|
||||
namespace Config {
|
||||
public const string GETTEXT_PACKAGE;
|
||||
public const string SPRITE_DIR;
|
||||
public const string BACKGROUND_DIR;
|
||||
public const string PACKAGE_DATA_DIR;
|
||||
public const string PACKAGE_LOCALE_DIR;
|
||||
public const string PACKAGE_NAME;
|
||||
public const string PACKAGE_VERSION;
|
||||
public const string VERSION;
|
||||
}
|
2167
src/dnd_charsheet.ui
Normal file
2167
src/dnd_charsheet.ui
Normal file
File diff suppressed because it is too large
Load Diff
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