Introduce Epplet_adjust_priority()
Avoiding some code duplication.
This commit is contained in:
parent
a128ce65ce
commit
83e1e71bee
10
api/epplet.c
10
api/epplet.c
|
@ -2,6 +2,7 @@
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -977,6 +978,15 @@ Epplet_cleanup(void)
|
||||||
Epplet_save_config();
|
Epplet_save_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Epplet_adjust_priority(int nice)
|
||||||
|
{
|
||||||
|
int prio;
|
||||||
|
|
||||||
|
prio = getpriority(PRIO_PROCESS, getpid());
|
||||||
|
setpriority(PRIO_PROCESS, getpid(), prio + nice);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Epplet_show(void)
|
Epplet_show(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,6 +91,9 @@ EAPI void Epplet_Init(const char *name, const char *version,
|
||||||
|
|
||||||
EAPI void Epplet_cleanup(void);
|
EAPI void Epplet_cleanup(void);
|
||||||
|
|
||||||
|
/* Adjust priority */
|
||||||
|
EAPI void Epplet_adjust_priority(int nice);
|
||||||
|
|
||||||
/* actualy display the app */
|
/* actualy display the app */
|
||||||
EAPI void Epplet_show(void);
|
EAPI void Epplet_show(void);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -266,10 +265,8 @@ parse_conf(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
Epplet_Init("E-Bandwidth", "0.2", "Enlightenment Network I/O Monitor Epplet",
|
Epplet_Init("E-Bandwidth", "0.2", "Enlightenment Network I/O Monitor Epplet",
|
||||||
3, 3, argc, argv, 0);
|
3, 3, argc, argv, 0);
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -425,10 +424,8 @@ process_conf(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
Epplet_Init("E-Biff", "0.5", "Enlightenment Mailbox Checker Epplet", 3, 3,
|
Epplet_Init("E-Biff", "0.5", "Enlightenment Mailbox Checker Epplet", 3, 3,
|
||||||
argc, argv, 0);
|
argc, argv, 0);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -421,10 +420,9 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Epplet_gadget p;
|
Epplet_gadget p;
|
||||||
int prio;
|
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
Epplet_adjust_priority(10);
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
cpus = count_cpus();
|
cpus = count_cpus();
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -245,10 +244,8 @@ parse_conf(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
Epplet_Init("E-Disk", "0.2", "Enlightenment Disk I/O Monitor Epplet", 3, 3,
|
Epplet_Init("E-Disk", "0.2", "Enlightenment Disk I/O Monitor Epplet", 3, 3,
|
||||||
argc, argv, 0);
|
argc, argv, 0);
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -249,7 +248,7 @@ out_cb(void *data __UNUSED__, Window w)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
/* check for Kernel 2.6 */
|
/* check for Kernel 2.6 */
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -274,8 +273,7 @@ main(int argc, char **argv)
|
||||||
/* end check for Kernel 2.6 */
|
/* end check for Kernel 2.6 */
|
||||||
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
Epplet_Init("E-MemWatch", "0.1", "Enlightenment RAM/Swap Monitor Epplet", 3,
|
Epplet_Init("E-MemWatch", "0.1", "Enlightenment RAM/Swap Monitor Epplet", 3,
|
||||||
3, argc, argv, 0);
|
3, argc, argv, 0);
|
||||||
Epplet_load_config();
|
Epplet_load_config();
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA
|
* Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
#include "CalcEphem.h"
|
#include "CalcEphem.h"
|
||||||
|
@ -101,11 +99,10 @@ out_cb(void *data __UNUSED__, Window w)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
Epplet_Init("E-MoonClock", "0.1", "Enlightenment MoonClock Epplet", 3, 3,
|
Epplet_Init("E-MoonClock", "0.1", "Enlightenment MoonClock Epplet", 3, 3,
|
||||||
argc, argv, 0);
|
argc, argv, 0);
|
||||||
Epplet_load_config();
|
Epplet_load_config();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -107,10 +106,9 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Epplet_gadget p1, p2;
|
Epplet_gadget p1, p2;
|
||||||
int prio;
|
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
Epplet_adjust_priority(10);
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
Epplet_Init("E-Net", "0.1", "Enlightenment Network Load Epplet",
|
Epplet_Init("E-Net", "0.1", "Enlightenment Network Load Epplet",
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -392,10 +391,9 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Epplet_gadget p;
|
Epplet_gadget p;
|
||||||
int prio;
|
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
Epplet_adjust_priority(10);
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
load_val = calloc(DIVISIONS, sizeof(int));
|
load_val = calloc(DIVISIONS, sizeof(int));
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Modified by Rahsheen Porter (StriderZ) */
|
* Modified by Rahsheen Porter (StriderZ) */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -402,10 +401,9 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Epplet_gadget drawingarea;
|
Epplet_gadget drawingarea;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
int prio;
|
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
Epplet_adjust_priority(10);
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
Epplet_Init("E-NetGraph", "0.2",
|
Epplet_Init("E-NetGraph", "0.2",
|
||||||
"Enlightenment Network Activity epplet", 3, 3, argc, argv, 0);
|
"Enlightenment Network Activity epplet", 3, 3, argc, argv, 0);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -372,18 +371,16 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
GLXContext cx;
|
GLXContext cx;
|
||||||
int prio;
|
|
||||||
Epplet_gadget objectPopup, lightingPopup, texturePopup;
|
Epplet_gadget objectPopup, lightingPopup, texturePopup;
|
||||||
FILE *textureFile;
|
FILE *textureFile;
|
||||||
|
|
||||||
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
/* This has to be an unsignned byte, otherwise you'll loose the 8th
|
/* This has to be an unsignned byte, otherwise you'll loose the 8th
|
||||||
* bit to the sign since the texture is 8 bits per color component. */
|
* bit to the sign since the texture is 8 bits per color component. */
|
||||||
GLubyte textureArray[3 * 64 * 64];
|
GLubyte textureArray[3 * 64 * 64];
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
Epplet_Init("E-OpenGL-Demo", "0.1", "Enlightenment OpenGL Demo",
|
Epplet_Init("E-OpenGL-Demo", "0.1", "Enlightenment OpenGL Demo",
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include <cdaudio.h>
|
#include <cdaudio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -524,7 +523,7 @@ main(int argc, char **argv)
|
||||||
"HELP", "REWIND", "FAST_FORWARD", "REPEAT", "CONFIGURE",
|
"HELP", "REWIND", "FAST_FORWARD", "REPEAT", "CONFIGURE",
|
||||||
"EJECT"
|
"EJECT"
|
||||||
};
|
};
|
||||||
int i, prio;
|
int i;
|
||||||
typedef void (*callback_func) (void *data);
|
typedef void (*callback_func) (void *data);
|
||||||
|
|
||||||
callback_func button_funcs[] = {
|
callback_func button_funcs[] = {
|
||||||
|
@ -532,9 +531,11 @@ main(int argc, char **argv)
|
||||||
popup_tracks, do_help, rew_cd, ff_cd, NULL, cddb_update,
|
popup_tracks, do_help, rew_cd, ff_cd, NULL, cddb_update,
|
||||||
eject_cd
|
eject_cd
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
Epplet_Init("E-PlayCD", "0.5",
|
Epplet_Init("E-PlayCD", "0.5",
|
||||||
"Enlightenment CD Player Epplet", 5, 3, argc, argv, 0);
|
"Enlightenment CD Player Epplet", 5, 3, argc, argv, 0);
|
||||||
Epplet_load_config();
|
Epplet_load_config();
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -544,10 +543,7 @@ clean_exit(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
|
|
||||||
atexit(clean_exit);
|
atexit(clean_exit);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* USA
|
* USA
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "cloak.h"
|
#include "cloak.h"
|
||||||
|
@ -614,10 +613,8 @@ clean_exit(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(clean_exit);
|
atexit(clean_exit);
|
||||||
/* Initialise random numbers */
|
/* Initialise random numbers */
|
||||||
srand(time(0));
|
srand(time(0));
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* USA
|
* USA
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -976,10 +975,7 @@ clean_exit(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
|
|
||||||
atexit(clean_exit);
|
atexit(clean_exit);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
*/
|
*/
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -691,11 +690,10 @@ get_images(char *image_path)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
int j = 0;
|
||||||
|
|
||||||
int prio, j = 0;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
srand(getpid() * time(NULL) % ((unsigned int)-1));
|
srand(getpid() * time(NULL) % ((unsigned int)-1));
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -124,12 +123,10 @@ out_cb(void *data __UNUSED__, Window w)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
Epplet_adjust_priority(10);
|
||||||
int prio;
|
|
||||||
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
Epplet_Init("E-Sys", "0.1", "Enlightenment Uptime Epplet", 3, 3, argc, argv,
|
Epplet_Init("E-Sys", "0.1", "Enlightenment Uptime Epplet", 3, 3, argc, argv,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* USA
|
* USA
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -836,12 +835,10 @@ work_out_cb(void *data __UNUSED__, Window w)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
/* Lower priority to save cpu cycles */
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
atexit(clean_exit);
|
atexit(clean_exit);
|
||||||
|
|
||||||
Epplet_Init("E-UrlWatch", "0.1",
|
Epplet_Init("E-UrlWatch", "0.1",
|
||||||
"Enlightenment Url Watcher Epplet", 6, 3, argc, argv, 0);
|
"Enlightenment Url Watcher Epplet", 6, 3, argc, argv, 0);
|
||||||
Epplet_load_config();
|
Epplet_load_config();
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
* and his E-CpuX Epplet.
|
* and his E-CpuX Epplet.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "epplet.h"
|
#include "epplet.h"
|
||||||
|
@ -225,11 +224,10 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
const char *ptr;
|
const char *ptr;
|
||||||
char s[64];
|
char s[64];
|
||||||
int priority;
|
|
||||||
Epplet_gadget p;
|
Epplet_gadget p;
|
||||||
|
|
||||||
priority = getpriority(PRIO_PROCESS, getpid());
|
Epplet_adjust_priority(10);
|
||||||
setpriority(PRIO_PROCESS, getpid(), priority + 10);
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
cpu_hist_size = WIDTH;
|
cpu_hist_size = WIDTH;
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -331,10 +330,7 @@ parse_config(void)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int prio;
|
Epplet_adjust_priority(10);
|
||||||
|
|
||||||
prio = getpriority(PRIO_PROCESS, getpid());
|
|
||||||
setpriority(PRIO_PROCESS, getpid(), prio + 10);
|
|
||||||
|
|
||||||
atexit(Epplet_cleanup);
|
atexit(Epplet_cleanup);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue