After repocopy from audio/traymp, add gmpc, a tray-aware GTK2-client for MPD,

the Music Player Daemon. This superceeds traymp from the same author.

PR:		ports/66577
Submitted by:	Mark Daniel Reidel <ports@mark.reidel.info> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-05-16 21:47:21 +00:00
parent 4c913eb49e
commit 2363a28abe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109297
16 changed files with 21 additions and 385 deletions

1
MOVED
View file

@ -1085,3 +1085,4 @@ databases/zpygresqlda||2004-05-14|depended on obsolete versions of Zope and Pyth
lang/ruby-python||2004-05-14|obsolete now that there are so many Ruby libraries
lang/tclX80|lang/tclX|2004-05-14|replaced by lang/tclX
misc/libelysium||2004-05-14|ancient version of this software
audio/traymp|audio/gmpc|2004-05-16|project renamed

View file

@ -117,6 +117,7 @@
SUBDIR += gkrellmvolume2
SUBDIR += glame
SUBDIR += gmixer
SUBDIR += gmpc
SUBDIR += gnapster
SUBDIR += gnomeaudio2
SUBDIR += gnomemedia2
@ -360,7 +361,6 @@
SUBDIR += toolame
SUBDIR += tosha
SUBDIR += tracker
SUBDIR += traymp
SUBDIR += trm
SUBDIR += trommler
SUBDIR += tuneradio

View file

@ -1,13 +1,13 @@
# New ports collection makefile for: traymp
# Date created: Oct 09 2003
# New ports collection makefile for: gmpc
# Date created: May 12 2004
# Whom: Mark Reidel <ports@mark.reidel.info>
#
# $FreeBSD$
#
PORTNAME= traymp
PORTVERSION= 0.12
PORTREVISION= 2
PORTNAME= gmpc
PORTVERSION= 0.10.1
PORTEPOCH= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= musicpd
@ -22,23 +22,4 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS+= -I${PREFIX}/include
.include <bsd.port.pre.mk>
.ifdef(WITH_XOSD)
CONFIGURE_ARGS+=--enable-xosd
LIB_DEPENDS+=xosd.4:${PORTSDIR}/misc/xosd
.endif
pre-everything::
.ifndef(WITH_XOSD)
@${ECHO} "You can build ${PKGNAME} with the following option:"
@${ECHO}
@${ECHO} "WITH_XOSD Make use of on-screen-display"
@${ECHO}
@sleep 3
.endif
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
MD5 (traymp-0.12.tar.gz) = 460ab9e72ff6ca522caa9a2c9e31a39b
SIZE (traymp-0.12.tar.gz) = 78528
MD5 (gmpc-0.10.1.tar.gz) = 821d816d04cd2c61c9890fe33790eab2
SIZE (gmpc-0.10.1.tar.gz) = 88800

View file

