[baobab/wip/new-design] Simplify previous commit



commit 3317fe8c918c9f0f7ef197b0ab1dcb34a59704f4
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Tue Apr 3 17:53:22 2012 +0200

    Simplify previous commit

 src/baobab-volume-list.vala |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/baobab-volume-list.vala b/src/baobab-volume-list.vala
index 6f198da..0f1a258 100644
--- a/src/baobab-volume-list.vala
+++ b/src/baobab-volume-list.vala
@@ -156,20 +156,14 @@ namespace Baobab {
 		public delegate void ActionOnClick (Location location);
 
 		void ensure_size_groups () {
-			if (name_size_group == null)
-				name_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
-
-			if (mount_point_size_group == null)
-				mount_point_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
-
-			if (size_size_group == null)
-				size_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
-
-			if (used_size_group == null)
-				used_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			if (name_size_group != null)
+				return;
 
-			if (button_size_group == null)
-				button_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			name_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			mount_point_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			size_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			used_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+			button_size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
 		}
 
 		public LocationWidget (Location location, ActionOnClick action) {



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