Author: igorz
Date: 2006-10-08 07:33:33 -0400 (Sun, 08 Oct 2006)
New Revision: 66404

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs
Log:
2006-10-08 Igor Zelmanovich <[EMAIL PROTECTED]>

        * FormView.cs:
        * GridView.cs:
        * DetailsView.cs: 
        * PagerSettings.cs: 
        reverted r66222, problem solved in r66283: command buttons inherit 
ForeColor
                


Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-10-08 11:10:43 UTC (rev 66403)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-10-08 11:33:33 UTC (rev 66404)
@@ -1,3 +1,11 @@
+2006-10-08 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * FormView.cs:
+       * GridView.cs:
+       * DetailsView.cs: 
+       * PagerSettings.cs: 
+       reverted r66222, problem solved in r66283: command buttons inherit 
ForeColor
+               
 2006-10-06 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * Image.cs: write 'alt' after 'src' so that the HyperLink test do not

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs 
2006-10-08 11:10:43 UTC (rev 66403)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs 
2006-10-08 11:33:33 UTC (rev 66404)
@@ -1133,7 +1133,7 @@
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount, pagerStyle));
+                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs    
2006-10-08 11:10:43 UTC (rev 66403)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs    
2006-10-08 11:33:33 UTC (rev 66404)
@@ -928,7 +928,7 @@
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount, pagerStyle));
+                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs    
2006-10-08 11:10:43 UTC (rev 66403)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs    
2006-10-08 11:33:33 UTC (rev 66404)
@@ -1228,7 +1228,7 @@
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount, pagerStyle));
+                               cell.Controls.Add 
(PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, 
dataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs       
2006-10-08 11:10:43 UTC (rev 66403)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs       
2006-10-08 11:33:33 UTC (rev 66404)
@@ -270,7 +270,7 @@
                        get { return ViewState.IsTrackingViewState; }
                }
                
-               internal Table CreatePagerControl (int currentPage, int 
pageCount, Style style)
+               internal Table CreatePagerControl (int currentPage, int 
pageCount)
                {
                        Table table = new Table ();
                        TableRow row = new TableRow ();
@@ -280,13 +280,13 @@
                        {
                                if (currentPage > 0) {
                                        if (Mode == 
PagerButtons.NextPreviousFirstLast)
-                                               row.Cells.Add (CreateCell 
(FirstPageText, FirstPageImageUrl, "Page", "First", style));
-                                       row.Cells.Add (CreateCell 
(PreviousPageText, PreviousPageImageUrl, "Page", "Prev", style));
+                                               row.Cells.Add (CreateCell 
(FirstPageText, FirstPageImageUrl, "Page", "First"));
+                                       row.Cells.Add (CreateCell 
(PreviousPageText, PreviousPageImageUrl, "Page", "Prev"));
                                }
                                if (currentPage < pageCount - 1) {
-                                       row.Cells.Add (CreateCell 
(NextPageText, NextPageImageUrl, "Page", "Next", style));
+                                       row.Cells.Add (CreateCell 
(NextPageText, NextPageImageUrl, "Page", "Next"));
                                        if (Mode == 
PagerButtons.NextPreviousFirstLast)
-                                               row.Cells.Add (CreateCell 
(LastPageText, LastPageImageUrl, "Page", "Last", style));
+                                               row.Cells.Add (CreateCell 
(LastPageText, LastPageImageUrl, "Page", "Last"));
                                }
                        }
                        else if (Mode == PagerButtons.Numeric || Mode == 
PagerButtons.NumericFirstLast)
@@ -300,30 +300,28 @@
                                
                                if (first > 0) {
                                        if (Mode == 
PagerButtons.NumericFirstLast)
-                                               row.Cells.Add (CreateCell 
(FirstPageText, FirstPageImageUrl, "Page", "First", style));
-                                       row.Cells.Add (CreateCell 
(PreviousPageText, PreviousPageImageUrl, "Page", "Prev", style));
+                                               row.Cells.Add (CreateCell 
(FirstPageText, FirstPageImageUrl, "Page", "First"));
+                                       row.Cells.Add (CreateCell 
(PreviousPageText, PreviousPageImageUrl, "Page", "Prev"));
                                }
                                
                                for (int n = first; n < last; n++)
-                                       row.Cells.Add (CreateCell ((n + 
1).ToString (), string.Empty, (n != currentPage) ? "Page" : "", (n + 
1).ToString (), style));
+                                       row.Cells.Add (CreateCell ((n + 
1).ToString (), string.Empty, (n != currentPage) ? "Page" : "", (n + 
1).ToString ()));
                                
                                if (last < pageCount - 1) {
-                                       row.Cells.Add (CreateCell 
(NextPageText, NextPageImageUrl, "Page", "Next", style));
+                                       row.Cells.Add (CreateCell 
(NextPageText, NextPageImageUrl, "Page", "Next"));
                                        if (Mode == 
PagerButtons.NumericFirstLast)
-                                               row.Cells.Add (CreateCell 
(LastPageText, LastPageImageUrl, "Page", "Last", style));
+                                               row.Cells.Add (CreateCell 
(LastPageText, LastPageImageUrl, "Page", "Last"));
                                }
                        }
                        return table;
                }
 
-               TableCell CreateCell (string text, string image, string 
command, string argument, Style style) {
+               TableCell CreateCell (string text, string image, string 
command, string argument) {
                        TableCell cell = new TableCell ();
                        DataControlButton button = new DataControlButton (ctrl, 
text, image, command, argument, true);
 
-                       if (image.Length > 0)
+                       if (!String.IsNullOrEmpty(image))
                                button.ButtonType = ButtonType.Image;
-                       else if (command.Length > 0 && style != null)
-                               button.ForeColor = style.ForeColor;
                        
                        cell.Controls.Add (button);
                        return cell;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to