From 6cd12e2d5ba107d3220aaffecf948dd7b80d1ae1 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Fri, 18 Feb 2011 12:14:42 +0200 Subject: [PATCH] data,ui: Option to use 'any' network --- data/rygel-preferences.ui | 3 +++ src/ui/rygel-network-pref-section.vala | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/rygel-preferences.ui b/data/rygel-preferences.ui index e8d1519..7a2780d 100644 --- a/data/rygel-preferences.ui +++ b/data/rygel-preferences.ui @@ -221,6 +221,9 @@ True False + + Any + True diff --git a/src/ui/rygel-network-pref-section.vala b/src/ui/rygel-network-pref-section.vala index 062f1f0..4997f14 100644 --- a/src/ui/rygel-network-pref-section.vala +++ b/src/ui/rygel-network-pref-section.vala @@ -25,6 +25,7 @@ using GUPnP; public class Rygel.NetworkPrefSection : PreferencesSection { const string IFACE_ENTRY = "iface-entry"; + const string ANY_NETWORK = "Any"; private ComboBoxText iface_entry; @@ -56,7 +57,13 @@ public class Rygel.NetworkPrefSection : PreferencesSection { } public override void save () { - this.config.set_interface (this.iface_entry.get_active_text ()); + var iface = this.iface_entry.get_active_text (); + + if (iface == ANY_NETWORK) { + iface = ""; + } + + this.config.set_interface (iface); } public override void set_sensitivity (bool sensitivity) { -- 2.7.4