summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-21 21:21:09 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-21 21:21:09 +0100
commitc88b07cd7a1380482fad62ac6f1716f2ff3524e7 (patch)
tree44c25d17e4b17979f4be43034482e0a847c40820 /plugins
parent439db34d8cbd2c558829eac501279adb83dddb95 (diff)
added filenumber column
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c8
-rw-r--r--plugins/gtkui/deadbeef.glade3
-rw-r--r--plugins/gtkui/gtkplaylist.c2
-rw-r--r--plugins/gtkui/interface.c1
-rw-r--r--plugins/notification/notification.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 818399fe..603c5267 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1790,9 +1790,9 @@ on_add_column_activate (GtkMenuItem *menuitem,
if (response == GTK_RESPONSE_OK) {
const gchar *title = gtk_entry_get_text (GTK_ENTRY (lookup_widget (dlg, "title")));
const gchar *format = gtk_entry_get_text (GTK_ENTRY (lookup_widget (dlg, "format")));
- int id = gtk_combo_box_get_active (GTK_COMBO_BOX (lookup_widget (dlg, "id"))) + 1;
+ int id = gtk_combo_box_get_active (GTK_COMBO_BOX (lookup_widget (dlg, "id")));
int align = gtk_combo_box_get_active (GTK_COMBO_BOX (lookup_widget (dlg, "align")));
- if (id > DB_COLUMN_ID_MAX) {
+ if (id >= DB_COLUMN_ID_MAX) {
id = -1;
}
gtkpl_column_insert_before (ps, ps->active_column, gtkpl_column_alloc (title, 100, id, format, align));
@@ -1882,13 +1882,13 @@ on_column_id_changed (GtkComboBox *combobox,
trace ("failed to get toplevel widget for column id combobox\n");
return;
}
- int act = gtk_combo_box_get_active (combobox) + 1;
+ int act = gtk_combo_box_get_active (combobox);
GtkWidget *fmt = lookup_widget (toplevel, "format");
if (!fmt) {
trace ("failed to get column format widget\n");
return;
}
- gtk_widget_set_sensitive (fmt, act > DB_COLUMN_ID_MAX ? TRUE : FALSE);
+ gtk_widget_set_sensitive (fmt, act >= DB_COLUMN_ID_MAX ? TRUE : FALSE);
}
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index cfd07055..35166688 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -3218,7 +3218,8 @@ SOCKS5_HOSTNAME</property>
<child>
<widget class="GtkComboBox" id="id">
<property name="visible">True</property>
- <property name="items" translatable="yes">Playing
+ <property name="items" translatable="yes">File number
+Playing
Artist - Album
Artist
Album
diff --git a/plugins/gtkui/gtkplaylist.c b/plugins/gtkui/gtkplaylist.c
index 762be03f..22fcf630 100644
--- a/plugins/gtkui/gtkplaylist.c
+++ b/plugins/gtkui/gtkplaylist.c
@@ -396,7 +396,7 @@ gtkpl_draw_pl_row (gtkplaylist_t *ps, int row, DB_playItem_t *it) {
}
else {
char text[1024];
- deadbeef->pl_format_title (it, text, sizeof (text), c->id, c->format);
+ deadbeef->pl_format_title (it, row, text, sizeof (text), c->id, c->format);
if (c->align_right) {
draw_text (x+5, row * rowheight - ps->scrollpos * rowheight + rowheight/2 - draw_get_font_size ()/2 - 2, c->width-10, 1, text);
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 0b614e97..1ce72388 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -2083,6 +2083,7 @@ create_editcolumndlg (void)
gtk_table_attach (GTK_TABLE (table9), id, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (id), "File number");
gtk_combo_box_append_text (GTK_COMBO_BOX (id), "Playing");
gtk_combo_box_append_text (GTK_COMBO_BOX (id), "Artist - Album");
gtk_combo_box_append_text (GTK_COMBO_BOX (id), "Artist");
diff --git a/plugins/notification/notification.c b/plugins/notification/notification.c
index a55effdd..dc5b669f 100644
--- a/plugins/notification/notification.c
+++ b/plugins/notification/notification.c
@@ -16,7 +16,7 @@ static void
show_notification (DB_playItem_t *track)
{
char cmd [1024];
- deadbeef->pl_format_title (track, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("notification.command", DEFAULT_COMMAND));
+ deadbeef->pl_format_title (track, -1, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("notification.command", DEFAULT_COMMAND));
//system (cmd);
}