banshee r3122 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Hyena.Gui/Hyena.Data.Gui
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3122 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Hyena.Gui/Hyena.Data.Gui
- Date: Thu, 31 Jan 2008 18:41:43 +0000 (GMT)
Author: abock
Date: Thu Jan 31 18:41:43 2008
New Revision: 3122
URL: http://svn.gnome.org/viewvc/banshee?rev=3122&view=rev
Log:
2008-01-31 Aaron Bockover <abock gnome org>
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs:
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
Remove the little speaker icon in the header of the list view that
represents the column which can hold the playback indicator; apparently
this is confusing and may lead to the expectation of it being clickable
and have it do something; fixes BNC #188717
* src/Core/Hyena.Gui/Hyena.Data.Gui/ListView.cs: Do not try to render
a null cell
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
trunk/banshee/src/Core/Hyena.Gui/Hyena.Data.Gui/ListView.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellPlaybackIndicator.cs Thu Jan 31 18:41:43 2008
@@ -43,13 +43,11 @@
private const int pixbuf_size = 16;
private const int pixbuf_spacing = 4;
- private bool is_header;
private Gdk.Pixbuf pixbuf;
private Gdk.Pixbuf pixbuf_paused;
- public ColumnCellPlaybackIndicator (string property, bool isHeader) : base (property,true)
+ public ColumnCellPlaybackIndicator (string property) : base (property, true)
{
- is_header = isHeader;
LoadPixbuf ();
}
@@ -65,13 +63,8 @@
pixbuf_paused = null;
}
- pixbuf = is_header
- ? IconThemeUtils.LoadIcon (pixbuf_size, "audio-volume-high")
- : IconThemeUtils.LoadIcon (pixbuf_size, "media-playback-start");
-
- if (!is_header) {
- pixbuf_paused = IconThemeUtils.LoadIcon (pixbuf_size, "media-playback-pause");
- }
+ pixbuf = IconThemeUtils.LoadIcon (pixbuf_size, "media-playback-start");
+ pixbuf_paused = IconThemeUtils.LoadIcon (pixbuf_size, "media-playback-pause");
}
public override void NotifyThemeChange ()
@@ -81,21 +74,16 @@
public override void Render (CellContext context, StateType state, double cellWidth, double cellHeight)
{
- if (!is_header && !ServiceManager.PlayerEngine.IsPlaying ((TrackInfo)BoundObject)) {
+ if (!ServiceManager.PlayerEngine.IsPlaying ((TrackInfo)BoundObject)) {
return;
}
Gdk.Pixbuf render_pixbuf = pixbuf;
- if (!is_header && ServiceManager.PlayerEngine.CurrentState == PlayerEngineState.Paused) {
+ if (ServiceManager.PlayerEngine.CurrentState == PlayerEngineState.Paused) {
render_pixbuf = pixbuf_paused;
}
- // No idea why this is necessary
- if (is_header) {
- context.Context.Translate (0.5, -0.5);
- } else {
- context.Context.Translate (0, 0.5);
- }
+ context.Context.Translate (0, 0.5);
Cairo.Rectangle pixbuf_area = new Cairo.Rectangle (pixbuf_spacing,
(cellHeight - render_pixbuf.Height) / 2, render_pixbuf.Width, render_pixbuf.Height);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs Thu Jan 31 18:41:43 2008
@@ -47,8 +47,7 @@
column_controller = new ColumnController();
column_controller.AddRange(
- new Column(new ColumnCellPlaybackIndicator(null, true), "indicator",
- new ColumnCellPlaybackIndicator(null, false), 0.05),
+ new Column(null, "indicator", new ColumnCellPlaybackIndicator(null), 0.05),
new SortableColumn("Track", new ColumnCellText("TrackNumber", true), 0.10, "Track"),
new SortableColumn("Artist", new ColumnCellText("ArtistName", true), 0.225, "Artist"),
new SortableColumn("Album", new ColumnCellText("AlbumTitle", true), 0.225, "Album"),
@@ -71,7 +70,10 @@
if (ServiceManager.Contains ("GtkElementsService")) {
ServiceManager.Get<Banshee.Gui.GtkElementsService> ("GtkElementsService").ThemeChanged += delegate {
foreach (Column column in column_controller) {
- column.HeaderCell.NotifyThemeChange ();
+ if (column.HeaderCell != null) {
+ column.HeaderCell.NotifyThemeChange ();
+ }
+
foreach (ColumnCell cell in column) {
cell.NotifyThemeChange ();
}
Modified: trunk/banshee/src/Core/Hyena.Gui/Hyena.Data.Gui/ListView.cs
==============================================================================
--- trunk/banshee/src/Core/Hyena.Gui/Hyena.Data.Gui/ListView.cs (original)
+++ trunk/banshee/src/Core/Hyena.Gui/Hyena.Data.Gui/ListView.cs Thu Jan 31 18:41:43 2008
@@ -781,11 +781,13 @@
}
}
- header_cr.Save ();
- header_cr.Translate (cell_area.X, cell_area.Y);
- cell.Render (new CellContext (header_cr, header_pango_layout, this, header_window,
- graphics, cell_area), StateType.Normal, cell_area.Width, cell_area.Height);
- header_cr.Restore ();
+ if (cell != null) {
+ header_cr.Save ();
+ header_cr.Translate (cell_area.X, cell_area.Y);
+ cell.Render (new CellContext (header_cr, header_pango_layout, this, header_window,
+ graphics, cell_area), StateType.Normal, cell_area.Width, cell_area.Height);
+ header_cr.Restore ();
+ }
if(ci < column_cache.Length - 1) {
graphics.DrawHeaderSeparator(header_cr, header_alloc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]