<child>
<object class="GtkTable" id="table4">
<property name="visible">True</property>
- <property name="n_rows">7</property>
+ <property name="n_rows">10</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
<property name="use_underline">True</property>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
</packing>
</child>
<child>
<property name="use_underline">True</property>
</object>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
<property name="use_underline">True</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
</packing>
</child>
<child>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="share-videos-checkbutton">
+ <property name="label" translatable="yes">Share _Videos</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ <property name="x_padding">12</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="share-music-checkbutton">
+ <property name="label" translatable="yes">Share M_usic</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0.54000002145767212</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ <property name="x_padding">12</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="share-pictures-checkbutton">
+ <property name="label" translatable="yes">Share _Pictures</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
+ <property name="y_options"></property>
+ <property name="x_padding">12</property>
</packing>
</child>
<child>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
<property name="type_hint">dialog</property>
<property name="transient_for">preferences-dialog</property>
<property name="has_separator">False</property>
- <property name="select_multiple">True</property>
<property name="local_only">False</property>
<property name="action">select-folder</property>
+ <property name="select_multiple">True</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
--- /dev/null
+/*
+ * Copyright (C) 2009 Nokia Corporation, all rights reserved.
+ *
+ * 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 Gee;
+
+public class Rygel.TrackerPrefSection : Rygel.PluginPrefSection {
+ const string NAME = "Tracker";
+ const string VIDEOS_KEY = "share-videos";
+ const string MUSIC_KEY = "share-music";
+ const string PICTURES_KEY = "share-pictures";
+ const string TAG_KEY = "share-tagged";
+ const string VIDEOS_CHECK = VIDEOS_KEY + "-checkbutton";
+ const string MUSIC_CHECK = MUSIC_KEY + "-checkbutton";
+ const string PICTURES_CHECK = PICTURES_KEY + "-checkbutton";
+
+ private CheckButton videos_check;
+ private CheckButton music_check;
+ private CheckButton pictures_check;
+
+ public TrackerPrefSection (Builder builder, UserConfig config) {
+ base (builder, config, NAME);
+
+ this.videos_check = (CheckButton) builder.get_object (VIDEOS_CHECK);
+ assert (this.videos_check != null);
+ this.music_check = (CheckButton) builder.get_object (MUSIC_CHECK);
+ assert (this.music_check != null);
+ this.pictures_check = (CheckButton) builder.get_object (PICTURES_CHECK);
+ assert (this.pictures_check != null);
+
+ this.videos_check.active = true;
+ this.music_check.active = true;
+ this.pictures_check.active = true;
+
+ try {
+ this.videos_check.active = config.get_bool (this.name, VIDEOS_KEY);
+ this.music_check.active = config.get_bool (this.name, MUSIC_KEY);
+ this.pictures_check.active = config.get_bool (this.name,
+ PICTURES_KEY);
+ } catch (Error err) {}
+ }
+
+ public override void save () {
+ base.save ();
+
+ config.set_bool (this.name, VIDEOS_KEY, this.videos_check.active);
+ config.set_bool (this.name, MUSIC_KEY, this.music_check.active);
+ config.set_bool (this.name, PICTURES_KEY, this.pictures_check.active);
+ }
+
+ protected override void on_enabled_check_toggled (
+ CheckButton enabled_check) {
+ base.on_enabled_check_toggled (enabled_check);
+
+ this.videos_check.sensitive = enabled_check.active;
+ this.music_check.sensitive = enabled_check.active;
+ this.pictures_check.sensitive = enabled_check.active;
+ }
+}