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,
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,
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) {