Commit 291010f1 authored by David Bremner's avatar David Bremner

Importing trayer-1.1.4.tar.gz

parent 26410275
......@@ -19,7 +19,7 @@ endif
TARGET = trayer
$(TARGET): $(OBJ)
$(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
$(CC) $(LDFLAGS) $(OBJ) -o $@ $(LIBS)
ifeq (,$(DEVEL))
strip $@
endif
......
......@@ -15,18 +15,14 @@ endif
endif
endif
CC = gcc
CC ?= gcc
LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -lX11 -L/usr/X11R6/lib -lXmu
INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
CFLAGS = -O2 # overwriten by command line or env. variable
CFLAGS += -Wall # always nice to have
CFLAGS ?= -O2 -Wall
ifneq (,$(DEVEL))
CFLAGS := -g -Wall
CFLAGS ?= -g -Wall
endif
# -DGTK_DISABLE_DEPRECATED does not work yet
CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED
%.o: %.c
$(CC) $(CFLAGS) $(INCS) -c $<
......
......@@ -62,7 +62,7 @@ OPTIONS
and docked icons
--monitor - define the mointor on which you like
trayer to appear, number of zero to number
of monitors minus one
of monitors minus one, or the string "primary".
AUTHORS
Maciej Delmanowski <harnir@users.berlios.de>
......@@ -74,3 +74,6 @@ AUTHORS
Yury Akudovich - added new option distancefrom option
Jens Peter Secher <jps@debian.org> - various (debian trayer fork)
Daniel Ehlers - multi monitor support, code cleanup
Stu Black - help closing a problem with wrong values in _NET_WM_STRUT_PARTIAL
Michael Weber - fix build problems, improvements cmdline parameter handling
Johannes Bittner - primary switch for monitor selection
......@@ -16,7 +16,7 @@
#include "main.h"
#include "gdk-helper.h"
#define VERSION "1.1.1"
#define VERSION "1.1.4"
static gchar version[] = VERSION;
int distance=0, distancefrom=DISTANCEFROM_TOP;
......@@ -59,7 +59,7 @@ panel_del_wm_strut(panel *p)
static void
panel_set_wm_strut(panel *p)
{
unsigned int data[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
unsigned long data[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
int i = 4;
ENTER;
......@@ -280,7 +280,7 @@ panel_start_gui(panel *p)
p->box = p->my_box_new(FALSE, 1);
gtk_container_set_border_width(GTK_CONTAINER(p->box), 1);
gtk_box_pack_start(GTK_BOX(p->lbox), p->box, FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(p->lbox), p->box, FALSE, TRUE, padding);
gtk_widget_show(p->box);
// get properties on topgwin
......@@ -337,10 +337,13 @@ panel_parse_global(panel *p)
p->width = 100;
p->heighttype = HEIGHT_PIXEL;
if (p->heighttype == HEIGHT_PIXEL) {
if (p->height < PANEL_HEIGHT_MIN)
if (p->height < PANEL_HEIGHT_MIN) {
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MIN );
p->height = PANEL_HEIGHT_MIN;
else if (p->height > PANEL_HEIGHT_MAX)
} else if (p->height > PANEL_HEIGHT_MAX) {
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MAX );
p->height = PANEL_HEIGHT_MAX;
}
}
panel_start_gui(p);
RET(1);
......@@ -397,7 +400,7 @@ usage()
printf(" --distancefrom <number>\n");
printf(" --expand <false|true>\n");
printf(" --padding <number>\n");
printf(" --monitor <number> (default:0)\n");
printf(" --monitor <number|primary> (default:0)\n");
}
void
......@@ -598,7 +601,13 @@ main(int argc, char *argv[], char *env[])
usage();
exit(1);
} else {
p->monitor = atoi(argv[i]);
if (g_ascii_isdigit(argv[i][0])) {
p->monitor = atoi(argv[i]);
} else if (!strcmp(argv[i], "primary")) {
GdkDisplay *display = gdk_display_get_default ();
GdkScreen *screen = gdk_display_get_screen(display, 0);
p->monitor = gdk_screen_get_primary_monitor(screen);
}
}
} else {
printf("trayer: unknown option - %s\n", argv[i]);
......
......@@ -18,7 +18,7 @@ enum { POS_NONE, POS_START, POS_END };
#define PANEL_HEIGHT_DEFAULT 26
#define PANEL_HEIGHT_MAX 200
#define PANEL_HEIGHT_MIN 16
#define PANEL_HEIGHT_MIN 2
typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment