⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sellyricdlg.c

📁 为audacious写的一个歌词显示插件
💻 C
字号:
/* * * Author: Allan <qimingos_lsk@163.com>, (C) 2005-2007 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA * */#include "../include/ShowLyric.h"#include "../include/SelLyricDlg.h"void SelLyricDlgInit(GladeXML* xml){	glade_xml_signal_connect_data(xml, "on_SelLyricComboxLyrics_changed",			G_CALLBACK(on_SelLyricComboxLyrics_changed), xml);	glade_xml_signal_connect_data(xml, "on_SelLyricBtnOK_clicked",			G_CALLBACK(on_SelLyricBtnOK_clicked), xml);	glade_xml_signal_connect_data(xml, "on_SelLyricBtnCancel_clicked",			G_CALLBACK(on_SelLyricBtnCancel_clicked), xml);}void on_SelLyricComboxLyrics_changed(GtkWidget* widget, GladeXML* xml){	GtkWidget * title = glade_xml_get_widget(xml, "SelLyricLableTitle");	GtkWidget * artist = glade_xml_get_widget(xml, "SelLyricLableArtist");	gchar * id = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));	//LyricDebug("id=%s(%#x, %#x)", id, title, artist);	if (!artist || !title)		return;	GList* pList = g_list_first(theApp._m_ListLyrics);	while (pList)	{		LyricsListItem* pItem = pList->data;		if (strcmp(pItem->szID, id) == 0)		{			gtk_label_set_text(GTK_LABEL(title), pItem->szTitle);			gtk_label_set_text(GTK_LABEL(artist), pItem->szArtist);		}		pList = g_list_next(pList);	}}void on_SelLyricBtnCancel_clicked(GtkWidget* wideget, GladeXML* xml){	GtkWidget* pSelLyricDlg = glade_xml_get_widget(xml, "SelLyricDlg");	gtk_widget_hide(pSelLyricDlg);}/** * \brief  * \param widget * \param user_data */void on_SelLyricBtnOK_clicked(GtkWidget* widget, GladeXML* xml){	GtkWidget* pSelLyricDlg = glade_xml_get_widget(xml, "SelLyricDlg");	gtk_widget_hide(GTK_WIDGET(pSelLyricDlg));	LyricDebug("正在下载歌词......\n");	// 下载歌词	//	SetAppState(AS_DowningLyric); 	GtkWidget * pSelLyricComboxLyrics = glade_xml_get_widget(xml,			"SelLyricComboxLyrics");	GtkWidget * title = glade_xml_get_widget(xml, "SelLyricLableTitle");	GtkWidget * artist = glade_xml_get_widget(xml, "SelLyricLableArtist");	gchar * id =			gtk_combo_box_get_active_text(GTK_COMBO_BOX(pSelLyricComboxLyrics));	if (!title || !artist || !id)		return;	theApp.DownLoadLyric(id, gtk_label_get_text(GTK_LABEL(title)),			gtk_label_get_text(GTK_LABEL(artist)));	g_free(id);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -