banshee r3502 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- From: scottp svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3502 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Fri, 21 Mar 2008 03:23:33 +0000 (GMT)
Author: scottp
Date: Fri Mar 21 03:23:33 2008
New Revision: 3502
URL: http://svn.gnome.org/viewvc/banshee?rev=3502&view=rev
Log:
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs:
Better polymorphism, removed unnessisary qualifications.
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs:
Better polymorphism.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs Fri Mar 21 03:23:33 2008
@@ -161,8 +161,9 @@
double even_distribution = 0.0;
int min_width = 25;
- if (resizing_column.Column.HeaderCell is IHeaderCell) {
- min_width = ((IHeaderCell)resizing_column.Column.HeaderCell).MinWidth;
+ IHeaderCell header_cell = resizing_column.Column.HeaderCell as IHeaderCell;
+ if (header_cell != null) {
+ min_width = header_cell.MinWidth;
}
if (resizing_column.Width + resize_delta < min_width) {
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs Fri Mar 21 03:23:33 2008
@@ -43,7 +43,7 @@
private Gdk.Window event_window;
- protected Gdk.Rectangle ListAllocation {
+ protected Rectangle ListAllocation {
get { return list_rendering_alloc; }
}
@@ -104,7 +104,7 @@
event_window.Hide ();
}
- private void MoveResize (Gdk.Rectangle allocation)
+ private void MoveResize (Rectangle allocation)
{
if (Theme == null) {
return;
@@ -115,9 +115,6 @@
list_rendering_alloc.X = header_rendering_alloc.X + Theme.TotalBorderWidth;
list_rendering_alloc.Y = header_rendering_alloc.Bottom + Theme.TotalBorderWidth;
- if (header_rendering_alloc.Height > 0) {
- //list_rendering_alloc.Y++;
- }
list_rendering_alloc.Width = allocation.Width - Theme.TotalBorderWidth * 2;
list_rendering_alloc.Height = allocation.Height - (list_rendering_alloc.Y - allocation.Y) -
Theme.TotalBorderWidth;
@@ -142,7 +139,7 @@
requisition.Height = HeaderHeight;
}
- protected override void OnSizeAllocated (Gdk.Rectangle allocation)
+ protected override void OnSizeAllocated (Rectangle allocation)
{
base.OnSizeAllocated (allocation);
@@ -160,8 +157,9 @@
UpdateAdjustments (null, null);
}
- if (Model is ICareAboutView) {
- ((ICareAboutView)Model).RowsInView = RowsInView;
+ ICareAboutView model = Model as ICareAboutView;
+ if (model != null) {
+ model.RowsInView = RowsInView;
}
RegenerateColumnCache ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]