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 / +10 lines)
Lines 3092-3102 Link Here
3092
								XSetForeground(display, window.gc, tmpcolour[colour_idx++]);
3092
								XSetForeground(display, window.gc, tmpcolour[colour_idx++]);
3093
							}
3093
							}
3094
						}
3094
						}
3095
3096
						int g = round_to_int((double)by + h - specials[special_index].graph[j] *
3097
											 (h - 1) / specials[special_index].graph_scale);
3098
3095
						/* this is mugfugly, but it works */
3099
						/* this is mugfugly, but it works */
3096
						XDrawLine(display, window.drawable, window.gc,
3100
						XDrawLine(display, window.drawable, window.gc,
3097
								cur_x + i + 1, by + h, cur_x + i + 1,
3101
								  cur_x + i + 1,
3098
								round_to_int((double)by + h - specials[special_index].graph[j] *
3102
								  specials[special_index].dotgraph ? g : by + h,
3099
									(h - 1) / specials[special_index].graph_scale));
3103
								  cur_x + i + 1,
3104
								  g);
3105
3100
						if ((w - i) / ((float) (w - 2) /
3106
						if ((w - i) / ((float) (w - 2) /
3101
									(specials[special_index].graph_width)) > j
3107
									(specials[special_index].graph_width)) > j
3102
								&& j < MAX_GRAPH_DEPTH - 3) {
3108
								&& j < MAX_GRAPH_DEPTH - 3) {
Lines 6015-6021 Link Here
6015
{
6021
{
6016
	/* signal handler is light as a feather, as it should be.
6022
	/* signal handler is light as a feather, as it should be.
6017
	 * we will poll g_signal_pending with each loop of conky
6023
	 * we will poll g_signal_pending with each loop of conky
6018
	 * and do any signal processing there, NOT here (except 
6024
	 * and do any signal processing there, NOT here (except
6019
	 * SIGALRM because this is caused when conky is hanging) */
6025
	 * SIGALRM because this is caused when conky is hanging) */
6020
	if(sig == SIGALRM) {
6026
	if(sig == SIGALRM) {
6021
		alarm_handler();
6027
		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