[rygel] ui: Separete general section class now unneeded
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] ui: Separete general section class now unneeded
- Date: Thu, 17 Feb 2011 23:49:32 +0000 (UTC)
commit 89a4cbe62440ea0338347b71e05a0e8432404c13
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Feb 17 18:19:37 2011 +0200
ui: Separete general section class now unneeded
po/POTFILES.in | 1 -
src/ui/Makefile.am | 1 -
src/ui/rygel-general-pref-section.vala | 46 --------------------------------
src/ui/rygel-preferences-dialog.vala | 10 ++++++-
4 files changed, 9 insertions(+), 49 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5426e42..01d949c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -146,7 +146,6 @@ src/rygel/rygel-wmv-transcoder-bin.vala
src/rygel/rygel-wmv-transcoder.vala
src/rygel/rygel-xbox-hacks.vala
src/rygel/rygel-changelog.vala
-src/ui/rygel-general-pref-section.vala
src/ui/rygel-media-export-pref-section.vala
src/ui/rygel-preferences-dialog.vala
src/ui/rygel-preferences-section.vala
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 1e48c63..02709cf 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -26,7 +26,6 @@ bin_PROGRAMS = rygel-preferences
rygel_preferences_SOURCES = \
rygel-preferences-dialog.vala \
rygel-preferences-section.vala \
- rygel-general-pref-section.vala \
rygel-media-export-pref-section.vala \
rygel-writable-user-config.vala \
rygel-network-pref-section.vala
diff --git a/src/ui/rygel-preferences-dialog.vala b/src/ui/rygel-preferences-dialog.vala
index bd02172..e5cf50c 100644
--- a/src/ui/rygel-preferences-dialog.vala
+++ b/src/ui/rygel-preferences-dialog.vala
@@ -27,10 +27,12 @@ public class Rygel.PreferencesDialog : GLib.Object {
const string UI_FILE = BuildConfig.DATA_DIR + "/rygel-preferences.ui";
const string DIALOG = "preferences-dialog";
const string ICON = BuildConfig.SMALL_ICON_DIR + "/rygel.png";
+ const string UPNP_CHECKBUTTON = "upnp-checkbutton";
private WritableUserConfig config;
private Builder builder;
private Dialog dialog;
+ private CheckButton upnp_check;
private ArrayList<PreferencesSection> sections;
public PreferencesDialog () throws Error {
@@ -41,11 +43,16 @@ public class Rygel.PreferencesDialog : GLib.Object {
this.dialog = (Dialog) this.builder.get_object (DIALOG);
assert (this.dialog != null);
+ this.upnp_check = (CheckButton) builder.get_object (UPNP_CHECKBUTTON);
+ assert (this.upnp_check != null);
this.dialog.set_icon_from_file (ICON);
+ try {
+ this.upnp_check.active = this.config.get_upnp_enabled ();
+ } catch (GLib.Error err) {}
+
this.sections = new ArrayList<PreferencesSection> ();
- this.sections.add (new GeneralPrefSection (this.builder, this.config));
this.sections.add (new NetworkPrefSection (this.builder, this.config));
this.sections.add (new MediaExportPrefSection (this.builder,
this.config));
@@ -54,6 +61,7 @@ public class Rygel.PreferencesDialog : GLib.Object {
public void run () {
this.dialog.run ();
+ this.config.set_upnp_enabled (this.upnp_check.active);
foreach (var section in this.sections) {
section.save ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]