Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 101541
Collapse All | Expand All

(-)gkfreq.c (-4 / +6 lines)
Lines 13-21 Link Here
13
#define	CONFIG_NAME	"gkfreq"
13
#define	CONFIG_NAME	"gkfreq"
14
#define	STYLE_NAME	"gkfreq"
14
#define	STYLE_NAME	"gkfreq"
15
15
16
16
static GkrellmMonitor	*monitor;
17
static GkrellmMonitor	*monitor;
17
static GkrellmPanel	*panel;
18
static GkrellmPanel	*panel;
18
static GkrellmDecal	*decal_text1;
19
static GkrellmDecal	*decal_text1;
20
static GkrellmTicks	*pGK;
19
static gint	style_id;
21
static gint	style_id;
20
22
21
23
Lines 68-85 Link Here
68
	x_scroll = (x_scroll + 1) % (2 * w);
70
	x_scroll = (x_scroll + 1) % (2 * w);
69
	
71
	
70
	// dont do it too much...
72
	// dont do it too much...
71
	if ((GK.timer_ticks % 10) != 0) return;
73
	if (pGK->second_tick) {
72
74
73
	read_MHz(info, 31);
75
	read_MHz(info, 31);
74
76
75
	decal_text1->x_off =
77
	decal_text1->x_off =
76
		(w - gdk_string_width(decal_text1->text_style.font,
78
		(w - gkrellm_gdk_string_width(decal_text1->text_style.font, info)) / 2;
77
		                      info)) / 2;
78
	if (decal_text1->x_off < 0)
79
	if (decal_text1->x_off < 0)
79
		decal_text1->x_off = 0;
80
		decal_text1->x_off = 0;
80
81
81
	gkrellm_draw_decal_text(panel, decal_text1, info, w - x_scroll);
82
	gkrellm_draw_decal_text(panel, decal_text1, info, w - x_scroll);
82
	gkrellm_draw_panel_layers(panel);
83
	gkrellm_draw_panel_layers(panel);
84
	}
83
}
85
}
84
86
85
87
Lines 135-141 Link Here
135
137
136
GkrellmMonitor *
138
GkrellmMonitor *
137
gkrellm_init_plugin() {
139
gkrellm_init_plugin() {
138
140
        pGK = gkrellm_ticks();
139
	style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME);
141
	style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME);
140
	monitor = &plugin_mon;
142
	monitor = &plugin_mon;
141
	return &plugin_mon;
143
	return &plugin_mon;

Return to bug 101541