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
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
+++ /dev/null
-/*
- * Copyright (C) 2009 Nokia Corporation.
- *
- * 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;
-using GUPnP;
-
-public class Rygel.GeneralPrefSection : PreferencesSection {
- const string UPNP_CHECKBUTTON = "upnp-checkbutton";
-
- private CheckButton upnp_check;
-
- public GeneralPrefSection (Builder builder,
- WritableUserConfig config) throws Error {
- base (config, "general");
-
- this.upnp_check = (CheckButton) builder.get_object (UPNP_CHECKBUTTON);
- assert (this.upnp_check != null);
-
- try {
- this.upnp_check.active = this.config.get_upnp_enabled ();
- } catch (GLib.Error err) {}
- }
-
- public override void save () {
- this.config.set_upnp_enabled (this.upnp_check.active);
- }
-}
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 {
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));
public void run () {
this.dialog.run ();
+ this.config.set_upnp_enabled (this.upnp_check.active);
foreach (var section in this.sections) {
section.save ();
}