Apply patch from Álvaro Lopes to fix CPU usage per task, with more then 1 CPU.
Added a THANKS file. Remove some svn executable properties and add svn keywords. Added LINGUAS support and removed the configure.ac > configure.in.in file. Improved the configure.in.in and Makefiles. (Old svn revision: 2350)
This commit is contained in:
@@ -1,27 +1,33 @@
|
||||
@SET_MAKE@
|
||||
# $Id$
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-DG_LOG_DOMAIN=\"xfce4-taskmanager\" \
|
||||
-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
|
||||
|
||||
bin_PROGRAMS = xfce4-taskmanager
|
||||
bin_PROGRAMS = \
|
||||
xfce4-taskmanager
|
||||
|
||||
xfce4_taskmanager_SOURCES = \
|
||||
main.c \
|
||||
callbacks.c callbacks.h \
|
||||
functions.c functions.h \
|
||||
interface.c interface.h \
|
||||
xfce-taskmanager-linux.c xfce-taskmanager-linux.h \
|
||||
xfce4_taskmanager_SOURCES = \
|
||||
main.c \
|
||||
callbacks.c \
|
||||
callbacks.h \
|
||||
functions.c \
|
||||
functions.h \
|
||||
interface.c \
|
||||
interface.h \
|
||||
xfce-taskmanager-linux.c \
|
||||
xfce-taskmanager-linux.h \
|
||||
types.h
|
||||
|
||||
xfce4_taskmanager_CFLAGS = \
|
||||
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
|
||||
@XFCE4_GUI_CFLAGS@ \
|
||||
@GTK_CFLAGS@
|
||||
xfce4_taskmanager_CFLAGS = \
|
||||
$(LIBXFCEGUI4_CFLAGS) \
|
||||
$(LIBXFCE4UTIL_CFLAGS) \
|
||||
$(GTK_CFLAGS)
|
||||
|
||||
xfce4_taskmanager_LDADD = \
|
||||
@XFCE4_GUI_LIBS@ \
|
||||
@GTK_LIBS@
|
||||
xfce4_taskmanager_LDADD = \
|
||||
$(LIBXFCEGUI4_LIBS) \
|
||||
$(LIBXFCE4UTIL_LIBS) \
|
||||
$(GTK_LIBS)
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
dist-bz2: dist
|
||||
zcat $(PACKAGE)-$(VERSION).tar.gz | bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
|
||||
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "functions.h"
|
||||
@@ -29,8 +28,14 @@ gboolean refresh_task_list(void)
|
||||
GArray *new_task_list;
|
||||
gchar *cpu_tooltip, *mem_tooltip;
|
||||
gdouble cpu_usage;
|
||||
guint num_cpus;
|
||||
guint memory_used;
|
||||
|
||||
if (sys_stat!=NULL)
|
||||
num_cpus = sys_stat->cpu_count;
|
||||
else
|
||||
num_cpus = 1;
|
||||
|
||||
/* gets the new task list */
|
||||
new_task_list = (GArray*) get_task_list();
|
||||
|
||||
@@ -50,8 +55,7 @@ gboolean refresh_task_list(void)
|
||||
|
||||
tmp->time = new_tmp->time;
|
||||
|
||||
|
||||
tmp->time_percentage = (gdouble)(tmp->time - tmp->old_time) * (gdouble)(1000.0 / REFRESH_INTERVAL);
|
||||
tmp->time_percentage = (gdouble)(tmp->time - tmp->old_time) * (gdouble)(1000.0 / (REFRESH_INTERVAL*num_cpus));
|
||||
if((gint)tmp->ppid != (gint)new_tmp->ppid || strcmp(tmp->state,new_tmp->state) || (unsigned int)tmp->size != (unsigned int)new_tmp->size || (unsigned int)tmp->rss != (unsigned int)new_tmp->rss || (unsigned int)tmp->time != (unsigned int)tmp->old_time)
|
||||
{
|
||||
tmp->ppid = new_tmp->ppid;
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2005 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef FUNCTIONS_H
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef INTERFACE_H
|
||||
|
||||
27
src/main.c
27
src/main.c
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
||||
27
src/types.h
27
src/types.h
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* xfce4-taskmanager - very simple taskmanger
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef TYPES_H
|
||||
|
||||
18
src/xfce-taskmanager-linux.c
Executable file → Normal file
18
src/xfce-taskmanager-linux.c
Executable file → Normal file
@@ -1,3 +1,21 @@
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "xfce-taskmanager-linux.h"
|
||||
|
||||
|
||||
21
src/xfce-taskmanager-linux.h
Executable file → Normal file
21
src/xfce-taskmanager-linux.h
Executable file → Normal file
@@ -1,3 +1,22 @@
|
||||
/* $Id$
|
||||
*
|
||||
* Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINUX_H
|
||||
#define LINUX_H
|
||||
|
||||
@@ -12,7 +31,7 @@
|
||||
#include "types.h"
|
||||
|
||||
struct task get_task_details(gint pid);
|
||||
GArray *get_task_list(void);
|
||||
GArray *get_task_list(void);
|
||||
gboolean get_system_status(system_status *sys_stat);
|
||||
gboolean get_cpu_usage_from_proc(system_status *sys_stat);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user