[libgtkmusic] Missing files added.
- From: Leandro Resende Mattioli <lmattioli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtkmusic] Missing files added.
- Date: Fri, 6 Jul 2012 17:03:22 +0000 (UTC)
commit 40fe8327da38640099cda4dbdfef5ac2c2cb2ec4
Author: Leandro Mattioli <leandro mattioli gmail com>
Date: Fri Jul 6 14:02:55 2012 -0300
Missing files added.
.gitignore | 13 +-
Makefile.am | 145 +++++++-
README | 4 +-
configure.ac | 12 +-
glade/Makefile.am | 41 --
glade/Makefile.in | 463 ----------------------
glade/gtkmusic-catalog.xml | 1 +
gtkmusic-0.2.pc.in | 2 +-
src/GuitarWidget.vala | 8 +-
src/Makefile.am | 66 ----
src/Makefile.in | 918 --------------------------------------------
src/TestsGuitar.vala | 35 --
src/TestsMusicalNotes.vala | 27 --
src/TestsPiano.vala | 27 --
14 files changed, 159 insertions(+), 1603 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 849e70b..bafe9b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,12 @@
-autom4te.cache/**/*
+autom4te.cache
+config.h
+config.log
+config.status
+stamp-h1
+Makefile
+libtool
+gtkmusic-0.2.pc
+src/.deps
+src/.libs
+Makefile.in
+*.stamp
diff --git a/Makefile.am b/Makefile.am
index 7006499..9fe25d2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,23 +1,144 @@
-dist_doc_DATA = README
+CLEANFILES=
+EXTRA_DIST=
-ACLOCAL_AMFLAGS = -I m4
+###############################################################################
+# root
+###############################################################################
-#if ENABLE_DOC
-#DOC_SUBDIR = doc
-#endif
+dist_doc_DATA = README
-#if ENABLE_BENCHMARK
-#BENCHMARK_SUBDIR = benchmark
-#endif
+ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gtkmusic-0.2.pc
-EXTRA_DIST = gtkmusic-0.2.pc.in
-SUBDIRS = src $(DOC_SUBDIR) $(BENCHMARK_SUBDIR)
+EXTRA_DIST += gtkmusic-0.2.pc.in
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
+###############################################################################
+# glade
+###############################################################################
if ENABLE_GLADE_CATALOG
-SUBDIRS += glade
+
+#Thanks vte for the example!
+
+catalogdir = $(GLADE_CATALOG_DIR)
+catalog_DATA = $(srcdir)/glade/gtkmusic-catalog.xml
+
+icons = \
+ $(srcdir)/glade/hicolor_actions_16x16_widget-gtkmusic-guitar.png \
+ $(srcdir)/glade/hicolor_actions_22x22_widget-gtkmusic-guitar.png \
+ $(srcdir)/glade/hicolor_actions_16x16_widget-gtkmusic-piano.png \
+ $(srcdir)/glade/hicolor_actions_22x22_widget-gtkmusic-piano.png
+
+EXTRA_DIST += \
+ $(catalog_DATA) \
+ $(icons)
+
+install-icons:
+ for icon in $(icons); do \
+ THEME=`echo $$icon | cut -d_ -f1`; \
+ CONTEXT=`echo $$icon | cut -d_ -f2`; \
+ SIZE=`echo $$icon | cut -d_ -f3`; \
+ ICONFILE=`echo $$icon | cut -d_ -f4`; \
+ mkdir -p $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT; \
+ $(INSTALL_DATA) $$icon $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ done
+
+uninstall-icons:
+ -for icon in $(icons); do \
+ THEME=`echo $$icon | cut -d_ -f1`; \
+ CONTEXT=`echo $$icon | cut -d_ -f2`; \
+ SIZE=`echo $$icon | cut -d_ -f3`; \
+ ICONFILE=`echo $$icon | cut -d_ -f4`; \
+ rm -f $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ done
+
+validate: $(catalog_DATA)
+ xmllint --dtdvalid $(srcdir)/glade/glade-catalog.dtd --noout $<
+
+install-data-local: install-icons
+uninstall-local: uninstall-icons
+
+#MAINTAINERCLEANFILES = $(catalog_DATA) glade catalog is not autogenerated
+
endif
-DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+###############################################################################
+# src
+###############################################################################
+
+lib_LTLIBRARIES = libgtkmusic-0.2.la
+
+libgtkmusic_0_2_la_SOURCES = \
+ $(srcdir)/src/GuitarWidget.vala \
+ $(srcdir)/src/PianoWidget.vala \
+ $(srcdir)/src/MusicalNotes.vala
+
+libgtkmusic_0_2_la_VALAFLAGS = \
+ -H gtkmusic.h --vapi gtkmusic-0.2.vapi \
+ -h gtkmusic-internals.h \
+ --internal-vapi gtkmusic-internals-0.2.vapi \
+ --library gtkmusic-0.2 --gir GtkMusic-0.2.gir \
+ --pkg gtk+-3.0 --pkg gee-0.8 \
+ $(VALAFLAGS)
+
+libgtkmusic_0_2_la_CPPFLAGS=$(LIBGTKMUSICDEPS_CFLAGS)
+
+libgtkmusic_0_2_la_LIBADD=$(LIBGTKMUSICDEPS_LIBS)
+
+libgtkmusic_0_2_la_LDFLAGS = \
+ -version-info $(LIBGTKMUSIC_LT_VERSION) \
+ -no-undefined
+
+gtkmusicincludedir = $(includedir)/gtkmusic-0.2
+gtkmusicinclude_HEADERS = gtkmusic.h
+
+vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = gtkmusic-0.2.vapi
+
+if HAVE_INTROSPECTION
+
+girdir = @INTROSPECTION_GIRDIR@
+gir_DATA = GtkMusic-0.2.gir
+
+typelibdir = @INTROSPECTION_TYPELIBDIR@
+typelib_DATA = GtkMusic-0.2.typelib
+
+GtkMusic-0.2.typelib: GtkMusic-0.2.gir
+ @INTROSPECTION_COMPILER@ --shared-library=libgtkmusic-0.2 -o $@ $^
+endif
+
+GtkMusic-0.2.gir gtkmusic-internals-0.2.vapi gtkmusic-0.2.vapi: libgtkmusic-0.2.la
+
+CLEANFILES += \
+ gtkmusic-0.2.vapi \
+ gtkmusic-internals-0.2.vapi \
+ GtkMusic-0.2.gir \
+ GtkMusic-0.2.typelib \
+ gtkmusic.h \
+ gtkmusic-internals.h
+
+###############################################################################
+# tests
+###############################################################################
+
+#TODO Find a more elegant way of doing this
+#bin_PROGRAMS = tests_notes tests_piano tests_guitar
+#COMMON_CFLAGS = $(LIBGTKMUSICDEPS_CFLAGS) `pkg-config --cflags gtkmusic-0.2`
+#COMMON_LIBS = $(LIBGTKMUSICDEPS_LIBS) `pkg-config --libs gtkmusic-0.2`
+#COMMON_VALAFLAGS = --pkg gee-0.8 --pkg gtkmusic-0.2 --pkg gtk+-3.0
+#tests_notes_SOURCES = $(srcdir)/test/TestsMusicalNotes.vala
+#tests_notes_VALAFLAGS = $(COMMON_VALAFLAGS)
+#tests_notes_CFLAGS= $(COMMON_CFLAGS)
+#tests_notes_LDFLAGS= $(COMMON_LIBS)
+#tests_piano_SOURCES = $(srcdir)/test/TestsPiano.vala
+#tests_piano_VALAFLAGS = $(COMMON_VALAFLAGS)
+#tests_piano_CFLAGS=$(COMMON_CFLAGS)
+#tests_piano_LDFLAGS=$(COMMON_LIBS)
+#tests_guitar_SOURCES = $(srcdir)/test/TestsGuitar.vala
+#tests_guitar_VALAFLAGS = $(COMMON_VALAFLAGS)
+#tests_guitar_CFLAGS=$(COMMON_CFLAGS)
+#tests_guitar_LDFLAGS=$(COMMON_LIBS)
diff --git a/README b/README
index 3ce9677..4c9a488 100644
--- a/README
+++ b/README
@@ -9,5 +9,7 @@ Currently it supports the Guitar and Piano widgets.
Known Bugs
==========
- * crashes in Glade (when trying to access Gee collections)
* crashes in GIR (when trying to use library with Python).
+ * glade catalogs may not install in the correct target folder (/usr/local/share instead of /usr/share)
+ * guitar widgets doesn't show strings and labels in Glade (gee related problem)
+ * widgets should have expand property set to True for proper displaying in glade
diff --git a/configure.ac b/configure.ac
index 96b5eca..b0ee472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
###############################################################################
#autoconf and automake init
###############################################################################
-AC_INIT([libgtkmusic], [0.2], [leandro mattioli gmail com])
+AC_INIT([libgtkmusic], [0.21], [leandro mattioli gmail com])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror])
@@ -22,11 +22,11 @@ PKG_CHECK_MODULES(LIBGTKMUSICDEPS,
glib-2.0 > 2.28.0
gobject-2.0 > 2.28.0
gtk+-3.0 > 3.0.0
- gee-1.0
-)
-PKG_CHECK_MODULES(LIBGTKMUSIC,
- gtkmusic-0.2
+ gee-0.8
)
+#PKG_CHECK_MODULES(LIBGTKMUSIC, Add for the tests
+# gtkmusic-0.2
+#)
GOBJECT_INTROSPECTION_CHECK([0.9.0])
###############################################################################
@@ -78,8 +78,6 @@ AM_CONDITIONAL([ENABLE_GLADE_CATALOG],[test "$enable_glade_catalog" = "yes"])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
- src/Makefile
- glade/Makefile
gtkmusic-0.2.pc
])
AC_OUTPUT
diff --git a/glade/gtkmusic-catalog.xml b/glade/gtkmusic-catalog.xml
index c2ca128..dcde2bd 100644
--- a/glade/gtkmusic-catalog.xml
+++ b/glade/gtkmusic-catalog.xml
@@ -8,6 +8,7 @@
<!--parent="GtkDrawingArea" />-->
<glade-widget-class name="GtkMusicPiano" generic-name="piano" title="Piano"
default-width="120" default-height="40">
+ <post-create-function>gtk_music_piano_new</post-create-function>
</glade-widget-class>
<!--parent="GtkDrawingArea" />-->
</glade-widget-classes>
diff --git a/gtkmusic-0.2.pc.in b/gtkmusic-0.2.pc.in
index cd1723c..997f16e 100644
--- a/gtkmusic-0.2.pc.in
+++ b/gtkmusic-0.2.pc.in
@@ -8,6 +8,6 @@ datadir= datadir@
Name: libgtkmusic
Description: Gtk musical widgets collection
Version: @VERSION@
-Requires: glib-2.0 gobject-2.0 gtk+-3.0 gee-1.0
+Requires: glib-2.0 gobject-2.0 gtk+-3.0 gee-0.8
Libs: -L${libdir} -lgtkmusic-0.2
Cflags: -I${includedir}/gtkmusic-0.2
diff --git a/src/GuitarWidget.vala b/src/GuitarWidget.vala
index 12a8998..bcaf574 100644
--- a/src/GuitarWidget.vala
+++ b/src/GuitarWidget.vala
@@ -143,8 +143,8 @@ public class Guitar : DrawingArea {
guitarStrings = new ArrayList<GuitarString> ();
fretMarks = new HashSet<GuitarFretMark> ();
markedNotes = new HashMap<GuitarPosition, MarkedNoteStyle>
- ( (HashFunc) GuitarPosition.hash_func,
- (EqualFunc) GuitarPosition.equal_func );
+ ( (Gee.HashDataFunc?) GuitarPosition.hash_func,
+ (Gee.EqualDataFunc?) GuitarPosition.equal_func );
foreach(string s in defaultStrings)
guitarStrings.add(new GuitarString(s));
foreach(ushort i in defaultFretMarks)
@@ -273,8 +273,8 @@ public class Guitar : DrawingArea {
short fretIndex;
HashSet<string> notesWithOctaves;
var validPositions = new HashSet<GuitarPosition> (
- (HashFunc) GuitarPosition.hash_func,
- (EqualFunc) GuitarPosition.equal_func
+ (Gee.HashDataFunc?) GuitarPosition.hash_func,
+ (Gee.EqualDataFunc?) GuitarPosition.equal_func
);
//Getting list of "complete" notes (with octave component)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]