Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 408313 | Differences between
and this patch

Collapse All | Expand All

(-)old//src/conky.c (-4 / +18 lines)
Lines 3061-3066 Link Here
3061
						tmpcolour = do_gradient(w - 1, specials[special_index].last_colour, specials[special_index].first_colour);
3061
						tmpcolour = do_gradient(w - 1, specials[special_index].last_colour, specials[special_index].first_colour);
3062
					}
3062
					}
3063
					colour_idx = 0;
3063
					colour_idx = 0;
3064
3065
					int og, g = -1; // dmr's here..
3066
3064
					for (i = w - 2; i > -1; i--) {
3067
					for (i = w - 2; i > -1; i--) {
3065
						if (specials[special_index].last_colour != 0
3068
						if (specials[special_index].last_colour != 0
3066
								|| specials[special_index].first_colour != 0) {
3069
								|| specials[special_index].first_colour != 0) {
Lines 3092-3102 Link Here
3092
								XSetForeground(display, window.gc, tmpcolour[colour_idx++]);
3095
								XSetForeground(display, window.gc, tmpcolour[colour_idx++]);
3093
							}
3096
							}
3094
						}
3097
						}
3098
3099
						og = g;
3100
						g = round_to_int((double)by + h - specials[special_index].graph[j] *
3101
										 (h - 1) / specials[special_index].graph_scale);
3102
3103
						if (!~og) {
3104
							og = g;
3105
						}
3106
3095
						/* this is mugfugly, but it works */
3107
						/* this is mugfugly, but it works */
3096
						XDrawLine(display, window.drawable, window.gc,
3108
						XDrawLine(display, window.drawable, window.gc,
3097
								cur_x + i + 1, by + h, cur_x + i + 1,
3109
								  cur_x + i + 1,
3098
								round_to_int((double)by + h - specials[special_index].graph[j] *
3110
								  specials[special_index].dotgraph ? og : by + h,
3099
									(h - 1) / specials[special_index].graph_scale));
3111
								  cur_x + i + 1,
3112
								  g);
3113
3100
						if ((w - i) / ((float) (w - 2) /
3114
						if ((w - i) / ((float) (w - 2) /
3101
									(specials[special_index].graph_width)) > j
3115
									(specials[special_index].graph_width)) > j
3102
								&& j < MAX_GRAPH_DEPTH - 3) {
3116
								&& j < MAX_GRAPH_DEPTH - 3) {
Lines 6015-6021 Link Here
6015
{
6029
{
6016
	/* signal handler is light as a feather, as it should be.
6030
	/* signal handler is light as a feather, as it should be.
6017
	 * we will poll g_signal_pending with each loop of conky
6031
	 * we will poll g_signal_pending with each loop of conky
6018
	 * and do any signal processing there, NOT here (except 
6032
	 * and do any signal processing there, NOT here (except
6019
	 * SIGALRM because this is caused when conky is hanging) */
6033
	 * SIGALRM because this is caused when conky is hanging) */
6020
	if(sig == SIGALRM) {
6034
	if(sig == SIGALRM) {
6021
		alarm_handler();
6035
		alarm_handler();
(-)old//src/specials.c (-1 / +8 lines)
Lines 67-73 Link Here
67
	int width, height;
67
	int width, height;
68
	unsigned int first_colour, last_colour;
68
	unsigned int first_colour, last_colour;
69
	unsigned int scale, showaslog;
69
	unsigned int scale, showaslog;
70
	char tempgrad;
70
	char tempgrad, dotgraph;
71
};
71
};
72
72
73
struct stippled_hr {
73
struct stippled_hr {
Lines 160-170 Link Here
160
	g->last_colour = 0;
160
	g->last_colour = 0;
161
	g->scale = defscale;
161
	g->scale = defscale;
162
	g->tempgrad = FALSE;
162
	g->tempgrad = FALSE;
163
	g->dotgraph = FALSE;
163
	g->showaslog = FALSE;
164
	g->showaslog = FALSE;
164
	if (args) {
165
	if (args) {
165
		if (strstr(args, " "TEMPGRAD) || strncmp(args, TEMPGRAD, strlen(TEMPGRAD)) == 0) {
166
		if (strstr(args, " "TEMPGRAD) || strncmp(args, TEMPGRAD, strlen(TEMPGRAD)) == 0) {
166
			g->tempgrad = TRUE;
167
			g->tempgrad = TRUE;
167
		}
168
		}
169
170
		if (strstr(args, " "DOTGRAPH) || strncmp(args, DOTGRAPH, strlen(DOTGRAPH)) == 0) {
171
			g->dotgraph = TRUE;
172
		}
173
168
		if (strstr(args, " "LOGGRAPH) || strncmp(args, LOGGRAPH, strlen(LOGGRAPH)) == 0) {
174
		if (strstr(args, " "LOGGRAPH) || strncmp(args, LOGGRAPH, strlen(LOGGRAPH)) == 0) {
169
			g->showaslog = TRUE;
175
			g->showaslog = TRUE;
170
		}
176
		}
Lines 390-395 Link Here
390
		s->show_scale = 1;
396
		s->show_scale = 1;
391
	}
397
	}
392
	s->tempgrad = g->tempgrad;
398
	s->tempgrad = g->tempgrad;
399
	s->dotgraph = g->dotgraph;
393
	/* if (s->width) {
400
	/* if (s->width) {
394
		s->graph_width = s->width - 2;	// subtract 2 for rectangle around
401
		s->graph_width = s->width - 2;	// subtract 2 for rectangle around
395
	} */
402
	} */
(-)old//src/specials.h (-1 / +2 lines)
Lines 38-43 Link Here
38
// don't use spaces in LOGGRAPH or NORMGRAPH if you change them
38
// don't use spaces in LOGGRAPH or NORMGRAPH if you change them
39
#define LOGGRAPH "-l"
39
#define LOGGRAPH "-l"
40
#define TEMPGRAD "-t"
40
#define TEMPGRAD "-t"
41
#define DOTGRAPH "-d"
41
42
42
enum special_types {
43
enum special_types {
43
	NONSPECIAL = 0,
44
	NONSPECIAL = 0,
Lines 71-77 Link Here
71
	unsigned long first_colour;	// for graph gradient
72
	unsigned long first_colour;	// for graph gradient
72
	unsigned long last_colour;
73
	unsigned long last_colour;
73
	short font_added;
74
	short font_added;
74
	char tempgrad;
75
	char tempgrad, dotgraph;
75
};
76
};
76
77
77
/* direct access to the registered specials (FIXME: bad encapsulation) */
78
/* direct access to the registered specials (FIXME: bad encapsulation) */

Return to bug 408313