@ -1,115 +0,0 @@
--- src/playlist.c.orig Thu Aug 28 17:46:31 2003
+++ src/playlist.c Mon Nov 17 19:08:53 2003
@@ -41,9 +41,9 @@
void switch_advanced()
{
int height;
+ GtkRequisition requisition;
gtk_window_get_size(GTK_WINDOW(glade_xml_get_widget(xml, "playlist_win")), NULL, &height);
- GtkRequisition requisition;
gtk_widget_get_child_requisition
(glade_xml_get_widget(xml, "vbox1"),
&requisition);
@@ -368,10 +368,12 @@
{
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(playlists);
+ GtkWidget *entry;
+ const gchar *buf;
if(!insetting.update_timeout) return;
insetting.update_timeout = FALSE;
- GtkWidget *entry = glade_xml_get_widget(xml, "playlist_name");
- const gchar *buf = gtk_entry_get_text(GTK_ENTRY(entry));
+ entry = glade_xml_get_widget(xml, "playlist_name");
+ buf = gtk_entry_get_text(GTK_ENTRY(entry));
if(strlen(buf) == 0) return;
if(gtk_tree_model_get_iter_first(model, &iter))
{
@@ -413,12 +415,14 @@
/** remove's the selected playlist */
void delete_playlist()
{
- if(!insetting.update_timeout) return;
- insetting.update_timeout = FALSE;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GtkWidget *tree = glade_xml_get_widget(xml, "tree_playlists");
- GtkTreeModel *model = GTK_TREE_MODEL(playlists);
+ GtkWidget *tree;
+ GtkTreeModel *model;
+ if(!insetting.update_timeout) return;
+ insetting.update_timeout = FALSE;
+ tree = glade_xml_get_widget(xml, "tree_playlists");
+ model = GTK_TREE_MODEL(playlists);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
if(gtk_tree_selection_get_selected(selection, &model, &iter))
{
@@ -474,12 +478,14 @@
void search_songs()
{
mpd_InfoEntity *entity;
- gtk_list_store_clear(searchlist);
GtkWidget *entry;
- GtkWidget *progress = start_progress("Loading search results");
+ GtkWidget *progress;
int i=0, option =0;
+ const gchar *entryb;
+ gtk_list_store_clear(searchlist);
+ progress = start_progress("Loading search results");
entry = glade_xml_get_widget(xml, "search_entry");
- const gchar *entryb = gtk_entry_get_text(GTK_ENTRY(entry));
+ entryb = gtk_entry_get_text(GTK_ENTRY(entry));
if(gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 0) option = MPD_TABLE_ARTIST;
else if (gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 1) option = MPD_TABLE_ALBUM;
else if (gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 2) option = MPD_TABLE_TITLE;
@@ -491,8 +497,9 @@
while((entity = mpd_getNextInfoEntity(connection)))
{
GtkTreeIter iter;
+ char *buf;
check_error();
- char *buf = g_path_get_basename(entity->info.song->file);
+ buf = g_path_get_basename(entity->info.song->file);
if(!(i % 50))
{
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progress));
@@ -640,12 +647,15 @@
void load_albums()
{
char *buf, *artist;
- gtk_list_store_clear(id3_album);
GtkTreeIter iter;
- GtkTreeModel *model = GTK_TREE_MODEL(id3_artist);
- GtkTreeSelection *selection = gtk_tree_view_get_selection((GtkTreeView *)glade_xml_get_widget(xml, "tree_artist"));
- GtkWidget *progress = start_progress("Loading albums");
+ GtkTreeModel *model;
+ GtkTreeSelection *selection;
+ GtkWidget *progress;
int i =0;
+ gtk_list_store_clear(id3_album);
+ model = GTK_TREE_MODEL(id3_artist);
+ selection = gtk_tree_view_get_selection((GtkTreeView *)glade_xml_get_widget(xml, "tree_artist"));
+ progress = start_progress("Loading albums");
if(!gtk_tree_selection_get_selected(selection, &model, &iter)) return;
else gtk_tree_model_get(model , &iter, 0,&artist,-1);
if(!strcmp(artist, "All")) mpd_sendListCommand(connection, MPD_TABLE_ALBUM, NULL);
@@ -1092,11 +1102,14 @@
mpd_InfoEntity *entity;
gchar *entryb,*buf = NULL;
GPatternSpec *spec;
- gtk_list_store_clear(curlist);
- GtkWidget *progress= start_progress("Loading songs in current playlist");
- int option = gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "optionmenufilter")));
- GtkWidget *entry = glade_xml_get_widget(xml, "entryfilter");
+ GtkWidget *progress;
+ int option;
+ GtkWidget *entry;
int i=0, rate = 50;
+ gtk_list_store_clear(curlist);
+ progress= start_progress("Loading songs in current playlist");
+ option = gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "optionmenufilter")));
+ entry = glade_xml_get_widget(xml, "entryfilter");
/* if there is a playlistlength set the update rate to every 2.5 % */
if(status->playlistLength != -1) rate = (int)(status->playlistLength/40 + 1);
/* this is needed to get the right number of songs in the playlist */

View file

@ -1,13 +0,0 @@
--- src/tray.c.orig Mon Nov 17 16:44:33 2003
+++ src/tray.c Mon Nov 17 16:44:51 2003
@@ -117,9 +117,9 @@
/* handle the click event on the tray icon */
int tray_clicked(GtkWidget *image, GdkEventButton *event){
+ char *buf;
if(!insetting.update_timeout) return 1;
insetting.update_timeout = FALSE;
- char *buf;
if(tray_icon == NULL) return 1;
insetting.update_timeout = TRUE; /* where done.. no need to wait */
check_error();

View file

@ -1,5 +1,5 @@
A tray-aware GTK2-client for MPD, the Music Player Daemon.
Traymp connects to a MPD running on a machine via a network.
gmpc connects to a MPD running on a machine via a network.
Read more about MPD on http://www.musicpd.org
You have to install musicpd somewhere in your network to

View file

@ -1,10 +0,0 @@
************************************************************
The traymp package has been successfully installed.
In order to connect to the MPD server, you need to set
MPD_HOST and MPD_PORT in your environment according to
where musicpd runs.
************************************************************

View file

@ -1,13 +1,10 @@
bin/traymp
share/pixmaps/traymp/tray.png
share/pixmaps/traymp/tray-play.png
share/pixmaps/traymp/media-play.png
share/pixmaps/traymp/media-pause.png
share/pixmaps/traymp/media-next.png
share/pixmaps/traymp/media-prev.png
share/pixmaps/traymp/media-stop.png
share/pixmaps/traymp/tray-pause.png
share/traymp/playlist.glade
@dirrm share/pixmaps/traymp
@dirrm share/pixmaps
@dirrm share/traymp
bin/gmpc
share/gmpc/tray.png
share/gmpc/media-play.png
share/gmpc/media-pause.png
share/gmpc/media-next.png
share/gmpc/media-prev.png
share/gmpc/gmpc-tray.png
share/gmpc/media-stop.png
share/gmpc/gmpc.glade
@dirrm share/gmpc

View file

@ -1,44 +0,0 @@
# New ports collection makefile for: traymp
# Date created: Oct 09 2003
# Whom: Mark Reidel <ports@mark.reidel.info>
#
# $FreeBSD$
#
PORTNAME= traymp
PORTVERSION= 0.12
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= musicpd
MAINTAINER= ports@mark.reidel.info
COMMENT= Tray-aware GTK2 client for musicpd
GNU_CONFIGURE= yes
USE_GNOME= glib20 gtk20 libglade2
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
CFLAGS+= -I${PREFIX}/include
.include <bsd.port.pre.mk>
.ifdef(WITH_XOSD)
CONFIGURE_ARGS+=--enable-xosd
LIB_DEPENDS+=xosd.4:${PORTSDIR}/misc/xosd
.endif
pre-everything::
.ifndef(WITH_XOSD)
@${ECHO} "You can build ${PKGNAME} with the following option:"
@${ECHO}
@${ECHO} "WITH_XOSD Make use of on-screen-display"
@${ECHO}
@sleep 3
.endif
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View file

@ -1,2 +0,0 @@
MD5 (traymp-0.12.tar.gz) = 460ab9e72ff6ca522caa9a2c9e31a39b
SIZE (traymp-0.12.tar.gz) = 78528

View file

@ -1,115 +0,0 @@
--- src/playlist.c.orig Thu Aug 28 17:46:31 2003
+++ src/playlist.c Mon Nov 17 19:08:53 2003
@@ -41,9 +41,9 @@
void switch_advanced()
{
int height;
+ GtkRequisition requisition;
gtk_window_get_size(GTK_WINDOW(glade_xml_get_widget(xml, "playlist_win")), NULL, &height);
- GtkRequisition requisition;
gtk_widget_get_child_requisition
(glade_xml_get_widget(xml, "vbox1"),
&requisition);
@@ -368,10 +368,12 @@
{
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(playlists);
+ GtkWidget *entry;
+ const gchar *buf;
if(!insetting.update_timeout) return;
insetting.update_timeout = FALSE;
- GtkWidget *entry = glade_xml_get_widget(xml, "playlist_name");
- const gchar *buf = gtk_entry_get_text(GTK_ENTRY(entry));
+ entry = glade_xml_get_widget(xml, "playlist_name");
+ buf = gtk_entry_get_text(GTK_ENTRY(entry));
if(strlen(buf) == 0) return;
if(gtk_tree_model_get_iter_first(model, &iter))
{
@@ -413,12 +415,14 @@
/** remove's the selected playlist */
void delete_playlist()
{
- if(!insetting.update_timeout) return;
- insetting.update_timeout = FALSE;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GtkWidget *tree = glade_xml_get_widget(xml, "tree_playlists");
- GtkTreeModel *model = GTK_TREE_MODEL(playlists);
+ GtkWidget *tree;
+ GtkTreeModel *model;
+ if(!insetting.update_timeout) return;
+ insetting.update_timeout = FALSE;
+ tree = glade_xml_get_widget(xml, "tree_playlists");
+ model = GTK_TREE_MODEL(playlists);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
if(gtk_tree_selection_get_selected(selection, &model, &iter))
{
@@ -474,12 +478,14 @@
void search_songs()
{
mpd_InfoEntity *entity;
- gtk_list_store_clear(searchlist);
GtkWidget *entry;
- GtkWidget *progress = start_progress("Loading search results");
+ GtkWidget *progress;
int i=0, option =0;
+ const gchar *entryb;
+ gtk_list_store_clear(searchlist);
+ progress = start_progress("Loading search results");
entry = glade_xml_get_widget(xml, "search_entry");
- const gchar *entryb = gtk_entry_get_text(GTK_ENTRY(entry));
+ entryb = gtk_entry_get_text(GTK_ENTRY(entry));
if(gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 0) option = MPD_TABLE_ARTIST;
else if (gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 1) option = MPD_TABLE_ALBUM;
else if (gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "search_type_selector"))) == 2) option = MPD_TABLE_TITLE;
@@ -491,8 +497,9 @@
while((entity = mpd_getNextInfoEntity(connection)))
{
GtkTreeIter iter;
+ char *buf;
check_error();
- char *buf = g_path_get_basename(entity->info.song->file);
+ buf = g_path_get_basename(entity->info.song->file);
if(!(i % 50))
{
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progress));
@@ -640,12 +647,15 @@
void load_albums()
{
char *buf, *artist;
- gtk_list_store_clear(id3_album);
GtkTreeIter iter;
- GtkTreeModel *model = GTK_TREE_MODEL(id3_artist);
- GtkTreeSelection *selection = gtk_tree_view_get_selection((GtkTreeView *)glade_xml_get_widget(xml, "tree_artist"));
- GtkWidget *progress = start_progress("Loading albums");
+ GtkTreeModel *model;
+ GtkTreeSelection *selection;
+ GtkWidget *progress;
int i =0;
+ gtk_list_store_clear(id3_album);
+ model = GTK_TREE_MODEL(id3_artist);
+ selection = gtk_tree_view_get_selection((GtkTreeView *)glade_xml_get_widget(xml, "tree_artist"));
+ progress = start_progress("Loading albums");
if(!gtk_tree_selection_get_selected(selection, &model, &iter)) return;
else gtk_tree_model_get(model , &iter, 0,&artist,-1);
if(!strcmp(artist, "All")) mpd_sendListCommand(connection, MPD_TABLE_ALBUM, NULL);
@@ -1092,11 +1102,14 @@
mpd_InfoEntity *entity;
gchar *entryb,*buf = NULL;
GPatternSpec *spec;
- gtk_list_store_clear(curlist);
- GtkWidget *progress= start_progress("Loading songs in current playlist");
- int option = gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "optionmenufilter")));
- GtkWidget *entry = glade_xml_get_widget(xml, "entryfilter");
+ GtkWidget *progress;
+ int option;
+ GtkWidget *entry;
int i=0, rate = 50;
+ gtk_list_store_clear(curlist);
+ progress= start_progress("Loading songs in current playlist");
+ option = gtk_option_menu_get_history(GTK_OPTION_MENU(glade_xml_get_widget(xml, "optionmenufilter")));
+ entry = glade_xml_get_widget(xml, "entryfilter");
/* if there is a playlistlength set the update rate to every 2.5 % */
if(status->playlistLength != -1) rate = (int)(status->playlistLength/40 + 1);
/* this is needed to get the right number of songs in the playlist */

View file

@ -1,13 +0,0 @@
--- src/tray.c.orig Mon Nov 17 16:44:33 2003
+++ src/tray.c Mon Nov 17 16:44:51 2003
@@ -117,9 +117,9 @@
/* handle the click event on the tray icon */
int tray_clicked(GtkWidget *image, GdkEventButton *event){
+ char *buf;
if(!insetting.update_timeout) return 1;
insetting.update_timeout = FALSE;
- char *buf;
if(tray_icon == NULL) return 1;
insetting.update_timeout = TRUE; /* where done.. no need to wait */
check_error();

View file

@ -1,8 +0,0 @@
A tray-aware GTK2-client for MPD, the Music Player Daemon.
Traymp connects to a MPD running on a machine via a network.
Read more about MPD on http://www.musicpd.org
You have to install musicpd somewhere in your network to
make use of this program.
WWW: http://www.musicpd.org

View file

@ -1,10 +0,0 @@
************************************************************
The traymp package has been successfully installed.
In order to connect to the MPD server, you need to set
MPD_HOST and MPD_PORT in your environment according to
where musicpd runs.
************************************************************

View file

@ -1,13 +0,0 @@
bin/traymp
share/pixmaps/traymp/tray.png
share/pixmaps/traymp/tray-play.png
share/pixmaps/traymp/media-play.png
share/pixmaps/traymp/media-pause.png
share/pixmaps/traymp/media-next.png
share/pixmaps/traymp/media-prev.png
share/pixmaps/traymp/media-stop.png
share/pixmaps/traymp/tray-pause.png
share/traymp/playlist.glade
@dirrm share/pixmaps/traymp
@dirrm share/pixmaps
@dirrm share/traymp