Beginning of a preferences UI.
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 17 Apr 2009 15:02:30 +0000 (18:02 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 19 Apr 2009 14:13:01 +0000 (17:13 +0300)
configure.ac
src/Makefile.am
src/ui/Makefile.am [new file with mode: 0644]
src/ui/rygel-preferences.vala [new file with mode: 0644]

index 3cb13c3..9952f10 100644 (file)
@@ -184,6 +184,7 @@ AC_OUTPUT([
 Makefile
 src/Makefile
 src/rygel/Makefile
+src/ui/Makefile
 src/plugins/Makefile
 src/plugins/dvb/Makefile
 src/plugins/tracker/Makefile
index 22a603c..42bd230 100644 (file)
@@ -1,3 +1,7 @@
+if BUILD_UI
+SUBDIRS = rygel ui plugins
+else
 SUBDIRS = rygel plugins
+endif
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
new file mode 100644 (file)
index 0000000..dbfef4a
--- /dev/null
@@ -0,0 +1,49 @@
+if UNINSTALLED
+shareddir = $(abs_top_builddir)/data
+else
+shareddir = $(datadir)/rygel
+endif
+
+rygeldir = $(abs_top_builddir)/src/rygel
+
+AM_CFLAGS = $(LIBGUPNP_CFLAGS) \
+           $(LIBGUPNP_AV_CFLAGS) \
+           $(LIBGCONF_CFLAGS) \
+           $(LIBGSTREAMER_CFLAGS) \
+           $(GIO_CFLAGS) \
+            $(GTK_CFLAGS) \
+           $(GEE_CFLAGS) \
+           $(UUID_CFLAGS) \
+           $(LIBSOUP_CFLAGS) \
+           -I$(top_srcdir) -I$(rygeldir) -DDATA_DIR='"$(shareddir)"' \
+           -include config.h
+
+bin_PROGRAMS = rygel-preferences
+
+BUILT_SOURCES = rygel.stamp \
+               rygel-preferences.c
+
+rygel_preferences_SOURCES = rygel-preferences.c \
+                            rygel-preferences.vala
+
+rygel.stamp: $(filter %.vala,$(rygel_preferences_SOURCES))
+       $(VALAC) -C --vapidir=$(rygeldir) \
+       --pkg rygel-1.0 --pkg gupnp-1.0 --pkg gupnp-av-1.0 --pkg dbus-glib-1 \
+       --pkg gconf-2.0 --pkg gstreamer-0.10 --pkg gio-2.0 --pkg gee-1.0 \
+        --pkg gtk+-2.0 $^
+       touch $@
+
+rygel_preferences_LDADD = $(LIBGUPNP_LIBS) \
+                         $(LIBGUPNP_AV_LIBS) \
+                          $(LIBGCONF_LIBS) \
+                          $(LIBGSTREAMER_LIBS) \
+                          $(GIO_LIBS) \
+                          $(GEE_LIBS) \
+                          $(UUID_LIBS) \
+                          $(LIBSOUP_LIBS) \
+                          $(GTK_LIBS) \
+                          -L$(rygeldir) \
+                          -lrygel-configuration
+
+CLEANFILES = $(BUILT_SOURCES)
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/ui/rygel-preferences.vala b/src/ui/rygel-preferences.vala
new file mode 100644 (file)
index 0000000..d546a5b
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation, all rights reserved.
+ *
+ * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ *                               <zeeshan.ali@nokia.com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+using Gtk;
+
+public class Rygel.Preferences : Dialog {
+    public Preferences () {
+        this.title = "Rygel Preferences";
+
+        this.add_button (STOCK_OK, ResponseType.ACCEPT);
+        this.add_button (STOCK_CANCEL, ResponseType.REJECT);
+    }
+
+    public static int main (string[] args) {
+        Gtk.init (ref args);
+
+        var pref = new Preferences ();
+
+        pref.run ();
+
+        return 0;
+    }
+}