[rygel/config] Put code to add a pref page in a separate method



commit 73b773f837abd23db7325922aa1f4b5895decae1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Apr 23 16:56:28 2009 +0300

    Put code to add a pref page in a separate method
---
 src/ui/rygel-preferences-dialog.vala |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/ui/rygel-preferences-dialog.vala b/src/ui/rygel-preferences-dialog.vala
index 7178684..5403b38 100644
--- a/src/ui/rygel-preferences-dialog.vala
+++ b/src/ui/rygel-preferences-dialog.vala
@@ -31,10 +31,7 @@ public class Rygel.PreferencesDialog : Dialog {
         var config_editor = new ConfigEditor ();
 
         this.notebook = new Notebook ();
-
-        var pref_vbox = new GeneralPrefVBox (config_editor);
-        var label = new Label (pref_vbox.title);
-        this.notebook.append_page (pref_vbox, label);
+        this.add_pref_page (new GeneralPrefVBox (config_editor));
 
         this.vbox.add (this.notebook);
 
@@ -47,6 +44,11 @@ public class Rygel.PreferencesDialog : Dialog {
         this.show_all ();
     }
 
+    private void add_pref_page (PreferencesVBox pref_vbox) {
+        var label = new Label (pref_vbox.title);
+        this.notebook.append_page (pref_vbox, label);
+    }
+
     private void on_response (PreferencesDialog dialog, int response_id) {
         switch (response_id) {
             case ResponseType.REJECT:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]