[rygel] data,ui: Option to use 'any' network
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] data,ui: Option to use 'any' network
- Date: Fri, 18 Feb 2011 10:15:25 +0000 (UTC)
commit 6cd12e2d5ba107d3220aaffecf948dd7b80d1ae1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Feb 18 12:14:42 2011 +0200
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 deletions(-)
---
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 @@
<object class="GtkComboBoxText" id="iface-entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Any</item>
+ </items>
</object>
<packing>
<property name="expand">True</property>
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]