Start cleanup of KotoLibrary logic and decoupling other components like Music Local from a specific library.
Fix the displaying of discs and tracks in an album on initial index due to missing cartographer add track call. Cleanup lots of double empty newlines. Updated ptr spacing in uncrustify config to enforce consistency in pointer char (`*`) spacing.
This commit is contained in:
parent
8334323af8
commit
bfe4891620
33 changed files with 146 additions and 623 deletions
|
@ -72,12 +72,11 @@ struct _KotoActionBarClass {
|
|||
|
||||
G_DEFINE_TYPE(KotoActionBar, koto_action_bar, G_TYPE_OBJECT);
|
||||
|
||||
KotoActionBar* action_bar;
|
||||
KotoActionBar * action_bar;
|
||||
|
||||
static void koto_action_bar_class_init(KotoActionBarClass * c) {
|
||||
GObjectClass * gobject_class = G_OBJECT_CLASS(c);
|
||||
|
||||
|
||||
actionbar_signals[SIGNAL_CLOSED] = g_signal_new(
|
||||
"closed",
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
|
@ -185,7 +184,6 @@ void koto_action_bar_handle_go_to_artist_button_clicked(
|
|||
(void) button;
|
||||
KotoActionBar * self = data;
|
||||
|
||||
|
||||
if (!KOTO_IS_ACTION_BAR(self)) {
|
||||
return;
|
||||
}
|
||||
|
@ -196,14 +194,12 @@ void koto_action_bar_handle_go_to_artist_button_clicked(
|
|||
|
||||
KotoTrack * selected_track = g_list_nth_data(self->current_list, 0); // Get the first item
|
||||
|
||||
|
||||
if (!KOTO_IS_TRACK(selected_track)) { // Not a track
|
||||
return;
|
||||
}
|
||||
|
||||
gchar * artist_uuid = NULL;
|
||||
|
||||
|
||||
g_object_get(
|
||||
selected_track,
|
||||
"artist-uuid",
|
||||
|
@ -222,7 +218,6 @@ void koto_action_bar_handle_playlists_button_clicked(
|
|||
(void) button;
|
||||
KotoActionBar * self = data;
|
||||
|
||||
|
||||
if (!KOTO_IS_ACTION_BAR(self)) {
|
||||
return;
|
||||
}
|
||||
|
@ -279,7 +274,6 @@ void koto_action_bar_handle_remove_from_playlist_button_clicked(
|
|||
(void) button;
|
||||
KotoActionBar * self = data;
|
||||
|
||||
|
||||
if (!KOTO_IS_ACTION_BAR(self)) {
|
||||
return;
|
||||
}
|
||||
|
@ -294,14 +288,12 @@ void koto_action_bar_handle_remove_from_playlist_button_clicked(
|
|||
|
||||
KotoPlaylist * playlist = koto_cartographer_get_playlist_by_uuid(koto_maps, self->current_playlist_uuid);
|
||||
|
||||
|
||||
if (!KOTO_IS_PLAYLIST(playlist)) { // Not a playlist
|
||||
goto doclose;
|
||||
}
|
||||
|
||||
GList * cur_list;
|
||||
|
||||
|
||||
for (cur_list = self->current_list; cur_list != NULL; cur_list = cur_list->next) { // For each KotoTrack
|
||||
KotoTrack * track = cur_list->data;
|
||||
koto_playlist_remove_track_by_uuid(playlist, koto_track_get_uuid(track)); // Remove this track
|
||||
|
@ -371,7 +363,6 @@ void koto_action_bar_set_tracks_in_playlist_selection(
|
|||
|
||||
gboolean single_selected = g_list_length(tracks) == 1;
|
||||
|
||||
|
||||
koto_action_bar_toggle_go_to_artist_visibility(self, single_selected);
|
||||
koto_action_bar_toggle_play_button_visibility(self, single_selected);
|
||||
gtk_widget_hide(GTK_WIDGET(self->playlists));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue