[Goodies-commits] r6896 - in xfmpc/trunk: . src
Mike Massonnet
mmassonnet at xfce.org
Sat Mar 14 09:41:57 CET 2009
Author: mmassonnet
Date: 2009-03-14 08:41:57 +0000 (Sat, 14 Mar 2009)
New Revision: 6896
Modified:
xfmpc/trunk/ChangeLog
xfmpc/trunk/src/playlist.c
Log:
Add position of the track in the playlist
Modified: xfmpc/trunk/ChangeLog
===================================================================
--- xfmpc/trunk/ChangeLog 2009-03-14 08:33:14 UTC (rev 6895)
+++ xfmpc/trunk/ChangeLog 2009-03-14 08:41:57 UTC (rev 6896)
@@ -1,5 +1,11 @@
2009-03-13 Mike Massonnet <mmassonnet at xfce.org>
+Add position of the track in the playlist
+ * src/playlist.c:
+ - Display the position of track in the playlist on the left
+
+2009-03-13 Mike Massonnet <mmassonnet at xfce.org>
+
Add about dialog in the context menu
* src/extended-interface.c:
- (xfmpc_extended_interface_context_menu_new): New menu item about
Modified: xfmpc/trunk/src/playlist.c
===================================================================
--- xfmpc/trunk/src/playlist.c 2009-03-14 08:33:14 UTC (rev 6895)
+++ xfmpc/trunk/src/playlist.c 2009-03-14 08:41:57 UTC (rev 6896)
@@ -74,6 +74,7 @@
{
COLUMN_ID,
COLUMN_FILENAME,
+ COLUMN_POSITION,
COLUMN_SONG,
COLUMN_LENGTH,
COLUMN_WEIGHT,
@@ -172,6 +173,7 @@
priv->store = gtk_list_store_new (N_COLUMNS,
G_TYPE_INT,
G_TYPE_STRING,
+ G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_INT);
@@ -194,9 +196,20 @@
gtk_tree_view_set_model (GTK_TREE_VIEW (priv->treeview), GTK_TREE_MODEL (priv->filter));
g_object_unref (priv->filter);
- /* Column "artist - title" */
+ /* Column "length" */
GtkCellRenderer *cell = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (cell),
+ "xalign", 1.0,
+ NULL);
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->treeview),
+ -1, "Length", cell,
+ "text", COLUMN_POSITION,
+ "weight", COLUMN_WEIGHT,
+ NULL);
+
+ /* Column "artist - title" */
+ cell = gtk_cell_renderer_text_new ();
+ g_object_set (G_OBJECT (cell),
"ellipsize", PANGO_ELLIPSIZE_END,
NULL);
GtkTreeViewColumn *column =
@@ -321,6 +334,7 @@
gtk_list_store_set (priv->store, &iter,
COLUMN_ID, id,
COLUMN_FILENAME, filename,
+ COLUMN_POSITION, id + 1,
COLUMN_SONG, song,
COLUMN_LENGTH, length,
COLUMN_WEIGHT, PANGO_WEIGHT_NORMAL,
More information about the Goodies-commits
mailing list