From 35ba165ddda82d0917890330de3d5f193d7ec6f0 Mon Sep 17 00:00:00 2001 From: daleclack Date: Mon, 13 May 2024 23:30:52 +0800 Subject: [PATCH] Rename a function for gtk154 --- Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp | 4 ++-- Gtk4/gtk154_mediaplayer3/src/LyricsParser.h | 2 +- Gtk4/gtk154_mediaplayer3/src/MyMediaPlayer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp index 3e172f3..71ea3d8 100644 --- a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp +++ b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.cpp @@ -150,7 +150,7 @@ static void get_lyrics_line(const char *lyrics, char *lyrics_line1, gboolean res } // Update lyrics -void update_lyrics(MyMediaPlayer *player) +void load_lyrics(MyMediaPlayer *player) { // Get position between filename and extension int point_pos; @@ -365,7 +365,7 @@ static gboolean get_media_stream_status(MyMediaPlayer *player, if (timestamp == 0 && !lyrics_updated && !lyrics_loaded) { // Load lyrics when a new media loaded - update_lyrics(player); + load_lyrics(player); } if (get_media_playing(timestamp, stream, player)) diff --git a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.h b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.h index a117f41..f7440a2 100644 --- a/Gtk4/gtk154_mediaplayer3/src/LyricsParser.h +++ b/Gtk4/gtk154_mediaplayer3/src/LyricsParser.h @@ -6,4 +6,4 @@ gboolean lyric_time_func(gpointer data); // Update lyrics file when a music will play -void update_lyrics(MyMediaPlayer *player); +void load_lyrics(MyMediaPlayer *player); diff --git a/Gtk4/gtk154_mediaplayer3/src/MyMediaPlayer.cpp b/Gtk4/gtk154_mediaplayer3/src/MyMediaPlayer.cpp index 2fc1935..5b42b44 100644 --- a/Gtk4/gtk154_mediaplayer3/src/MyMediaPlayer.cpp +++ b/Gtk4/gtk154_mediaplayer3/src/MyMediaPlayer.cpp @@ -262,7 +262,7 @@ static void load_audio(MyItem *item, MyMediaPlayer *player) g_free(label_str); // Force update lyrics file - update_lyrics(player); + load_lyrics(player); // Enable control button gtk_widget_set_sensitive(player->btn_play, TRUE);