oh my fucking godj ust comment it out for now
This commit is contained in:
parent
dd0536e5dd
commit
7268b1bacf
3 changed files with 21 additions and 15 deletions
|
@ -101,10 +101,6 @@ class Playbin : Object {
|
||||||
bus.message["stream-start"].connect ((message) => {
|
bus.message["stream-start"].connect ((message) => {
|
||||||
this.stream_counter += 1;
|
this.stream_counter += 1;
|
||||||
|
|
||||||
int64 new_duration;
|
|
||||||
assert (this.playbin.query_duration (Gst.Format.TIME, out new_duration));
|
|
||||||
this.duration = new_duration;
|
|
||||||
|
|
||||||
if (notify_next_transition) {
|
if (notify_next_transition) {
|
||||||
this.song_transition ((string) this.playbin.current_uri);
|
this.song_transition ((string) this.playbin.current_uri);
|
||||||
} else {
|
} else {
|
||||||
|
@ -112,6 +108,12 @@ class Playbin : Object {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
bus.message["async-done"].connect ((message) => {
|
||||||
|
int64 new_duration;
|
||||||
|
assert (this.playbin.query_duration (Gst.Format.TIME, out new_duration));
|
||||||
|
this.duration = new_duration;
|
||||||
|
});
|
||||||
|
|
||||||
bus.message["eos"].connect ((message) => {
|
bus.message["eos"].connect ((message) => {
|
||||||
assert (notify_next_transition);
|
assert (notify_next_transition);
|
||||||
this.playback_finished ();
|
this.playback_finished ();
|
||||||
|
|
|
@ -18,11 +18,11 @@ template $UiPlayQueue: Adw.NavigationPage {
|
||||||
ColumnView view {
|
ColumnView view {
|
||||||
styles [ "data-table" ]
|
styles [ "data-table" ]
|
||||||
|
|
||||||
ColumnViewColumn {
|
//ColumnViewColumn {
|
||||||
factory: SignalListItemFactory {
|
// factory: SignalListItemFactory {
|
||||||
setup => $on_delete_cell_setup ();
|
// setup => $on_delete_cell_setup ();
|
||||||
};
|
// };
|
||||||
}
|
//}
|
||||||
|
|
||||||
ColumnViewColumn {
|
ColumnViewColumn {
|
||||||
title: _("Title");
|
title: _("Title");
|
||||||
|
@ -59,4 +59,3 @@ template $UiPlayQueue: Adw.NavigationPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,14 @@ class Ui.PlayQueueStore : Object, ListModel, Gtk.SelectionModel {
|
||||||
this.playing_index = position;
|
this.playing_index = position;
|
||||||
|
|
||||||
if (previous < this.inner.get_n_items ()) {
|
if (previous < this.inner.get_n_items ()) {
|
||||||
this.selection_changed (previous, 1);
|
if (previous < position) {
|
||||||
|
this.selection_changed (previous, position-previous+1);
|
||||||
|
} else if (previous > position) {
|
||||||
|
this.selection_changed (position, previous-position+1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.selection_changed (position, 1);
|
||||||
}
|
}
|
||||||
this.selection_changed (position, 1);
|
|
||||||
|
|
||||||
this.begin_playback ((Song) this.inner.get_item (this.playing_index));
|
this.begin_playback ((Song) this.inner.get_item (this.playing_index));
|
||||||
this.prepare_next ((Song) this.inner.get_item (this.playing_index+1));
|
this.prepare_next ((Song) this.inner.get_item (this.playing_index+1));
|
||||||
|
@ -168,14 +173,14 @@ public class Ui.PlayQueue : Adw.NavigationPage {
|
||||||
this.store.select_item (this.store.playing_index-1, true);
|
this.store.select_item (this.store.playing_index-1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
[GtkCallback] private void on_delete_cell_setup (Object object) {
|
[GtkCallback] private void on_delete_cell_setup (Object object) {
|
||||||
var cell = (Gtk.ColumnViewCell) object;
|
var cell = (Gtk.ColumnViewCell) object;
|
||||||
var button = new Gtk.Button.from_icon_name ("edit-delete");
|
var button = new Gtk.Button.from_icon_name ("edit-delete");
|
||||||
button.add_css_class ("flat");
|
button.add_css_class ("flat");
|
||||||
button.clicked.connect (() => {
|
button.clicked.connect (() => {
|
||||||
this.store.inner.remove (cell.position);
|
//this.store.inner.remove (cell.position);
|
||||||
});
|
});
|
||||||
cell.child = button;
|
cell.child = button;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue