[banshee/a11y: 22/27] [a11y] More code style conformance
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee/a11y: 22/27] [a11y] More code style conformance
- Date: Tue, 6 Oct 2009 00:22:35 +0000 (UTC)
commit a6f0cc92d0cd463e76547156916c3e00fc6b901e
Author: Gabriel Burt <gabriel burt gmail com>
Date: Mon Oct 5 16:46:50 2009 -0700
[a11y] More code style conformance
.../ColumnCellStatusIndicator.cs | 40 +++++++++----------
.../Accessibility/ListViewAccessible.cs | 4 +-
.../Hyena.Gui/Hyena.Data.Gui/ColumnCell.cs | 2 +-
.../Hyena.Data.Gui/ListView/ListView_Accessible.cs | 5 +-
4 files changed, 24 insertions(+), 27 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
index e0859a1..00f68a3 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
@@ -48,11 +48,7 @@ namespace Banshee.Collection.Gui
{
}
- public string ImageLocale {
- get {
- return null;
- }
- }
+ public string ImageLocale { get { return null; } }
public bool SetImageDescription (string description)
{
@@ -61,10 +57,10 @@ namespace Banshee.Collection.Gui
public void GetImageSize (out int width, out int height)
{
- if (cell.GetTextAlternative (bound_object) != string.Empty)
+ if (!String.IsNullOrEmpty (cell.GetTextAlternative (bound_object)))
width = height = 16;
else
- width = height = int.MinValue;
+ width = height = Int32.MinValue;
}
public string ImageDescription {
@@ -75,13 +71,13 @@ namespace Banshee.Collection.Gui
public void GetImagePosition (out int x, out int y, Atk.CoordType coordType)
{
- if (cell.GetTextAlternative (bound_object) != string.Empty)
- {
+ if (!String.IsNullOrEmpty (cell.GetTextAlternative (bound_object))) {
GetPosition (out x, out y, coordType);
x += 4;
y += 4;
- } else
- x = y = int.MinValue;
+ } else {
+ x = y = Int32.MinValue;
+ }
}
}
@@ -94,9 +90,10 @@ namespace Banshee.Collection.Gui
Protected
}
- private string[] icon_names = new string[] {
+ private string [] icon_names = new string[] {
Catalog.GetString ("Playing"), Catalog.GetString ("Paused"),
- Catalog.GetString ("Error"), Catalog.GetString ("Protected"), string.Empty};
+ Catalog.GetString ("Error"), Catalog.GetString ("Protected"), ""
+ };
private int pixbuf_size = 16;
protected virtual int PixbufSize {
@@ -131,15 +128,16 @@ namespace Banshee.Collection.Gui
public override string GetTextAlternative (object obj)
{
- if (!(obj is TrackInfo))
- return string.Empty;
+ var track = obj as TrackInfo;
+ if (track == null)
+ return "";
- int icon_index = GetIconIndex ((TrackInfo)obj);
+ int icon_index = GetIconIndex (track);
if (icon_index < 0)
- return string.Empty;
+ return "";
else
- return icon_names[GetIconIndex ((TrackInfo)obj)];
+ return icon_names[GetIconIndex (track)];
}
protected virtual int PixbufCount {
@@ -180,9 +178,9 @@ namespace Banshee.Collection.Gui
pixbufs = new Gdk.Pixbuf[PixbufCount];
}
- pixbufs[(int)Icon.Playing] = IconThemeUtils.LoadIcon (PixbufSize, "media-playback-start");
- pixbufs[(int)Icon.Paused] = IconThemeUtils.LoadIcon (PixbufSize, "media-playback-pause");
- pixbufs[(int)Icon.Error] = IconThemeUtils.LoadIcon (PixbufSize, "emblem-unreadable", "dialog-error");
+ pixbufs[(int)Icon.Playing] = IconThemeUtils.LoadIcon (PixbufSize, "media-playback-start");
+ pixbufs[(int)Icon.Paused] = IconThemeUtils.LoadIcon (PixbufSize, "media-playback-pause");
+ pixbufs[(int)Icon.Error] = IconThemeUtils.LoadIcon (PixbufSize, "emblem-unreadable", "dialog-error");
pixbufs[(int)Icon.Protected] = IconThemeUtils.LoadIcon (PixbufSize, "emblem-readonly", "dialog-error");
}
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
index caf6e34..32ebc73 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
@@ -139,7 +139,7 @@ namespace Hyena.Data.Gui.Accessibility
public Gdk.Rectangle GetCellExtents (ColumnCellAccessible cell, Atk.CoordType coord_type)
{
int cache_index = GetCellIndex (cell);
- int minval = int.MinValue;
+ int minval = Int32.MinValue;
if (cache_index == -1)
return new Gdk.Rectangle (minval, minval, minval, minval);
@@ -158,7 +158,7 @@ namespace Hyena.Data.Gui.Accessibility
{
Gdk.Rectangle cell_extents = GetCellExtents (cell, Atk.CoordType.Window);
- if (cell_extents.X == int.MinValue && cell_extents.Y == int.MinValue)
+ if (cell_extents.X == Int32.MinValue && cell_extents.Y == Int32.MinValue)
return false;
return true;
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCell.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCell.cs
index 05cfb2a..237fb23 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCell.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCell.cs
@@ -50,7 +50,7 @@ namespace Hyena.Data.Gui
public virtual string GetTextAlternative (object obj)
{
- return string.Empty;
+ return "";
}
public ColumnCell (string property, bool expand)
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
index ed546d0..8e00b2b 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
@@ -66,7 +66,7 @@ namespace Hyena.Data.Gui
Gdk.Rectangle rectangle = new Gdk.Rectangle (x, y, width, height);
if (clip && !ListAllocation.Contains (rectangle))
- return new Gdk.Rectangle (int.MinValue, int.MinValue, int.MinValue, int.MinValue);
+ return new Gdk.Rectangle (Int32.MinValue, Int32.MinValue, Int32.MinValue, Int32.MinValue);
if (coord_type == Atk.CoordType.Window)
return rectangle;
@@ -83,8 +83,7 @@ namespace Hyena.Data.Gui
public Gdk.Rectangle GetColumnHeaderCellExtents (int column, bool clip, Atk.CoordType coord_type)
{
if (!HeaderVisible)
- return new Gdk.Rectangle (int.MinValue, int.MinValue,
- int.MinValue, int.MinValue);
+ return new Gdk.Rectangle (Int32.MinValue, Int32.MinValue, Int32.MinValue, Int32.MinValue);
int width = GetColumnWidth (column);
int height = HeaderHeight;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]