[rygel/config] Add "Enable Xbox support" option.



commit 85b01ac3bb01bba88417f15419c17e545ff7e6b2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Apr 20 16:13:09 2009 +0300

    Add "Enable Xbox support" option.
---
 src/ui/rygel-preferences.vala |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/ui/rygel-preferences.vala b/src/ui/rygel-preferences.vala
index 0b35a16..b87b17f 100644
--- a/src/ui/rygel-preferences.vala
+++ b/src/ui/rygel-preferences.vala
@@ -36,6 +36,9 @@ public class Rygel.Preferences : Dialog {
                            uint16.MIN,
                            uint16.MAX,
                            "The port to advertise the UPnP MediaServer on");
+        this.add_boolean_pref ("XBox support",
+                               config.enable_xbox,
+                               "Enable Xbox support");
 
         this.add_button (STOCK_OK, ResponseType.ACCEPT);
         this.add_button (STOCK_APPLY, ResponseType.APPLY);
@@ -92,6 +95,22 @@ public class Rygel.Preferences : Dialog {
         this.vbox.add (hbox);
     }
 
+    private void add_boolean_pref (string  name,
+                                   bool    current_value,
+                                   string  tooltip) {
+        var hbox = new HBox (true, 6);
+
+        var check = new CheckButton.with_label (name);
+
+        check.active = current_value;
+
+        hbox.add (check);
+
+        hbox.set_tooltip_text (tooltip);
+
+        this.vbox.add (hbox);
+    }
+
     private void on_response (Preferences pref, int response_id) {
         switch (response_id) {
             case ResponseType.REJECT:



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