wmauda: Pixmap folder set as argument
The PIXMAP_DIR is set in the Makefile folder, using the prefix argument.
This commit is contained in:
		
							parent
							
								
									eea379d833
								
							
						
					
					
						commit
						eff65410df
					
				
					 3 changed files with 13 additions and 11 deletions
				
			
		| 
						 | 
					@ -1,20 +1,18 @@
 | 
				
			||||||
CC	?= gcc
 | 
					CC	?= gcc
 | 
				
			||||||
CFLAGS	?= -g -pipe
 | 
					CFLAGS	?= -g -pipe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PREFIX	?= /usr
 | 
					PREFIX	?= /usr/local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTALL_DIR	:= $(PREFIX)/bin
 | 
					INSTALL_DIR	:= $(PREFIX)/bin
 | 
				
			||||||
PIXMAP_DIR	:= $(PREFIX)/share/pixmaps
 | 
					PIXMAP_DIR	:= $(PREFIX)/share/pixmaps
 | 
				
			||||||
MANPAGE_DIR	:= $(PREFIX)/share/man/man1
 | 
					MANPAGE_DIR	:= $(PREFIX)/share/man/man1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CFLAGS 	+= $(shell pkg-config audacious --cflags) $(shell pkg-config dbus-1 --cflags)
 | 
					CFLAGS 	+= $(shell pkg-config audclient --cflags) $(shell pkg-config dbus-glib-1 --cflags) $(shell pkg-config gtk+-2.0 --cflags) -DPIXMAP_DIR="\"$(PIXMAP_DIR)\""
 | 
				
			||||||
LIBS 	:= $(shell pkg-config audacious --libs) $(shell pkg-config audclient --libs)  $(shell pkg-config dbus-1 --libs)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
CFLAGS  += $(shell pkg-config gtk+-2.0 --cflags)
 | 
					LIBS 	:= $(shell pkg-config audclient --libs) $(shell pkg-config dbus-glib-1 --libs) $(shell pkg-config gtk+-2.0 --libs) -lX11
 | 
				
			||||||
LIBS    += $(shell pkg-config gtk+-2.0 --libs) -lX11
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
OBJS 	= wmauda.o
 | 
					OBJS 	= wmauda.o
 | 
				
			||||||
HEADERS = config.h dock-master.xpm
 | 
					HEADERS = dock-master.xpm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wmauda:	$(OBJS) $(HEADERS)
 | 
					wmauda:	$(OBJS) $(HEADERS)
 | 
				
			||||||
	$(CC) -o wmauda $(OBJS) $(CFLAGS) $(LIBS)
 | 
						$(CC) -o wmauda $(OBJS) $(CFLAGS) $(LIBS)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +0,0 @@
 | 
				
			||||||
#define DATA_DIR "/usr/share/pixmaps"
 | 
					 | 
				
			||||||
#define VERSION "0.6"
 | 
					 | 
				
			||||||
| 
						 | 
					@ -29,12 +29,18 @@
 | 
				
			||||||
#include <audacious/dbus.h>
 | 
					#include <audacious/dbus.h>
 | 
				
			||||||
#include <audacious/audctrl.h>
 | 
					#include <audacious/audctrl.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "config.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "dock-master.xpm"
 | 
					#include "dock-master.xpm"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <getopt.h>
 | 
					#include <getopt.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef VERSION
 | 
				
			||||||
 | 
					# define VERSION 0.8
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef PIXMAP_DIR
 | 
				
			||||||
 | 
					# define PIXMAP_DIR "/usr/local/share/pixmaps"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct
 | 
					typedef struct
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int x, y, width, height, pressed_x, pressed_y, normal_x, normal_y;
 | 
						int x, y, width, height, pressed_x, pressed_y, normal_x, normal_y;
 | 
				
			||||||
| 
						 | 
					@ -731,7 +737,7 @@ void init(void)
 | 
				
			||||||
	gdk_draw_rectangle(launch_mask, mask_gc, TRUE, 0, 0, -1, -1);
 | 
						gdk_draw_rectangle(launch_mask, mask_gc, TRUE, 0, 0, -1, -1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!icon_name)
 | 
						if (!icon_name)
 | 
				
			||||||
		icon_name = g_strdup_printf("%s/wmauda.xpm", DATA_DIR);
 | 
							icon_name = g_strdup_printf("%s/wmauda.xpm", PIXMAP_DIR);
 | 
				
			||||||
	pixmap = gdk_pixmap_create_from_xpm(icon_win->window, &mask,
 | 
						pixmap = gdk_pixmap_create_from_xpm(icon_win->window, &mask,
 | 
				
			||||||
					    NULL, icon_name);
 | 
										    NULL, icon_name);
 | 
				
			||||||
	if (!pixmap)
 | 
						if (!pixmap)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue