[rygel/config] A bit of refactoring.
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel/config] A bit of refactoring.
- Date: Tue, 21 Apr 2009 12:49:33 -0400 (EDT)
commit 703387308ddaf769e95db52ec27df5de439210ad
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Apr 20 17:21:08 2009 +0300
A bit of refactoring.
---
src/ui/rygel-preferences.vala | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/ui/rygel-preferences.vala b/src/ui/rygel-preferences.vala
index b87b17f..1a68cf1 100644
--- a/src/ui/rygel-preferences.vala
+++ b/src/ui/rygel-preferences.vala
@@ -64,9 +64,7 @@ public class Rygel.Preferences : Dialog {
entry.set_text (current_value);
}
- hbox.set_tooltip_text (tooltip);
-
- this.vbox.add (hbox);
+ this.add_pref_widget (hbox, tooltip);
}
private void add_int_pref (string name,
@@ -90,9 +88,7 @@ public class Rygel.Preferences : Dialog {
hbox.add (label);
hbox.add (spin);
- hbox.set_tooltip_text (tooltip);
-
- this.vbox.add (hbox);
+ this.add_pref_widget (hbox, tooltip);
}
private void add_boolean_pref (string name,
@@ -106,9 +102,14 @@ public class Rygel.Preferences : Dialog {
hbox.add (check);
- hbox.set_tooltip_text (tooltip);
+ this.add_pref_widget (hbox, tooltip);
+ }
+
+ private void add_pref_widget (Widget widget,
+ string tooltip) {
+ widget.set_tooltip_text (tooltip);
- this.vbox.add (hbox);
+ this.vbox.add (widget);
}
private void on_response (Preferences pref, int response_id) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]