[gnome-subtitles] Only set column fixed size if the size is specified.



commit fe5e784b51e0747aab1daec38effa9aced5e360a
Author: Pedro Castro <mail pedrocastro org>
Date:   Sat May 23 12:15:21 2009 +0100

    Only set column fixed size if the size is specified.
---
 src/GnomeSubtitles/Core/Util.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/GnomeSubtitles/Core/Util.cs b/src/GnomeSubtitles/Core/Util.cs
index 9086197..07c8439 100644
--- a/src/GnomeSubtitles/Core/Util.cs
+++ b/src/GnomeSubtitles/Core/Util.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of Gnome Subtitles.
- * Copyright (C) 2006-2008 Pedro Castro
+ * Copyright (C) 2006-2009 Pedro Castro
  *
  * Gnome Subtitles is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -40,8 +40,12 @@ public class Util {
 		TreeViewColumn column = new TreeViewColumn();
 		column.Alignment = 0.5f;
 		column.Title = title;
-		column.FixedWidth = width;
-		column.Sizing = TreeViewColumnSizing.Fixed;
+		
+		if (width != -1) {
+			column.FixedWidth = width;
+			column.Sizing = TreeViewColumnSizing.Fixed;
+		}
+		
 		column.Resizable = true;
 		column.PackStart(cell, true);
 		column.SetCellDataFunc(cell, dataFunction);



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