Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 305541 Details for
Bug 408313
app-admin/conky-1.8.1 - patch to add plot dot graph option
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Improved dot graph patch
conky-1.8.1-graph.patch (text/plain), 3.32 KB, created by
Alessandro Di Marco
on 2012-03-15 17:25:55 UTC
(
hide
)
Description:
Improved dot graph patch
Filename:
MIME Type:
Creator:
Alessandro Di Marco
Created:
2012-03-15 17:25:55 UTC
Size:
3.32 KB
patch
obsolete
>diff -urN old//src/conky.c new//src/conky.c >--- old//src/conky.c 2010-10-05 23:29:36.000000000 +0200 >+++ new//src/conky.c 2012-03-15 18:14:17.552776620 +0100 >@@ -3061,6 +3061,9 @@ > tmpcolour = do_gradient(w - 1, specials[special_index].last_colour, specials[special_index].first_colour); > } > colour_idx = 0; >+ >+ int og, g = -1; // dmr's here.. >+ > for (i = w - 2; i > -1; i--) { > if (specials[special_index].last_colour != 0 > || specials[special_index].first_colour != 0) { >@@ -3092,11 +3095,22 @@ > XSetForeground(display, window.gc, tmpcolour[colour_idx++]); > } > } >+ >+ og = g; >+ g = round_to_int((double)by + h - specials[special_index].graph[j] * >+ (h - 1) / specials[special_index].graph_scale); >+ >+ if (!~og) { >+ og = g; >+ } >+ > /* this is mugfugly, but it works */ > XDrawLine(display, window.drawable, window.gc, >- cur_x + i + 1, by + h, cur_x + i + 1, >- round_to_int((double)by + h - specials[special_index].graph[j] * >- (h - 1) / specials[special_index].graph_scale)); >+ cur_x + i + 1, >+ specials[special_index].dotgraph ? og : by + h, >+ cur_x + i + 1, >+ g); >+ > if ((w - i) / ((float) (w - 2) / > (specials[special_index].graph_width)) > j > && j < MAX_GRAPH_DEPTH - 3) { >@@ -6015,7 +6029,7 @@ > { > /* signal handler is light as a feather, as it should be. > * we will poll g_signal_pending with each loop of conky >- * and do any signal processing there, NOT here (except >+ * and do any signal processing there, NOT here (except > * SIGALRM because this is caused when conky is hanging) */ > if(sig == SIGALRM) { > alarm_handler(); >diff -urN old//src/specials.c new//src/specials.c >--- old//src/specials.c 2010-10-05 23:29:36.000000000 +0200 >+++ new//src/specials.c 2012-03-15 11:14:37.862144963 +0100 >@@ -67,7 +67,7 @@ > int width, height; > unsigned int first_colour, last_colour; > unsigned int scale, showaslog; >- char tempgrad; >+ char tempgrad, dotgraph; > }; > > struct stippled_hr { >@@ -160,11 +160,17 @@ > g->last_colour = 0; > g->scale = defscale; > g->tempgrad = FALSE; >+ g->dotgraph = FALSE; > g->showaslog = FALSE; > if (args) { > if (strstr(args, " "TEMPGRAD) || strncmp(args, TEMPGRAD, strlen(TEMPGRAD)) == 0) { > g->tempgrad = TRUE; > } >+ >+ if (strstr(args, " "DOTGRAPH) || strncmp(args, DOTGRAPH, strlen(DOTGRAPH)) == 0) { >+ g->dotgraph = TRUE; >+ } >+ > if (strstr(args, " "LOGGRAPH) || strncmp(args, LOGGRAPH, strlen(LOGGRAPH)) == 0) { > g->showaslog = TRUE; > } >@@ -390,6 +396,7 @@ > s->show_scale = 1; > } > s->tempgrad = g->tempgrad; >+ s->dotgraph = g->dotgraph; > /* if (s->width) { > s->graph_width = s->width - 2; // subtract 2 for rectangle around > } */ >diff -urN old//src/specials.h new//src/specials.h >--- old//src/specials.h 2010-10-05 23:29:36.000000000 +0200 >+++ new//src/specials.h 2012-03-15 11:19:36.873056808 +0100 >@@ -38,6 +38,7 @@ > // don't use spaces in LOGGRAPH or NORMGRAPH if you change them > #define LOGGRAPH "-l" > #define TEMPGRAD "-t" >+#define DOTGRAPH "-d" > > enum special_types { > NONSPECIAL = 0, >@@ -71,7 +72,7 @@ > unsigned long first_colour; // for graph gradient > unsigned long last_colour; > short font_added; >- char tempgrad; >+ char tempgrad, dotgraph; > }; > > /* direct access to the registered specials (FIXME: bad encapsulation) */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 408313
:
305471
|
305473
| 305541