[rygel] ui: Connect signals from UI description as much as possible
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] ui: Connect signals from UI description as much as possible
- Date: Fri, 5 Jun 2009 12:01:24 -0400 (EDT)
commit 3ee6fe6158b58f0e745dd5c46891c5bef5193dcb
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jun 3 18:16:06 2009 +0300
ui: Connect signals from UI description as much as possible
---
data/rygel-preferences.ui | 1 +
src/ui/rygel-general-pref-section.vala | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/data/rygel-preferences.ui b/data/rygel-preferences.ui
index 2b2b4dc..042cd68 100644
--- a/data/rygel-preferences.ui
+++ b/data/rygel-preferences.ui
@@ -64,6 +64,7 @@
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled" handler="rygel_general_pref_section_on_trans_check_toggled"/>
</object>
<packing>
<property name="y_options"></property>
diff --git a/src/ui/rygel-general-pref-section.vala b/src/ui/rygel-general-pref-section.vala
index 7eccc43..e9e65ab 100644
--- a/src/ui/rygel-general-pref-section.vala
+++ b/src/ui/rygel-general-pref-section.vala
@@ -66,7 +66,7 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
this.mp2ts_check.active = this.config.mp2ts_transcoder;
this.lpcm_check.active = this.config.lpcm_transcoder;
- this.trans_check.toggled += this.on_trans_check_toggled;
+ builder.connect_signals (this);
}
public override void save () {
@@ -79,7 +79,8 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
this.config.lpcm_transcoder = this.lpcm_check.active;
}
- private void on_trans_check_toggled (CheckButton trans_check) {
+ [CCode (instance_pos = -1)]
+ public void on_trans_check_toggled (CheckButton trans_check) {
this.mp3_check.sensitive =
this.mp2ts_check.sensitive =
this.lpcm_check.sensitive = trans_check.active;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]