[rygel/config] Introducing PluginPrefVBox.



commit 089ceb5bbc9d3692f93bf1252036aea7fa67e7b9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Apr 23 17:05:18 2009 +0300

    Introducing PluginPrefVBox.
    
    A class for editiong of common plugin configuration.
---
 src/ui/Makefile.am                 |    3 ++
 src/ui/rygel-plugin-pref-vbox.vala |   46 ++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 2012e44..09b2b7c 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -24,6 +24,7 @@ BUILT_SOURCES = rygel.stamp \
 		rygel-preferences-dialog.c \
 		rygel-preferences-vbox.c \
 		rygel-general-pref-vbox.c \
+		rygel-plugin-pref-vbox.c \
 		rygel-config-editor.c
 
 rygel_preferences_SOURCES = rygel-preferences-dialog.c \
@@ -32,6 +33,8 @@ rygel_preferences_SOURCES = rygel-preferences-dialog.c \
 			    rygel-preferences-vbox.vala \
 			    rygel-general-pref-vbox.c \
 			    rygel-general-pref-vbox.vala \
+			    rygel-plugin-pref-vbox.c \
+			    rygel-plugin-pref-vbox.vala \
 			    rygel-config-editor.c \
 			    rygel-config-editor.vala
 
diff --git a/src/ui/rygel-plugin-pref-vbox.vala b/src/ui/rygel-plugin-pref-vbox.vala
new file mode 100644
index 0000000..45fd3a1
--- /dev/null
+++ b/src/ui/rygel-plugin-pref-vbox.vala
@@ -0,0 +1,46 @@
+/*
+ * 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.PluginPrefVBox : PreferencesVBox {
+    public PluginPrefVBox (ConfigEditor config_editor,
+                           string       pref_title,
+                           string       section) {
+        base (config_editor, pref_title, section);
+
+        var title = config_editor.get_title (section);
+        var udn = config_editor.get_udn (section);
+
+        this.add_string_pref (ConfigReader.TITLE_KEY,
+                              "Title",
+                              title,
+                              "This is the name that will appear on the " +
+                              "client UIs to");
+
+        this.add_string_pref (ConfigReader.UDN_KEY,
+                              "UDN",
+                              udn,
+                              "The Unique Device Name (UDN) for this plugin." +
+                              " Usually, there is no need to change this.");
+    }
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]