summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 653b7f9)
raw | patch | inline | side by side (parent: 653b7f9)
author | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Fri, 5 Jan 2007 10:39:17 +0000 (10:39 +0000) | ||
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Fri, 5 Jan 2007 10:39:17 +0000 (10:39 +0000) |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5220 09075e82-0dd4-0310-85a5-a0d7c8717e4f
src/main.c | patch | blob | history | |
src/src_lyrics.c | patch | blob | history | |
src/src_lyrics.h | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index ed7c70cc76d860b45453f3542a8156bb3592f130..934882244156d3a2d312bf8bd2f52e5e3e48df1d 100644 (file)
--- a/src/main.c
+++ b/src/main.c
ncurses_init();
if(options->show_splash == TRUE) draw_splash();
- init_src_lyr ();
+ src_lyr_init ();
/* connect to our music player daemon */
mpd = mpdclient_new();
diff --git a/src/src_lyrics.c b/src/src_lyrics.c
index ee7c852ea67ed9124f168f5d8eae881708ed48ed..8ce9937dde433eaf37152d6b6791301e721e25a0 100644 (file)
--- a/src/src_lyrics.c
+++ b/src/src_lyrics.c
*
*/
-#include "src_lyrics.h"
-#include <options.h>
#include <unistd.h>
+#include <string.h>
+
#include "../config.h"
+#include "src_lyrics.h"
-#define PLUGIN_DIR_USER "/home/andi/.ncmpc/plugins"
+#define PLUGIN_DIR_USER "/.ncmpc/plugins"
int get_text_line(formed_text *text, int num, char *dest, int len)
{
int register_lyr_hd (src_lyr *source_descriptor);
#endif
-int init_src_lyr_stack ()
+int src_lyr_stack_init ()
{
src_lyr_stack = g_array_new (TRUE, FALSE, sizeof (src_lyr*));
#endif
#ifndef DISABLE_PLUGIN_SYSTEM
+
src_lyr_plugins_load ();
#endif
}
-int init_src_lyr ()
+int src_lyr_init ()
{
- init_src_lyr_stack();
+ src_lyr_stack_init ();
int i = 0;
while (g_array_index (src_lyr_stack, src_lyr*, i) != NULL)
if (plugin_dir == NULL)
return -1;
src_lyr_plugins_load_from_dir (plugin_dir);
+
+ GString *user_dir_path;
+ user_dir_path = g_string_new (g_get_home_dir());
+ g_string_append (user_dir_path, PLUGIN_DIR_USER);
- plugin_dir = g_dir_open (PLUGIN_DIR_USER, 0, NULL);
+ plugin_dir = g_dir_open (user_dir_path->str, 0, NULL);
if (plugin_dir == NULL)
return -1;
src_lyr_plugins_load_from_dir (plugin_dir);
diff --git a/src/src_lyrics.h b/src/src_lyrics.h
index dd52e72828dd4eb3612d7df770f2c0f193b43cf8..140906e26f4259ca36f6add45791e9e015cb6e16 100644 (file)
--- a/src/src_lyrics.h
+++ b/src/src_lyrics.h
GArray *src_lyr_stack;
-int init_src_lyr_stack ();
-int init_src_lyr ();
+int src_lyr_stack_init ();
+int src_lyr_init ();
int get_lyr_by_src (int priority, char *artist, char *title);
#endif