summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-10-20 22:04:31 +0200
committerGravatar waker <wakeroid@gmail.com>2010-10-20 22:04:31 +0200
commit47f411b6964dc2f0af7d0f35ac0016204f1d9e96 (patch)
treeb32de71a60fa8961b67f76bb8a4510f9cac9d47c /plugins/gtkui
parent4886787e05f757a602f077e436a9b6f8b929ae3d (diff)
added portable build mode (--enable-portable configure option)
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/callbacks.c12
-rw-r--r--plugins/gtkui/coverart.c7
-rw-r--r--plugins/gtkui/gtkui.c3
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 58a3da41..7ca76d0c 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -689,7 +689,7 @@ on_help1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", _("help.txt"));
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), _("help.txt"));
show_info_window (fname, _("Help"), &helpwindow);
}
@@ -702,7 +702,7 @@ on_about1_activate (GtkMenuItem *menuitem,
char s[200];
snprintf (s, sizeof (s), _("About DeaDBeeF %s"), VERSION);
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", "about.txt");
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), "about.txt");
show_info_window (fname, s, &aboutwindow);
}
@@ -715,7 +715,7 @@ on_changelog1_activate (GtkMenuItem *menuitem,
char s[200];
snprintf (s, sizeof (s), _("DeaDBeeF %s ChangeLog"), VERSION);
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", "ChangeLog");
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), "ChangeLog");
show_info_window (fname, s, &changelogwindow);
}
@@ -726,7 +726,7 @@ on_gpl1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", "COPYING.GPLv2");
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), "COPYING.GPLv2");
show_info_window (fname, "GNU GENERAL PUBLIC LICENSE Version 2", &gplwindow);
}
@@ -737,7 +737,7 @@ on_lgpl1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", "COPYING.LGPLv2.1");
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), "COPYING.LGPLv2.1");
show_info_window (fname, "GNU LESSER GENERAL PUBLIC LICENSE Version 2.1", &lgplwindow);
}
@@ -1079,7 +1079,7 @@ on_translators1_activate (GtkMenuItem *menuitem,
char s[200];
snprintf (s, sizeof (s), _("DeaDBeeF Translators"));
char fname[PATH_MAX];
- snprintf (fname, sizeof (fname), DOCDIR "/%s", "translators.txt");
+ snprintf (fname, sizeof (fname), "%s/%s", deadbeef->get_doc_dir (), "translators.txt");
show_info_window (fname, s, &translatorswindow);
}
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c
index 7fb50554..ffd2c2b2 100644
--- a/plugins/gtkui/coverart.c
+++ b/plugins/gtkui/coverart.c
@@ -25,8 +25,6 @@
#include "../artwork/artwork.h"
#include "gtkui.h"
-#define DEFAULT_COVER_PATH (PREFIX "/share/deadbeef/pixmaps/noartwork.jpg")
-
//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
#define trace(...)
@@ -151,9 +149,10 @@ loading_thread (void *none) {
g_error_free (error);
error = NULL;
}
- pixbuf = gdk_pixbuf_new_from_file_at_scale (DEFAULT_COVER_PATH, queue->width, queue->width, TRUE, &error);
+ const char *defpath = coverart_plugin->get_default_cover ();
+ pixbuf = gdk_pixbuf_new_from_file_at_scale (defpath, queue->width, queue->width, TRUE, &error);
if (!pixbuf) {
- fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", DEFAULT_COVER_PATH, queue->width, error->message);
+ fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", defpath, queue->width, error->message);
}
}
if (error) {
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index ae7ce4ee..2dd40a73 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -899,7 +899,8 @@ void
gtkui_thread (void *ctx) {
// let's start some gtk
g_thread_init (NULL);
- add_pixmap_directory (PREFIX "/share/deadbeef/pixmaps");
+// add_pixmap_directory (PREFIX "/share/deadbeef/pixmaps");
+ add_pixmap_directory (deadbeef->get_pixmap_dir ());
gdk_threads_init ();
gdk_threads_enter ();