Apply formatting

This commit is contained in:
Joshua Strobl 2021-05-27 13:03:24 +03:00
parent fa19fd23b1
commit 4cc5c6efd4
9 changed files with 66 additions and 35 deletions

View file

@ -217,7 +217,10 @@ static void koto_config_set_property(
/**
* Load our TOML file from the specified path into our KotoConfig
**/
void koto_config_load(KotoConfig * self, gchar *path) {
void koto_config_load(
KotoConfig * self,
gchar * path
) {
if (!koto_utils_is_string_valid(path)) { // Path is not valid
return;
}
@ -248,7 +251,8 @@ void koto_config_load(KotoConfig * self, gchar *path) {
GError * file_info_query_err;
GFileInfo * file_info = g_file_query_info( // Get the size of our TOML file
GFileInfo * file_info = g_file_query_info(
// Get the size of our TOML file
self->config_file,
G_FILE_ATTRIBUTE_STANDARD_SIZE,
G_FILE_QUERY_INFO_NONE,
@ -367,7 +371,13 @@ monitor:
}
}
void koto_config_monitor_handle_changed(GFileMonitor * monitor, GFile * file, GFile *other_file, GFileMonitorEvent ev, gpointer user_data) {
void koto_config_monitor_handle_changed(
GFileMonitor * monitor,
GFile * file,
GFile * other_file,
GFileMonitorEvent ev,
gpointer user_data
) {
(void) monitor;
(void) file;
(void) other_file;

View file

@ -30,9 +30,21 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(KotoConfig, koto_config, KOTO, CONFIG, GObject)
KotoConfig* koto_config_new();
void koto_config_load(KotoConfig * self, gchar *path);
void koto_config_monitor_handle_changed(GFileMonitor * monitor, GFile * file, GFile *other_file, GFileMonitorEvent ev, gpointer user_data);
void koto_config_load(
KotoConfig * self,
gchar * path
);
void koto_config_monitor_handle_changed(
GFileMonitor * monitor,
GFile * file,
GFile * other_file,
GFileMonitorEvent ev,
gpointer user_data
);
void koto_config_refresh(KotoConfig * self);
void koto_config_save(KotoConfig * self);
G_END_DECLS

View file

@ -65,7 +65,6 @@ static void koto_library_set_property(
static void koto_library_class_init(KotoLibraryClass * c) {
GObjectClass * gobject_class;
gobject_class = G_OBJECT_CLASS(c);
gobject_class->set_property = koto_library_set_property;
gobject_class->get_property = koto_library_get_property;
@ -99,7 +98,6 @@ void koto_library_add_artist(
gchar * artist_name;
gchar * artist_uuid;
g_object_get(artist, "name", &artist_name, "uuid", &artist_uuid, NULL);
if (g_hash_table_contains(self->music_artists, artist_name)) { // Already have the artist
@ -122,7 +120,6 @@ KotoArtist * koto_library_get_artist(
gchar * artist_uuid = g_hash_table_lookup(self->music_artists, artist_name); // Get the UUID from our music artists
if (artist_uuid != NULL) {
KotoArtist * artist = koto_cartographer_get_artist_by_uuid(koto_maps, artist_uuid); // Return any artist from cartographer
return artist;

View file

@ -158,7 +158,11 @@ void koto_window_add_page(
gtk_stack_add_named(GTK_STACK(self->pages), page, page_name);
}
void koto_window_manage_style(KotoConfig * c, guint prop_id, KotoWindow * self) {
void koto_window_manage_style(
KotoConfig * c,
guint prop_id,
KotoWindow * self
) {
(void) prop_id;
if (!KOTO_IS_WINDOW(self)) { // Not a Koto Window

View file

@ -287,7 +287,11 @@ void koto_playback_engine_backwards(KotoPlaybackEngine * self) {
koto_playback_engine_set_track_by_uuid(self, koto_playlist_go_to_previous(playlist), FALSE);
}
void koto_playback_engine_current_playlist_changed(KotoCurrentPlaylist * current_pl, guint prop_id, KotoPlaybackEngine *self) {
void koto_playback_engine_current_playlist_changed(
KotoCurrentPlaylist * current_pl,
guint prop_id,
KotoPlaybackEngine * self
) {
(void) current_pl;
(void) prop_id;

View file

@ -52,7 +52,11 @@ void koto_playback_engine_apply_configuration_state(
void koto_playback_engine_backwards(KotoPlaybackEngine * self);
void koto_playback_engine_current_playlist_changed(KotoCurrentPlaylist * current_pl, guint prop_id, KotoPlaybackEngine *self);
void koto_playback_engine_current_playlist_changed(
KotoCurrentPlaylist * current_pl,
guint prop_id,
KotoPlaybackEngine * self
);
void koto_playback_engine_forwards(KotoPlaybackEngine * self);